HUE configure hadoop

 

HDFS configuration

Reference documents: http://archive.cloudera.com/cdh5/cdh/5/hue-3.9.0-cdh5.5.0/manual.html

 

Hadoop configuration file is modified

hdfs-site.xml

<property>
  <name>dfs.webhdfs.enabled</name>
  <value>true</value>
</property>

core-site.html

<property>
  <name>hadoop.proxyuser.hue.hosts</name>
  <value>*</value>
</property>
<property>
  <name>hadoop.proxyuser.hue.groups</name>
  <value>*</value>
</property>

 

HUE modify configuration files

[[hdfs_clusters]] [[[default]]]

fs_defaultfs=hdfs://mycluster

webhdfs_url=http://node1:50070/webhdfs/v1

hadoop_bin=/usr/hadoop-2.5.1/bin

hadoop_conf_dir=/usr/hadoop-2.5.1/etc/hadoop

Start hdfs, restart the hue

 

Web access

 

Solution:

Modify the default user access hdfs

Modify the configuration hue.ini

default_hdfs_superuser=hdfs

Changed

default_hdfs_superuser=root

Restart hue

 

Hdfs can be operated by HUE file browser file, add, delete, change, and other operations.

But modify the file contents are abnormal, view the log file:

 

Solution:

1, closed hdfs permission verification

hdfs-site.xml

<property>

          <name>dfs.permissions.enabled</name>

    <value>false</value>

</property>

Need to restart hdfs and hue

2, create a root user in hue, the hue and log in as root.

 

Yarn Configuration

HUE modify configuration files

[[yarn_clusters]] [[[default]]]

resourcemanager_host=node1

resourcemanager_port=8032

submit_to=True

resourcemanager_api_url=http://node1:8088

HUE service restart

Run the test program workcout

hadoop jar /usr/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.1.jar wordcount /test/wc/input /out1

 

HDFS configuration

Reference documents: http://archive.cloudera.com/cdh5/cdh/5/hue-3.9.0-cdh5.5.0/manual.html

 

Hadoop configuration file is modified

hdfs-site.xml

<property>
  <name>dfs.webhdfs.enabled</name>
  <value>true</value>
</property>

core-site.html

<property>
  <name>hadoop.proxyuser.hue.hosts</name>
  <value>*</value>
</property>
<property>
  <name>hadoop.proxyuser.hue.groups</name>
  <value>*</value>
</property>

 

HUE modify configuration files

[[hdfs_clusters]] [[[default]]]

fs_defaultfs=hdfs://mycluster

webhdfs_url=http://node1:50070/webhdfs/v1

hadoop_bin=/usr/hadoop-2.5.1/bin

hadoop_conf_dir=/usr/hadoop-2.5.1/etc/hadoop

启动hdfs、重启hue

 

访问Web

 

解决方法:

修改默认的hdfs访问用户

修改hue.ini中的配置

default_hdfs_superuser=hdfs

改为

default_hdfs_superuser=root

重启hue

 

可以通过HUE的 文件浏览器 来操作hdfs的文件,进行增、删、改、查等操作。

但是修改文件内容是出现异常,查看日志文件:

 

解决方法:

1、 关闭hdfs的权限验证

hdfs-site.xml

<property>

          <name>dfs.permissions.enabled</name>

    <value>false</value>

</property>

需要重启hdfs和hue

2、 在hue中创建root用户,并以root用户登录hue。

 

Yarn配置

HUE配置文件修改

[[yarn_clusters]] [[[default]]]

resourcemanager_host=node1

resourcemanager_port=8032

submit_to=True

resourcemanager_api_url=http://node1:8088

重启HUE服务

运行workcout程序进行测试

hadoop jar /usr/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.1.jar wordcount /test/wc/input /out1

 

Guess you like

Origin www.cnblogs.com/liuys635/p/11407589.html