hive-1.2.0 安装

1 复制 hive-env.sh.template 为 hive-env.sh 后添加
export HADOOP_USER_CLASSPATH_FIRST=true

2 复制hive-default.xml.template 为 hive-site.xml
删除所有的,然后添加
提前设置好你的 mysql 相关用户和密码

<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?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>hive</value>
<description>username to use against metastore database</description>
</property>

<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>666666</value>
<description>password to use against metastore database</description>
</property>

3 添加 mysql-connector-java-5.1.35-bin.jar 到 lib 目录下

4 启动 hive

1

 

5 Mysql 里的三张表保存了 表,列,和在 hdfs 上的信息
2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s