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

HUE-689 [desktop] Switching users inconsistencies

Romain Rigaux 13 жил өмнө
parent
commit
f4d5288d45

+ 4 - 7
desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

@@ -120,13 +120,10 @@ class WebHdfs(Hdfs):
       return WebHdfs.DEFAULT_USER
       return WebHdfs.DEFAULT_USER
 
 
   def _getparams(self):
   def _getparams(self):
-    if self.security_enabled:
-      return {
-        "user.name" : WebHdfs.DEFAULT_USER,
-        "doas" : self.user
-      }
-    else:
-      return { "user.name" : self.user }
+    return {
+      "user.name" : WebHdfs.DEFAULT_USER,
+      "doas" : self.user
+    }
 
 
   def setuser(self, user):
   def setuser(self, user):
     """Set a new user. Return the current user."""
     """Set a new user. Return the current user."""

+ 2 - 0
desktop/libs/hadoop/src/hadoop/pseudo_hdfs4.py

@@ -386,6 +386,8 @@ class PseudoHdfs4(object):
       'dfs.datanode.ipc.address': 'localhost:0',
       'dfs.datanode.ipc.address': 'localhost:0',
       'dfs.replication': 1,
       'dfs.replication': 1,
       'dfs.safemode.min.datanodes': 1,
       'dfs.safemode.min.datanodes': 1,
+      'hadoop.proxyuser.hue.hosts': '*',
+      'hadoop.proxyuser.hue.groups': '*',
     }
     }
     write_config(hdfs_configs, self._tmppath('conf/hdfs-site.xml'))
     write_config(hdfs_configs, self._tmppath('conf/hdfs-site.xml'))
 
 

+ 26 - 0
docs/manual.txt

@@ -150,10 +150,32 @@ Depending on your setup, your `hdfs-site.xml` might be in `/etc/hadoop/conf`.
       <value>true</value>
       <value>true</value>
     </property>
     </property>
 
 
+You also need to add this to `core-site.html`.
+
+    <property>
+      <name>hadoop.proxyuser.hue.hosts</name>
+      <value>*</value>
+    </property>
+    <property>
+      <name>hadoop.proxyuser.hue.groups</name>
+      <value>*</value>
+    </property>
+
 If you place your Hue Server outside the Hadoop cluster, you can run
 If you place your Hue Server outside the Hadoop cluster, you can run
 an HttpFS server to provide Hue access to HDFS. The HttpFS service requires
 an HttpFS server to provide Hue access to HDFS. The HttpFS service requires
 only one port to be opened to the cluster.
 only one port to be opened to the cluster.
 
 
+Also add this in `httpfs-site.xml` which might be in `/etc/hadoop-httpfs/conf`.
+
+    <property>
+      <name>httpfs.proxyuser.hue.hosts</name>
+      <value>*</value>
+    </property>
+    <property>
+      <name>httpfs.proxyuser.hue.groups</name>
+      <value>*</value>
+    </property>
+
 
 
 Configure MapReduce 0.20 (MR1)
 Configure MapReduce 0.20 (MR1)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -608,6 +630,10 @@ section for more details about managing and operating a Hue installation.
 Hue Processes
 Hue Processes
 ~~~~~~~~~~~~~
 ~~~~~~~~~~~~~
 
 
+Process User
+^^^^^^^^^^^^
+Filebrowser requires Hue to be running as the 'hue' user.
+
 Process Hierarchy
 Process Hierarchy
 ^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^