< Back

Get-AzureRmHDInsightJob

Tue Jan 29, 2019 9:47 pm

NAME Get-AzureRmHDInsightJob



SYNOPSIS

Gets the list of jobs from a cluster and lists them in reverse chronological order, or retrieves a specific job.





SYNTAX

Get-AzureRmHDInsightJob [-ClusterName] <String> [-HttpCredential] <PSCredential> [[-JobId] <String>] [-DefaultProfile <IAzureContextContainer>]

[-NumOfJobs <Int32>] [-ResourceGroupName <String>] [<CommonParameters>]





DESCRIPTION

The Get-AzureRmHDInsightJob cmdlet gets recent jobs for a specified Azure HDInsight cluster in reverse chronological order, with the most recent

job at the top of the list. Get a specific job by providing the JobId parameter.





PARAMETERS

-ClusterName <String>

Specifies the name of the cluster.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-HttpCredential <PSCredential>

Specifies the cluster login (HTTP) credentials for the cluster.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-JobId <String>

Specifies the job ID of the job to get.



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NumOfJobs <Int32>

Specifies the number of jobs to retrieve.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the resource group.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightJob







NOTES









Example 1: Get recent jobs for a specified Azure HDInsight cluster



PS C:\\># Cluster info

PS C:\\> $clusterName = "your-hadoop-001"

PS C:\\> $clusterCreds = Get-Credential



# Hive job details

PS C:\\> $statusFolder = "tempStatusFolder/"

PS C:\\> $query = "SHOW TABLES"



PS C:\\> New-AzureRmHDInsightHiveJobDefinition -StatusFolder $statusFolder `

-Query $query `

| Start-AzureRmHDInsightJob -ClusterName $clusterName `

-ClusterCredential $clusterCreds `

| Get-AzureRmHDInsightJob -ClusterName $clusterName `

-ClusterCredential $clusterCreds



This command gets all recent jobs for the cluster named your-hadoop-001.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... insightjob

New-AzureRmHDInsightHiveJobDefinition

Start-AzureRmHDInsightJob

Stop-AzureRmHDInsightJob

Wait-AzureRmHDInsightJob