Browse Source

HUE-5436 [fb] Fail elegantly if CHECKACCESS is not supported and returns a 400

Romain Rigaux 9 years ago
parent
commit
88dd96aa43
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

+ 1 - 1
desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

@@ -587,7 +587,7 @@ class WebHdfs(Hdfs):
     try:
     try:
       return self._root.get(path, params)
       return self._root.get(path, params)
     except WebHdfsException, ex:
     except WebHdfsException, ex:
-      if ex.code == 500:
+      if ex.code == 500 or ex.code == 400:
         LOG.warn('Failed to check access to path %s, CHECKACCESS operation may not be supported.' % path)
         LOG.warn('Failed to check access to path %s, CHECKACCESS operation may not be supported.' % path)
         return None
         return None
       else:
       else: