一、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 HiveServer2netstat -tlnup | grep 10000
如果需要远程连接,则改成主机名beifeng-hadoop-02,或者0.0.0.2(表示任何主机都可以连接)
JDBC连接beeline连接客户端beeline
,进入beeline交互式窗口以后,执行:!connect jdbc:hive2://beifeng-hadoop-02:10000
二、Sqoop
时间: 2024-12-11 18:38:34