Edit

Share via


Start-AzHDInsightJob

Starts a defined Azure HDInsight job on a specified cluster.

Syntax

Default (Default)

Start-AzHDInsightJob
    [-ClusterName] <String>
    [-JobDefinition] <AzureHDInsightJobDefinition>
    [-HttpCredential] <PSCredential>
    [-ResourceGroupName <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Start-AzHDInsightJob cmdlet starts a defined Azure HDInsight job on a specified cluster. This can be a MapReduce job, a Streaming MapReduce job, a Hive job, or a Pig job.

Examples

Example 1: Start a job on the specified cluster

# Cluster info
$clusterName = "your-hadoop-001"
$clusterCreds = Get-Credential

# Hive job details
$statusFolder = "tempStatusFolder/"
$query = "SHOW TABLES"

New-AzHDInsightHiveJobDefinition -StatusFolder $statusFolder `
            -Query $query `
        | Start-AzHDInsightJob `
            -ClusterName $clusterName `
            -ClusterCredential $clusterCreds

This command starts a job on the cluster named your-hadoop-001.

Parameters

-ClusterName

Specifies the name of the cluster.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HttpCredential

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

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ClusterCredential

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobDefinition

Specifies the job to start on the Azure HDInsight cluster.

Parameter properties

Type:AzureHDInsightJobDefinition
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

Specifies the name of the resource group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

AzureHDInsightJobDefinition

Outputs

AzureHDInsightJob