2

我在由 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 -Defines @{ "mapred.max.split.size"="33554432", "mapred.input.format.class"="mycustom.hadoop.CombinedInputFormat" } ...(剩下的我删了命令)

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

是否有人尝试执行此操作或有解决方法来定义具有 HDInsight 流作业提交的 libjar?

4

1 回答 1

1

如您所知,HDInsight PowerShell 和 .Net SDK 使用 WebHcat/Templeton REST API,我相信,New-AzureHDInsightStreamingMapReduceJobDefinition 没有 -libjars 作为参数的原因是,Templeton REST API 没有或不支持,如图所示在此处的 apache Templeton 文档中- 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)

于 2014-02-19T18:32:33.073 回答