[ 
https://issues.apache.org/jira/browse/SPARK-14093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15208078#comment-15208078
 ] 

Dulaj Rajitha commented on SPARK-14093:
---------------------------------------

I'm running spark in standalone mode and I need to save the trained model and 
load it back from HDFS using ALSModel.save method and it gives an error as 
Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: 
hdfs://192.168.1.71/res/als.model, expected: file:///
        at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:645)
        at 
org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:80)
        at 
org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:529)
        at 
org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:747)
        at 
org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:524)
        at 
org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:409)
        at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1400)
        at org.apache.spark.ml.util.MLWriter.save(ReadWrite.scala:80)
        at org.apache.spark.ml.util.MLWritable$class.save(ReadWrite.scala:130)
        at org.apache.spark.ml.recommendation.ALSModel.save(ALS.scala:182)
        at it.codegen.rnd.ml.test.ALSImplicitTest.main(ALSImplicitTest.java:107)
.
When I used jsc.parallelize( alsModels ).saveAsObjectFile( modelPath ),
I cannot load back the exact model which I have saved. 

> org.apache.spark.ml.recommendation.ALSModel.save method cannot be used with 
> HDFS
> --------------------------------------------------------------------------------
>
>                 Key: SPARK-14093
>                 URL: https://issues.apache.org/jira/browse/SPARK-14093
>             Project: Spark
>          Issue Type: Bug
>          Components: Java API, ML
>    Affects Versions: 1.6.0
>            Reporter: Dulaj Rajitha
>
> ALSModel.save(path) is not working for HDFS paths and it gives  
> java.lang.IllegalArgumentException: Wrong FS: 
> hdfs://192.168.1.71/res/als.model, expected: file:/// 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to