Skip to content

Commit

Permalink
HUE-8407 [fb] Overwriting default_hdfs_superuser in configuration doe…
Browse files Browse the repository at this point in the history
…s not take effect
  • Loading branch information
roohisyeda committed Jul 24, 2018
1 parent a2fe26d commit 9b8a15b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions desktop/libs/hadoop/src/hadoop/fs/webhdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,16 @@ def ssl_cert_ca_verify(self):
@property
def superuser(self):
if self._superuser is None:
try:
# The owner of '/' is usually the superuser
sb = self.stats('/')
self._superuser = sb.user
except Exception, ex:
LOG.exception('Failed to determine superuser of %s: %s' % (self, ex))
if DEFAULT_HDFS_SUPERUSER != desktop.conf.DEFAULT_HDFS_SUPERUSER.config.default_value:
self._superuser = DEFAULT_HDFS_SUPERUSER
else:
try:
# The owner of '/' is usually the superuser
sb = self.stats('/')
self._superuser = sb.user
except Exception, ex:
LOG.exception('Failed to determine superuser of %s: %s' % (self, ex))
self._superuser = DEFAULT_HDFS_SUPERUSER

return self._superuser

Expand Down

0 comments on commit 9b8a15b

Please sign in to comment.