flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fanyon <...@git.apache.org>
Subject [GitHub] flink pull request #3766: [FLINK-6288] fix FlinkKafkaProducer's custom Parti...
Date Wed, 03 May 2017 03:11:29 GMT
Github user fanyon commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3766#discussion_r114466534
  
    --- Diff: flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBase.java
---
    @@ -281,6 +307,47 @@ public void onCompletion(RecordMetadata metadata, Exception exception)
{
     		}
     	}
     
    +	protected int[] getPartitionsByTopic(String topic, KafkaProducer<byte[], byte[]>
producer) {
    +		Future<int[]> future = executor.submit(new PartitionMetaTask(topic, producer));
    +
    +		try {
    +			return future.get(kafkaMetaTimeoutMs, TimeUnit.MILLISECONDS);
    +		} catch (Exception e) {
    +			throw new RuntimeException(e);
    --- End diff --
    
    Yes, retry here will be nicer, I'll fix it, thanks :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message