Created on 01-08-2019 02:15 AM - edited 09-16-2022 07:02 AM
I config prostro on hue :Hue Service → Configuration → Service-Wide → Advanced → Hue Service
Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini,
when I add the following:
[notebook]
[[interpreters]]
[[[presto]]]
name=Presto JDBC
interface=jdbc
options='{"url": "jdbc:presto://172.31.17.252:9080/", "driver": "com.facebook.presto.jdbc.PrestoDriver"}'
thus the hue-->query-->editor only show "prosto JDBC ", how to config presto without losting the hive and impala button on edior ????
I try to config all these
[notebook]
## Show the notebook menu or not
# show_notebooks=true
## Flag to enable the selection of queries from files, saved queries into the editor or as snippet.
# enable_external_statements=true
## Flag to enable the bulk submission of queries as a background task through Oozie.
# enable_batch_execute=true
## Flag to turn on the SQL indexer.
# enable_sql_indexer=false
## Flag to turn on the Presentation mode of the editor.
# enable_presentation=true
## Flag to enable the SQL query builder of the table assist.
# enable_query_builder=true
## Flag to enable the creation of a coordinator for the current SQL query.
# enable_query_scheduling=false
## Main flag to override the automatic starting of the DBProxy server.
# enable_dbproxy_server=true
## Classpath to be appended to the default DBProxy server classpath.
# dbproxy_extra_classpath=
## Comma separated list of interpreters that should be shown on the wheel. This list takes precedence over the
## order in which the interpreter entries appear. Only the first 5 interpreters will appear on the wheel.
# interpreters_shown_on_wheel=
# One entry for each type of snippet.
[[interpreters]]
# Define the name and how to connect and execute the language.
[[[hive]]]
# The name of the snippet.
name=Hive
# The backend connection to use to communicate with the server.
interface=hiveserver2
[[[impala]]]
name=Impala
interface=hiveserver2
# [[[sparksql]]]
# name=SparkSql
# interface=hiveserver2
[[[spark]]]
name=Scala
interface=livy
[[[pyspark]]]
name=PySpark
interface=livy
[[[r]]]
name=R
interface=livy
[[[jar]]]
name=Spark Submit Jar
interface=livy-batch
[[[py]]]
name=Spark Submit Python
interface=livy-batch
[[[text]]]
name=Text
interface=text
[[[markdown]]]
name=Markdown
interface=text
[[[mysql]]]
name = MySQL
interface=rdbms
[[[sqlite]]]
name = SQLite
interface=rdbms
[[[postgresql]]]
name = PostgreSQL
interface=rdbms
[[[oracle]]]
name = Oracle
interface=rdbms
[[[solr]]]
name = Solr SQL
interface=solr
## Name of the collection handler
# options='{"collection": "default"}'
[[[pig]]]
name=Pig
interface=oozie
[[[java]]]
name=Java
interface=oozie
[[[spark2]]]
name=Spark
interface=oozie
[[[mapreduce]]]
name=MapReduce
interface=oozie
[[[sqoop1]]]
name=Sqoop1
interface=oozie
[[[distcp]]]
name=Distcp
interface=oozie
[[[shell]]]
name=Shell
interface=oozie
[[[presto]]]
name=Presto JDBC
interface=jdbc
options='{"url": "jdbc:presto://172.31.17.252:9080/hive/tmp", "driver": "com.facebook.presto.jdbc.PrestoDriver","user":"", "password":""}'
thus The hive impala return,but I when click prestoJDBC on editor ,I got this in hue server log file :
Error running autocomplete
Traceback (most recent call last):
File "/home/ubuntu/data_disk/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/desktop/libs/notebook/src/notebook/decorators.py", line 97, in decorator
return func(*args, **kwargs)
File "/home/ubuntu/data_disk/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/desktop/libs/notebook/src/notebook/api.py", line 572, in autocomplete
autocomplete_data = get_api(request, snippet).autocomplete(snippet, database, table, column, nested)
File "/home/ubuntu/data_disk/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/desktop/libs/notebook/src/notebook/connectors/base.py", line 269, in get_api
return JdbcApi(request.user, interpreter=interpreter)
File "/home/ubuntu/data_disk/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/desktop/libs/notebook/src/notebook/connectors/jdbc.py", line 66, in __init__
self.db = API_CACHE[self.cache_key] = Jdbc(self.options['driver'], self.options['url'], username, self.options['password'])
File "/home/ubuntu/data_disk/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/desktop/libs/librdbms/src/librdbms/jdbc.py", line 67, in __init__
self.gateway = JavaGateway.launch_gateway(classpath=classpath)
File "/home/ubuntu/data_disk/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/py4j-0.9-py2.7.egg/py4j/java_gateway.py", line 1537, in launch_gateway
daemonize_redirect=daemonize_redirect)
File "/home/ubuntu/data_disk/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/py4j-0.9-py2.7.egg/py4j/java_gateway.py", line 178, in launch_gateway
close_fds=True)
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
what file missing ??????
Created 01-13-2019 06:54 PM
Got it myself , the error above is due to lack of lib, ( do not konw which exacly)
solved after install the following
sudo apt-get install git ant gcc g++ libffi-dev libkrb5-dev libmysqlclient-dev libsasl2-dev libsasl2-modules-gssapi-mit libsqlite3-dev libssl-dev libxml2-dev libxslt-dev make maven libldap2-dev python-dev python-setuptools libgmp3-dev
Created 01-13-2019 06:54 PM
Got it myself , the error above is due to lack of lib, ( do not konw which exacly)
solved after install the following
sudo apt-get install git ant gcc g++ libffi-dev libkrb5-dev libmysqlclient-dev libsasl2-dev libsasl2-modules-gssapi-mit libsqlite3-dev libssl-dev libxml2-dev libxslt-dev make maven libldap2-dev python-dev python-setuptools libgmp3-dev
Created 01-14-2019 05:59 AM