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

相关文章:

  • 2021-11-15
  • 2021-11-13
  • 2021-09-11
  • 2021-06-04
  • 2022-12-23
  • 2021-06-19
猜你喜欢
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2021-04-28
  • 2022-01-10
  • 2021-10-28
  • 2021-12-16
相关资源
相似解决方案