use of org.apache.flink.streaming.connectors.kafka.testutils.ZooKeeperStringSerializer in project flink by apache.
the class KafkaTestEnvironmentImpl method getZkUtils.
public ZkUtils getZkUtils() {
LOG.info("In getZKUtils:: zookeeperConnectionString = {}", zookeeperConnectionString);
ZkClient creator = new ZkClient(zookeeperConnectionString, Integer.valueOf(standardProps.getProperty("zookeeper.session.timeout.ms")), Integer.valueOf(standardProps.getProperty("zookeeper.connection.timeout.ms")), new ZooKeeperStringSerializer());
return ZkUtils.apply(creator, false);
}
use of org.apache.flink.streaming.connectors.kafka.testutils.ZooKeeperStringSerializer in project flink by apache.
the class KafkaTestEnvironmentImpl method deleteTestTopic.
@Override
public void deleteTestTopic(String topic) {
ZkUtils zkUtils = getZkUtils();
try {
LOG.info("Deleting topic {}", topic);
ZkClient zk = new ZkClient(zookeeperConnectionString, Integer.valueOf(standardProps.getProperty("zookeeper.session.timeout.ms")), Integer.valueOf(standardProps.getProperty("zookeeper.connection.timeout.ms")), new ZooKeeperStringSerializer());
AdminUtils.deleteTopic(zkUtils, topic);
zk.close();
} finally {
zkUtils.close();
}
}
Aggregations