最近在同一时刻执行多个hive -e 操作时,出现了java.lang.OutOfMemoryError: unable to create new native thread异常 或Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient。折磨许久,后来发现是该机器没有设置创建线程数量造成的,默认是1024,需要改系统配置文件,设大才行。

 

 

修改/etc/security/limits.conf

*    soft    nofile    65536
*    hard    nofile    65536
username  soft nproc  32000
username hard nproc  32000
username soft stack  1024
username hard stack  1024

修改配置文件需重新登陆客户端,即可生效。

posted on 2014-11-13 14:59  LIUSANNITY  阅读(1793)  评论(0编辑  收藏  举报