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

Create linter rule to prevent misuse of SparkContext.hadoopConfiguration in SQL modules

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.4.0
    • 2.4.0
    • SQL
    • None

    Description

      SparkContext.hadoopConfiguration should not be used directly in SQL module.
      Instead, one should always use sessionState.newHadoopConfiguration(), which blends in configs set per session.

      The idea is to add the linter rule to ban it.

      • Restrict the linter rule to the components that use SQL. use the parameter `scalastyleSources`?
      • Exclude genuinely valid uses, like e.g. in SessionState (ok, that can be done per case with scalastyle:off in the code.

      Attachments

        Issue Links

          Activity

            People

              Gengliang.Wang Gengliang Wang
              smilegator Xiao Li
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: