Hue是一個開源的Apache Hadoop UI系統,由Cloudera Desktop演化而來,最后Cloudera公司將其貢獻給Apache基金會的Hadoop社區,它是基於Python Web框架Django實現的。通過使用Hue我們可以在瀏覽器端的Web控制台上與Hadoop集群進行交互來分析處理數據,例如操作HDFS上的數據,運行MapReduce Job,執行Hive的SQL語句,瀏覽HBase數據庫等等。
Hue在數據庫方面,默認使用的是SQLite數據庫來管理自身的數據,包括用戶認證和授權,另外,可以自定義為MySQL數據庫、Postgresql數據庫、以及Oracle數據庫。其自身的功能包含有:
對HDFS的訪問,通過瀏覽器來查閱HDFS的數據。
Hive編輯器:可以編寫HQL和運行HQL腳本,以及查看運行結果等相關Hive功能。
提供Solr搜索應用,並對應相應的可視化數據視圖以及DashBoard。
提供Impala的應用進行數據交互查詢。
最新的版本集成了Spark編輯器和DashBoard
支持Pig編輯器,並能夠運行編寫的腳本任務。
Oozie調度器,可以通過DashBoard來提交和監控Workflow、Coordinator以及Bundle。
支持HBase對數據的查詢修改以及可視化。
支持對Metastore的瀏覽,可以訪問Hive的元數據以及對應的HCatalog。
另外,還有對Job的支持,Sqoop,ZooKeeper以及DB(MySQL,SQLite,Oracle等)的支持。
1.安裝依賴項
ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi gcc gcc-c++ krb5-devel libtidy (for unit tests only) libxml2-devel libxslt-devel make mvn (from maven package or maven3 tarball) mysql mysql-devel openldap-devel python-devel sqlite-devel openssl-devel (for version 7+) gmp-devel
2.安裝hadoop/hbase/hive/zookeeper等
3.官網http://gethue.com下載安裝包上傳到LINUX服務器上去,解壓,進入目錄執行make apps,也可以make install安裝到/usr/local下
4.修改desktop/conf/pseudo-distributed.ini/hue.ini---按項目實際情況進行配置
[desktop] # hue webServer 地址和端口號 http_host=192.168.66.66 http_port=8001 # Webserver runs as this user server_user=hue server_group=hue # This should be the Hue admin and proxy user default_user=hue # This should be the hadoop cluster admin default_hdfs_superuser=root [hadoop] fs_defaultfs=hdfs://xinfang:9000 webhdfs_url=http://192.168.66.66:50070/webhdfs/v1/ hadoop_conf_dir=/usr/app/hadoop/etc/hadoop [[yarn_clusters]] # Enter the host on which you are running the ResourceManager resourcemanager_host=192.168.66.66 # The port where the ResourceManager IPC listens on resourcemanager_port=8032 # Whether to submit jobs to this cluster submit_to=True # URL of the ResourceManager API resourcemanager_api_url=http://192.168.66.66:8088 # URL of the ProxyServer API proxy_api_url=http://192.168.66.66:8088 # URL of the HistoryServer API history_server_api_url=http://192.168.66.66:19888 [beeswax] # If Kerberos security is enabled, use fully-qualified domain name (FQDN). hive_server_host=192.168.66.66 # Port where HiveServer2 Thrift server runs on. hive_server_port=10000 # Hive configuration directory, where hive-site.xml is located hive_conf_dir=/usr/app/hive/conf [zookeeper] host_ports=192.168.66.66:2181
[[[mysql]]]
engine=mysql # IP or hostname of the database to connect to. host=192.168.66.66 # Port the database server is listening to. Defaults are: # 1. MySQL: 3306 # 2. PostgreSQL: 5432 # 3. Oracle Express Edition: 1521 port=3306 # Username to authenticate with when connecting to the database. user=root # Password matching the username to authenticate with when # connecting to the database. password=1
#adduser hue ---添加用戶
#chmod -R 777 /usr/app/hue-4.0.0 ---授權
5.執行build/env/bin/supervisor
6. 瀏覽器輸入:http://192.168.66.66:8001,創建用戶和密碼登錄即可