Hello Csaba Ringhofer, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/19112

to look at the new patch set (#2).

Change subject: IMPALA-11644: updateLatestEventId should handle cases of empty 
events
......................................................................

IMPALA-11644: updateLatestEventId should handle cases of empty events

IMPALA-11490 adds a catalog metric for the latest event id in HMS. The
fetched events could be empty if there are no more events in the past 24
hours, since the retention duration for notification events in HMS is 24
hours by default. This case is not handled so the thread for updating
the latestEventId metric will keep throwing a NoSuchElementException
until there are new events generated.

This patch handles the case to avoid exceptions, also sets the initial
value of latestEventId to 0 which is the returned value of
getCurrentNotificationEventId() when there are no events in HMS.

Tests
- Clean up the notification events in HMS by truncating the
  NOTIFICATION_SEQUENCE and NOTIFICATION_LOG tables in the underlying
  PostgreSQL. Then launch HMS and Impala. Verified the exception
  disappears.
- Add a breakpoint in updateLatestEventId() to stop before fetching the
  events and after getting the current event id. Clean up the
  notification events in HMS. Then resume catalogd. Verified no
  exceptions are thrown.

Change-Id: I0f207fff1ff59376e30afdc3cd074c950a1c3ddb
---
M 
fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/12/19112/2
--
To view, visit http://gerrit.cloudera.org:8080/19112
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0f207fff1ff59376e30afdc3cd074c950a1c3ddb
Gerrit-Change-Number: 19112
Gerrit-PatchSet: 2
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>

Reply via email to