Tabnine Logo
AdminClientConfig.getLong
Code IndexAdd Tabnine to your IDE (free)

How to use
getLong
method
in
org.apache.kafka.clients.admin.AdminClientConfig

Best Java code snippets using org.apache.kafka.clients.admin.AdminClientConfig.getLong (Showing top 3 results out of 315)

origin: apache/kafka

private KafkaAdminClient(AdminClientConfig config,
             String clientId,
             Time time,
             AdminMetadataManager metadataManager,
             Metrics metrics,
             KafkaClient client,
             TimeoutProcessorFactory timeoutProcessorFactory,
             LogContext logContext) {
  this.defaultTimeoutMs = config.getInt(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG);
  this.clientId = clientId;
  this.log = logContext.logger(KafkaAdminClient.class);
  this.time = time;
  this.metadataManager = metadataManager;
  this.metrics = metrics;
  this.client = client;
  this.runnable = new AdminClientRunnable();
  String threadName = NETWORK_THREAD_PREFIX + " | " + clientId;
  this.thread = new KafkaThread(threadName, runnable, true);
  this.timeoutProcessorFactory = (timeoutProcessorFactory == null) ?
    new TimeoutProcessorFactory() : timeoutProcessorFactory;
  this.maxRetries = config.getInt(AdminClientConfig.RETRIES_CONFIG);
  this.retryBackoffMs = config.getLong(AdminClientConfig.RETRY_BACKOFF_MS_CONFIG);
  config.logUnused();
  AppInfoParser.registerAppInfo(JMX_PREFIX, clientId, metrics);
  log.debug("Kafka admin client initialized");
  thread.start();
}
origin: apache/kafka

  config.getLong(AdminClientConfig.RETRY_BACKOFF_MS_CONFIG),
  config.getLong(AdminClientConfig.METADATA_MAX_AGE_CONFIG));
List<InetSocketAddress> addresses = ClientUtils.parseAndValidateAddresses(
    config.getList(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG),
Map<String, String> metricTags = Collections.singletonMap("client-id", clientId);
MetricConfig metricConfig = new MetricConfig().samples(config.getInt(AdminClientConfig.METRICS_NUM_SAMPLES_CONFIG))
  .timeWindow(config.getLong(AdminClientConfig.METRICS_SAMPLE_WINDOW_MS_CONFIG), TimeUnit.MILLISECONDS)
  .recordLevel(Sensor.RecordingLevel.forName(config.getString(AdminClientConfig.METRICS_RECORDING_LEVEL_CONFIG)))
  .tags(metricTags);
String metricGrpPrefix = "admin-client";
channelBuilder = ClientUtils.createChannelBuilder(config, time);
selector = new Selector(config.getLong(AdminClientConfig.CONNECTIONS_MAX_IDLE_MS_CONFIG),
    metrics, time, metricGrpPrefix, channelBuilder, logContext);
networkClient = new NetworkClient(
  clientId,
  1,
  config.getLong(AdminClientConfig.RECONNECT_BACKOFF_MS_CONFIG),
  config.getLong(AdminClientConfig.RECONNECT_BACKOFF_MAX_MS_CONFIG),
  config.getInt(AdminClientConfig.SEND_BUFFER_CONFIG),
  config.getInt(AdminClientConfig.RECEIVE_BUFFER_CONFIG),
origin: apache/kafka

public AdminClientUnitTestEnv(Time time, Cluster cluster, Map<String, Object> config) {
  this.time = time;
  this.cluster = cluster;
  AdminClientConfig adminClientConfig = new AdminClientConfig(config);
  AdminMetadataManager metadataManager = new AdminMetadataManager(new LogContext(),
      adminClientConfig.getLong(AdminClientConfig.RETRY_BACKOFF_MS_CONFIG),
      adminClientConfig.getLong(AdminClientConfig.METADATA_MAX_AGE_CONFIG));
  this.mockClient = new MockClient(time, new MockClient.MockMetadataUpdater() {
    @Override
    public List<Node> fetchNodes() {
      return cluster.nodes();
    }
    @Override
    public boolean isUpdateNeeded() {
      return false;
    }
    @Override
    public void update(Time time, MockClient.MetadataUpdate update) {
      throw new UnsupportedOperationException();
    }
  });
  metadataManager.update(cluster, time.milliseconds());
  this.adminClient = KafkaAdminClient.createInternal(adminClientConfig, metadataManager, mockClient, time);
}
org.apache.kafka.clients.adminAdminClientConfiggetLong

Popular methods of AdminClientConfig

  • <init>
  • configNames
  • getInt
  • getConfiguredInstances
  • getList
  • getString
  • logUnused

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Reference (javax.naming)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Best IntelliJ 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