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

标签 powershell hadoop mapreduce hadoop-streaming azure-hdinsight

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

call 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.class"="mycustom.hadoop.CombinedInputFormat"} }强> ...(我删掉了命令的其余部分)

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

是否有人尝试执行该操作或有解决方法来使用 HDInsight 流式作业提交定义 libjars?

最佳答案

如您所知,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

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

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

希望对解释有所帮助!

阿齐姆(微软)

关于powershell - HDInsight powershell 作业提交无法使用流式 C# 作业定义自定义 libjar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21731269/

相关文章:

azure - Web 应用程序 PowerShell 内部的订阅 ID、资源组名称和应用程序名称

c# - 如何在 PowerShell cmdlet 中获取当前目录?

hadoop - 我们如何处理来自 Hadoop DB 的处理数据(输出)?

java - 无法启动Hadoop守护程序:内存不足

powershell - cmd.exe 抛出错误 "& was unexpected at this time."

visual-studio - 从 Visual Studio 交换产品 <> 暂存 Azure 应用程序插槽

hadoop - 'prepare'命令和 'safemode'在HDFS滚动升级中的作用

hadoop - 如何将HiveQL查询的结果输出到远程服务器目录?

Hadoop 机架感知配置

java - 我在链接两个mapreduce工作时遇到麻烦