简体   繁体   English

Apache Beam 执行

[英]Apache Beam execution

I'm following this example but in the step: Run WordCount , throught direct command我正在关注这个例子,但在步骤中:运行 WordCount ,通过直接命令

$ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
 -Dexec.args="--inputFile=pom.xml --output=counts" -Pdirect-runner

And finally I have this error:最后我有这个错误:

[INFO] -----------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 12.065 s

[INFO] Finished at: 2018-10-02T17:36:05+02:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project word-count-beam: An exception occured while executing the Java class. java.lang.UnsupportedOperationException: Cannot define class using reflection: Could not find sun.misc.Unsafe -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.


[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

You need to use the Java Development Kit (JDK) version 8 .您需要使用Java 开发工具包 (JDK) 版本 8 Verify that the JAVA_HOME environment variable is set and points to your JDK installation.验证 JAVA_HOME 环境变量是否已设置并指向您的 JDK 安装。

To understand this change better, read:要更好地理解这一变化,请阅读:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM