- Apache Oozie Essentials
- Jagat Jasjit Singh
- 642字
- 2021-07-30 09:58:22
Installing and configuring Hue
The Hortonworks virtual machine already has one version of Hue running, but that is very old. We will install the latest version of Hue ourselves since it has a better Oozie editor.
Start the virtual machine. Once the machine is up and running, we can log in to that via SSH using the following command:
$ ssh root@127.0.0.1 -p 2222
The default password is hadoop
.
Let's download and configure Hue. Here are the steps to do so:
- Download the latest release of Hue.
- Install the dependencies required to build Hue via yum.
- Build the Hue package using the
make
command. - Before you execute the following commands, check the Hue website ( version is present:
$ mkdir -p /opt/learn_oozie/hue $ chmod 777 /opt/learn_oozie/hue $ chown hue:hue /opt/learn_oozie/hue $ sudo su hue $ cd /opt/learn_oozie/hue $ # Download Hue $ wget https://dl.dropboxusercontent.com/u/730827/hue/releases/3.8.1/hue-3.8.1.tgz $ tar -xvf hue-3.8.1.tgz $ cd hue-3.8.1 $ Install dependencies required to build Hue $ yum install ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi gcc gcc-c++ krb5-devel libtidy libxml2-devel libxslt-devel make mysql mysql-devel openldap-devel python-devel sqlite-devel openssl-devel gmp-devel $ Build Hue $ make apps
- Wait for some time for Hue to get ready. You can also run the following scripts to do all the steps in one go:
<BOOK_CODE_HOME>/ch02/scripts/install_hue.sh
Once it is successful, you will get following message:
Post-processed 'zookeeper/art/line_icons.png' as 'zookeeper/art/line_icons.f50a9ca444bf.png' Post-processed 'zookeeper/art/icon_zookeeper_24.png' as 'zookeeper/art/icon_zookeeper_24.e3168d30a559.png' Post-processed 'zookeeper/help/index. ml' Post-processed 'zookeeper/css/zookeehtml' as 'zookeeper/help/index.7570dbb625f3.htper.css' as 'zookeeper/css/zookeeper.dab3cbab10bb.css' Post-processed 'zookeeper/js/base64.js' as 'zookeeper/js/base64.ce5e02af31e5.js' 576 static files copied to '/opt/learn_oozie/hue/hue-3.8.1/build/static', 576 post-processed. make[1]: Leaving directory `/opt/learn_oozie/hue/hue-3.8.1/apps'[hue@sandbox hue-3.8.1]$
Tip
To save time in copying files from host machine to guest and vice versa, I have configured my host machine's
Home
folder as shared folder with guest. You can also do the same.
We need to start Hue now, but before that we need to make few changes to the Hue configuration file, hue.ini
.
Following are the steps to make the changes and start Hue:
- The default port of Hue,
8888
, is already used in this virtual machine. So we will change the port for Hue in our machine. - Open the file in vi or your favorite editor and enter the following command:
$ vi desktop/conf/hue.in
- Change the port from
8888
to18888
.There are few other changes related to
hue.ini
in which we need to change the hostname tosandbox.hortonworks.com
. I have already done those changes in thehue.ini
file. So you can just copy it from following location:<BOOK_CODE_HOME>/ch02/files/hue/hue.ini
We need to add one port forwarding to see the Hue web page in the host machine.
- Open running VirtualBox.
- Go to Settings | Networking | Port Forwarding. Click on Add new port forwarding rule.
- Add one more entry to forward port
8888
on guest to host at18888
, as shown in the following screenshot:Hue port forwarding
- Let's start Hue using the following commands:
$ sudo su hue $ cd /opt/learn_oozie/hue/hue-3.8.1 $ build/env/bin/supervisor
Once this is successful, you will get the following message:
[hue@sandbox hue-3.8.1]$ build/env/bin/supervisor [INFO] Not running as root, skipping privilege drop starting server with options {'ssl_certificate': None, 'workdir': None, 'server_name': 'localhost', 'host': '0.0.0.0', 'daemonize': False, 'threads': 40, 'pidfile': None, 'ssl_private_key': None, 'server_group': 'hue', 'ssl_cipher_list':'DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2', 'port': 18888, 'server_user': 'hue'}
- On the host machine, use your browser and open the URL
http://127.0.0.1:18888/
. - Pick up any username and password for first login. I have chosen
hue
for both username and password.Note
Take some time to browse the Hue interface. Hue has lots of functionality we can run, such as Hive, Pig, and Oozie jobs.
We are interested in the Workflow editor functionality, where we can edit and watch the Oozie jobs. Click on Workflows and take some time to see what Hue provides.
Note
This often happens with me! Learning new things make me forget the basics. So, if you need, have a quick refresher for XSD by referring to the following links:
- Instant Node Package Manager
- TensorFlow Lite移動端深度學習
- ASP.NET Core Essentials
- Nginx實戰:基于Lua語言的配置、開發與架構詳解
- 領域驅動設計:軟件核心復雜性應對之道(修訂版)
- R數據科學實戰:工具詳解與案例分析
- HTML+CSS+JavaScript編程入門指南(全2冊)
- 零基礎看圖學ScratchJr:少兒趣味編程(全彩大字版)
- Ext JS 4 Plugin and Extension Development
- Learning D
- Android技術內幕(系統卷)
- 絕密原型檔案:看看專業產品經理的原型是什么樣
- Scala編程(第4版)
- 軟件再工程:優化現有軟件系統的方法與最佳實踐
- Three.js Essentials