浏览代码

HUE-9368 [docs] How to run Hive queries in dev section (sree) (#1188)

Sreenath Somarajapuram 5 年之前
父节点
当前提交
4264dea710
共有 1 个文件被更改,包括 30 次插入0 次删除
  1. 30 0
      docs/docs-site/content/developer/development/_index.md

+ 30 - 0
docs/docs-site/content/developer/development/_index.md

@@ -64,6 +64,36 @@ Below the `[[interpreters]]` of `[notebook]`.
     interface=sqlalchemy
     options='{"url": "mysql://${USER}:${PASSWORD}@localhost:3306/hue"}'
 
+#### Configure Apache Hive
+
+You can connect to an existing Hive instance or setup a new one locally. An easy way to setup Hive locally is using Docker. You could use this container for Hive 2.3.2 - https://github.com/big-data-europe/docker-hive.
+
+    git clone https://github.com/big-data-europe/docker-hive
+    cd docker-hive
+    docker-compose up -d
+
+Just follow the above 3 steps and you would have a running Hive instance on jdbc:hive2://localhost:10000. Follow [testing section](https://github.com/big-data-europe/docker-hive#testing) in the readme of the above repo to check if things are working as expected.
+
+Now under Hue open `desktop/conf/pseudo-distributed.ini` file in a text editor, and modify the following options.
+
+Directly below the `[[beeswax]]` line, add the following.
+
+    # Host where HiveServer2 is running.
+    hive_server_host=localhost
+
+    # Port where HiveServer2 Thrift server runs on.
+    hive_server_port=10000
+
+    thrift_version=7
+
+Below the `[[interpreters]]` of `[notebook]`, add.
+
+    [[[hive]]]
+      name=Hive
+      interface=hiveserver2
+
+Restart Hue and you must be able to run Hive queries.
+
 ### Dev environment
 
 #### Visual Code