public static List<NotificationEvent> getListOfNotificationEvents(Long eventId, Hive hiveDb,
                                                                    ReplLoadWork work) throws Exception {
    List<NotificationEvent> notificationEvents =
        hiveDb.getMSC().getNextNotification(eventId - 1, -1,
            new DatabaseAndTableFilter(work.dbNameToLoadIn, null)).getEvents();

    // Check the first eventId fetched is the same as what we fed, to ensure the events post that hasn't expired.
    if (notificationEvents.get(0).getEventId() != eventId) {
      throw new Exception("Failover notification events expired.");
    }
    // Remove the first one, it is already loaded, we fetched it to confirm the notification events post that haven't
    // expired.
    notificationEvents.remove(0);
    return notificationEvents;
  }
Returns list of notificationEvents starting from eventId that are related to the database.
@param eventId Starting eventId
@param hiveDb the hive object
@param work the load work
@throws Exception
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/OptimisedBootstrapUtils.java