@Test (expected = IllegalArgumentException.class) public void testDescribeTopicResourceNameChanged() throws Exception { LOG.info("[testDescribeTopicResourceNameChanged] start"); GetDescribeInfoResponse getDescribeInfoResponse = new GetDescribeInfoResponse( talosResourceName, partitionNum); GetDescribeInfoResponse getDescribeInfoResponse2 = new GetDescribeInfoResponse( talosResourceName2, partitionNum); when(talosAdminMock.getDescribeInfo(any(GetDescribeInfoRequest.class))).thenReturn( getDescribeInfoResponse2).thenReturn(getDescribeInfoResponse2); GreedyConsumer greedyConsumer = new GreedyConsumer(consumerConfig, talosResourceName, topicName, workerId, new SimpleTopicAbnormalCallback(),consumerClientMock, talosAdminMock, fetcherMap); greedyConsumer.shutDown(); LOG.info("[testDescribeTopicResourceNameChanged] done"); }
public void shutDown() { LOG.info("Worker: " + workerId + " is shutting down..."); greedyConsumerState.set(GREEDYCONSUMER_STATE.SHUTDOWN); shutDownAllFetcher(); partitionCheckFuture.cancel(false); checkpointFuture.cancel(false); partitionScheduleExecutor.shutdownNow(); checkpointScheduleExecutor.shutdownNow(); greedyMonitorThread.shutdownNow(); scheduleInfoCache.shutDown(topicTalosResourceName); LOG.info("Worker: " + workerId + " shutdown "); }
GreedyConsumer { public void shutDown() { LOG.info("Worker: " + workerId + " is shutting down..."); greedyConsumerState.set(GREEDYCONSUMER_STATE.SHUTDOWN); shutDownAllFetcher(); partitionCheckFuture.cancel(false); checkpointFuture.cancel(false); partitionScheduleExecutor.shutdownNow(); checkpointScheduleExecutor.shutdownNow(); greedyMonitorThread.shutdownNow(); scheduleInfoCache.shutDown(topicTalosResourceName); LOG.info("Worker: " + workerId + " shutdown "); } }
GreedyConsumer { public void shutDown() { LOG.info("Worker: " + workerId + " is shutting down..."); greedyConsumerState.set(GREEDYCONSUMER_STATE.SHUTDOWN); shutDownAllFetcher(); partitionCheckFuture.cancel(false); checkpointFuture.cancel(false); partitionScheduleExecutor.shutdownNow(); checkpointScheduleExecutor.shutdownNow(); greedyMonitorThread.shutdownNow(); scheduleInfoCache.shutDown(topicTalosResourceName); LOG.info("Worker: " + workerId + " shutdown "); } GreedyConsumer(TalosConsumerConfig consumerConfig, Credential credential,
			String topicName, GreedyMessageReaderFactory messageReaderFactory,
			MessageProcessorFactory messageProcessorFactory, TopicAbnormalCallback abnormalCallback,
			String workerId, Map<Integer, Long> outerCheckPoint);  GreedyConsumer(TalosConsumerConfig consumerConfig, Credential credential,
			String topicName, GreedyMessageReaderFactory messageReaderFactory,
			MessageProcessorFactory messageProcessorFactory, TopicAbnormalCallback abnormalCallback,
			String workerId);  GreedyConsumer(TalosConsumerConfig consumerConfig, TopicTalosResourceName talosResourceName,
			String topicName, String workerId, TopicAbnormalCallback abnormalCallback, ConsumerService.Iface consumerClientMock,
			TalosAdmin talosAdminMock, Map<Integer, GreedyPartitionFetcher> fetcherMap); }
GreedyConsumer { public void shutDown() { LOG.info("Worker: " + workerId + " is shutting down..."); greedyConsumerState.set(GREEDYCONSUMER_STATE.SHUTDOWN); shutDownAllFetcher(); partitionCheckFuture.cancel(false); checkpointFuture.cancel(false); partitionScheduleExecutor.shutdownNow(); checkpointScheduleExecutor.shutdownNow(); greedyMonitorThread.shutdownNow(); scheduleInfoCache.shutDown(topicTalosResourceName); LOG.info("Worker: " + workerId + " shutdown "); } GreedyConsumer(TalosConsumerConfig consumerConfig, Credential credential,
			String topicName, GreedyMessageReaderFactory messageReaderFactory,
			MessageProcessorFactory messageProcessorFactory, TopicAbnormalCallback abnormalCallback,
			String workerId, Map<Integer, Long> outerCheckPoint);  GreedyConsumer(TalosConsumerConfig consumerConfig, Credential credential,
			String topicName, GreedyMessageReaderFactory messageReaderFactory,
			MessageProcessorFactory messageProcessorFactory, TopicAbnormalCallback abnormalCallback,
			String workerId);  GreedyConsumer(TalosConsumerConfig consumerConfig, TopicTalosResourceName talosResourceName,
			String topicName, String workerId, TopicAbnormalCallback abnormalCallback, ConsumerService.Iface consumerClientMock,
			TalosAdmin talosAdminMock, Map<Integer, GreedyPartitionFetcher> fetcherMap); Map<Integer, Long> initCheckPointFromFile(); synchronized void initCheckpointTask(); Map<Integer, Long> getCurCheckPoint(); boolean shouldFlush(Map<Integer, Long> curCheckpoint); boolean isActive(); boolean isDisabled(); boolean isShutdowned(); JsonArray getPartitionLag(); void shutDown(); }
GreedyConsumer { public void shutDown() { LOG.info("Worker: " + workerId + " is shutting down..."); greedyConsumerState.set(GREEDYCONSUMER_STATE.SHUTDOWN); shutDownAllFetcher(); partitionCheckFuture.cancel(false); checkpointFuture.cancel(false); partitionScheduleExecutor.shutdownNow(); checkpointScheduleExecutor.shutdownNow(); greedyMonitorThread.shutdownNow(); scheduleInfoCache.shutDown(topicTalosResourceName); LOG.info("Worker: " + workerId + " shutdown "); } GreedyConsumer(TalosConsumerConfig consumerConfig, Credential credential,
			String topicName, GreedyMessageReaderFactory messageReaderFactory,
			MessageProcessorFactory messageProcessorFactory, TopicAbnormalCallback abnormalCallback,
			String workerId, Map<Integer, Long> outerCheckPoint);  GreedyConsumer(TalosConsumerConfig consumerConfig, Credential credential,
			String topicName, GreedyMessageReaderFactory messageReaderFactory,
			MessageProcessorFactory messageProcessorFactory, TopicAbnormalCallback abnormalCallback,
			String workerId);  GreedyConsumer(TalosConsumerConfig consumerConfig, TopicTalosResourceName talosResourceName,
			String topicName, String workerId, TopicAbnormalCallback abnormalCallback, ConsumerService.Iface consumerClientMock,
			TalosAdmin talosAdminMock, Map<Integer, GreedyPartitionFetcher> fetcherMap); Map<Integer, Long> initCheckPointFromFile(); synchronized void initCheckpointTask(); Map<Integer, Long> getCurCheckPoint(); boolean shouldFlush(Map<Integer, Long> curCheckpoint); boolean isActive(); boolean isDisabled(); boolean isShutdowned(); JsonArray getPartitionLag(); void shutDown();  }