commit | b2ef98369542ddd6cd8b783574cdb9d62081a8bf | [log] [tgz] |
---|---|---|
author | Alex Merritt <lecaran@gmail.com> | Wed Jul 31 15:06:20 2019 -0300 |
committer | Alex Merritt <lecaran@gmail.com> | Wed Jul 31 15:06:20 2019 -0300 |
tree | 25347157c47c9c47b64f8e45fb8161888207a3e1 | |
parent | 1094de8322285a572b2d2e8ae49073d1066242d2 [diff] |
[PIO-211] Fix pio deploy fail when using HDFS model storage
diff --git a/core/src/main/scala/org/apache/predictionio/workflow/EngineServerPluginContext.scala b/core/src/main/scala/org/apache/predictionio/workflow/EngineServerPluginContext.scala index 011cd95..1d2eaaa 100644 --- a/core/src/main/scala/org/apache/predictionio/workflow/EngineServerPluginContext.scala +++ b/core/src/main/scala/org/apache/predictionio/workflow/EngineServerPluginContext.scala
@@ -80,8 +80,9 @@ private def stringFromFile(filePath: String): Option[String] = { try { - val fs = FileSystem.get(new Configuration()) - val path = new Path(new URI(filePath)) + val uri = new URI(filePath) + val fs = FileSystem.get(uri, new Configuration()) + val path = new Path(uri) if (fs.exists(path)) { Some(new String(ByteStreams.toByteArray(fs.open(path)).map(_.toChar))) } else {