提交 f07aa014 编写于 作者: M mbalassi

[quickstart] Error msg in streaming quickstarts when run with wrong number of arguments

上级 e8faff79
......@@ -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]);
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册