21.Hadoop:HUE安装及简单使用

2020-07-14  本文已影响0人  負笈在线

本节主要内容:

HUE安装及简单使用

Hue是一个开源的Apache Hadoop UI系统,由Cloudera Desktop演化而来,最后Cloudera公司将其贡献给Apache基金会的Hadoop社区,它是基于Python Web框架Django实现的。

通过使用Hue我们可以在浏览器端的Web控制台上与Hadoop集群进行交互来分析处理数据,例如操作HDFS上的数据,运行MapReduce Job,执行Hive的SQL语句,浏览HBase数据库等等。

1.系统环境:

OS:CentOS Linux release 7.5.1804 (Core)

CPU:2核心

Memory:1GB

运行用户:root

JDK版本:1.8.0_252

Hadoop版本:cdh5.16.2

2.集群各节点角色规划为:

172.26.37.245 node1.hadoop.com---->namenode,zookeeper,journalnode,hadoop-hdfs-zkfc,resourcenode,historyserver,hbase,hbase-master,hive,hive-metastore,hive-server2,hive-hbase,sqoop,impala,impala-server,impala-state-store,impala-catalog,pig,spark-core,spark-master,spark-worker,spark-python,hue

172.26.37.246 node2.hadoop.com---->datanode,zookeeper,journalnode,nodemanager,hadoop-client,mapreduce,hbase-regionserver,impala,impala-server,hive,spark-core,spark-worker,spark-history-server,spark-python

172.26.37.247  node3.hadoop.com---->datanode,nodemanager,hadoop-client,mapreduce,hive,mysql-server,impala,impala-server,hadoop-httpfs

172.26.37.248  node4.hadoop.com---->namenode,zookeeper,journalnode,hadoop-hdfs-zkfc,hive,hive-server2,impala-shell

3.环境说明:

本次追加部署

172.26.37.245 node1.hadoop.com---->hue

一.安装

Node1节点

        # yum install -y hue

二.配置

确认hue用户对hdfs的访问权限(部署httpfs的Node3节点)

        # cp -p /etc/hadoop-httpfs/conf/httpfs-site.xml /etc/hadoop-httpfs/conf/httpfs-site.xml.20200706

        # vi /etc/hadoop-httpfs/conf/httpfs-site.xml

确认以下内容

<!-- Hue HttpFS proxy user setting -->

<property>

  <name>httpfs.proxyuser.hue.hosts</name>

  <value>*</value>

</property>

<property>

  <name>httpfs.proxyuser.hue.groups</name>

  <value>*</value>

</property>

HUE配置(Node1节点)

        # cp -p /use/lib/hue/desktop/conf/hue.ini /use/lib/hue/desktop/conf/hue.ini.20200706

        # vi /use/lib/hue/desktop/conf/hue.ini

修改以下内容

[desktop]

  secret_key=12345678dfklajflkjasdlfjlasdjf

  http_host=0.0.0.0

  http_port=8888

  time_zone=America/Los_Angeles

  django_debug_mode=false

  http_500_debug_mode=false

  default_hdfs_superuser=hue

  [[django_admins]]

  [[custom]]

  [[auth]]

    idle_session_timeout=-1

  [[ldap]]

    [[[users]]]

    [[[groups]]]

    [[[ldap_servers]]]

  [[vcs]]

  [[database]]

    engine=sqlite3

    name=/var/lib/hue/desktop.db

  [[session]]

  [[smtp]]

    host=localhost

    port=25

    user=

    password=

    tls=no

  [[kerberos]]

  [[oauth]]

  [[metrics]]

[notebook]

  [[interpreters]]

    [[[hive]]]

      name=Hive

      interface=hiveserver2

    [[[impala]]]

      name=Impala

      interface=hiveserver2

    [[[spark]]]

      name=Scala

      interface=livy

    [[[pyspark]]]

      name=PySpark

      interface=livy

    [[[r]]]

      name=R

      interface=livy

    [[[jar]]]

      name=Spark Submit Jar

      interface=livy-batch

    [[[py]]]

      name=Spark Submit Python

      interface=livy-batch

    [[[text]]]

      name=Text

      interface=text

    [[[markdown]]]

      name=Markdown

      interface=text

    [[[mysql]]]

      name = MySQL

      interface=rdbms

    [[[sqlite]]]

      name = SQLite

      interface=rdbms

    [[[postgresql]]]

      name = PostgreSQL

      interface=rdbms

    [[[oracle]]]

      name = Oracle

      interface=rdbms

    [[[solr]]]

      name = Solr SQL

      interface=solr

    [[[pig]]]

      name=Pig

      interface=oozie

    [[[java]]]

      name=Java

      interface=oozie

    [[[spark2]]]

      name=Spark

      interface=oozie

    [[[mapreduce]]]

      name=MapReduce

      interface=oozie

    [[[sqoop1]]]

      name=Sqoop1

      interface=oozie

    [[[distcp]]]

      name=Distcp

      interface=oozie

    [[[shell]]]

      name=Shell

      interface=oozie

[dashboard]

  [[engines]]

[hadoop]

  [[hdfs_clusters]]

    [[[default]]]

      fs_defaultfs=hdfs://cluster1:8020

      webhdfs_url=http://node3.hadoop.com:14000/webhdfs/v1

  [[yarn_clusters]]

    [[[default]]]

      resourcemanager_host=node1.hadoop.com

      submit_to=True

      resourcemanager_api_url=http://node1.hadoop.com:8088

      proxy_api_url=http://node1.hadoop.com:8088

      history_server_api_url=http://node1.hadoop.com:19888

  [[mapred_clusters]]

    [[[default]]]

      submit_to=False

[beeswax]

  hive_server_host=node1.hadoop.com

  [[ssl]]

[metastore]

[impala]

  server_host=node1.hadoop.com

  [[ssl]]

[spark]

[oozie]

[filebrowser]

[pig]

[sqoop]

[proxy]

[hbase]

  hbase_clusters=(Cluster|node1.hadoop.com:9090)

[search]

[libsolr]

[indexer]

[jobsub]

[jobbrowser]

[security]

[zookeeper]

  [[clusters]]

    [[[default]]]

      host_ports=node1.hadoop.com:2181,node2.hadoop.com:2181,node4.hadoop.com:2181

[useradmin]

  [[password_policy]]

[liboozie]

[aws]

  [[aws_accounts]]

[azure]

  [[azure_accounts]]

    [[[default]]]

  [[adls_clusters]]

    [[[default]]]

[libsentry]

[libzookeeper]

[librdbms]

  [[databases]]

[libsaml]

[libopenid]

[liboauth]

[metadata]

  [[optimizer]]

  [[navigator]]

三.启动服务并试用

Node1节点

        # service hue start

        # service hue status

        ## netstat -ant |grep 8888

访问:http://172.26.37.245:8888/hue

首次登陆创建admin用户密码。

上一篇下一篇

猜你喜欢

热点阅读