/** * Create {@link TwitterSource} for streaming. * * @param properties For the source */ public TwitterSource(Properties properties) { checkProperty(properties, CONSUMER_KEY); checkProperty(properties, CONSUMER_SECRET); checkProperty(properties, TOKEN); checkProperty(properties, TOKEN_SECRET); this.properties = properties; }
@Override public void stop() { LOG.info("Stopping Twitter source"); close(); }
params.has(TwitterSource.TOKEN_SECRET) ) { streamSource = env.addSource(new TwitterSource(params.getProperties())); } else { System.out.println("Executing TwitterStream example with default props.");
params.has(TwitterSource.TOKEN_SECRET) ) { streamSource = env.addSource(new TwitterSource(params.getProperties())); } else { System.out.println("Executing TwitterStream example with default props.");
@Override public void cancel() { LOG.info("Cancelling Twitter source"); close(); }
/** * Create {@link TwitterSource} for streaming. * * @param properties For the source */ public TwitterSource(Properties properties) { checkProperty(properties, CONSUMER_KEY); checkProperty(properties, CONSUMER_SECRET); checkProperty(properties, TOKEN); checkProperty(properties, TOKEN_SECRET); this.properties = properties; }
@Override public void cancel() { LOG.info("Cancelling Twitter source"); close(); }
@Override public void stop() { LOG.info("Stopping Twitter source"); close(); }