public void start() { if (!consumerPollThread.isAlive()) { LOG.info("Starting KafkaConsumerProxy polling thread for " + this.toString()); consumerPollThread.start(); // we need to wait until the thread starts while (!isRunning && failureCause == null) { try { consumerPollThreadStartLatch.await(3000, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { LOG.info("Ignoring InterruptedException while waiting for consumer poll thread to start.", e); } } } else { LOG.warn("Tried to start an already started KafkaConsumerProxy (%s). Ignoring.", this.toString()); } if (topicPartitionToSSP.size() == 0) { String msg = String.format("Cannot start KafkaConsumerProxy without any registered TopicPartitions for %s", systemName); LOG.error(msg); throw new SamzaException(msg); } }
public void start() { if (!consumerPollThread.isAlive()) { LOG.info("Starting KafkaConsumerProxy polling thread for " + this.toString()); consumerPollThread.start(); // we need to wait until the thread starts while (!isRunning && failureCause == null) { try { consumerPollThreadStartLatch.await(3000, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { LOG.info("Ignoring InterruptedException while waiting for consumer poll thread to start.", e); } } } else { LOG.warn("Tried to start an already started KafkaConsumerProxy (%s). Ignoring.", this.toString()); } if (topicPartitionToSSP.size() == 0) { String msg = String.format("Cannot start KafkaConsumerProxy without any registered TopicPartitions for %s", systemName); LOG.error(msg); throw new SamzaException(msg); } }
public void start() { if (!consumerPollThread.isAlive()) { LOG.info("Starting KafkaConsumerProxy polling thread for " + this.toString()); consumerPollThread.start(); // we need to wait until the thread starts while (!isRunning && failureCause == null) { try { consumerPollThreadStartLatch.await(3000, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { LOG.info("Ignoring InterruptedException while waiting for consumer poll thread to start.", e); } } } else { LOG.warn("Tried to start an already started KafkaConsumerProxy (%s). Ignoring.", this.toString()); } if (topicPartitionToSSP.size() == 0) { String msg = String.format("Cannot start KafkaConsumerProxy without any registered TopicPartitions for %s", systemName); LOG.error(msg); throw new SamzaException(msg); } }