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

Create HiveConf per application instead of per query in HiveQl.scala

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.0, 1.3.0
    • 1.2.3
    • SQL
    • None

    Description

      A new HiveConf is created per query in getAst method in HiveQl.scala

      def getAst(sql: String): ASTNode =

      { /* * Context has to be passed in hive0.13.1. * Otherwise, there will be Null pointer exception, * when retrieving properties form HiveConf. */ val hContext = new Context(new HiveConf()) val node = ParseUtils.findRootNonNullToken((new ParseDriver).parse(sql, hContext)) hContext.clear() node }

      Creating hiveConf adds a minimum of 90ms delay per query. So moving its creation in Object such that it gets created once.

      Attachments

        Activity

          People

            nitin2goyal Nitin Goyal
            nitin2goyal Nitin Goyal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: