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