What is Hue

Hue is an open source SQL Assistant for Databases & Data Warehouses.

Preparation

Get Kyuubi Started

Get the server Started first before your try Hue with Kyuubi.

  1. Welcome to
  2. __ __ __
  3. /\ \/\ \ /\ \ __
  4. \ \ \/'/' __ __ __ __ __ __\ \ \____/\_\
  5. \ \ , < /\ \/\ \/\ \/\ \/\ \/\ \\ \ '__`\/\ \
  6. \ \ \\`\\ \ \_\ \ \ \_\ \ \ \_\ \\ \ \L\ \ \ \
  7. \ \_\ \_\/`____ \ \____/\ \____/ \ \_,__/\ \_\
  8. \/_/\/_/`/___/> \/___/ \/___/ \/___/ \/_/
  9. /\___/
  10. \/__/

Run Hue in Docker

Here we demo running Kyuubi on macOS and Hue on Docker for Mac, there are several known limitations of network, and you can find workarounds from here.

Configuration

  1. Copy a configuration template from Hue Docker image.
  1. docker run --rm gethue/hue:latest cat /usr/share/hue/desktop/conf/hue.ini > hue.ini
  1. Modify the hue.ini
  1. [beeswax]
  2. # Kyuubi 1.1.x support thrift version from 1 to 10
  3. thrift_version=7
  4. # change to your username to avoid permissions issue for local test
  5. auth_username=chengpan
  6. [notebook]
  7. [[interpreters]]
  8. [[[sql]]]
  9. name=SparkSQL
  10. interface=hiveserver2
  11. [spark]
  12. # Host of the Spark Thrift Server
  13. # For macOS users, use docker.for.mac.host.internal to access host network
  14. sql_server_host=docker.for.mac.host.internal
  15. # Port of the Spark Thrift Server
  16. sql_server_port=10009
  17. # other configurations
  18. ...

Start Hue in Docker

  1. docker run -p 8888:8888 -v $PWD/hue.ini:/usr/share/hue/desktop/conf/hue.ini gethue/hue:latest

Go http://localhost:8888/ and follow the guide to create an account.

Cloudera Hue - 图1

Having fun with Hue and Kyuubi!

Cloudera Hue - 图2

For CDH 6.x Users

If you are using CDH 6.x, there is a trick that CDH 6.x blocks Spark in default, you need to modify the configuration to overwrite the desktop.app_blacklist to remove this restriction.

Config Hue in Cloudera Manager.

Cloudera Hue - 图3

Refer following configuration and tune it to fit your environment.

  1. [desktop]
  2. app_blacklist=zookeeper,hbase,impala,search,sqoop,security
  3. use_new_editor=true
  4. [[interpreters]]
  5. [[[sparksql]]]
  6. name=Spark SQL
  7. interface=hiveserver2
  8. # other interpreters
  9. ...
  10. [spark]
  11. sql_server_host=kyuubi-server-host
  12. sql_server_port=10009

You need to restart the Hue Service to activate the configuration changes, and then Spark SQL will available in editor list.

Cloudera Hue - 图4

Having fun with Hue and Kyuubi!

Cloudera Hue - 图5