hive3.1使用作为 hive metastore 的元库,好像是元数据库初始化失败导致未能成功启动
Initializing the schema to: 3.1.1000
Metastore connection URL: jdbc:hive2://?hive.conf.restricted.list=;hive.security.authorization.sqlstd.confwhitelist=.;hive.security.authorization.sqlstd.confwhitelist.append=.;hive.security.authorization.enabled=false;hive.metastore.uris=;hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdConfOnlyAuthorizerFactory;hive.support.concurrency=false;hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager;hive.metastore.rawstore.impl=org.apache.hadoop.hive.metastore.ObjectStore
Metastore Connection Driver : org.apache.hive.jdbc.HiveDriver
Metastore connection User: hive
Hive Session ID = 00f19dbe-095d-474c-a273-1a1e23d7a66c
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is
com.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Exception in thread “main” java.lang.RuntimeException: Error applying authorization policy on hive configuration: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hive.service.cli.CLIService.init(CLIService.java:121)
at org.apache.hive.service.cli.thrift.EmbeddedThriftBinaryCLIService.init(EmbeddedThriftBinaryCLIService.java:63)
at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:293)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.apache.hadoop.hive.metastore.tools.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:88)
at org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool.getConnectionToMetastore(MetastoreSchemaTool.java:250)
at org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool.testConnectionToMetastore(MetastoreSchemaTool.java:333)
at org.apache.hadoop.hive.metastore.tools.SchemaToolTaskInit.execute(SchemaToolTaskInit.java:53)
at org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool.run(MetastoreSchemaTool.java:448)
at org.apache.hive.beeline.schematool.HiveSchemaTool.main(HiveSchemaTool.java:138)
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.run(RunJar.java:328)
at org.apache.hadoop.util.RunJar.main(RunJar.java:241)
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hadoop.hive.ql.session.SessionState.setupAuth(SessionState.java:932)
at org.apache.hadoop.hive.ql.session.SessionState.applyAuthorizationPolicy(SessionState.java:1893)
at org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:134)
at org.apache.hive.service.cli.CLIService.init(CLIService.java:118)
… 17 more
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hadoop.hive.ql.session.SessionState.setAuthorizerV2Config(SessionState.java:964)
at org.apache.hadoop.hive.ql.session.SessionState.setupAuth(SessionState.java:924)
… 20 more
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:304)
at org.apache.hadoop.hive.ql.metadata.Hive.(Hive.java:497)
at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:398)
at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:385)
at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:356)
at org.apache.hadoop.hive.ql.session.SessionState.setAuthorizerV2Config(SessionState.java:960)
… 21 more
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:86)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.(RetryingMetaStoreClient.java:95)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119)
at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:4867)
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:4935)
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:4915)
at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:5211)
at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:316)
at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:299)
… 26 more
我们就是用的tidb,没啥问题,你这是初始化报错的吗,你可以看看初始化脚本,是否有语法不支持,可以先用mysql初始化,再迁过来,我记得还有个什么参数要改的
是的,看报错好像是在执行初始化命令 schematool -info -dbType mysql -userName hive -passWord [PROTECTED] -verbose’ 的时候失败了
这是由于2以上版本要首先初始化源数据库可以使用如下命令初始化
./hive/bin/schematool -dbType mysql -initSchema
会是这个原因嘛?
不是的
现在用TIDB的企业越来越多了,建议官方更新一下报错文档的收集整理工作。