@Test public void onExecutorUnblacklisted() { TriConsumer<Long,Header, Object> handlerMock = mock(TriConsumer.class); SparkListener listener = new GarmadonSparkListener(handlerMock, DUMMY_HEADER.toSerializeHeader()); listener.onExecutorUnblacklisted(new SparkListenerExecutorUnblacklisted(1, "invokationExecutorId")); checkExecutorEventHeader(handlerMock, DUMMY_HEADER.cloneAndOverride(Header.newBuilder() .withExecutorId("invokationExecutorId").build())); }
@Override public void onExecutorUnblacklisted(SparkListenerExecutorUnblacklisted executorUnblacklisted) { try { sendExecutorStateEvent(executorUnblacklisted.time(), State.UNBLACKLISTED, executorUnblacklisted.executorId(), executorHostId.getOrDefault(executorUnblacklisted.executorId(), "UNKNOWN"), null, 0); } catch (Throwable t) { LOGGER.warn("Failed to send event for onExecutorUnblacklisted", t); } }
GarmadonSparkListener extends SparkListener { @Override public void onExecutorUnblacklisted(SparkListenerExecutorUnblacklisted executorUnblacklisted) { try { sendExecutorStateEvent(executorUnblacklisted.time(), State.UNBLACKLISTED, executorUnblacklisted.executorId(), executorHostId.getOrDefault(executorUnblacklisted.executorId(), "UNKNOWN"), null, 0); } catch (Throwable t) { LOGGER.warn("Failed to send event for onExecutorUnblacklisted", t); } } }
GarmadonSparkListener extends SparkListener { @Override public void onExecutorUnblacklisted(SparkListenerExecutorUnblacklisted executorUnblacklisted) { try { sendExecutorStateEvent(executorUnblacklisted.time(), State.UNBLACKLISTED, executorUnblacklisted.executorId(), executorHostId.getOrDefault(executorUnblacklisted.executorId(), "UNKNOWN"), null, 0); } catch (Throwable t) { LOGGER.warn("Failed to send event for onExecutorUnblacklisted", t); } } GarmadonSparkListener();  GarmadonSparkListener(TriConsumer<Long, Header, Object> eventHandler, Header.SerializedHeader header); }
GarmadonSparkListener extends SparkListener { @Override public void onExecutorUnblacklisted(SparkListenerExecutorUnblacklisted executorUnblacklisted) { try { sendExecutorStateEvent(executorUnblacklisted.time(), State.UNBLACKLISTED, executorUnblacklisted.executorId(), executorHostId.getOrDefault(executorUnblacklisted.executorId(), "UNKNOWN"), null, 0); } catch (Throwable t) { LOGGER.warn("Failed to send event for onExecutorUnblacklisted", t); } } GarmadonSparkListener();  GarmadonSparkListener(TriConsumer<Long, Header, Object> eventHandler, Header.SerializedHeader header); @Override void onApplicationStart(SparkListenerApplicationStart applicationStart); @Override void onStageSubmitted(SparkListenerStageSubmitted stageSubmitted); @Override void onStageCompleted(SparkListenerStageCompleted stageCompleted); @Override void onTaskEnd(SparkListenerTaskEnd taskEnd); @Override void onExecutorAdded(SparkListenerExecutorAdded executorAdded); @Override void onExecutorRemoved(SparkListenerExecutorRemoved executorRemoved); @Override void onExecutorBlacklisted(SparkListenerExecutorBlacklisted executorBlacklisted); @Override void onExecutorUnblacklisted(SparkListenerExecutorUnblacklisted executorUnblacklisted); }
GarmadonSparkListener extends SparkListener { @Override public void onExecutorUnblacklisted(SparkListenerExecutorUnblacklisted executorUnblacklisted) { try { sendExecutorStateEvent(executorUnblacklisted.time(), State.UNBLACKLISTED, executorUnblacklisted.executorId(), executorHostId.getOrDefault(executorUnblacklisted.executorId(), "UNKNOWN"), null, 0); } catch (Throwable t) { LOGGER.warn("Failed to send event for onExecutorUnblacklisted", t); } } GarmadonSparkListener();  GarmadonSparkListener(TriConsumer<Long, Header, Object> eventHandler, Header.SerializedHeader header); @Override void onApplicationStart(SparkListenerApplicationStart applicationStart); @Override void onStageSubmitted(SparkListenerStageSubmitted stageSubmitted); @Override void onStageCompleted(SparkListenerStageCompleted stageCompleted); @Override void onTaskEnd(SparkListenerTaskEnd taskEnd); @Override void onExecutorAdded(SparkListenerExecutorAdded executorAdded); @Override void onExecutorRemoved(SparkListenerExecutorRemoved executorRemoved); @Override void onExecutorBlacklisted(SparkListenerExecutorBlacklisted executorBlacklisted); @Override void onExecutorUnblacklisted(SparkListenerExecutorUnblacklisted executorUnblacklisted);  }