Impala Public Jenkins has submitted this change and it was merged. ( 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, 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 Reviewed-on: http://gerrit.cloudera.org:8080/19112 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- 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: merged Gerrit-Change-Id: I0f207fff1ff59376e30afdc3cd074c950a1c3ddb Gerrit-Change-Number: 19112 Gerrit-PatchSet: 4 Gerrit-Owner: Quanlong Huang <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]>
