如何在 systemML DSL 中从 HDFS 加载 csv 文件?
我尝试了一些类似的东西:
X = read("hdfs://ip-XXX-XXX-XXX-XXX:9000/SystemML/data/NN_X_100_10.csv");
我检查了文件实际上位于这个 HDFS 位置。
当我通过以下方式运行 dsl 时:
$SPARK_HOME/bin/spark-submit ~/Nearest_Neighbour_Search/SystemML/systemml-0.14.0-incubating.jar -f ~/Nearest_Neighbour_Search/SystemML/Task03_NN_SystemML_1000_hdfs.dml
它抱怨说:
ERROR:/home/ubuntu/Nearest_Neighbour_Search/SystemML/Task03_NN_SystemML_1000_hdfs.dml -- line 1, column 0 -- Read input file does not exist on FS (local mode): hdfs://ip-172-30-4-168:9000/SystemML/data/NN_X_1000000_1000.csv
at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:367)
at org.apache.sysml.api.DMLScript.main(DMLScript.java:214)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:738)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: /home/ubuntu/Nearest_Neighbour_Search/SystemML/Task03_NN_SystemML_1000_hdfs.dml -- line 1, column 0 -- Read input file does not exist on FS (local mode): hdfs://ip-172-30-4-168:9000/SystemML/data/NN_X_1000000_1000.csv
at org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:549)
at org.apache.sysml.parser.DataExpression.validateExpression(DataExpression.java:641)
at org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:592)
at org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:143)
at org.apache.sysml.api.DMLScript.execute(DMLScript.java:591)
at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:353)
... 10 more
我认为问题与本地模式有关,但我不知道如何设置以支持 systemML 的 HDFS。
任何建议都非常感谢!
谢谢!