suztomo commented on a change in pull request #14578:
URL: https://github.com/apache/beam/pull/14578#discussion_r616169131



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/Publishers.java
##########
@@ -35,24 +39,26 @@
   private Publishers() {}
 
   @SuppressWarnings("unchecked")
-  static Publisher<PublishMetadata> newPublisher(PublisherOptions options) 
throws ApiException {
+  static Publisher<MessageMetadata> newPublisher(PublisherOptions options) 
throws ApiException {
     SerializableSupplier<Object> supplier = options.publisherSupplier();
     if (supplier != null) {
       Object supplied = supplier.get();
-      TypeToken<Publisher<PublishMetadata>> token = new 
TypeToken<Publisher<PublishMetadata>>() {};
+      TypeToken<Publisher<MessageMetadata>> token = new 
TypeToken<Publisher<MessageMetadata>>() {};
       checkArgument(token.isSupertypeOf(supplied.getClass()));
-      return (Publisher<PublishMetadata>) supplied;
+      return (Publisher<MessageMetadata>) supplied;
     }
+    TopicPath topic = options.topicPath();
     return new PartitionCountWatchingPublisher(

Review comment:
       @dpcollins-google I tried replacing the Beam code with the default 
values by reading the diff in 
https://github.com/googleapis/java-pubsublite/pull/475/files. But the 
PartitionCountWatchingPublisher constructor changed its accessor from public to 
package-default. Do you have a suggestion on how to adopt the change here?
   
   ```
   > Task :sdks:java:io:google-cloud-platform:compileJava
   
/Users/suztomo/beam/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/Publishers.java:51:
 error:
    PartitionCountWatchingPublisher(PartitionPublisherFactory,
       com.google.cloud.pubsublite.internal.RoutingPolicy.Factory,
       com.google.cloud.pubsublite.internal.wire.PartitionCountWatcher.Factory) 
is not public in PartitionCountWatchingPublisher; cannot be accessed from 
outside package
       return new PartitionCountWatchingPublisher(
              ^
   ```
   




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