use of org.apache.hadoop.hive.metastore.api.NotificationEvent in project hive by apache.
the class TestEventHandlerFactory method shouldProvideDefaultHandlerWhenNothingRegisteredForThatEvent.
@Test
public void shouldProvideDefaultHandlerWhenNothingRegisteredForThatEvent() {
EventHandler eventHandler = EventHandlerFactory.handlerFor(new NotificationEvent(Long.MAX_VALUE, Integer.MAX_VALUE, "shouldGiveDefaultHandler", "s"));
assertTrue(eventHandler instanceof DefaultHandler);
}
use of org.apache.hadoop.hive.metastore.api.NotificationEvent in project hive by apache.
the class ObjectStore method translateDbToThrift.
private NotificationEvent translateDbToThrift(MNotificationLog dbEvent) {
NotificationEvent event = new NotificationEvent();
event.setEventId(dbEvent.getEventId());
event.setEventTime(dbEvent.getEventTime());
event.setEventType(dbEvent.getEventType());
event.setDbName(dbEvent.getDbName());
event.setTableName(dbEvent.getTableName());
event.setMessage((dbEvent.getMessage()));
event.setMessageFormat(dbEvent.getMessageFormat());
return event;
}
Aggregations