我是靠谱客的博主 热情白开水,最近开发中收集的这篇文章主要介绍配置Hive,采用mysql存储metadata,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

1.安装hadoop(1.0以上)

2.安装hive安装(0.9.0以上版本)

4.当然你还得安装jdk

4. mysql,同时准备个可访问的账号,这里采用root,最好配上远程访问权限。

修改hive下的conf文件夹中将hive-default.xml.template 复制并改名成hive-site.xml

这里是我的文件

<property>
<wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;hive.metastore.local&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;value&gt;true&lt;/value&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;javax.jdo.option.ConnectionURL&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;value&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><span style="background-color:rgb(255,0,0)"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px">jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist</span></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="background-color:rgb(255,0,0)"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px">=true</span></span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/value&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;javax.jdo.option.ConnectionDriverName&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><span style="background-color:rgb(255,0,0)"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px">&lt;value&gt;com.mysql.jdbc.Driver&lt;/value&gt;</span></span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;javax.jdo.option.ConnectionUserName&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><span style="background-color:rgb(255,0,0)"><span style="color:#000000"><span style="font-family:simsun; font-size:14px; text-align:left; line-height:21px">&lt;value&gt;Username&lt;/value&gt;&lt;!-- In my case UserName is hadoop--&gt;</span></span></span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;property&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;name&gt;javax.jdo.option.ConnectionPassword&lt;/name&gt;</span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><wbr style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)"></span><span style="background-color:rgb(255,0,0)"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px">&lt;value&gt;UserPassword&lt;/value&gt;&lt;!-- In my case password is hadoop--&gt;</span></span><br style="text-align:left; line-height:21px; background-color:rgb(234,247,253); font-family:simsun; color:rgb(70,70,70); font-size:14px"><span style="font-family:simsun; font-size:14px; color:#464646; text-align:left; line-height:21px; background-color:rgb(234,247,253)">&lt;/property&gt;</span></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>

其中标红的都是需要修改的,并改成自己的设置,同时将mysql的jdbc驱动拷贝到hive的lib目录下,然后启动hive看到如下界面


  1. WARNING:org.apache.hadoop.metrics.jvm.EventCounterisdeprecated.Pleaseuseorg.apache.hadoop.log.metrics.EventCounterinallthelog4j.propertiesfiles.
  2. Logginginitializedusingconfigurationinjar:file:/usr/local/hadoop/hive/lib/hive-common-0.9.0.jar!/hive-log4j.properties
  3. Hivehistoryfile=/tmp/root/hive_job_log_root_201206141444_1788273672.txt
  4. hive>
当输入 show tables;没有报错时,证明配置成功
hive> show tables;
OK
invites
Time taken: 3.688 seconds
hive>
然后大家可以登录到mysql查看是否创建了数据库hive(跟你配置的名字相同)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hive |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.00 sec)
这时一切搞定~~~~~~~~~~

最后

以上就是热情白开水为你收集整理的配置Hive,采用mysql存储metadata的全部内容,希望文章能够帮你解决配置Hive,采用mysql存储metadata所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(57)

评论列表共有 0 条评论

立即
投稿
返回
顶部