Tabnine Logo
KafkaSystemConsumer$KafkaConsumerMessageSink.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.samza.system.kafka.KafkaSystemConsumer$KafkaConsumerMessageSink
constructor

Best Java code snippets using org.apache.samza.system.kafka.KafkaSystemConsumer$KafkaConsumerMessageSink.<init> (Showing top 3 results out of 315)

origin: org.apache.samza/samza-kafka_2.11

/**
 * Create a KafkaSystemConsumer for the provided {@code systemName}
 * @param kafkaConsumer kafka Consumer object to be used by this system consumer
 * @param systemName system name for which we create the consumer
 * @param config application config
 * @param clientId clientId from the kafka consumer to be used in the KafkaConsumerProxy
 * @param metrics metrics for this KafkaSystemConsumer
 * @param clock system clock
 */
public KafkaSystemConsumer(Consumer<K, V> kafkaConsumer, String systemName, Config config, String clientId,
  KafkaSystemConsumerMetrics metrics, Clock clock) {
 super(metrics.registry(), clock, metrics.getClass().getName());
 this.kafkaConsumer = kafkaConsumer;
 this.clientId = clientId;
 this.systemName = systemName;
 this.config = config;
 this.metrics = metrics;
 fetchThresholdBytesEnabled = new KafkaConfig(config).isConsumerFetchThresholdBytesEnabled(systemName);
 // create a sink for passing the messages between the proxy and the consumer
 messageSink = new KafkaConsumerMessageSink();
 // Create the proxy to do the actual message reading.
 String metricName = String.format("%s-%s", systemName, clientId);
 proxy = new KafkaConsumerProxy(kafkaConsumer, systemName, clientId, messageSink, metrics, metricName);
 LOG.info("{}: Created KafkaConsumerProxy {} ", this, proxy);
}
origin: apache/samza

/**
 * Create a KafkaSystemConsumer for the provided {@code systemName}
 * @param kafkaConsumer kafka Consumer object to be used by this system consumer
 * @param systemName system name for which we create the consumer
 * @param config application config
 * @param clientId clientId from the kafka consumer to be used in the KafkaConsumerProxy
 * @param metrics metrics for this KafkaSystemConsumer
 * @param clock system clock
 */
public KafkaSystemConsumer(Consumer<K, V> kafkaConsumer, String systemName, Config config, String clientId,
  KafkaSystemConsumerMetrics metrics, Clock clock) {
 super(metrics.registry(), clock, metrics.getClass().getName());
 this.kafkaConsumer = kafkaConsumer;
 this.clientId = clientId;
 this.systemName = systemName;
 this.config = config;
 this.metrics = metrics;
 fetchThresholdBytesEnabled = new KafkaConfig(config).isConsumerFetchThresholdBytesEnabled(systemName);
 // create a sink for passing the messages between the proxy and the consumer
 messageSink = new KafkaConsumerMessageSink();
 // Create the proxy to do the actual message reading.
 String metricName = String.format("%s-%s", systemName, clientId);
 proxy = new KafkaConsumerProxy(kafkaConsumer, systemName, clientId, messageSink, metrics, metricName);
 LOG.info("{}: Created KafkaConsumerProxy {} ", this, proxy);
}
origin: org.apache.samza/samza-kafka

/**
 * Create a KafkaSystemConsumer for the provided {@code systemName}
 * @param kafkaConsumer kafka Consumer object to be used by this system consumer
 * @param systemName system name for which we create the consumer
 * @param config application config
 * @param clientId clientId from the kafka consumer to be used in the KafkaConsumerProxy
 * @param metrics metrics for this KafkaSystemConsumer
 * @param clock system clock
 */
public KafkaSystemConsumer(Consumer<K, V> kafkaConsumer, String systemName, Config config, String clientId,
  KafkaSystemConsumerMetrics metrics, Clock clock) {
 super(metrics.registry(), clock, metrics.getClass().getName());
 this.kafkaConsumer = kafkaConsumer;
 this.clientId = clientId;
 this.systemName = systemName;
 this.config = config;
 this.metrics = metrics;
 fetchThresholdBytesEnabled = new KafkaConfig(config).isConsumerFetchThresholdBytesEnabled(systemName);
 // create a sink for passing the messages between the proxy and the consumer
 messageSink = new KafkaConsumerMessageSink();
 // Create the proxy to do the actual message reading.
 String metricName = String.format("%s-%s", systemName, clientId);
 proxy = new KafkaConsumerProxy(kafkaConsumer, systemName, clientId, messageSink, metrics, metricName);
 LOG.info("{}: Created KafkaConsumerProxy {} ", this, proxy);
}
org.apache.samza.system.kafkaKafkaSystemConsumer$KafkaConsumerMessageSink<init>

Popular methods of KafkaSystemConsumer$KafkaConsumerMessageSink

  • addMessage
  • needsMoreMessages
  • setIsAtHighWatermark

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Notification (javax.management)
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JList (javax.swing)
  • Top 17 PhpStorm Plugins
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