Skip to content

Commit

Permalink
[quickstart] Error msg in streaming quickstarts when run with wrong n…
Browse files Browse the repository at this point in the history
…umber of arguments
  • Loading branch information
mbalassi committed Apr 8, 2015
1 parent e8faff7 commit f07aa01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public class SocketTextStreamWordCount {

public static void main(String[] args) throws Exception {

if (args.length != 2){
System.err.println("USAGE:\nSocketTextStreamWordCount <hostname> <port>");
return;
}

String hostName = args[0];
Integer port = Integer.parseInt(args[1]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ import org.apache.flink.streaming.api.scala._
object SocketTextStreamWordCount {

def main(args: Array[String]) {
if (args.length != 2) {
System.err.println("USAGE:\nSocketTextStreamWordCount <hostname> <port>")
return
}

val hostName = args(0)
val port = args(1).toInt
Expand Down

0 comments on commit f07aa01

Please sign in to comment.