How to Connect Tableau to MaxCompute Using HiveServer2 Proxy

What Is Hive?

What Is HiveServer2?

What Is HiveServer2 Proxy?

Deploying HiveServer2 Proxy

[root@HS2Proxy apache-hive-2.1.0-odps-proxy]# cd /usr/lib/jvm/jre-1.8.0-openjdk
[root@HS2Proxy jre-1.8.0-openjdk]# export JAVA_HOME=$(pwd)
[root@HS2Proxy jre-1.8.0-openjdk]# echo $JAVA_HOME
/usr/lib/jvm/jre-1.8.0-openjdk
[root@HS2Proxy ~]# cd ~/apache-hive-2.1.0-odps-proxy
[root@HS2Proxy apache-hive-2.1.0-odps-proxy]# export HIVE_HOME=$(pwd)
[root@HS2Proxy apache-hive-2.1.0-odps-proxy]# echo $HIVE_HOME
/root/apache-hive-2.1.0-odps-proxy
[root@HS2Proxy apache-hive-2.1.0-odps-proxy]# export HADOOP_HOME=$(pwd)/hadoop
[root@HS2Proxy apache-hive-2.1.0-odps-proxy]# echo $HADOOP_HOME
/root/apache-hive-2.1.0-odps-proxy/hadoop
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hive.execution.engine</name>
<value>odps</value>
<description>Hive execution engine, here is odps by default, no need to modify</description>
</property>
<property>
<name>hive.session.impl.classname</name>
<value>org.apache.hive.service.cli.session.HiveSessionOdpsImpl</value>
<description>HiveSession's odps plugin, no need to modify</description>
</property>
<property>
<name>odps.accessid</name>
<value>customeraccessid</value>
<description>Please modify it to your accessid</description>
</property>
<property>
<name>odps.accesskey</name>
<value>customeraccesskey</value>
<description> Please modify it to your accesskey</description>
</property>
<property>
<name>odps.project</name>
<value>odpsdemo</value>
<description>Please change to your default project</description>
</property>
<property>
<name>odps.projects</name>
<value>odpsdemo</value>
<description> Please change it to your project list. If there are multiple, please separate them with a comma. This configuration will take effect in show schemas. </description>
</property>
<property>
<name>odps.endpoint</name>
<value>https://service.odps.aliyun.com/api</value>
<description>ODPS endpoint</description>
</property>
<property>
<name>hive.server2.thrift.port</name>
<value>20000</value>
<description>HiveServer2 Thrift Server starts the service port in binary mode, which can be modified as appropriate to avoid port conflicts.</description>
</property>
</configuration>
[root@HS2Proxy conf]# tail -f /tmp/$USER/hive.log
2019-02-12T11:58:48,891 INFO [main] service.AbstractService: Service:HiveServer2 is started.
2019-02-12T11:58:48,893 INFO [main] server.Server: jetty-7.6.0.v20120127
2019-02-12T11:58:48,958 INFO [main] webapp.WebInfConfiguration: Extract jar:file:/root/apache-hive-2.1.0-odps-proxy/lib/hive-service-2.1.0.jar!/hive-webapps/hiveserver2/ to /tmp/jetty-0.0.0.0-10002-hiveserver2-_-any-/webapp
2019-02-12T11:58:49,068 INFO [Thread-7] thrift.ThriftCLIService: Starting ThriftBinaryCLIService on port 20000 with 5...500 worker threads
2019-02-12T11:58:49,109 INFO [main] handler.ContextHandler: started o.e.j.w.WebAppContext{/,file:/tmp/jetty-0.0.0.0-10002-hiveserver2-_-any-/webapp/},jar:file:/root/apache-hive-2.1.0-odps-proxy/lib/hive-service-2.1.0.jar!/hive-webapps/hiveserver2
2019-02-12T11:58:49,147 INFO [main] handler.ContextHandler: started o.e.j.s.ServletContextHandler{/static,jar:file:/root/apache-hive-2.1.0-odps-proxy/lib/hive-service-2.1.0.jar!/hive-webapps/static}
2019-02-12T11:58:49,148 INFO [main] handler.ContextHandler: started o.e.j.s.ServletContextHandler{/logs,file:/tmp/root/}
2019-02-12T11:58:49,168 INFO [main] server.HiveServer2: Web UI has started on port 10002
2019-02-12T11:58:49,167 INFO [main] server.AbstractConnector: Started SelectChannelConnector@0.0.0.0:10002
2019-02-12T11:58:49,168 INFO [main] http.HttpServer: Started HttpServer[hiveserver2] on port 10002

Connecting Tableau to HiveServer2 Proxy

Project Demo

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

My Experience as LGM-SOC’21

Chronicle: A story of building technical documentation for GO-DATA

How to build a Lotto Generator Web Application using Django and Visual Studio Code on macOS

Top 4 Challenges You Will Face When Acquiring New IT Solutions

Simple Data Science Project Tutorial

6 Essential Skills Every Successful Developer Needs to Have

Local CI/CD with Skaffold

Talk Python To Me Podcast Founder Michael Kennedy Interview

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Produce and consume messages from a Kafka topic using docker

How to install and get started with Apache Airflow in 10 mins

Kafka Producer/Consumer with Message key and offset

Apache Beam: Side input Pattern