Skip to content
Snippets Groups Projects
Commit c1a040db authored by Tathagata Das's avatar Tathagata Das
Browse files

Fixed bugs in examples.

parent b4eb24de
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ import spark.streaming.api.java.JavaStreamingContext; ...@@ -23,7 +23,7 @@ import spark.streaming.api.java.JavaStreamingContext;
*/ */
public class JavaNetworkWordCount { public class JavaNetworkWordCount {
public static void main(String[] args) { public static void main(String[] args) {
if (args.length < 2) { if (args.length < 3) {
System.err.println("Usage: NetworkWordCount <master> <hostname> <port>\n" + System.err.println("Usage: NetworkWordCount <master> <hostname> <port>\n" +
"In local mode, <master> should be 'local[n]' with n > 1"); "In local mode, <master> should be 'local[n]' with n > 1");
System.exit(1); System.exit(1);
......
...@@ -131,8 +131,7 @@ object ActorWordCount { ...@@ -131,8 +131,7 @@ object ActorWordCount {
val Seq(master, host, port) = args.toSeq val Seq(master, host, port) = args.toSeq
// Create the context and set the batch size // Create the context and set the batch size
val ssc = new StreamingContext(master, "ActorWordCount", val ssc = new StreamingContext(master, "ActorWordCount", Seconds(2))
Seconds(10))
/* /*
* Following is the use of actorStream to plug in custom actor as receiver * Following is the use of actorStream to plug in custom actor as receiver
......
...@@ -16,7 +16,7 @@ import spark.streaming.StreamingContext._ ...@@ -16,7 +16,7 @@ import spark.streaming.StreamingContext._
*/ */
object NetworkWordCount { object NetworkWordCount {
def main(args: Array[String]) { def main(args: Array[String]) {
if (args.length < 2) { if (args.length < 3) {
System.err.println("Usage: NetworkWordCount <master> <hostname> <port>\n" + System.err.println("Usage: NetworkWordCount <master> <hostname> <port>\n" +
"In local mode, <master> should be 'local[n]' with n > 1") "In local mode, <master> should be 'local[n]' with n > 1")
System.exit(1) System.exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment