소스 검색

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

Romain Rigaux 12 년 전
부모
커밋
d6301a4286
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

+ 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')