Tabnine Logo
KafkaZkClient.topicExists
Code IndexAdd Tabnine to your IDE (free)

How to use
topicExists
method
in
kafka.zk.KafkaZkClient

Best Java code snippets using kafka.zk.KafkaZkClient.topicExists (Showing top 6 results out of 315)

origin: allegro/hermes

private boolean isMigrationToNewKafkaTopic(KafkaTopics kafkaTopics) {
  return kafkaTopics.getSecondary().isPresent() &&
      !kafkaZkClient.topicExists(kafkaTopics.getPrimary().name().asString());
}
origin: allegro/hermes

@Override
public boolean topicExists(Topic topic) {
  return kafkaNamesMapper.toKafkaTopics(topic)
      .allMatch(kafkaTopic -> kafkaZkClient.topicExists(kafkaTopic.name().asString()));
}
origin: allegro/hermes

public boolean topicExists(String topicName, String kafkaClusterName) {
  Topic topic = topic(topicName).build();
  return kafkaNamesMapper.toKafkaTopics(topic)
      .allMatch(kafkaTopic -> zkClients.get(kafkaClusterName).topicExists(kafkaTopic.name().asString()) &&
          !isMarkedForDeletion(kafkaClusterName, kafkaTopic));
}
origin: pl.allegro.tech.hermes/hermes-test-helper

public boolean topicExists(String topicName, String kafkaClusterName) {
  Topic topic = topic(topicName).build();
  return kafkaNamesMapper.toKafkaTopics(topic)
      .allMatch(kafkaTopic -> zkClients.get(kafkaClusterName).topicExists(kafkaTopic.name().asString()) &&
          !isMarkedForDeletion(kafkaClusterName, kafkaTopic));
}
origin: allegro/hermes

private void createTopic(String topicName, KafkaZkClient kafkaZkClient) {
  Topic topic = topic(topicName).build();
  kafkaNamesMapper.toKafkaTopics(topic).forEach(kafkaTopic -> {
    AdminZkClient adminZkClient = new AdminZkClient(kafkaZkClient);
    adminZkClient.createTopic(kafkaTopic.name().asString(), DEFAULT_PARTITIONS, DEFAULT_REPLICATION_FACTOR, new Properties(), RackAwareMode.Enforced$.MODULE$);
    waitAtMost(adjust(Duration.ONE_MINUTE)).until(() -> {
          kafkaZkClient.topicExists(kafkaTopic.name().asString());
        }
    );
  });
}
origin: pl.allegro.tech.hermes/hermes-test-helper

private void createTopic(String topicName, KafkaZkClient kafkaZkClient) {
  Topic topic = topic(topicName).build();
  kafkaNamesMapper.toKafkaTopics(topic).forEach(kafkaTopic -> {
    AdminZkClient adminZkClient = new AdminZkClient(kafkaZkClient);
    adminZkClient.createTopic(kafkaTopic.name().asString(), DEFAULT_PARTITIONS, DEFAULT_REPLICATION_FACTOR, new Properties(), RackAwareMode.Enforced$.MODULE$);
    waitAtMost(adjust(Duration.ONE_MINUTE)).until(() -> {
          kafkaZkClient.topicExists(kafkaTopic.name().asString());
        }
    );
  });
}
kafka.zkKafkaZkClienttopicExists

Popular methods of KafkaZkClient

  • apply
  • <init>
  • getAllBrokersInCluster
  • getConsumerOffset
  • getLeaderForPartition
  • isTopicMarkedForDeletion
  • close
  • createPartitionReassignment
  • getBroker
  • getEntityConfigs
  • getPartitionAssignmentForTopics
  • reassignPartitionsInProgress
  • getPartitionAssignmentForTopics,
  • reassignPartitionsInProgress,
  • setOrCreateEntityConfigs

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • 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