Эх сурвалжийг харах

HUE-538 [fb] Upload doesn't work if / is not owned by 'hdfs'

Romain Rigaux 12 жил өмнө
parent
commit
d6301a4286

+ 3 - 2
desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

@@ -22,7 +22,6 @@ Interfaces for Hadoop filesystem access via HttpFs/WebHDFS
 import errno
 import logging
 import posixpath
-import random
 import stat
 import threading
 import time
@@ -773,9 +772,11 @@ def test_fs_configuration(fs_config):
   # Access root
   try:
     statbuf = fs.stats('/')
+    if statbuf.user != 'hdfs':
+      return [(fs_config.WEBHDFS_URL, _("Filesystem root '/' should be owned by 'hdfs'"))]
   except Exception, ex:
     LOG.info("%s -- Validation error: %s" % (fs, ex))
-    return [(fs_config.WEBHDFS_URL, 'Failed to access filesystem root')]
+    return [(fs_config.WEBHDFS_URL, _('Failed to access filesystem root'))]
 
   # Write a file
   tmpname = fs.mktemp(prefix='hue_config_validation')