Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-4510

Config "hive_sync.metastore.uris" in flink sql sync is not effective

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Exception occur as below. The reason is "hive_sync.metastore.uris" in flink sql sync is not effective. It causes uri of hive meta store is '' , which make choose local meta store when init meta client.

       

      Exception stacktrace

      java.lang.ClassNotFoundException: org.datanucleus.api.jdo.JDOPersistenceManagerFactory
          at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:348)
          at javax.jdo.JDOHelper$18.run(JDOHelper.java:2018)
          at javax.jdo.JDOHelper$18.run(JDOHelper.java:2016)
          at java.security.AccessController.doPrivileged(Native Method)
          at javax.jdo.JDOHelper.forName(JDOHelper.java:2015)
          at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1162)
          at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
          at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)
          at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:523)
          at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:552)
          at org.apache.hadoop.hive.metastore.ObjectStore.initializeHelper(ObjectStore.java:407)
          at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:344)
          at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:305)
          at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
          at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
          at org.apache.hadoop.hive.metastore.RawStoreProxy.<init>(RawStoreProxy.java:58)
          at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)
          at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStoreForConf(HiveMetaStore.java:624)
          at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMSForConf(HiveMetaStore.java:590)
          at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:584)
          at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:655)
          at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:427)
          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.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148)
          at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
          at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:79)
          at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:92)
          at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6889)
          at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:159)
          at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:70)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
          at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1699)
          at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:83)
          at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:133)
          at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:104)
          at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3600)
          at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3652)
          at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3632)
          at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3894)
          at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:248)
          at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:231)
          at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:388)
          at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:332)
          at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:312)
          at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:288)
          at org.apache.hudi.hive.ddl.HMSDDLExecutor.<init>(HMSDDLExecutor.java:78)
          at org.apache.hudi.hive.HoodieHiveSyncClient.<init>(HoodieHiveSyncClient.java:79)
          at org.apache.hudi.hive.HiveSyncTool.initSyncClient(HiveSyncTool.java:101)
          at org.apache.hudi.hive.HiveSyncTool.<init>(HiveSyncTool.java:95)
          at org.apache.hudi.sink.utils.HiveSyncContext.hiveSyncTool(HiveSyncContext.java:79)
          at org.apache.hudi.sink.StreamWriteOperatorCoordinator.doSyncHive(StreamWriteOperatorCoordinator.java:352)
          at org.apache.hudi.sink.utils.NonThrownExecutor.lambda$wrapAction$0(NonThrownExecutor.java:130)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

       

      This bug happened after pr [pr-5854|https://github.com/apache/hudi/pull/5854.]

      It seems not correct to remove the code in red square. I think you must have your reason to remove the code. Shiyan Xu Please have a look. Thank you ~  I will add the code back first to make sure the sync code running as expect. 

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sherhom sherhomhuang
            sherhom sherhomhuang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment