boyuanzz commented on a change in pull request #13567:
URL: https://github.com/apache/beam/pull/13567#discussion_r557039070



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/SubscriberOptions.java
##########
@@ -163,28 +161,6 @@ abstract Builder setBacklogReaderSupplier(
     abstract Builder setOffsetReaderSupplier(
         SerializableSupplier<InitialOffsetReader> offsetReaderSupplier);
 
-    // Used for implementing build();
-    abstract SubscriptionPath subscriptionPath();
-
-    abstract Set<Partition> partitions();
-
-    abstract SubscriberOptions autoBuild();
-
-    @SuppressWarnings("CheckReturnValue")
-    public SubscriberOptions build() throws ApiException {
-      if (!partitions().isEmpty()) {
-        return autoBuild();
-      }
-
-      if (partitions().isEmpty()) {
-        int partitionCount = 
PartitionLookupUtils.numPartitions(subscriptionPath());
-        ImmutableSet.Builder<Partition> partitions = ImmutableSet.builder();
-        for (int i = 0; i < partitionCount; i++) {
-          partitions.add(Partition.of(i));
-        }
-        setPartitions(partitions.build());
-      }
-      return autoBuild();
-    }
+    public abstract SubscriberOptions build();

Review comment:
       You may want to highlight the ability of watching partitions growth when 
`partitions()` is empty. This is the key information when users look into 
javadoc.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to