Hive
  1. Hive
  2. HIVE-1937

DDLSemanticAnalyzer won't take newly set Hive parameters

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Query Processor
    • Labels:
      None

      Description

      Hive DDLSemanticAnalyzer maintains a static reservedPartitionValue set whose values come from several Hive parameters. However even if these parameters are set to new values, the reservedPartitionValue are not changed.

      1. HIVE-1937.patch
        8 kB
        Ning Zhang
      2. HIVE-1937.2.patch
        9 kB
        Ning Zhang
      3. HIVE-1937.3.patch
        5 kB
        Ning Zhang

        Activity

        Hide
        Carl Steinbach added a comment -

        The proposed solution introduces a concurrency bug since
        reservedPartitionValues is a class variable and access to
        it is not synchronized. It looks like another solution which
        doesn't introduce concurrency issues is to make
        make reservedPartitionValues a private instance variable.

        Show
        Carl Steinbach added a comment - The proposed solution introduces a concurrency bug since reservedPartitionValues is a class variable and access to it is not synchronized. It looks like another solution which doesn't introduce concurrency issues is to make make reservedPartitionValues a private instance variable.
        Hide
        Carl Steinbach added a comment -

        @Ning: can you also make TokenToTypeName private? I can't see any reason why this should be public. Thanks!

        Show
        Carl Steinbach added a comment - @Ning: can you also make TokenToTypeName private? I can't see any reason why this should be public. Thanks!
        Hide
        Ning Zhang added a comment -

        Good catch Carl. Yeah, it won't work for HiveServer.

        I'm uploading a new patch taking your 2 comments.

        Show
        Ning Zhang added a comment - Good catch Carl. Yeah, it won't work for HiveServer. I'm uploading a new patch taking your 2 comments.
        Hide
        Ning Zhang added a comment -

        updated to current trunk.

        Show
        Ning Zhang added a comment - updated to current trunk.
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/707/
        -----------------------------------------------------------

        Review request for hive.

        Summary
        -------

        this patch resets reservedPartitioinValues every time DDLSemanticAnalyzer got initialized.

        This addresses bug HIVE-1937.
        https://issues.apache.org/jira/browse/HIVE-1937

        Diffs


        trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 1101312
        trunk/ql/src/test/queries/clientnegative/default_partition_name.q PRE-CREATION
        trunk/ql/src/test/queries/clientpositive/default_partition_name.q PRE-CREATION
        trunk/ql/src/test/results/clientnegative/default_partition_name.q.out PRE-CREATION
        trunk/ql/src/test/results/clientpositive/default_partition_name.q.out PRE-CREATION

        Diff: https://reviews.apache.org/r/707/diff

        Testing
        -------

        Thanks,

        Ning

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/707/ ----------------------------------------------------------- Review request for hive. Summary ------- this patch resets reservedPartitioinValues every time DDLSemanticAnalyzer got initialized. This addresses bug HIVE-1937 . https://issues.apache.org/jira/browse/HIVE-1937 Diffs trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 1101312 trunk/ql/src/test/queries/clientnegative/default_partition_name.q PRE-CREATION trunk/ql/src/test/queries/clientpositive/default_partition_name.q PRE-CREATION trunk/ql/src/test/results/clientnegative/default_partition_name.q.out PRE-CREATION trunk/ql/src/test/results/clientpositive/default_partition_name.q.out PRE-CREATION Diff: https://reviews.apache.org/r/707/diff Testing ------- Thanks, Ning
        Hide
        He Yongqiang added a comment -

        +1, will commit after tests pass

        Show
        He Yongqiang added a comment - +1, will commit after tests pass
        Hide
        He Yongqiang added a comment -

        committed! thanks Ning

        Show
        He Yongqiang added a comment - committed! thanks Ning
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.20 #726 (See https://builds.apache.org/hudson/job/Hive-trunk-h0.20/726/)

        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.20 #726 (See https://builds.apache.org/hudson/job/Hive-trunk-h0.20/726/ )

          People

          • Assignee:
            Ning Zhang
            Reporter:
            Ning Zhang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development