windows单机启动hive hiveserver2

原来起hiveserver2 报:

org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.

原因在于hiveserver2 tcp服务端口默认是使用10000,服务默认使用的端口:

hive.server2.transport.mode – 默认值为binary(TCP),可选值HTTP,0.13版本后开始支持。    
hive.server2.thrift.http.port– HTTP的监听端口,默认值为10001。  
hive.server2.thrift.min.worker.threads– 最小工作线程数,默认为5。  
hive.server2.thrift.max.worker.threads – 最大工作线程数,默认为500。    
hive.server2.thrift.port– TCP 的监听端口,默认为10000。    
hive.server2.thrift.bind.host– TCP绑定的主机,默认为localhost。  
hive.server2.enable.doAs:设置为false,查询将以运行hiveserver2进程的用户运行,否则以提交查询的用户执行查询  

所以对hive-site.xml做以配置:

     
     <property>
        <name>hive.server2.thrift.http.port</name>
        <value>10001</value>
     </property>
      <property>
        <name>hive.server2.thrift.port</name>
        <value>10005</value>
     </property>    	  
 




猜你喜欢

转载自blog.csdn.net/pdw2009/article/details/80632085
今日推荐