merlimat commented on a change in pull request #2446: Add EventTime interface 
to Record
URL: https://github.com/apache/incubator-pulsar/pull/2446#discussion_r212806146
 
 

 ##########
 File path: 
pulsar-io/twitter/src/main/java/org/apache/pulsar/io/twitter/TwitterFireHose.java
 ##########
 @@ -177,6 +183,23 @@ public TwitterRecord(TweetData tweet) {
             return Optional.empty();
         }
 
+        @Override
+        public Optional<Long> getEventTime() {
+            try {
+                if (tweet.getCreatedAt() != null) {
+                    SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM d 
HH:mm:ss Z yyyy");
 
 Review comment:
   This could be created as `private static final`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to