Database Reference
In-Depth Information
$wordCountJob = Start-AzureHDInsightJob -Cluster $cluster -JobDefinition $mapReduceJobDefinition
-Credential $myCreds
# Wait for the job to complete
Wait-AzureHDInsightJob -Job $wordCountJob -WaitTimeoutInSeconds 3600 -Credential $myCreds
# Get the job standard error output
Get-AzureHDInsightJobOutput -Cluster $cluster -JobId $wordCountJob.JobId -StandardError
-Subscription $subscription
# Get the blob content
Get-AzureStorageBlobContent -Container $Container -Blob example/data/WordCountOutputPS /part-r-00000
-Context $storageContext -Force
# List the content of the output file
cat ./example/data/WordCountOutputPS/part-r-00000 | findstr "human"
because the output would be a huge number of words and their counts, we would display only the words that
have the string human in it.
Note
As you continue to develop your script-based framework for job submissions, it becomes increasingly difficult
to manage it without a standard editor. The Windows Azure PowerShell kit provides you with a development
environment called Windows PowerShell ISE , which makes it easy to write, execute, and debug PowerShell scripts.
Figure 5-6 shows you a glimpse of PowerShell ISE. It has built-in IntelliSense and autocomplete features for your
variable or method names that comes into play as you type in your code. It also implements a standard coloring
mechanism that helps you visually distinguish between the different PowerShell object types.
 
 
Search WWH ::




Custom Search