/** * Notify a list of listeners about a specific metastore event. Each listener notified might update * the (ListenerEvent) event by setting a parameter key/value pair. These updated parameters will * be returned to the caller. * * @param listeners List of MetaStoreEventListener listeners. * @param eventType Type of the notification event. * @param event The ListenerEvent with information about the event. * @param environmentContext An EnvironmentContext object with parameters sent by the HMS client. * @return A list of key/value pair parameters that the listeners set. The returned object will return an empty * map if no parameters were updated or if no listeners were notified. * @throws MetaException If an error occurred while calling the listeners. */ public static Map<String, String> notifyEvent(List<? extends MetaStoreEventListener> listeners, EventType eventType, ListenerEvent event, EnvironmentContext environmentContext) throws MetaException { Preconditions.checkNotNull(event, "The event must not be null."); event.setEnvironmentContext(environmentContext); return notifyEvent(listeners, eventType, event); }
/** * Notify a list of listeners about a specific metastore event. Each listener notified might update * the (ListenerEvent) event by setting a parameter key/value pair. These updated parameters will * be returned to the caller. * * @param listeners List of MetaStoreEventListener listeners. * @param eventType Type of the notification event. * @param event The ListenerEvent with information about the event. * @param environmentContext An EnvironmentContext object with parameters sent by the HMS client. * @return A list of key/value pair parameters that the listeners set. The returned object will return an empty * map if no parameters were updated or if no listeners were notified. * @throws MetaException If an error occurred while calling the listeners. */ public static Map<String, String> notifyEvent(List<? extends MetaStoreEventListener> listeners, EventType eventType, ListenerEvent event, EnvironmentContext environmentContext) throws MetaException { Preconditions.checkNotNull(event, "The event must not be null."); event.setEnvironmentContext(environmentContext); return notifyEvent(listeners, eventType, event); }