Codota Logo
KafkaSystemConsumer.stop
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now