Repository: incubator-gobblin
Updated Branches:
  refs/heads/master 9d3c731ad -> f5b893cf3


[GOBBLIN-516] Fixing vague error message while checking Fs state in ConfigBased 
Entities

Closes #2387 from
autumnust/ExceptionSwallowInConfigStore


Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/f5b893cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/f5b893cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/f5b893cf

Branch: refs/heads/master
Commit: f5b893cf3972a89c6557e7899138e34493882dcb
Parents: 9d3c731
Author: Lei Sun <[email protected]>
Authored: Mon Jun 25 14:42:54 2018 -0700
Committer: Hung Tran <[email protected]>
Committed: Mon Jun 25 14:42:54 2018 -0700

----------------------------------------------------------------------
 .../management/copy/replication/HadoopFsEndPoint.java | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/f5b893cf/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/replication/HadoopFsEndPoint.java
----------------------------------------------------------------------
diff --git 
a/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/replication/HadoopFsEndPoint.java
 
b/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/replication/HadoopFsEndPoint.java
index ea93ea8..1160315 100644
--- 
a/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/replication/HadoopFsEndPoint.java
+++ 
b/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/replication/HadoopFsEndPoint.java
@@ -61,7 +61,7 @@ public abstract class HadoopFsEndPoint implements EndPoint {
 
   /**
    * A helper utility for data/filesystem availability checking
-   * @param path The path to be checked. For fs availability checking, just 
use "/"
+   * @param path The path to be checked.
    * @return If the filesystem/path exists or not.
    */
   public boolean isPathAvailable(Path path) {
@@ -71,18 +71,24 @@ public abstract class HadoopFsEndPoint implements EndPoint {
       if (fs.exists(path)) {
         return true;
       } else {
-        log.warn("Skipped the problematic FileSystem " + this.getFsURI());
+        log.warn("The data path [" + path + "] is not available on FileSystem: 
" + this.getFsURI());
         return false;
       }
     } catch (IOException ioe) {
-      log.warn("Skipped the problematic FileSystem " + this.getFsURI());
+      log.warn("Errors occurred while checking path [" + path + "] existence " 
+ this.getFsURI(), ioe);
       return false;
     }
   }
 
   @Override
   public boolean isFileSystemAvailable() {
-    return isPathAvailable(new Path("/"));
+    try {
+      FileSystem.get(this.getFsURI(), new Configuration());
+    } catch (IOException ioe){
+      log.error(String.format("FileSystem %s is not available", 
this.getFsURI()), ioe);
+      return false;
+    }
+    return true;
   }
 
   public boolean isDatasetAvailable(Path datasetPath) {

Reply via email to