赞
踩
hive-site.xml
文件注意:先创建一个metastore数据库,字符集要用latin1
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://hostname:3306/metastore?createDatabaseIfNotExist=true</value> <description>JDBC connect string for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> <description>Driver class name for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>root</value> <description>username to use against metastore database</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>your_password</value> <description>password to use against metastore database</description> </property> </configuration>
start-dfs.sh
start-yarn.sh
hive
创建一张表,试试看元数据能否保存到MySQL里
查看一下metastore库
TBLS表
COLUMNS_V2表
DBS表
从上图中,可得知
元数据的结构
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。