1

我尝试按照此处提供的说明使用 EclairJS 服务器:https ://github.com/EclairJS/eclairjs/tree/master/server

执行后:mvn package得到以下错误:

Tests run: 293, Failures: 8, Errors: 9, Skipped: 0

 [INFO] ------------------------------------------------------------------------
 [INFO] BUILD FAILURE
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time: 04:51 min
 [INFO] Finished at: 2018-04-10T07:13:41+00:00
 [INFO] Final Memory: 31M/373M
 [INFO] ------------------------------------------------------------------------
 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project eclairjs-nashorn: There are test failures.
 [ERROR] 
 [ERROR] Please refer to /root/eclairjs/server/target/surefire-reports for the individual test results.
 [ERROR] -> [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] 
 [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/MojoFailureException

 Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 26.528 sec - in org.eclairjs.nashorn.ZClusterTest
 Running org.eclairjs.nashorn.PairRDDTest
 Tests run: 8, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 2.821 sec <<< FAILURE! - in org.eclairjs.nashorn.PairRDDTest
 countByKey(org.eclairjs.nashorn.PairRDDTest)  Time elapsed: 0.582 sec  <<< FAILURE!
 org.junit.ComparisonFailure: failure - strings are not equal expected:<{"[pandas":1,"coffee":3]}> but was:<{"[coffee":3,"pandas":1]}>
 at org.eclairjs.nashorn.PairRDDTest.countByKey(PairRDDTest.java:64)

 cogroup2(org.eclairjs.nashorn.PairRDDTest)  Time elapsed: 0.73 sec  <<< FAILURE!
 org.junit.ComparisonFailure: failure - strings are not equal expected:<[{"0":"[Apples","1":{"0":["Fruit"],"1":[3],"2":[42],"length":3},"length":2},{"0":"Oranges","1":{"0":["Fruit","Citrus"],"1":[2],"2":[21]],"length":3},"lengt...> but was:<[{"0":"[Oranges","1":{"0":["Fruit","Citrus"],"1":[2],"2":[21],"length":3},"length":2},{"0":"Apples","1":{"0":["Fruit"],"1":[3],"2":[42]],"length":3},"lengt...>
 at org.eclairjs.nashorn.PairRDDTest.cogroup2(PairRDDTest.java:112)

 cogroup3(org.eclairjs.nashorn.PairRDDTest)  Time elapsed: 0.405 sec  <<< FAILURE!
 org.junit.ComparisonFailure: failure - strings are not equal expected:<[{"0":"[Apples","1":{"0":["Fruit"],"1":[3],"2":[42],"3":["WA"],"length":4},"length":2},{"0":"Oranges","1":{"0":["Fruit","Citrus"],"1":[2],"2":[21],"3":["FL]"],"length":4},"leng...> but was:<[{"0":"[Oranges","1":{"0":["Fruit","Citrus"],"1":[2],"2":[21],"3":["FL"],"length":4},"length":2},{"0":"Apples","1":{"0":["Fruit"],"1":[3],"2":[42],"3":["WA]"],"length":4},"leng...>
 at org.eclairjs.nashorn.PairRDDTest.cogroup3(PairRDDTest.java:124)

ests 运行:50,失败:0,错误:1,跳过:0,经过的时间:94.35 秒 <<< 失败!- 在 org.eclairjs.nashorn.MlTest LDAExample(org.eclairjs.nashorn.MlTest) 已用时间:0.005 秒 <<< 错误!javax.script.ScriptException: TypeError: Cannot load script from examples/ml/LDA_example.js in /ml/mltest.js at line number 214 at org.eclairjs.nashorn.MlTest.LDAExample(MlTest.java:610) 原因: jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot load script from examples/ml/LDA_example.js at org.eclairjs.nashorn.MlTest.LDAExample(MlTest.java:610)

运行 org.eclairjs.nashorn.CoreExamplesTest 测试运行:6,失败:0,错误:6,跳过:0,经过时间:0.064 秒 <<< 失败!- 在 org.eclairjs.nashorn.CoreExamplesTest WordCount(org.eclairjs.nashorn.CoreExamplesTest) 已用时间:0.017 秒 <<< 错误!javax.script.ScriptException:TypeError:无法从文件中的 eclairjs/sql/sparkSession 加载脚本:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js 在 org.eclairjs 的第 122 行.nashorn.CoreExamplesTest.WordCount(CoreExamplesTest.java:48) 引起:jdk.nashorn.internal.runtime.ECMAException:TypeError:无法从 org.eclairjs.nashorn.CoreExamplesTest.WordCount(CoreExamplesTest.爪哇:48)

SparkLR(org.eclairjs.nashorn.CoreExamplesTest) 经过时间:0.006 秒 <<< 错误!javax.script.ScriptException:TypeError:无法从文件中的 eclairjs/sql/sparkSession 加载脚本:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js 在 org.eclairjs 的第 122 行.nashorn.CoreExamplesTest.SparkLR(CoreExamplesTest.java:88) 原因:jdk.nashorn.internal.runtime.ECMAException:TypeError:无法从 org.eclairjs.nashorn.CoreExamplesTest.SparkLR(CoreExamplesTest.爪哇:88)

SparkPI(org.eclairjs.nashorn.CoreExamplesTest) 经过时间:0.007 秒 <<< 错误!javax.script.ScriptException:TypeError:无法从文件中的 eclairjs/sql/sparkSession 加载脚本:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js 在 org.eclairjs 的第 122 行.nashorn.CoreExamplesTest.SparkPI(CoreExamplesTest.java:76) 原因:jdk.nashorn.internal.runtime.ECMAException:TypeError:无法在 org.eclairjs.nashorn.CoreExamplesTest.SparkPI(CoreExamplesTest.爪哇:76)

SparkTC(org.eclairjs.nashorn.CoreExamplesTest) 经过时间:0.006 秒 <<< 错误!javax.script.ScriptException:TypeError:无法从文件中的 eclairjs/sql/sparkSession 加载脚本:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js 在 org.eclairjs 的第 122 行.nashorn.CoreExamplesTest.SparkTC(CoreExamplesTest.java:64) 原因:jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot load script from eclairjs/sql/sparkSession at org.eclairjs.nashorn.CoreExamplesTest.SparkTC(CoreExamplesTest.爪哇:64)

PageRank(org.eclairjs.nashorn.CoreExamplesTest) 经过时间:0.008 秒 <<< 错误!javax.script.ScriptException:TypeError:无法从文件中的 eclairjs/sql/sparkSession 加载脚本:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js 在 org.eclairjs 的第 122 行.nashorn.CoreExamplesTest.PageRank(CoreExamplesTest.java:100) 原因:jdk.nashorn.internal.runtime.ECMAException:TypeError:无法从 org.eclairjs.nashorn.CoreExamplesTest.PageRank(CoreExamplesTest.爪哇:100)

LogQuery(org.eclairjs.nashorn.CoreExamplesTest) 经过时间:0.007 秒 <<< 错误!javax.script.ScriptException:TypeError:无法从文件中的 eclairjs/sql/sparkSession 加载脚本:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js 在 org.eclairjs 的第 122 行.nashorn.CoreExamplesTest.LogQuery(CoreExamplesTest.java:115) 原因:jdk.nashorn.internal.runtime.ECMAException:TypeError:无法在 org.eclairjs.nashorn.CoreExamplesTest.LogQuery(CoreExamplesTest.爪哇:115)

可以请任何人帮助我解决这个错误,或者可以分享一些在我的节点应用程序中使用 apache spark 谢谢

4

0 回答 0