Get-AzureHDInsightJobOutput

Gets the log output for a job.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Get-AzureHDInsightJobOutput
   [-Certificate <X509Certificate2>]
   [-HostedService <String>]
   -Cluster <String>
   [-DownloadTaskLogs]
   [-Endpoint <Uri>]
   [-IgnoreSslErrors <Boolean>]
   -JobId <String>
   [-StandardError]
   [-StandardOutput]
   [-Subscription <String>]
   [-TaskLogsDirectory <String>]
   [-TaskSummary]
   [-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. For information about how to submit jobs by using Azure PowerShell and other approaches, see Submit Hadoop jobs in HDInsight. For reference information about Azure PowerShell HDInsight, see Azure HDInsight Cmdlets.

The Get-AzureHDInsightJobOutput cmdlet gets the log output for a job from the storage account associated with a cluster. You can get various types of job logs including standard output, standard error, task logs, and a summary of the task logs.

Examples

Example 1: Get job output

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" $WordCountJob
    | Start-AzureHDInsightJob -Subscription $SubId -Cluster $ClusterName
    | Wait-AzureHDInsightJob -Subscription $SubId -WaitTimeoutInSeconds 3600
    | Get-AzureHDInsightJobOutput -Cluster $ClusterName -StandardError

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

The second command stores the name MyCluster in the $Clustername variable.

The third command creates a MapReduce job definition, and then stores it in the $WordCountJob variable. The command passes the job in $WordCountJob to the Start-AzureHDInsightJob cmdlet to start the job. It also passes $WordCountJob to the Wait-AzureHDInsightJob cmdlet to wait for the job to finish, and then it uses Get-AzureHDInsightJobOutput to get the job output.

Parameters

-Certificate

Specifies the management certificate for an Azure subscription.

Type:X509Certificate2
Aliases:Cert
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Cluster

Specifies a cluster. This cmdlet gets job logs from the cluster that this parameter specifies.

Type:String
Aliases:ClusterName
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DownloadTaskLogs

Indicates that this cmdlet gets the task logs for a job.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HostedService

Specifies the namespace of an HDInsight service if you do not want to use the default namespace.

Type:String
Aliases:CloudServiceName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IgnoreSslErrors

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

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

-JobId

Specifies the ID of the job to get.

Type:String
Aliases:Id
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StandardError

Indicates that this cmdlet gets the StdErr output of a job.

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

-StandardOutput

Indicates that this cmdlet gets the SdtOut output of a job.

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

-Subscription

Specifies the subscription that contains the HDInsight cluster to get.

Type:String
Aliases:Sub
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TaskLogsDirectory

Specifies a local folder in which to store tasks logs.

Type:String
Aliases:LogsDir
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TaskSummary

Indicates that this cmdlets gets the task log summary.

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