Skip to content

Latest commit

 

History

History
270 lines (207 loc) · 8.49 KB

Wait-AzureHDInsightJob.md

File metadata and controls

270 lines (207 loc) · 8.49 KB
external help file ms.assetid online version schema
Microsoft.WindowsAzure.Commands.HDInsight.dll-Help.xml
2EA36090-1A45-4F77-9222-9C0E9C07656C
2.0.0

Wait-AzureHDInsightJob

SYNOPSIS

Awaits the completion or failure of an HDInsight job and displays the progress of the job.

[!INCLUDE rdfe-banner]

SYNTAX

Get jobDetails History of a HDInsight Cluster (Default)

Wait-AzureHDInsightJob [-Credential <PSCredential>] [-WaitTimeoutInSeconds <Double>]
 [-Profile <AzureSMProfile>] [<CommonParameters>]

Get jobDetails History of a HDInsight Cluster (with Specific Subscription Credential)

Wait-AzureHDInsightJob [-Certificate <X509Certificate2>] [-HostedService <String>] [-Endpoint <Uri>]
 [-IgnoreSslErrors <Boolean>] -Job <AzureHDInsightJob> -Subscription <String> [-WaitTimeoutInSeconds <Double>]
 [-Profile <AzureSMProfile>] [<CommonParameters>]

Wait Job with JobId on an HDInsight Cluster

Wait-AzureHDInsightJob -Cluster <String> [-Credential <PSCredential>] -JobId <String>
 [-WaitTimeoutInSeconds <Double>] [-Profile <AzureSMProfile>] [<CommonParameters>]

Wait Job with Job on an HDInsight Cluster

Wait-AzureHDInsightJob [-Credential <PSCredential>] -Job <AzureHDInsightJob> [-WaitTimeoutInSeconds <Double>]
 [-Profile <AzureSMProfile>] [<CommonParameters>]

DESCRIPTION

This version of Azure PowerShell HDInsight is deprecated. These cmdlets will be removed by January 1, 2017. Please use the newer version of Azure PowerShell HDInsight.

For information about how to use the new HDInsight to create a cluster, see Create Linux-based clusters in HDInsight using Azure PowerShell (https://azure.microsoft.com/en-us/documentation/articles/hdinsight-hadoop-create-linux-clusters-azure-powershell/). For information about how to submit jobs by using Azure PowerShell and other approaches, see Submit Hadoop jobs in HDInsight (https://azure.microsoft.com/en-us/documentation/articles/hdinsight-submit-hadoop-jobs-programmatically/). For reference information about Azure PowerShell HDInsight, see Azure HDInsight Cmdlets.

The Wait-AzureHDInsightJob cmdlet awaits the completion or failure of an Azure HDInsight job and displays the progress of the job.

EXAMPLES

Example 1: Run a job and wait for it to complete

PS C:\>$SubId = (Get-AzureSubscription -Current).SubscriptionId
PS C:>\ $ClusterName = "MyCluster"
PS C:>\ $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"
PS C:>\ $WordCountJob | Start-AzureHDInsightJob -Subscription $SubId -Cluster $ClusterName
    | Wait-AzureHDInsightJob -Subscription $SubId -WaitTimeoutInSeconds 3600
    | Get-AzureHDInsightJobOutput -Cluster $ClusterName -Subscription $SubId -StandardError

The first command gets the current Azure subscription ID, and then stores it in the $SubId variable.

The second command gets the specified cluster, and then stores it in the $ClusterName variable.

The third command uses the New-AzureHDInsightMapReduceJobDefinition cmdlet to create a MapReduce job definition, and then stores it in the $WordCountJob variable.

The fourth command uses several cmdlets in sequence:

  • It uses the pipeline operator to pass $WordCountJob to the Start-AzureHDInsightJob cmdlet to start the job.
  • The job is passed to the Wait-AzureHDInsightJob cmdlet to wait 3600 seconds for the job to complete.
  • If the job completes, the command uses the Get-AzureHDInsightJobOutput cmdlet to get the job output.

PARAMETERS

-Certificate

Specifies the management certificate for an Azure subscription.

Type: X509Certificate2
Parameter Sets: Get jobDetails History of a HDInsight Cluster (with Specific Subscription Credential)
Aliases: Cert

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Cluster

Specifies a cluster. This cmdlet waits for a job on the cluster that this parameter specifies.

Type: String
Parameter Sets: Wait Job with JobId on an HDInsight Cluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Credential

Specifies the credentials to use for direct HTTP access to a cluster. You can specify this parameter instead of the Subscription parameter to authenticate access to a cluster.

Type: PSCredential
Parameter Sets: Get jobDetails History of a HDInsight Cluster, Wait Job with JobId on an HDInsight Cluster, Wait Job with Job on an HDInsight Cluster
Aliases: Cred

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Endpoint

Specifies the endpoint to use to connect to Azure. If you do not specify this parameter, this cmdlet uses the default endpoint.

Type: Uri
Parameter Sets: Get jobDetails History of a HDInsight Cluster (with Specific Subscription Credential)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostedService

Specifies the namespace of an HDInsight service. If you do not specify this parameter, the default namespace is used.

Type: String
Parameter Sets: Get jobDetails History of a HDInsight Cluster (with Specific Subscription Credential)
Aliases: CloudServiceName

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreSslErrors

Indicates whether Secure Sockets Layer (SSL) errors are ignored.

Type: Boolean
Parameter Sets: Get jobDetails History of a HDInsight Cluster (with Specific Subscription Credential)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Job

Specifies an Azure HDInsight job.

Type: AzureHDInsightJob
Parameter Sets: Get jobDetails History of a HDInsight Cluster (with Specific Subscription Credential), Wait Job with Job on an HDInsight Cluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-JobId

Specifies the ID of the job to wait for.

Type: String
Parameter Sets: Wait Job with JobId on an HDInsight Cluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type: AzureSMProfile
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subscription

Specifies a subscription. This cmdlet waits for a job for the subscription that this parameter specifies.

Type: String
Parameter Sets: Get jobDetails History of a HDInsight Cluster (with Specific Subscription Credential)
Aliases: Sub

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WaitTimeoutInSeconds

Specifies the time-out, in seconds, for the wait operation. If the time-out expires before the job completes, the cmdlet ceases to run.

Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Get-AzureHDInsightJob

Get-AzureHDInsightJobOutput

Start-AzureHDInsightJob

Stop-AzureHDInsightJob