@Test public void filterNullTableParametersDefaultEvent() { when(listenerEvent.getEventType()).thenReturn(ALTER_TABLE); when(listenerEvent.getTableParameters()).thenReturn(null); boolean filter = listenerEventFilter.isFiltered(listenerEvent, UNREFERENCED); assertThat(filter).isFalse(); }
@Override public boolean isFiltered(ListenerEvent listenerEvent, LifecycleEventType lifecycleEventType) { Map<String, String> tableParameters = listenerEvent.getTableParameters(); if (tableParameters != null && tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST) != null) { return !isWhitelisted(listenerEvent, tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST)); } return !isDefaultBehaviour(listenerEvent); }
WhitelistedListenerEventFilter implements ListenerEventFilter { @Override public boolean isFiltered(ListenerEvent listenerEvent, LifecycleEventType lifecycleEventType) { Map<String, String> tableParameters = listenerEvent.getTableParameters(); if (tableParameters != null && tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST) != null) { return !isWhitelisted(listenerEvent, tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST)); } return !isDefaultBehaviour(listenerEvent); } }
WhitelistedListenerEventFilter implements ListenerEventFilter { @Override public boolean isFiltered(ListenerEvent listenerEvent, LifecycleEventType lifecycleEventType) { Map<String, String> tableParameters = listenerEvent.getTableParameters(); if (tableParameters != null && tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST) != null) { return !isWhitelisted(listenerEvent, tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST)); } return !isDefaultBehaviour(listenerEvent); }  }
WhitelistedListenerEventFilter implements ListenerEventFilter { @Override public boolean isFiltered(ListenerEvent listenerEvent, LifecycleEventType lifecycleEventType) { Map<String, String> tableParameters = listenerEvent.getTableParameters(); if (tableParameters != null && tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST) != null) { return !isWhitelisted(listenerEvent, tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST)); } return !isDefaultBehaviour(listenerEvent); }  @Override boolean isFiltered(ListenerEvent listenerEvent, LifecycleEventType lifecycleEventType); }
WhitelistedListenerEventFilter implements ListenerEventFilter { @Override public boolean isFiltered(ListenerEvent listenerEvent, LifecycleEventType lifecycleEventType) { Map<String, String> tableParameters = listenerEvent.getTableParameters(); if (tableParameters != null && tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST) != null) { return !isWhitelisted(listenerEvent, tableParameters.get(BEEKEEPER_HIVE_EVENT_WHITELIST)); } return !isDefaultBehaviour(listenerEvent); }  @Override boolean isFiltered(ListenerEvent listenerEvent, LifecycleEventType lifecycleEventType); static final String BEEKEEPER_HIVE_EVENT_WHITELIST; }