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:
- # . mysql
- # . postgresql
- # . oracle
- ## engine=mysql
- # IP or hostname of the database to connect to.
- ## host=localhost
- # Port the database server is listening to. Defaults are:
- # . MySQL:
- # . PostgreSQL:
- # . Oracle Express Edition:
- ## port=
- # 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:
- # . mysql
- # . postgresql
- # . oracle
- engine=mysql
- # IP or hostname of the database to connect to.
- host=bigdatamaster
- # Port the database server is listening to. Defaults are:
- # . MySQL:
- # . PostgreSQL:
- # . Oracle Express Edition:
- port=
- # 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: 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:
- # . mysql
- # . postgresql
- # . oracle
- engine=mysql
- # IP or hostname of the database to connect to.
- host=bigdatamaster
- # Port the database server is listening to. Defaults are:
- # . MySQL:
- # . PostgreSQL:
- # . Oracle Express Edition:
- port=
- # 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.-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:
- # . mysql
- # . postgresql
- # . oracle
- engine=mysql
- # IP or hostname of the database to connect to.
- host=bigdata-pro01.kfk.com
- # Port the database server is listening to. Defaults are:
- # . MySQL:
- # . PostgreSQL:
- # . Oracle Express Edition:
- port=
- # 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)
HUE配置文件hue.ini 的database模块详解(包含qlite、mysql、 psql、和oracle)(图文详解)(分HA集群和非HA集群)的更多相关文章
- HUE配置文件hue.ini 的hive和beeswax模块详解(图文详解)(分HA集群和非HA集群)
不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...
- 全网最详细的Windows系统里Oracle 11g R2 Database服务器端(64bit)的下载与安装(图文详解)
不多说,直接上干货! 环境: windows10系统(64位) 最好先安装jre或jdk(此软件用来打开oracle自带的可视化操作界面,不装也没关系:可以安装plsql,或者直接用命令行操作) Or ...
- HUE配置文件hue.ini 的hdfs_clusters模块详解(图文详解)(分HA集群和非HA集群)
不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...
- HUE配置文件hue.ini 的yarn_clusters模块详解(图文详解)(分HA集群和非HA集群)
不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...
- HUE配置文件hue.ini 的hbase模块详解(图文详解)(分HA集群和非HA集群)
不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...
- HUE配置文件hue.ini 的Spark模块详解(图文详解)(分HA集群和HA集群)
不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...
- HUE配置文件hue.ini 的impala模块详解(图文详解)(分HA集群)
不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...
- HUE配置文件hue.ini 的filebrowser模块详解(图文详解)(分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 ...
随机推荐
- iphone“连接到icloud是出错”的可能原因
百度没能解决"连接到icloud是出错",突然发现是因为禁止了"设置"访问WIFI和蜂窝网络(第三张图所示).
- mysql中要根据某个逗号分割的字符串关联查询另一张表的数据
首先观察下面的查询 select * from company where f_id in ('210','205','208') select * from company where f_id i ...
- Go语言的传参和传引用[转]
目录[-] 传参和传引用的问题 传slice不是传引用! 什么叫传引用? 为什么传slice不是传引用? 为什么很多人误以为slice是传引用呢? 传指针和传引用是等价的吗? 所有类型的函数参数都是传 ...
- Windows10+Python3+BeautifulSoup4 安装
用正则表达式来提取网页中的内容是相当麻烦的,这里介绍一个可以从HTML或XML文件中提取数据的Python库:Beautiful Soup.它能够通过你喜欢的转换器实现惯用的文档导航,查找,修改文档的 ...
- spring 3.X与jdk 1.8不兼容
1.报错(部分) 2.解决 虽然Spring的jdk要求如下,但是spring 3与jdk1.8不兼容(使用的是spring 3.2) 在eclipse将jdk版本下调.这里将JDK调到1.7(在ec ...
- Lucene.net 性能《第八篇》
一.IndexReader性能分析 IndexReader完成了打开所有索引文件和提供底层reader API等繁重的工作,而IndexSearch则要简单得多.由于打开一个IndexReader需要 ...
- crosss compile VLC with OpenMAX on ARM board(RockChip RK3399),in order to use Hard Acceleration when decode video
reference:http://www.x90x90x90.com/en/raspberry-pi-3-howto-compile-vlc-with-hardware-acceleration/ 1 ...
- hdu 1205 吃糖果【鸽巢原理】
题目 这道题不难,看别人博客的时候发现大家都说用鸽巢原理,这是个什么鬼,于是乎百度之. 1.把某种糖果看做隔板,如果某种糖果有n个,那么就有n+1块区域,至少需要n-1块其他种糖果才能使得所有隔板不挨 ...
- 无限存储之胖文本数据库TTD(Thick Text Database)
无限存储之胖文本数据库TTD(Thick Text Database) 阅读: 评论: 作者:Rybby 日期: 来源:rybby.com 所谓的“胖”就是多.大.丰富的意思,像我们平时看到的 ...
- ajax如何向后台传递数组,在后台该如何接收的问题(项目积累)
一.后台如何接收从前台接收的数组: 使用request.getParameterValues(String xxx); <input type="text" name=&qu ...