1. 程式人生 > >解決啟動hive時報錯問題

解決啟動hive時報錯問題

一、錯誤

java.lang.OutOfMemoryError: Java heap space
	at java.net.ServerSocket.accept(ServerSocket.java:512)
	at org.apache.thrift.transport.TServerSocket.acceptImpl(TServerSocket.java:113)
	at org.apache.hadoop.hive.metastore.TServerSocketKeepAlive.acceptImpl(TServerSocketKeepAlive.java:39)
	at org.apache.hadoop.hive.metastore.TServerSocketKeepAlive.acceptImpl(TServerSocketKeepAlive.java:32)
	at org.apache.thrift.transport.TServerTransport.accept(TServerTransport.java:31)
	at org.apache.thrift.server.TThreadPoolServer.serve(TThreadPoolServer.java:131)
	at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:5253)
	at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:5134)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

二、解決方法
是啟動hive時,與hive相關的兩個服務沒有啟動開,兩個服務的啟動命令是:

 bin/hive --service metastore &
 bin/hive --service hiveserver &