Start-AzHDInsightJob
在指定的叢集上啟動已定義的 Azure HDInsight 作業。
語法
Start-AzHDInsightJob
[-ClusterName] <String>
[-JobDefinition] <AzureHDInsightJobDefinition>
[-HttpCredential] <PSCredential>
[-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Start-AzHDInsightJob Cmdlet 會在指定的叢集上啟動已定義的 Azure HDInsight 作業。 這可以是 MapReduce 作業、串流 MapReduce 作業、Hive 作業或 Pig 作業。
範例
範例 1:在指定的叢集上啟動作業
# 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
此命令會在名為your-hadoop-001的叢集上啟動作業。
參數
-ClusterName
指定叢集的名稱。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-HttpCredential
指定叢集的叢集登入 (HTTP) 認證。
類型: | PSCredential |
別名: | ClusterCredential |
Position: | 2 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-JobDefinition
指定要在 Azure HDInsight 叢集上啟動的工作。
類型: | AzureHDInsightJobDefinition |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ResourceGroupName
指定資源群組的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |