-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hive3.x get_table_meta null pointer exception #288
Comments
I just did a clean checkout of branch and tests succeed. Not sure what would be different to make it fail. |
I tested it again according to your way and WaggleDanceIntegrationTest#getTableMeta failed again. And I run from IDE(Idea) also failed. `Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 75.938 sec <<< FAILURE! 2023-09-06T18:01:50,041 INFO com.hotels.bdp.waggledance.server.MetaStoreProxyServer:128 - Shutting down WaggleDance. Results : Failed tests: getTableMeta(com.hotels.bdp.waggledance.WaggleDanceIntegrationTest): (..) Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 |
Could you please merge my pr firstly. ^-^. |
After testing, the getTableMate() unit test has a probability of error, and the cycle test is conducted by modifying the getTableMeta() code
Errors will appear after about 15 cycles, and the same error message is 2023-09-07T10:17:09,792 WARN com.hotels.bdp.waggledance.mapping.service.PanopticConcurrentOperationExecutor:79 - Got exception fetching get_table_meta: {} |
strange I got to 224 attempts and the stopped the test all were ok.
outside the loop and just repeat the getTableMeta call in a loop. Can you reproduce this in a a real environment as well or is this only happening in the IT? |
This test case may not be very accurate because it determines whether the result is 1, but sometimes even if an error occurs, it does not affect the accuracy of UT testing because WD will query two databases at the same time. If an error is reported that originally had no results, it does not affect the accuracy of UT testing. Perhaps you can modify the log to see if there are any abnormal stacks. Maybe there is some timing issue with the runner/proxy setup that something is not completed correctly before the first call is being made.---- Yes , I agree with you, maybe fix some code, can run successfully. At present, feedback shows that the testing environment is relatively normal. |
Describe the bug
WaggleDanceIntegrationTest.getTableMeta
is always fail because ofassertThat(tableMeta.size(), is(1));
To Reproduce
run WaggleDanceIntegrationTest.getTableMeta, the ut always fails ,sometimes ok.
Expected behavior
run WaggleDanceIntegrationTest.getTableMeta ok.
Logs
I change the code PanopticConcurrentOperationExecutor.getResultFromFuture from
} catch (ExecutionException e) { log.warn(errorMessage, e.getCause().getMessage());
to
} catch (ExecutionException e) { log.warn(errorMessage, e);
I will get this log. It seems may be the hms bug.
2023-09-05T22:43:04,765 WARN com.hotels.bdp.waggledance.mapping.service.PanopticConcurrentOperationExecutor:78 - Got exception fetching get_table_meta: {} java.util.concurrent.ExecutionException: MetaException(message:java.lang.NullPointerException) at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_301] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_301] at com.hotels.bdp.waggledance.mapping.service.PanopticConcurrentOperationExecutor.getResultFromFuture(PanopticConcurrentOperationExecutor.java:74) ~[classes/:?] at com.hotels.bdp.waggledance.mapping.service.PanopticConcurrentOperationExecutor.executeRequests(PanopticConcurrentOperationExecutor.java:63) ~[classes/:?] at com.hotels.bdp.waggledance.mapping.service.PanopticOperationHandler.getTableMeta(PanopticOperationHandler.java:110) ~[classes/:?] at com.hotels.bdp.waggledance.mapping.service.impl.PrefixBasedDatabaseMappingService$1.getTableMeta(PrefixBasedDatabaseMappingService.java:359) ~[classes/:?] at com.hotels.bdp.waggledance.server.FederatedHMSHandler.get_table_meta_aroundBody830(FederatedHMSHandler.java:2163) ~[classes/:?] at com.hotels.bdp.waggledance.server.FederatedHMSHandler$AjcClosure831.run(FederatedHMSHandler.java:1) ~[classes/:?] at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:170) ~[aspectjweaver-1.9.7.jar:?] at com.hotels.bdp.waggledance.metrics.MonitoredAspect.monitor(MonitoredAspect.java:58) ~[classes/:?] at com.hotels.bdp.waggledance.metrics.MonitoredAspect.monitor(MonitoredAspect.java:47) ~[classes/:?] at com.hotels.bdp.waggledance.server.FederatedHMSHandler.get_table_meta_aroundBody832(FederatedHMSHandler.java:2162) ~[classes/:?] at com.hotels.bdp.waggledance.server.FederatedHMSHandler$AjcClosure833.run(FederatedHMSHandler.java:1) ~[classes/:?] at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:170) ~[aspectjweaver-1.9.7.jar:?] at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:218) ~[jcabi-aspects-0.25.1.jar:?] at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1) ~[jcabi-aspects-0.25.1.jar:?] at com.jcabi.aspects.aj.MethodLogger.wrapMethod(MethodLogger.java:169) ~[jcabi-aspects-0.25.1.jar:?] at com.hotels.bdp.waggledance.server.FederatedHMSHandler.get_table_meta(FederatedHMSHandler.java:2162) ~[classes/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_301] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_301] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_301] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_301] at com.hotels.bdp.waggledance.server.ExceptionWrappingHMSHandler.invoke(ExceptionWrappingHMSHandler.java:49) ~[classes/:?] at com.sun.proxy.$Proxy29.get_table_meta(Unknown Source) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_301] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_301] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_301] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_301] at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:147) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108) ~[hive-exec-3.1.3.jar:3.1.3] at com.sun.proxy.$Proxy29.get_table_meta(Unknown Source) ~[?:?] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$get_table_meta.getResult(ThriftHiveMetastore.java:15190) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$get_table_meta.getResult(ThriftHiveMetastore.java:15174) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.hadoop.hive.metastore.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:48) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) ~[hive-exec-3.1.3.jar:3.1.3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_301] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_301] at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_301] Caused by: org.apache.hadoop.hive.metastore.api.MetaException: java.lang.NullPointerException at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$get_table_meta_result$get_table_meta_resultStandardScheme.read(ThriftHiveMetastore.java) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$get_table_meta_result$get_table_meta_resultStandardScheme.read(ThriftHiveMetastore.java) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$get_table_meta_result.read(ThriftHiveMetastore.java) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:86) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_get_table_meta(ThriftHiveMetastore.java:1973) ~[hive-exec-3.1.3.jar:3.1.3] at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.get_table_meta(ThriftHiveMetastore.java:1958) ~[hive-exec-3.1.3.jar:3.1.3] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_301] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_301] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_301] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_301] at com.hotels.bdp.waggledance.client.compatibility.HiveCompatibleThriftHiveMetastoreIfaceFactory$ThriftMetaStoreClientInvocationHandler.invoke(HiveCompatibleThriftHiveMetastoreIfaceFactory.java:43) ~[classes/:?] at com.sun.proxy.$Proxy150.get_table_meta(Unknown Source) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_301] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_301] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_301] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_301] at com.hotels.bdp.waggledance.client.DefaultMetaStoreClientFactory$ReconnectingMetastoreClientInvocationHandler.doRealCall(DefaultMetaStoreClientFactory.java:105) ~[classes/:?] at com.hotels.bdp.waggledance.client.DefaultMetaStoreClientFactory$ReconnectingMetastoreClientInvocationHandler.invoke(DefaultMetaStoreClientFactory.java:98) ~[classes/:?] at com.sun.proxy.$Proxy150.get_table_meta(Unknown Source) ~[?:?] at com.hotels.bdp.waggledance.mapping.service.requests.GetTableMetaRequest.call(GetTableMetaRequest.java:41) ~[classes/:?] at com.hotels.bdp.waggledance.mapping.service.requests.GetTableMetaRequest.call(GetTableMetaRequest.java:29) ~[classes/:?] at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) ~[?:1.8.0_301] at java.util.concurrent.FutureTask.run(FutureTask.java) ~[?:1.8.0_301] ... 3 more
The NPE comes from
public void rollbackTransaction() { if (this.openTrasactionCalls < 1) { this.debugLog("rolling back transaction: no open transactions: " + this.openTrasactionCalls); } else { this.debugLog("Rollback transaction, isActive: " + this.currentTransaction.isActive()); }
in
this.debugLog("Rollback transaction, isActive: " + this.currentTransaction.isActive());
this.currentTransaction is null.
Versions (please complete the following information):
Additional context
The bug looks very serious,beacause get_table_meta often uses.
The text was updated successfully, but these errors were encountered: