Skip to content

Commit

Permalink
[PIO-211] Fix pio deploy fail when using HDFS model storage
Browse files Browse the repository at this point in the history
  • Loading branch information
EmergentOrder committed Jul 31, 2019
1 parent 1094de8 commit b2ef983
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ object EngineServerPluginContext extends Logging {

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 {
Expand Down

0 comments on commit b2ef983

Please sign in to comment.