Quanlong Huang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19112
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. 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/1 -- 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: newchange Gerrit-Change-Id: I0f207fff1ff59376e30afdc3cd074c950a1c3ddb Gerrit-Change-Number: 19112 Gerrit-PatchSet: 1 Gerrit-Owner: Quanlong Huang <[email protected]>
