HDInsight powershell作业提交无法使用流式C#作业定义自定义libjar

时间:2014-02-12 14:51:10

标签: powershell hadoop mapreduce hadoop-streaming hdinsight

我在由Microsoft Azure HDInsight服务托管的hadoop集群上运行C#作业。 我必须直接在我的hdinsight服务器中使用hadoop命令行才能使用我的自定义Java输入格式:

调用bin \ hadoop jar lib \ hadoop-streaming.jar -D" mapred.max.split.size = 33554432" -libjars" ../ mycustom-hadoop-streaming.jar" -inputformat" mycustom.hadoop.CombinedInputFormat" ......(我切断了剩下的命令)

现在我尝试通过powershell命令行(从另一台azure机器提交远程作业)提交作业:

$ jobDefinition = New-AzureHDInsightStreamingMapReduceJobDefinition - 定义@ {" mapred.max.split.size" =" 33554432"," mapred.input.format。类" =" mycustom.hadoop.CombinedInputFormat" } ......(我切断了剩下的命令)

但是使用powershell命令行定义-libjars的方法是什么? 似乎微软没有考虑这种能力: http://msdn.microsoft.com/en-us/library/windowsazure/dn527638.aspx

是否有人试图通过HDInsight流媒体作业提交来执行该操作或使用解决方法来定义libjars?

1 个答案:

答案 0 :(得分:1)

正如您所知,HDInsight PowerShell和.Net SDK使用WebHcat / Templeton REST API,我相信,New-AzureHDInsightStreamingMapReduceJobDefinition没有-libjars作为参数的原因是,Templeton REST API没有那个或者支持,如apache templeton doc所示 - http://people.apache.org/~thejas/templeton_doc_latest/mapreducestreaming.html

另一方面,MapReduce / JAR的Templeton REST API支持libjars http://people.apache.org/~thejas/templeton_doc_latest/mapreducejar.html

因此,相应的HDInsight cmdlet New-AzureHDInsightMapReduceJobDefinition具有-Libjars参数。

我希望它有助于解释!

阿齐姆(MSFT)

相关问题