spark 启动thrift server实现hive on spark

在 spark的conf下 创建 hive-site.xml
不过在CDH中,hive是默认为hive on spark的,而不是mr

新增下面内容:

<configuration>
    <property>
      <name>hive.metastore.client.connect.retry.delay</name>
      <value>5</value>
    </property>
    <property>
      <name>hive.metastore.client.socket.timeout</name>
      <value>1800</value>
    </property>
    <property>
      <name>hive.metastore.connect.retries</name>
      <value>24</value>
    </property>
    <property>
      <name>hive.metastore.uris</name>
      <value>thrift://www.cdh001.com:9083</value>
    </property>
    <property>
      <name>hive.server2.thrift.port</name>
      <value>10015</value>
    </property>
    <property>
      <name>hive.server2.transport.mode</name>
      <value>binary</value>
    </property>
  </configuration>

hive.metastore.uris为hive的元数据获取地址
10015为jdbc连接spark的端口

上一篇:给hive的metastore做JVM优化


下一篇:SemanticException org.apache.hadoop.hive.ql.metadata.HiveException