zoukankan      html  css  js  c++  java
  • Hive远程模式启动

    1、配置远程服务器MYSQL,并保证远程可以访问 
    2、$HIVE_HOME/conf/hive-site.xml 关键配置如下
      <property>
      <name>hive.metastore.local</name>
      <value>false</value>
      <description>controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM</description>
    </property>
    <property>
      <name>javax.jdo.option.ConnectionURL</name>
      <value>jdbc:mysql://192.168.17.133:3306/hive?createDatabaseIfNotExist=true</value>
      <description>JDBC connect string for a JDBC metastore</description>
    </property>
    <property>
      <name>javax.jdo.option.ConnectionDriverName</name>
      <value>com.mysql.jdbc.Driver</value>
      <description>Driver class name for a JDBC metastore</description>
    </property>
    <property>
      <name>javax.jdo.option.ConnectionUserName</name>
      <value>root</value>
      <description>username to use against metastore database</description>
    </property>
    <property>
      <name>javax.jdo.option.ConnectionPassword</name>
      <value>chenbo</value>
      <description>password to use against metastore database</description>
    </property>
    <property>
      <name>hive.metastore.uris</name>
      <value>thrift://127.0.0.1:9083</value>
    </property>
    3、mysql-connector-java-5.1.12.jar复制到$HIVE_HOME/lib下
    4、$HIVE_HOME/bin/hive --service metastore --开启metastore服务 默认端口用的是9083
    5、$HIVE_HOME/bin/hive --service hiveserver --开启hiveserver服务 JDBC端口是10000   JAVA可以连接
    6、在本地启动$HIVE_HOME/bin/hive   hive>show tables;
    7、登录远程hive数据库,如果有元数据,说明完全启动成功
  • 相关阅读:
    程序执行并发和并行的理解
    计算机的线程和进程的区别理解,不是编程上的进程和线程
    php单线程理解
    一句话题解(2020.12)
    PE328 Lowest-cost Search
    arc109D
    6908. 【2020.11.30提高组模拟】关灯(light)/loj#3385. 「COCI 2020.11」Svjetlo
    CF1456D. Cakes for Clones
    CF1456C. New Game Plus!
    agc025E
  • 原文地址:https://www.cnblogs.com/bobsoft/p/2714494.html
Copyright © 2011-2022 走看看