You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2024/01/06 04:43:40 UTC
(impala) branch master updated: IMPALA-12683: Fix wrong event time for batched events
This is an automated email from the ASF dual-hosted git repository.
stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new c3f875eac IMPALA-12683: Fix wrong event time for batched events
c3f875eac is described below
commit c3f875eac42c48ddad4762fb8463a7ebf59b0cf7
Author: stiga-huang <hu...@gmail.com>
AuthorDate: Fri Jan 5 18:53:39 2024 +0800
IMPALA-12683: Fix wrong event time for batched events
When updating the last-synced-event-id after processing a batch of
partition events, we use the last event id. We should do the same when
updating last-synced-event-time. However, currently BatchPartitionEvent
uses getEventTime() from the parent class. It actually returns the event
time of the first event. We should override it to use the last event.
Tests
- Ran MetastoreEventsProcessorTest.testDisableEventSyncFlag 200 times.
Change-Id: I82efe18dd28fe8af47f8c66cc8c5eb8e6f8dfd2b
Reviewed-on: http://gerrit.cloudera.org:8080/20864
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
.../java/org/apache/impala/catalog/events/MetastoreEvents.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java b/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
index f6ffdb1b5..062b9fd84 100644
--- a/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
+++ b/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java
@@ -2391,6 +2391,15 @@ public class MetastoreEvents {
return batchedEvents_.get(batchedEvents_.size()-1).getEventId();
}
+ /**
+ * Same as the above but returns the event time.
+ */
+ @Override
+ public long getEventTime() {
+ Preconditions.checkState(!batchedEvents_.isEmpty());
+ return batchedEvents_.get(batchedEvents_.size() - 1).getEventTime();
+ }
+
/**
*
* @param event The event under consideration to be batched into this event. It can