问题出现场景:
如用户描述:(
测试脚本如下:
echo "
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.optimize.sort.dynamic.partition=false;
set hive.exec.max.dynamic.partitions.pernode=1000;
set hive.exec.max.dynamic.partitions=10000;
set mapred.child.java.opts=-Xmx3000m;
drop table tmp.test30;create table tmp.test30(v1 int);" | hive
将以上脚本复制30份,修改其中的表名 test30 为 testn,n为1,2,3...)多个进程同时在操作元数据时,会报如下错误Log:
INFO 01-07 11:03:20,392 - 12 2 - (stderr) Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
INFO 01-07 11:03:20,393 - 12 2 - (stderr) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:346)
INFO 01-07 11:03:20,393 - 12 2 - (stderr) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
INFO 01-07 11:03:20,393 - 12 2 - (stderr) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
INFO 01-07 11:03:20,393 - 12 2 - (stderr) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO 01-07 11:03:20,393 - 12 2 - (stderr) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
INFO 01-07 11:03:20,393 - 12 2 - (stderr) at sun.reflect.DelegatingMe