Hive3.x get_table_meta null pointer exception
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Run WaggleDanceIntegrationTest.getTableMeta and inspect PanopticConcurrentOperationExecutor.getResultFromFuture, GetTableMetaRequest.call, and rollbackTransaction where currentTransaction is reported null. Compare the failing call with the underlying metastore directly, then verify that the integration test consistently passes without the reported NullPointerException.
Written by the indexing model from the issue text.
Description
Describe the bug
WaggleDanceIntegrationTest.getTableMeta is always fail because of assertThat(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):
- Waggle Dance Version: the latest hive3.x
- Hive Versions: no hive version, test the ut
Additional context
The bug looks very serious,beacause get_table_meta often uses.
- Dominant language
- Java
- Stars
- 289
- Forks
- 79
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ExpediaGroup/waggle-dance
-
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
ExpediaGroup/waggle-dance#341 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ExpediaGroup/waggle-dance#333 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
ExpediaGroup/waggle-dance#323 · 1 comment ·
-
Can we implement a MetaStoreFilterHook to modify the path and support HMS that uses the same nsOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
ExpediaGroup/waggle-dance#320 · 9 comments ·
-
Kerberos IssueOpen
Difficulty 4/5 3-5 days Newbie friendliness 20/100
ExpediaGroup/waggle-dance#287 · 12 comments ·
All issues in ExpediaGroup/waggle-dance
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
avaje/avaje-metrics#142 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RamazanKara/nightjar#299 · 4 comments ·
-
Support emergency=access_point (POI type and rendering)Possibly taken @julenepj claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
osmandapp/OsmAnd#27424 · 1 comment ·
Maintainers usually reply within 1 day
-
Link not working in the feedback concerning String.format() in exercise 'Tim from Marketing'Possibly taken @LaibaMunir016 claimed this 1 day ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
exercism/java-analyzer#379 · 1 comment ·