Skip to content

[SPARK-17628][Streaming][Examples] change name "StreamingExamples" to be "StreamingExamplesUtils", more descriptive#15191

Closed
keypointt wants to merge 1 commit intoapache:masterfrom
keypointt:SPARK-17628
Closed

[SPARK-17628][Streaming][Examples] change name "StreamingExamples" to be "StreamingExamplesUtils", more descriptive#15191
keypointt wants to merge 1 commit intoapache:masterfrom
keypointt:SPARK-17628

Conversation

@keypointt
Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/SPARK-17628

What changes were proposed in this pull request?

object StreamingExamples is more of a utility object, and the name is too general. here changing it to be StreamingExamplesUtils

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

  /** Set reasonable logging levels for streaming if the user has not configured log4j. */
  def setStreamingLogLevels() {
    val log4jInitialized = Logger.getRootLogger.getAllAppenders.hasMoreElements
    if (!log4jInitialized) {
      // We first log something to initialize Spark's default logging, then we override the
      // logging level.
      logInfo("Setting log level to [WARN] for streaming example." +
        " To override add a custom log4j.properties to the classpath.")
      Logger.getRootLogger.setLevel(Level.WARN)
    }
  }
}

How was this patch tested?

Tested manually on local laptop

@SparkQA
Copy link
Copy Markdown

SparkQA commented Sep 22, 2016

Test build #65748 has finished for PR 15191 at commit 79533fd.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Copy Markdown
Member

srowen commented Sep 22, 2016

"Foobars" is a common name in Java / Scala for "static methods related to Foobar objects". I think the current name is fine. It's not really an API anyway, just a component of an example.

@keypointt
Copy link
Copy Markdown
Contributor Author

oh I see...sorry...I'll close this one

@keypointt keypointt closed this Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants