You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/27 15:24:51 UTC

[GitHub] [flink] fapaul commented on a diff in pull request #19433: [BK-1.14][FLINK-26645][Connector/pulsar] Support subscribe only one topic partition/

fapaul commented on code in PR #19433:
URL: https://github.com/apache/flink/pull/19433#discussion_r859934962


##########
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/enumerator/subscriber/impl/BasePulsarSubscriber.java:
##########
@@ -63,18 +63,15 @@ protected List<TopicPartition> toTopicPartitions(
                     .map(range -> new TopicPartition(metadata.getName(), -1, range))
                     .collect(toList());
         } else {
-            return IntStream.range(0, metadata.getPartitionSize())
-                    .boxed()
-                    .flatMap(
-                            partitionId ->
-                                    ranges.stream()
-                                            .map(
-                                                    range ->
-                                                            new TopicPartition(
-                                                                    metadata.getName(),
-                                                                    partitionId,
-                                                                    range)))
-                    .collect(toList());
+            List<TopicPartition> partitions = new ArrayList<>();

Review Comment:
   Nit: Why did you change using the stream API to the manual loop?



##########
flink-connectors/flink-connector-pulsar/src/test/resources/containers/txnStandalone.conf:
##########
@@ -14,8 +14,7 @@
 
 ### --- General broker settings --- ###
 
-# Zookeeper quorum connection string
-zookeeperServers=
+# Zookeeper quorum connection stringzookeeperServers=

Review Comment:
   I did not find this change in the original PR, and it looks suspicious.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org