【问题标题】:How to run WordCount in Amazon EMR?如何在 Amazon EMR 中运行 WordCount?
【发布时间】:2023-03-29 11:20:01
【问题描述】:

在 Amazon EMR 中指定输入和输出路径的正确方法是什么?

在我的集群中,我点击了Add Step,然后选择Custom Jar 并输入jar 位置s3://wordcountbuckett/wc.jar。对于参数输入框,我指定了s3://wordcountbuckett/file01 作为我的输入文件,s3://wordcountbuckett/output/ 作为我的输出路径。

file01 是一个 txt 文件,而 /output/ 是一个文件夹。

以下是我从日志中得到的错误

Exception in thread "main" java.lang.ClassNotFoundException: s3://wordcountbuckett/
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:278)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:214)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

My Add Step details:
1. Step Type : Custom Jar
2. Name : WordCount2
3. JAR Location : s3://mywordcountbuckett/binary/wc.jar
4. Arguments: s3://mywordcountbuckett/input/
s3://mywordcountbuckett/output/
5. Action on Failure : Continue

【问题讨论】:

  • 能否提供自定义 Jar 步骤的屏幕截图?
  • @JohnRotenstein 我无法上传屏幕截图,但步骤如上编辑。

标签: java hadoop amazon-web-services amazon-emr


【解决方案1】:

您确定您指定了正确的路径吗?因为在文本中您谈论的是s3://wordcountbuckett/wc.jar,但在添加步骤配置中您指定了s3://mywordcountbuckett/..。我建议检查这是问题所在还是只是一个错字。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-25
    • 2014-03-13
    • 1970-01-01
    相关资源
    最近更新 更多