Wait-AzureHDInsightJob
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Wait-AzureHDInsightJob
Awaits the completion or failure of the HDInsight job and shows its progress.
Syntax
Parameter Set: Get jobDetails History of a HDInsight Cluster
Wait-AzureHDInsightJob [[-Credential] <PSCredential> ] [-WaitTimeoutInSeconds <Double> ] [ <CommonParameters>]
Parameter Set: Get jobDetails History of a HDInsight Cluster (with Specific Subscription Credential)
Wait-AzureHDInsightJob [-Subscription] <String> -Job <AzureHDInsightJob> [-Certificate <X509Certificate2> ] [-Endpoint <Uri> ] [-HostedService <String> ] [-WaitTimeoutInSeconds <Double> ] [ <CommonParameters>]
Parameter Set: Wait Job with Job on an HDInsight Cluster
Wait-AzureHDInsightJob -Job <AzureHDInsightJob> [-Credential <PSCredential> ] [-WaitTimeoutInSeconds <Double> ] [ <CommonParameters>]
Parameter Set: Wait Job with JobId on an HDInsight Cluster
Wait-AzureHDInsightJob -Cluster <String> -JobId <String> [-Credential <PSCredential> ] [-WaitTimeoutInSeconds <Double> ] [ <CommonParameters>]
Detailed Description
Awaits the completion or failure of the HDInsight job and shows its progress.
This topic describes the cmdlet in the 0.8.1 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version.
Parameters
-Certificate<X509Certificate2>
Management certificate of the Azure subscription.
Aliases |
Cert |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Cluster<String>
The cluster running the job.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName, ByValue) |
Accept Wildcard Characters? |
false |
-Credential<PSCredential>
Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster.
Aliases |
Cred |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Endpoint<Uri>
Specifies the endpoint to use when connecting to Windows Azure if the endpoint is different from the default.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-HostedService<String>
The namespace of the Azure HDInsight Service if it is different from the default.
Aliases |
CloudServiceName |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Job<AzureHDInsightJob>
The HDInsight job running for which the script awaits.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-JobId<String>
The Id of the job running.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName, ByValue) |
Accept Wildcard Characters? |
false |
-Subscription<String>
The subscription that contains the HDInsight clusters to use
Aliases |
Sub |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WaitTimeoutInSeconds<Double>
Timeout (in seconds) for the wait operation. When timeout expires the cmdlet finishes execution.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Wait for job completion
Await the completion or failure of the HDInsight job for a specified interval of time.
PS C:\> $subid = (Get-AzureSubscription –Current).SubscriptionId$clustername = “yourcluster”$wordCountJob = New-AzureHDInsightMapReduceJobDefinition -JarFile "/example/apps/hadoop-examples.jar" -ClassName "wordcount" ` -Defines @{ "mapred.map.tasks"="3" } -Arguments "/example/data/gutenberg/davinci.txt", "/example/output/WordCount"$wordCountJob ` | Start-AzureHDInsightJob -Subscription $subid -Cluster $clustername ` | Wait-AzureHDInsightJob -WaitTimeoutInSeconds 3600 ` | Get-AzureHDInsightJobOutput -Cluster $clustername -Subscription $subid -StandardError