Xeli commented on a change in pull request #6594: [FLINK-9311] [pubsub] Added
PubSub source connector with support for checkpointing (ATLEAST_ONCE)
URL: https://github.com/apache/flink/pull/6594#discussion_r257039169
##########
File path: flink-examples/flink-examples-streaming/pom.xml
##########
@@ -562,6 +578,43 @@ under the License.
</filters>
</configuration>
</execution>
+ <!-- PubSub -->
+ <execution>
+ <id>PubSub</id>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+
<shadeTestJar>false</shadeTestJar>
+
<shadedArtifactAttached>true</shadedArtifactAttached>
+
<createDependencyReducedPom>false</createDependencyReducedPom>
+ <transformers>
+ <transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+
<mainClass>org.apache.flink.streaming.examples.pubsub.PubSubExample</mainClass>
+ </transformer>
+ </transformers>
+
<finalName>PubSub</finalName>
+ <filters>
+ <filter>
+
<artifact>org.apache.flink:flink-connector-pubsub_${scala.binary.version}</artifact>
+
<includes>
+
<include>org/apache/flink/streaming/connectors/pubsub/**</include>
Review comment:
- Fixed the javadoc comment.
- I've changed where the example is stored
(flink-examples/flink-examples-build-helper/flink-examples-streaming-pubsub/),
could you have a look at this again? Indentation is fixed through this change
as well.
- I've removed `SerializableCredentialsProvider`. The reason I added it is
because several PubSub classes require a `CredentialsProvider` rather than
`Credentials`. But I agree we might as well rewrap Credentials using Google's
`FixedCredentialsProvider` (which is bascially the
`SerializableCredentialsProvider`). Good one!
**Regarding the BoundedPubSubSource:**
The idea was this would be useful when running integration tests for 'end
users'. Hence it's not in test scope. Now that we've been using this code
ourselves for a while now, in our projects we prefer using the 'normal'
PubSubSource and start/restart the job should it be needed for tests.
Although I do like the concept of being able to `Bound` SourceFunctions like
this (either a max received messages or idle time). I would propose I remove
the `BoundedPubSubSource` all together, this allows us to simplify the Builder
inside of the PubSubSource as well and make everything a bit cleaner.
What do you think? @zentol @rmetzger
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services