@Test public void testCreateLocalOffsetFile() throws Exception { LOG.info("[testCreateLocalOffsetFile] start"); String fileName = Utils.getFileNameForTopic(consumerConfig.getLocalOffsetPath(), workerId, topicName); File fileForTopic = new File(fileName); assertEquals(false, fileForTopic.exists()); GreedyConsumer greedyConsumer = new GreedyConsumer(consumerConfig, talosResourceName, topicName, workerId, new SimpleTopicAbnormalCallback(), consumerClientMock, talosAdminMock,fetcherMap); Thread.sleep(10050); File newFileForTopic = new File(fileName); assertEquals(true, newFileForTopic.exists()); greedyConsumer.shutDown(); LOG.info("[testCreateLocalOffsetFile] 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();  }