You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2020/04/02 12:27:12 UTC

[GitHub] [zeppelin] alexott commented on a change in pull request #3713: [ZEPPELIN-4718] Fix Regression HDFS Notebook Storage

alexott commented on a change in pull request #3713: [ZEPPELIN-4718] Fix Regression HDFS Notebook Storage
URL: https://github.com/apache/zeppelin/pull/3713#discussion_r402273198
 
 

 ##########
 File path: zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
 ##########
 @@ -602,6 +602,10 @@ public boolean isWindowsPath(String path){
     return path.matches("^[A-Za-z]:\\\\.*");
   }
 
+  public boolean isHdfsPath(String path){
+      return path.matches("^hdfs://.*");
+  }
+
 
 Review comment:
   Theoretically we can use FileSystemStorage with HDFS compatible file systems. For example, I'm using `dsefs` (from DataStax) very often as replacement for HDFS.
   
   I maybe instead would go with something like this:
   
   ```scala
   return new org.apache.hadoop.fs.Path(path).toUri.getScheme != null // or check for isBlank?
   ```
   
   overall, I would maybe switch to more high-level API, like, Java's `Path`, Hadoop Path, etc. instead of doing "manual checks"
   
   @zjffdu WDYT?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services