if (e.getCause() instanceof BindException) {
int port = simpleConsumer.port(); simpleConsumer = null; throw new KafkaException("Network error when fetching messages: " + host + ":" + port + " , " + e.getMessage(), e);
consumerRecords = kafkaConsumer.poll(kafkaPollTimeOut); } catch (KafkaException ke) { logger.error(ke.getMessage(), ke); throw UserException.dataReadError(ke).message(ke.getMessage()).build(logger);
if (e.getCause() instanceof BindException) {
private void createTopics(AdminClient admin, List<NewTopic> newTopics) { CreateTopicsResult createTopics = admin.createTopics(newTopics); try { createTopics.all().get(this.adminTimeout, TimeUnit.SECONDS); } catch (Exception e) { throw new KafkaException(e); } }
if (e.getCause() instanceof BindException) {
public KafkaCheckpointLogKey fromBytes(byte[] bytes) { throw new KafkaException("exception"); } }
if (e.getCause() instanceof BindException) {
public Checkpoint fromBytes(byte[] bytes) { throw new KafkaException("exception"); } }
if (e.getCause() instanceof BindException) {
/** * build props from a list of strings and interpret them as * key, value, key, value,.... * * @param args * @return props */ @SuppressWarnings("unchecked") public static Props of(String... args) { if (args.length % 2 != 0) throw new KafkaException( "Must have an equal number of keys and values."); Map<String, String> vals = new HashMap<String, String>(args.length / 2); for (int i = 0; i < args.length; i += 2) vals.put(args[i], args[i + 1]); return new Props(vals); }
if (e.getCause() instanceof BindException) {
private void createTopics(AdminClient admin, List<NewTopic> newTopics) { CreateTopicsResult createTopics = admin.createTopics(newTopics); try { createTopics.all().get(this.adminTimeout, TimeUnit.SECONDS); } catch (Exception e) { throw new KafkaException(e); } }
if (e.getCause() instanceof BindException) {
int port = simpleConsumer.port(); simpleConsumer = null; throw new KafkaException("Network error when fetching messages: " + host + ":" + port + " , " + e.getMessage(), e);
if (e.getCause() instanceof BindException) {
if (e.getCause() instanceof BindException) {
if (e.getCause() instanceof BindException) {
if (e.getCause() instanceof BindException) {
if (e.getCause() instanceof BindException) {