Tabnine Logo
KafkaSystemConsumerMetrics.registry
Code IndexAdd Tabnine to your IDE (free)

How to use
registry
method
in
org.apache.samza.system.kafka.KafkaSystemConsumerMetrics

Best Java code snippets using org.apache.samza.system.kafka.KafkaSystemConsumerMetrics.registry (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.kafkaKafkaSystemConsumerMetricsregistry

Popular methods of KafkaSystemConsumerMetrics

  • incBytesReads
  • incClientBytesReads
  • incClientReads
  • incReads
  • registerClientProxy
  • registerTopicAndPartition
  • setHighWatermarkValue
  • setLagValue
  • setNumTopicPartitions
  • setOffsets
  • incClientSkippedFetchRequests
  • <init>
  • incClientSkippedFetchRequests,
  • <init>,
  • bytesRead,
  • clientBytesRead,
  • clientReads,
  • group,
  • highWatermark,
  • lag,
  • offsets

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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