HUE配置文件hue.ini 的database模块详解(包含qlite、mysql、 psql、和oracle)(图文详解)(分HA集群和非HA集群)...
不多说,直接上干货!
Hue配置文件里,提及到,提供有postgresql_psycopg2, mysql, sqlite3 or oracle。
注意:Hue本身用到的是sqlite3。
在哪里呢,怎么看呢?
desktop.db这个就是Hue用的 sqlite3数据库。
https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_ig_hue_config.html#concept_ezg_b2s_hl
首先,看下官网的参考步骤
http://archive.cloudera.com/cdh5/cdh/5/hue-3.9.0-cdh5.5.0/manual.html
一、以下是默认的配置文件
# Configuration options for specifying the Desktop Database. For more info,# see http://docs.djangoproject.com/en/1.4/ref/settings/#database-engine# ------------------------------------------------------------------------[[database]]# Database engine is typically one of:# postgresql_psycopg2, mysql, sqlite3 or oracle.## Note that for sqlite3, 'name', below is a path to the filename. For other backends, it is the database name.# Note for Oracle, options={"threaded":true} must be set in order to avoid crashes.# Note for Oracle, you can use the Oracle Service Name by setting "port=0" and then "name=<host>:<port>/<service_name>".# Note for MariaDB use the 'mysql' engine.## engine=sqlite3## host=## port=## user=## password=## name=desktop/desktop.db## options={}
########################################################################### # Settings for the RDBMS application ###########################################################################[librdbms]# The RDBMS app can have any number of databases configured in the databases# section. A database is known by its section name# (IE sqlite, mysql, psql, and oracle in the list below).[[databases]]# sqlite configuration.## [[[sqlite]]]# Name to show in the UI.## nice_name=SQLite# For SQLite, name defines the path to the database.## name=/tmp/sqlite.db# Database backend to use.## engine=sqlite# Database options to send to the server when connecting.# https://docs.djangoproject.com/en/1.4/ref/databases/## options={}# mysql, oracle, or postgresql configuration.## [[[mysql]]]# Name to show in the UI.## nice_name="My SQL DB"# For MySQL and PostgreSQL, name is the name of the database.# For Oracle, Name is instance of the Oracle server. For express edition# this is 'xe' by default.## name=mysqldb# Database backend to use. This can be:# 1. mysql# 2. postgresql# 3. oracle## engine=mysql# IP or hostname of the database to connect to.## host=localhost# Port the database server is listening to. Defaults are:# 1. MySQL: 3306# 2. PostgreSQL: 5432# 3. Oracle Express Edition: 1521## port=3306# Username to authenticate with when connecting to the database.## user=example# Password matching the username to authenticate with when# connecting to the database.## password=example# Database options to send to the server when connecting.# https://docs.djangoproject.com/en/1.4/ref/databases/## options={}
二、以下是跟我机器集群匹配的配置文件(非HA集群下怎么配置Hue的database模块)
########################################################################### # Settings for the RDBMS application ###########################################################################[librdbms]# The RDBMS app can have any number of databases configured in the databases# section. A database is known by its section name# (IE sqlite, mysql, psql, and oracle in the list below).[[databases]]# sqlite configuration.[[[sqlite]]]# Name to show in the UI.nice_name=SQLite# For SQLite, name defines the path to the database.name=/home/hadoop/app/hue/desktop/desktop.db# Database backend to use.engine=sqlite
# mysql, oracle, or postgresql configuration.[[[mysql]]]# Name to show in the UI.nice_name="My SQL DB"# For MySQL and PostgreSQL, name is the name of the database.# For Oracle, Name is instance of the Oracle server. For express edition# this is 'xe' by default.name=test# Database backend to use. This can be:# 1. mysql# 2. postgresql# 3. oracleengine=mysql# IP or hostname of the database to connect to.host=bigdatamaster# Port the database server is listening to. Defaults are:# 1. MySQL: 3306# 2. PostgreSQL: 5432# 3. Oracle Express Edition: 1521port=3306# Username to authenticate with when connecting to the database.user=root# Password matching the username to authenticate with when# connecting to the database.password=rootroot# Database options to send to the server when connecting.# https://docs.djangoproject.com/en/1.4/ref/databases/## options={}
当然,这里,也可以用hive里安装的mysql里的数据库hive(命名)。(我一般用这种)
hive> show databases; OK default hive Time taken: 0.074 seconds, Fetched: 2 row(s) hive>
# mysql, oracle, or postgresql configuration.[[[mysql]]]# Name to show in the UI.nice_name="My SQL DB"# For MySQL and PostgreSQL, name is the name of the database.# For Oracle, Name is instance of the Oracle server. For express edition# this is 'xe' by default.name=hive# Database backend to use. This can be:# 1. mysql# 2. postgresql# 3. oracleengine=mysql# IP or hostname of the database to connect to.host=bigdatamaster# Port the database server is listening to. Defaults are:# 1. MySQL: 3306# 2. PostgreSQL: 5432# 3. Oracle Express Edition: 1521port=3306# Username to authenticate with when connecting to the database.user=hive# Password matching the username to authenticate with when# connecting to the database.password=hive# Database options to send to the server when connecting.# https://docs.djangoproject.com/en/1.4/ref/databases/## options={}
最后的界面,如下
三、以下是跟我机器集群匹配的配置文件(HA集群下怎么配置Hue的database模块)
<configuration><property><name>javax.jdo.option.ConnectionURL</name><value>jdbc:mysql://bigdata-pro01.kfk.com:3306/metastore?createDatabaseIfNotExist=true</value></property><property><name>javax.jdo.option.ConnectionDriverName</name><value>com.mysql.jdbc.Driver</value></property><property><name>javax.jdo.option.ConnectionUserName</name><value>root</value></property><property><name>javax.jdo.option.ConnectionPassword</name><value>root</value></property><property><name>hive.cli.print.header</name><value>true</value><description>Whether to print the names of the columns in query output.</description></property><property><name>hive.cli.print.current.db</name><value>true</value><description>Whether to include the current database in the Hive prompt.</description></property><property><name>hbase.zookeeper.quorum</name><value>bigdata-pro01.kfk.com,bigdata-pro02.kfk.com,bigdata-pro03.kfk.com</value></property> </configuration>
所以,我这里设置如下:
########################################################################### # Settings for the RDBMS application ###########################################################################[librdbms]# The RDBMS app can have any number of databases configured in the databases# section. A database is known by its section name# (IE sqlite, mysql, psql, and oracle in the list below).[[databases]]# sqlite configuration.[[[sqlite]]]# Name to show in the UI.nice_name=SQLite# For SQLite, name defines the path to the database.name=/opt/modules/hue-3.9.0-cdh5.5.0/desktop/desktop.db# Database backend to use.engine=sqlite# Database options to send to the server when connecting.# https://docs.djangoproject.com/en/1.4/ref/databases/## options={}# mysql, oracle, or postgresql configuration.[[[mysql]]]# Name to show in the UI.nice_name="My SQL DB"# For MySQL and PostgreSQL, name is the name of the database.# For Oracle, Name is instance of the Oracle server. For express edition# this is 'xe' by default.name=metastore# Database backend to use. This can be:# 1. mysql# 2. postgresql# 3. oracleengine=mysql# IP or hostname of the database to connect to.host=bigdata-pro01.kfk.com# Port the database server is listening to. Defaults are:# 1. MySQL: 3306# 2. PostgreSQL: 5432# 3. Oracle Express Edition: 1521port=3306# Username to authenticate with when connecting to the database.user=root# Password matching the username to authenticate with when# connecting to the database.password=root# Database options to send to the server when connecting.# https://docs.djangoproject.com/en/1.4/ref/databases/## options={}
然后,关闭mysql,再重启mysql,重启一下hue。
再,停掉mysql,重启mysql和hue
[kfk@bigdata-pro01 conf]$ sudo service mysqld restart Stopping mysqld: [ OK ] Starting mysqld: [ OK ] [kfk@bigdata-pro01 conf]$
[kfk@bigdata-pro01 hue-3.9.0-cdh5.5.0]$ ./build/env/bin/supervisor [INFO] Not running as root, skipping privilege drop starting server with options: {'daemonize': False,'host': 'bigdata-pro01.kfk.com','pidfile': None,'port': 8888, 'server_group': 'hue', 'server_name': 'localhost', 'server_user': 'hue', 'ssl_certificate': None, 'ssl_cipher_list': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA', 'ssl_private_key': None, 'threads': 40, 'workdir': None}
总结:
即,Hue的服务器(名字为My SQL DB,一般是mysql, oracle, or postgresql)。通常用mysql。
那么,它的数据库是metastore,是在hive里新建的mysql来充当它的元数据库。
<property><name>javax.jdo.option.ConnectionURL</name><value>jdbc:mysql://master:3306/metastore?createDatabaseIfNotExist=true</value></property>
Hue的服务器(名字为SQLite),那么它的数据库是/opt/modules/hue-3.9.0-cdh5.5.0/desktop/desktop.db
同时,大家可以关注我的个人博客:
http://www.cnblogs.com/zlslch/ 和 http://www.cnblogs.com/lchzls/ http://www.cnblogs.com/sunnyDream/
详情请见:http://www.cnblogs.com/zlslch/p/7473861.html
人生苦短,我愿分享。本公众号将秉持活到老学到老学习无休止的交流分享开源精神,汇聚于互联网和个人学习工作的精华干货知识,一切来于互联网,反馈回互联网。
目前研究领域:大数据、机器学习、深度学习、人工智能、数据挖掘、数据分析。 语言涉及:Java、Scala、Python、Shell、Linux等 。同时还涉及平常所使用的手机、电脑和互联网上的使用技巧、问题和实用软件。 只要你一直关注和呆在群里,每天必须有收获
对应本平台的讨论和答疑QQ群:大数据和人工智能躺过的坑(总群)(161156071)
转载于:https://www.cnblogs.com/zlslch/p/6818229.html
HUE配置文件hue.ini 的database模块详解(包含qlite、mysql、 psql、和oracle)(图文详解)(分HA集群和非HA集群)...相关推荐
- HUE配置文件hue.ini 的hbase模块详解(图文详解)(分HA集群和非HA集群)
不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...
- HUE配置文件hue.ini 的zookeeper模块详解(图文详解)(分HA集群)
不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...
- mysql连接数详解_查看mysql当前连接数的方法详解
1.查看当前所有连接的详细资料: ./mysqladmin -uadmin -p -h10.140.1.1 processlist2.只查看当前连接数(Threads就是连接数.): ./mysqla ...
- mysql查询语句详解_基于mysql查询语句的使用详解
1> 查询数据表除了前三条以外的数据. 起初我想到的是这条语句 SELECT * FROM admin WHERE userid NOT IN (SELECT userid FROM admin ...
- mysql索引详讲_SQL优化 MySQL版 - B树索引详讲
SQL优化 MySQL版 - -B树索引详讲 作者:Stanley 罗昊 [转载请注明出处和署名,谢谢!] 为什么要进行SQL优化呢?很显然,当我们去写sql语句时: 1会发现性能低 2.执行时间太 ...
- 台式计算机硬件图文详解,[计算机硬件及网络]电脑硬件知识图文详解.pdf
[计算机硬件及网络]电脑硬件知识图文详解 电脑硬件图文详解(一)构成 开机壳看光光 做为这系列的起头,当然先从最简单的聊起:把机壳侧板打开瞧一下电脑内部. 如果你有兴趣的话,准备一支螺丝起子,不用五分 ...
- docker build命令详解_Docker镜像与容器常用命令图文详解
一.系统命令 #查看docker版本 docker version #查看docker的系统信息,包含镜像容器的数量 docker info #查看docker的所有命令 docker --help ...
- mysql join 组合索引,图文详解MySQL中两表关联的连接表如何创建索引
本文介绍了MySQL中两表关联的连接表是如何创建索引的相关内容,分享出来供大家参考学习,下面来看看详细的介绍: 问题介绍 创建数据库的索引,可以选择单列索引,也可以选择创建组合索引. 遇到如下这种情况 ...
- 【Hue】Hue入门解析
一. Apache Hue介绍 1.Hue是什么 HUE英文全称为Hadoop User Experience,是一个开源的Apache Hadoop UI系统,由Cloudera Desktop演化 ...
最新文章
- 清华大学精密仪器系:智能传感器太重要了!
- js实现图片无缝连接
- try-catch-finally 与返回值的修改
- sql两个时间计算时间差_Java 8时间类,越用越香
- 数据库:case when then
- 这一年多来,阿里Blink测试体系如何从0走向成熟?
- 开展“稳健”的生物信息学研究的9个要点
- 依赖 netty spring_面试官:如何写好一个 Spring 组件?懵圈!
- 无公式无数学内容下,如何理解加密与解密知识?
- 电力载波通信模块JST-HPLC-S-C在物联网通信领域的应用
- 服务器上怎么安虚拟主机呀,上线虚拟主机产品步骤
- HTML和CSS小知识点笔记
- SN74LVC2G04DRLR 德州仪器TI 反相器
- JVM的一些总结(面试须知)
- python分数约分_python分数的四则运算
- 缓存Cache-Control
- 查看eigen库版本的指令
- 理解left join的多次连续使用
- DB2自定义数据库方言
- 自己动手做聊天机器人 二十九-重磅:近1GB的三千万聊天语料供出