问题
I tried to use EclairJS Server following the instructions available here: https://github.com/EclairJS/eclairjs/tree/master/server
after executing: mvn package
got the following error:
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 run: 50, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 94.35 sec <<< FAILURE! - in org.eclairjs.nashorn.MlTest LDAExample(org.eclairjs.nashorn.MlTest) Time elapsed: 0.005 sec <<< ERROR! 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) Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot load script from examples/ml/LDA_example.js at org.eclairjs.nashorn.MlTest.LDAExample(MlTest.java:610)
Running org.eclairjs.nashorn.CoreExamplesTest Tests run: 6, Failures: 0, Errors: 6, Skipped: 0, Time elapsed: 0.064 sec <<< FAILURE! - in org.eclairjs.nashorn.CoreExamplesTest WordCount(org.eclairjs.nashorn.CoreExamplesTest) Time elapsed: 0.017 sec <<< ERROR! javax.script.ScriptException: TypeError: Cannot load script from eclairjs/sql/sparkSession in file:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js at line number 122 at org.eclairjs.nashorn.CoreExamplesTest.WordCount(CoreExamplesTest.java:48) Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot load script from eclairjs/sql/sparkSession at org.eclairjs.nashorn.CoreExamplesTest.WordCount(CoreExamplesTest.java:48)
SparkLR(org.eclairjs.nashorn.CoreExamplesTest) Time elapsed: 0.006 sec <<< ERROR! javax.script.ScriptException: TypeError: Cannot load script from eclairjs/sql/sparkSession in file:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js at line number 122 at org.eclairjs.nashorn.CoreExamplesTest.SparkLR(CoreExamplesTest.java:88) Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot load script from eclairjs/sql/sparkSession at org.eclairjs.nashorn.CoreExamplesTest.SparkLR(CoreExamplesTest.java:88)
SparkPI(org.eclairjs.nashorn.CoreExamplesTest) Time elapsed: 0.007 sec <<< ERROR! javax.script.ScriptException: TypeError: Cannot load script from eclairjs/sql/sparkSession in file:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js at line number 122 at org.eclairjs.nashorn.CoreExamplesTest.SparkPI(CoreExamplesTest.java:76) Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot load script from eclairjs/sql/sparkSession at org.eclairjs.nashorn.CoreExamplesTest.SparkPI(CoreExamplesTest.java:76)
SparkTC(org.eclairjs.nashorn.CoreExamplesTest) Time elapsed: 0.006 sec <<< ERROR! javax.script.ScriptException: TypeError: Cannot load script from eclairjs/sql/sparkSession in file:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js at line number 122 at org.eclairjs.nashorn.CoreExamplesTest.SparkTC(CoreExamplesTest.java:64) Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot load script from eclairjs/sql/sparkSession at org.eclairjs.nashorn.CoreExamplesTest.SparkTC(CoreExamplesTest.java:64)
PageRank(org.eclairjs.nashorn.CoreExamplesTest) Time elapsed: 0.008 sec <<< ERROR! javax.script.ScriptException: TypeError: Cannot load script from eclairjs/sql/sparkSession in file:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js at line number 122 at org.eclairjs.nashorn.CoreExamplesTest.PageRank(CoreExamplesTest.java:100) Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot load script from eclairjs/sql/sparkSession at org.eclairjs.nashorn.CoreExamplesTest.PageRank(CoreExamplesTest.java:100)
LogQuery(org.eclairjs.nashorn.CoreExamplesTest) Time elapsed: 0.007 sec <<< ERROR! javax.script.ScriptException: TypeError: Cannot load script from eclairjs/sql/sparkSession in file:/root/eclairjs/server/target/classes/eclairjs/jvm-npm/jvm-npm.js at line number 122 at org.eclairjs.nashorn.CoreExamplesTest.LogQuery(CoreExamplesTest.java:115) Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot load script from eclairjs/sql/sparkSession at org.eclairjs.nashorn.CoreExamplesTest.LogQuery(CoreExamplesTest.java:115)
Can please anyone help me to get through this error or can share some to use apache spark in my node application Thankyou
来源:https://stackoverflow.com/questions/49747880/problems-to-use-the-eclairjs-server