Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-17628

Name of "object StreamingExamples" should be more self-explanatory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 2.0.0
    • None
    • DStreams, Examples
    • None

    Description

      `object StreamingExamples` is more of a utility object, and the name is too general and I thought it's an actual streaming example at the very beginning.

      /** 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)
          }
        }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            iamshrek Xin Ren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: