共用方式為


New-AzHDInsightStreamingMapReduceJobDefinition

建立串流 MapReduce 作業物件。

語法

New-AzHDInsightStreamingMapReduceJobDefinition
   [-Arguments <String[]>]
   [-File <String>]
   [-Files <String[]>]
   [-StatusFolder <String>]
   [-CommandEnvironment <Hashtable>]
   [-Defines <Hashtable>]
   -InputPath <String>
   [-Mapper <String>]
   [-OutputPath <String>]
   [-Reducer <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

New-AzHDInsightStreamingMapReduceJobDefinition Cmdlet 會定義串流 MapReduce 工作物件,以搭配 Azure HDInsight 叢集使用。

範例

範例 1:建立串流 MapReduce 作業定義

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

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

New-AzHDInsightStreamingMapReduceJobDefinition -StatusFolder $statusFolder -File $query `
        | Start-AzHDInsightJob `
            -ClusterName $clusterName `
            -ClusterCredential $clusterCreds

此命令會建立串流 MapReduce 作業定義。

參數

-Arguments

指定作業的自變數陣列。 自變數會以命令行自變數的形式傳遞至每個工作。

類型:String[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-CommandEnvironment

指定要在背景工作節點上執行作業時設定的命令行環境變數數位。

類型:Hashtable
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Defines

指定要在作業執行時設定的Hadoop組態值。

類型:Hashtable
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-File

指定要執行之查詢的檔案路徑。 您可以使用此參數,而不是 Query 參數。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Files

指定與Hive作業相關聯的檔案集合。

類型:String[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputPath

指定輸入檔案的路徑。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Mapper

指定 Mapper 檔名。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-OutputPath

指定作業輸出的路徑。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Reducer

指定歸納器檔名。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-StatusFolder

指定資料夾的位置,其中包含作業的標準輸出和錯誤輸出。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

None

輸出

AzureHDInsightStreamingMapReduceJobDefinition