Hi I am trying to run this code in but it is working fine in another EC2 Azkaban instance but not giving below error for another instance.
private val adminprops = new Properties()
adminprops.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG,"Kafka Endpoint")
private val admin = AdminClient.create(adminprops)
def topicExist(topicName: String): Boolean = {
val result = admin.listTopics.names.get.contains(topicName)
result
}
"Kafka Exception java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: listTopics"