congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
KafkaSystemConsumer.stop
Code IndexAdd Tabnine to your IDE (free)

How to use
stop
method
in
org.apache.samza.system.kafka.KafkaSystemConsumer

Best Java code snippets using org.apache.samza.system.kafka.KafkaSystemConsumer.stop (Showing top 6 results out of 315)

origin: apache/samza

@Override
public Map<SystemStreamPartition, List<IncomingMessageEnvelope>> poll(
  Set<SystemStreamPartition> systemStreamPartitions, long timeout) throws InterruptedException {
 // check if the proxy is running
 if (!proxy.isRunning()) {
  LOG.info("{}: KafkaConsumerProxy is not running. Stopping the consumer.", this);
  stop();
  String message = String.format("%s: KafkaConsumerProxy has stopped.", this);
  throw new SamzaException(message, proxy.getFailureCause());
 }
 return super.poll(systemStreamPartitions, timeout);
}
origin: org.apache.samza/samza-kafka_2.11

@Override
public Map<SystemStreamPartition, List<IncomingMessageEnvelope>> poll(
  Set<SystemStreamPartition> systemStreamPartitions, long timeout) throws InterruptedException {
 // check if the proxy is running
 if (!proxy.isRunning()) {
  stop();
  String message = String.format("%s: KafkaConsumerProxy has stopped.", this);
  throw new SamzaException(message, proxy.getFailureCause());
 }
 return super.poll(systemStreamPartitions, timeout);
}
origin: org.apache.samza/samza-kafka

@Override
public Map<SystemStreamPartition, List<IncomingMessageEnvelope>> poll(
  Set<SystemStreamPartition> systemStreamPartitions, long timeout) throws InterruptedException {
 // check if the proxy is running
 if (!proxy.isRunning()) {
  stop();
  String message = String.format("%s: KafkaConsumerProxy has stopped.", this);
  throw new SamzaException(message, proxy.getFailureCause());
 }
 return super.poll(systemStreamPartitions, timeout);
}
origin: apache/samza

@Test
public void testFetchThresholdShouldDivideEvenlyAmongPartitions() {
 final KafkaSystemConsumer consumer = createConsumer(FETCH_THRESHOLD_MSGS, FETCH_THRESHOLD_BYTES);
 final int partitionsNum = 50;
 for (int i = 0; i < partitionsNum; i++) {
  consumer.register(new SystemStreamPartition(TEST_SYSTEM, TEST_STREAM, new Partition(i)), "0");
 }
 consumer.start();
 Assert.assertEquals(Long.valueOf(FETCH_THRESHOLD_MSGS) / partitionsNum, consumer.perPartitionFetchThreshold);
 Assert.assertEquals(Long.valueOf(FETCH_THRESHOLD_BYTES) / 2 / partitionsNum,
   consumer.perPartitionFetchThresholdBytes);
 consumer.stop();
}
origin: apache/samza

Assert.assertEquals(ime1Size + ime11Size, consumer.getMessagesSizeInQueue(ssp1));
consumer.stop();
origin: apache/samza

Assert.assertEquals(ime1Size + ime11Size, consumer.getMessagesSizeInQueue(ssp1));
consumer.stop();
org.apache.samza.system.kafkaKafkaSystemConsumerstop

Popular methods of KafkaSystemConsumer

  • toTopicPartition
  • compareOffsets
    Compare two String offsets. Note. There is a method in KafkaSystemAdmin that does that, but that wou
  • setFetchThresholds
  • startConsumer
    Set the offsets to start from. Register the TopicPartitions with the proxy. Start the proxy.
  • startSubscription
  • toTopicAndPartition
  • getMessagesSizeInQueue
  • getNumMessagesInQueue
  • register
    record the ssp and the offset. Do not submit it to the consumer yet.
  • start

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now