Skip to content

Commit

Permalink
[SPARK-17628] change name StreamingExamples to be StreamingExamplesUt…
Browse files Browse the repository at this point in the history
…ils, more descriptive
  • Loading branch information
keypointt committed Sep 22, 2016
1 parent 7cbe216 commit 79533fd
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static void main(String[] args) throws Exception {
System.exit(1);
}

StreamingExamples.setStreamingLogLevels();
StreamingExamplesUtils.setStreamingLogLevels();

// Create the context with a 1 second batch size
SparkConf sparkConf = new SparkConf().setAppName("JavaCustomReceiver");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static void main(String[] args) throws Exception {
System.exit(1);
}

StreamingExamples.setStreamingLogLevels();
StreamingExamplesUtils.setStreamingLogLevels();

String brokers = args[0];
String topics = args[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static void main(String[] args) throws Exception {
System.exit(1);
}

StreamingExamples.setStreamingLogLevels();
StreamingExamplesUtils.setStreamingLogLevels();

String host = args[0];
int port = Integer.parseInt(args[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static void main(String[] args) throws Exception {
System.exit(1);
}

StreamingExamples.setStreamingLogLevels();
StreamingExamplesUtils.setStreamingLogLevels();
SparkConf sparkConf = new SparkConf().setAppName("JavaKafkaWordCount");
// Create the context with 2 seconds batch size
JavaStreamingContext jssc = new JavaStreamingContext(sparkConf, new Duration(2000));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void main(String[] args) throws Exception {
System.exit(1);
}

StreamingExamples.setStreamingLogLevels();
StreamingExamplesUtils.setStreamingLogLevels();

// Create the context with a 1 second batch size
SparkConf sparkConf = new SparkConf().setAppName("JavaNetworkWordCount");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private JavaQueueStream() {

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

StreamingExamples.setStreamingLogLevels();
StreamingExamplesUtils.setStreamingLogLevels();
SparkConf sparkConf = new SparkConf().setAppName("JavaQueueStream");

// Create the context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static void main(String[] args) throws Exception {
System.exit(1);
}

StreamingExamples.setStreamingLogLevels();
StreamingExamplesUtils.setStreamingLogLevels();

// Create the context with a 1 second batch size
SparkConf sparkConf = new SparkConf().setAppName("JavaSqlNetworkWordCount");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static void main(String[] args) throws Exception {
System.exit(1);
}

StreamingExamples.setStreamingLogLevels();
StreamingExamplesUtils.setStreamingLogLevels();

// Create the context with a 1 second batch size
SparkConf sparkConf = new SparkConf().setAppName("JavaStatefulNetworkWordCount");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object CustomReceiver {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()

// Create the context with a 1 second batch size
val sparkConf = new SparkConf().setAppName("CustomReceiver")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object DirectKafkaWordCount {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()

val Array(brokers, topics) = args

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object FlumeEventCount {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()

val Array(host, IntParam(port)) = args

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object FlumePollingEventCount {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()

val Array(host, IntParam(port)) = args

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object HdfsWordCount {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()
val sparkConf = new SparkConf().setAppName("HdfsWordCount")
// Create the context
val ssc = new StreamingContext(sparkConf, Seconds(2))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object KafkaWordCount {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()

val Array(zkQuorum, group, topics, numThreads) = args
val sparkConf = new SparkConf().setAppName("KafkaWordCount")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object NetworkWordCount {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()

// Create the context with a 1 second batch size
val sparkConf = new SparkConf().setAppName("NetworkWordCount")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object QueueStream {

def main(args: Array[String]) {

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()
val sparkConf = new SparkConf().setAppName("QueueStream")
// Create the context
val ssc = new StreamingContext(sparkConf, Seconds(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object RawNetworkGrep {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()

val Array(IntParam(numStreams), host, IntParam(port), IntParam(batchMillis)) = args
val sparkConf = new SparkConf().setAppName("RawNetworkGrep")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object SqlNetworkWordCount {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()

// Create the context with a 2 second batch size
val sparkConf = new SparkConf().setAppName("SqlNetworkWordCount")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ object StatefulNetworkWordCount {
System.exit(1)
}

StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()

val sparkConf = new SparkConf().setAppName("StatefulNetworkWordCount")
// Create the context with a 1 second batch size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.apache.log4j.{Level, Logger}
import org.apache.spark.internal.Logging

/** Utility functions for Spark Streaming examples. */
object StreamingExamples extends Logging {
object StreamingExamplesUtils extends Logging {

/** Set reasonable logging levels for streaming if the user has not configured log4j. */
def setStreamingLogLevels() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// scalastyle:off println
package org.apache.spark.examples.streaming.clickstream

import org.apache.spark.examples.streaming.StreamingExamples
import org.apache.spark.examples.streaming.StreamingExamplesUtils
import org.apache.spark.streaming.{Seconds, StreamingContext}

// scalastyle:off
Expand All @@ -42,7 +42,7 @@ object PageViewStream {
" errorRatePerZipCode, activeUserCount, popularUsersSeen")
System.exit(1)
}
StreamingExamples.setStreamingLogLevels()
StreamingExamplesUtils.setStreamingLogLevels()
val metric = args(0)
val host = args(1)
val port = args(2).toInt
Expand Down

0 comments on commit 79533fd

Please sign in to comment.