首页 > 其他 > 详细

《OD学Hive》第五周20160730

时间:2016-07-30 10:19:15      阅读:99      评论:0      收藏:0      [点我收藏+]

一、Hive的JDBC连接

日志分析结果数据,存储在hive中

 

<property>
  <name>hive.server2.thrift.port</name>
  <value>10000</value>
  <description>Port number of HiveServer2 Thrift interface.
  Can be overridden by setting $HIVE_SERVER2_THRIFT_PORT</description>
</property>

<property>
  <name>hive.server2.thrift.bind.host</name>
  <value>localhost</value>
  <description>Bind host on which to run the HiveServer2 Thrift interface.
  Can be overridden by setting $HIVE_SERVER2_THRIFT_BIND_HOST</description>
</property>

hive.server2.thrift.bind.host

如果需要远程连接,则改成主机名beifeng-hadoop-02,或者0.0.0.2(表示任何主机都可以连接)

hiveserver2进程的启动:nohup hiveserver2 > /home/beifeng/hiveserver2.start.log 2>&1 &

nohup hive --service hiveserver2 > /home/beifeng/hiveserver2.start.log 2>&1 &
ps -ef | grep HiveServer2
netstat -tlnup | grep 10000

如果需要远程连接,则改成主机名beifeng-hadoop-02,或者0.0.0.2(表示任何主机都可以连接)

 

JDBC连接beeline连接客户端beeline

,进入beeline交互式窗口以后,执行:!connect jdbc:hive2://beifeng-hadoop-02:10000

二、Sqoop

 

《OD学Hive》第五周20160730

原文:http://www.cnblogs.com/yeahwell/p/5720201.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!