Hive配置连接hiveserver2


1.编辑Hive的hive-site.xml

  <property> <!-- hiveserver2用户名 --> <name>beeline.hs2.connection.user</name> <value>hive2</value> </property> <property> <!-- hiveserver2密码 --> <name>beeline.hs2.connection.password</name> <value>hive2</value> </property> <property> <!-- hiveserver2端口 --> <name>beeline.hs2.connection.hosts</name> <value>localhost:10000</value> </property> 2.测试是否成功
启动hiveserver2
$HIVE_HOME/bin/hiveserver2
 连接方式一
    $HIVE_HOME/bin/beeline -u jdbc:hive2://localhost:10000;auth=hive2;password=hive2
连接方式二
    先启动beeline
    然后在beeline中连接hiveserver2:!connect jdbc:hive2://localhost:10000


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM