flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmetz...@apache.org
Subject [01/25] flink git commit: [FLINK-3522] [storm compat] PrintSampleStream prints a proper message when involked without arguments
Date Fri, 26 Feb 2016 19:58:47 GMT
Repository: flink
Updated Branches:
  refs/heads/release-1.0 016644ac3 -> c0ce1b6d9


[FLINK-3522] [storm compat] PrintSampleStream prints a proper message when involked without
arguments


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8c330150
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8c330150
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8c330150

Branch: refs/heads/release-1.0
Commit: 8c3301501934ee0faeffec3f8c2034d292d078ef
Parents: f3c6646
Author: Stephan Ewen <sewen@apache.org>
Authored: Fri Feb 26 15:12:07 2016 +0100
Committer: Robert Metzger <rmetzger@apache.org>
Committed: Fri Feb 26 20:56:24 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/flink/storm/print/PrintSampleStream.java | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/8c330150/flink-contrib/flink-storm-examples/src/main/java/org/apache/flink/storm/print/PrintSampleStream.java
----------------------------------------------------------------------
diff --git a/flink-contrib/flink-storm-examples/src/main/java/org/apache/flink/storm/print/PrintSampleStream.java
b/flink-contrib/flink-storm-examples/src/main/java/org/apache/flink/storm/print/PrintSampleStream.java
index ba183c9..de652cf 100644
--- a/flink-contrib/flink-storm-examples/src/main/java/org/apache/flink/storm/print/PrintSampleStream.java
+++ b/flink-contrib/flink-storm-examples/src/main/java/org/apache/flink/storm/print/PrintSampleStream.java
@@ -32,7 +32,15 @@ import java.util.Arrays;
  * Prints incoming tweets. Tweets can be filtered by keywords.
  */
 public class PrintSampleStream {
+	
 	public static void main(String[] args) throws Exception {
+		
+		if (args.length < 4) {
+			System.err.println(
+					"Usage: PrintSampleStream <consumer-key> <consumer-secret> <access-token>
<access-token-secret>");
+			return;
+		}
+		
 		String consumerKey = args[0];
 		String consumerSecret = args[1];
 		String accessToken = args[2];


Mime
View raw message