This is an automated email from the ASF dual-hosted git repository. kgyrtkirk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push: new 3826ffe HIVE-25634: Eclipse compiler bumps into AIOBE during ObjectStore compilation (#2754) (Zhihua Deng reviewed by Zoltan Haindrich) 3826ffe is described below commit 3826ffedd7563ec393e44f92841a37bdd8fabe39 Author: dengzh <dengzhhu...@gmail.com> AuthorDate: Fri Nov 12 21:55:27 2021 +0800 HIVE-25634: Eclipse compiler bumps into AIOBE during ObjectStore compilation (#2754) (Zhihua Deng reviewed by Zoltan Haindrich) --- .../org/apache/hadoop/hive/metastore/ObjectStore.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java index ea70e94..603c65a 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -14175,12 +14175,13 @@ public class ObjectStore implements RawStore, Configurable { @Override public ScheduledQueryPollResponse scheduledQueryPoll(ScheduledQueryPollRequest request) throws MetaException { ensureScheduledQueriesEnabled(); - String namespace = request.getClusterNamespace(); boolean commited = false; ScheduledQueryPollResponse ret = new ScheduledQueryPollResponse(); - try (QueryWrapper q = new QueryWrapper(pm.newQuery(MScheduledQuery.class, - "nextExecution <= now && enabled && clusterNamespace == ns && activeExecution == null"))) { + Query q = null; + try { openTransaction(); + q = pm.newQuery(MScheduledQuery.class, + "nextExecution <= now && enabled && clusterNamespace == ns && activeExecution == null"); q.setSerializeRead(true); q.declareParameters("java.lang.Integer now, java.lang.String ns"); q.setOrdering("nextExecution"); @@ -14190,7 +14191,6 @@ public class ObjectStore implements RawStore, Configurable { return new ScheduledQueryPollResponse(); } MScheduledQuery schq = results.get(0); - Integer plannedExecutionTime = schq.getNextExecution(); schq.setNextExecution(computeNextExecutionTime(schq.getSchedule())); MScheduledExecution execution = new MScheduledExecution(); @@ -14212,12 +14212,8 @@ public class ObjectStore implements RawStore, Configurable { LOG.debug("Caught jdo exception; exclusive", e); commited = false; } finally { - if (commited) { - return ret; - } else { - rollbackTransaction(); - return new ScheduledQueryPollResponse(); - } + rollbackAndCleanup(commited, q); + return commited ? ret : new ScheduledQueryPollResponse(); } }