You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/05/04 20:02:50 UTC
[GitHub] [beam] usingh83 commented on a change in pull request #14531: Added a connector that streams data from twitter using a Standard Twi…
usingh83 commented on a change in pull request #14531:
URL: https://github.com/apache/beam/pull/14531#discussion_r626067938
##########
File path: examples/twitter-beam-java/src/main/java/TweeterStream.java
##########
@@ -0,0 +1,35 @@
+import org.apache.beam.sdk.Pipeline;
+import org.apache.beam.sdk.transforms.Create;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.transforms.windowing.*;
+import org.apache.beam.sdk.values.PCollection;
+import org.joda.time.Duration;
+
+import java.util.Collections;
+
+public class TweeterStream {
+
+ public static void main(String[] args) {
+ Pipeline pipeline = Pipeline.create();
+ PCollection<String> tweetStream = pipeline.apply(Create.of(Collections.singletonList(""))).apply(ParDo.of(new ReadFromTweeterDoFn()))
Review comment:
Tried to do this, please review.
--
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:
users@infra.apache.org