Hive
  1. Hive
  2. HIVE-2822

Add JSON output to the hive ddl commands

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      The goal is to have an option to produce JSON output of the DDL commands that is easily machine parseable.

      For example, "desc my_table" currently gives

          id    bigint
          user  string
      

      and we want to allow a json output:

          {
            "columns": [
              {"name": "id", "type": "bigint"},
              {"name": "user", "type": "string"}
            ]
          }
      
      1. ASF.LICENSE.NOT.GRANTED--HIVE-2822.D2475.1.patch
        78 kB
        Phabricator
      2. ASF.LICENSE.NOT.GRANTED--HIVE-2822.D2475.2.patch
        85 kB
        Phabricator
      3. ASF.LICENSE.NOT.GRANTED--HIVE-2822.D2475.3.patch
        83 kB
        Phabricator
      4. ASF.LICENSE.NOT.GRANTED--HIVE-2822.D2475.4.patch
        83 kB
        Phabricator
      5. HIVE-2822.03.patch
        80 kB
        Chris Dean
      6. HIVE-2822.03b.patch
        80 kB
        Chris Dean
      7. HIVE-2822.03-branch0-8.patch
        80 kB
        Chris Dean
      8. HIVE-2822.04-branch-08.patch
        81 kB
        Alan Gates
      9. HIVE-2822.05.patch
        80 kB
        Chris Dean
      10. HIVE-2822.05-branch0-8.patch
        81 kB
        Chris Dean
      11. HIVE-2822.05-branch0-8-1.patch
        81 kB
        Alan Gates
      12. hive-json-01.patch
        46 kB
        Chris Dean
      13. hive-json-01-branch0-8.patch
        48 kB
        Alan Gates
      14. hive-json-02.patch
        69 kB
        Chris Dean
      15. hive-json-02-branch0-8.patch
        69 kB
        Chris Dean

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/)
        HIVE-2822: Second part of it (ctdean via Ashutosh Chauhan) (Revision 1309667)
        HIVE-2822 [jira] Add JSON output to the hive ddl commands
        (Chris Dean via Ashutosh Chauhan)

        Summary:
        JSON output for DDL commands

        By setting the variable hive.format=json then ddl commands will
        produce json output suitable for client side parsing. For example, to
        list all the databases one might get:

        { "databases": [ "default" ] }

        The goal is to have an option to produce JSON output of the DDL commands that is
        easily machine parseable.

        For example, "desc my_table" currently gives

        id bigint
        user string

        and we want to allow a json output:

        {
        "columns": [

        {"name": "id", "type": "bigint"}

        ,

        {"name": "user", "type": "string"}

        ]
        }

        Test Plan: Run the provided unit tests

        Reviewers: JIRA, ashutoshc

        Reviewed By: ashutoshc

        Differential Revision: https://reviews.facebook.net/D2475 (Revision 1309666)

        Result = ABORTED
        hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309667
        Files :

        • /hive/trunk/ql/src/test/results/clientnegative/column_rename1.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/column_rename4.q.out

        hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309666
        Files :

        • /hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
        • /hive/trunk/conf/hive-default.xml.template
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java
        • /hive/trunk/ql/src/test/queries/clientpositive/describe_database_json.q
        • /hive/trunk/ql/src/test/queries/clientpositive/describe_table_json.q
        • /hive/trunk/ql/src/test/queries/clientpositive/misc_json.q
        • /hive/trunk/ql/src/test/queries/clientpositive/partitions_json.q
        • /hive/trunk/ql/src/test/results/clientnegative/database_create_already_exists.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/describe_database_json.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/describe_table_json.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/misc_json.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/partitions_json.q.out
        Show
        Hudson added a comment - Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/ ) HIVE-2822 : Second part of it (ctdean via Ashutosh Chauhan) (Revision 1309667) HIVE-2822 [jira] Add JSON output to the hive ddl commands (Chris Dean via Ashutosh Chauhan) Summary: JSON output for DDL commands By setting the variable hive.format=json then ddl commands will produce json output suitable for client side parsing. For example, to list all the databases one might get: { "databases": [ "default" ] } The goal is to have an option to produce JSON output of the DDL commands that is easily machine parseable. For example, "desc my_table" currently gives id bigint user string and we want to allow a json output: { "columns": [ {"name": "id", "type": "bigint"} , {"name": "user", "type": "string"} ] } Test Plan: Run the provided unit tests Reviewers: JIRA, ashutoshc Reviewed By: ashutoshc Differential Revision: https://reviews.facebook.net/D2475 (Revision 1309666) Result = ABORTED hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309667 Files : /hive/trunk/ql/src/test/results/clientnegative/column_rename1.q.out /hive/trunk/ql/src/test/results/clientnegative/column_rename4.q.out hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309666 Files : /hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java /hive/trunk/conf/hive-default.xml.template /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java /hive/trunk/ql/src/test/queries/clientpositive/describe_database_json.q /hive/trunk/ql/src/test/queries/clientpositive/describe_table_json.q /hive/trunk/ql/src/test/queries/clientpositive/misc_json.q /hive/trunk/ql/src/test/queries/clientpositive/partitions_json.q /hive/trunk/ql/src/test/results/clientnegative/database_create_already_exists.q.out /hive/trunk/ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out /hive/trunk/ql/src/test/results/clientpositive/describe_database_json.q.out /hive/trunk/ql/src/test/results/clientpositive/describe_table_json.q.out /hive/trunk/ql/src/test/results/clientpositive/misc_json.q.out /hive/trunk/ql/src/test/results/clientpositive/partitions_json.q.out
        Hide
        Ashutosh Chauhan added a comment -

        This issue is closed now. It was released with the fix in 0.9.0. If there is a problem, please open a new jira and link this one with that.

        Show
        Ashutosh Chauhan added a comment - This issue is closed now. It was released with the fix in 0.9.0. If there is a problem, please open a new jira and link this one with that.
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #1354 (See https://builds.apache.org/job/Hive-trunk-h0.21/1354/)
        HIVE-2822: Second part of it (ctdean via Ashutosh Chauhan) (Revision 1309667)
        HIVE-2822 [jira] Add JSON output to the hive ddl commands
        (Chris Dean via Ashutosh Chauhan)

        Summary:
        JSON output for DDL commands

        By setting the variable hive.format=json then ddl commands will
        produce json output suitable for client side parsing. For example, to
        list all the databases one might get:

        { "databases": [ "default" ] }

        The goal is to have an option to produce JSON output of the DDL commands that is
        easily machine parseable.

        For example, "desc my_table" currently gives

        id bigint
        user string

        and we want to allow a json output:

        {
        "columns": [

        {"name": "id", "type": "bigint"}

        ,

        {"name": "user", "type": "string"}

        ]
        }

        Test Plan: Run the provided unit tests

        Reviewers: JIRA, ashutoshc

        Reviewed By: ashutoshc

        Differential Revision: https://reviews.facebook.net/D2475 (Revision 1309666)

        Result = FAILURE
        hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309667
        Files :

        • /hive/trunk/ql/src/test/results/clientnegative/column_rename1.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/column_rename4.q.out

        hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309666
        Files :

        • /hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
        • /hive/trunk/conf/hive-default.xml.template
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java
        • /hive/trunk/ql/src/test/queries/clientpositive/describe_database_json.q
        • /hive/trunk/ql/src/test/queries/clientpositive/describe_table_json.q
        • /hive/trunk/ql/src/test/queries/clientpositive/misc_json.q
        • /hive/trunk/ql/src/test/queries/clientpositive/partitions_json.q
        • /hive/trunk/ql/src/test/results/clientnegative/database_create_already_exists.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/describe_database_json.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/describe_table_json.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/misc_json.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/partitions_json.q.out
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #1354 (See https://builds.apache.org/job/Hive-trunk-h0.21/1354/ ) HIVE-2822 : Second part of it (ctdean via Ashutosh Chauhan) (Revision 1309667) HIVE-2822 [jira] Add JSON output to the hive ddl commands (Chris Dean via Ashutosh Chauhan) Summary: JSON output for DDL commands By setting the variable hive.format=json then ddl commands will produce json output suitable for client side parsing. For example, to list all the databases one might get: { "databases": [ "default" ] } The goal is to have an option to produce JSON output of the DDL commands that is easily machine parseable. For example, "desc my_table" currently gives id bigint user string and we want to allow a json output: { "columns": [ {"name": "id", "type": "bigint"} , {"name": "user", "type": "string"} ] } Test Plan: Run the provided unit tests Reviewers: JIRA, ashutoshc Reviewed By: ashutoshc Differential Revision: https://reviews.facebook.net/D2475 (Revision 1309666) Result = FAILURE hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309667 Files : /hive/trunk/ql/src/test/results/clientnegative/column_rename1.q.out /hive/trunk/ql/src/test/results/clientnegative/column_rename4.q.out hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309666 Files : /hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java /hive/trunk/conf/hive-default.xml.template /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java /hive/trunk/ql/src/test/queries/clientpositive/describe_database_json.q /hive/trunk/ql/src/test/queries/clientpositive/describe_table_json.q /hive/trunk/ql/src/test/queries/clientpositive/misc_json.q /hive/trunk/ql/src/test/queries/clientpositive/partitions_json.q /hive/trunk/ql/src/test/results/clientnegative/database_create_already_exists.q.out /hive/trunk/ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out /hive/trunk/ql/src/test/results/clientpositive/describe_database_json.q.out /hive/trunk/ql/src/test/results/clientpositive/describe_table_json.q.out /hive/trunk/ql/src/test/results/clientpositive/misc_json.q.out /hive/trunk/ql/src/test/results/clientpositive/partitions_json.q.out
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #1353 (See https://builds.apache.org/job/Hive-trunk-h0.21/1353/)
        HIVE-2822: Second part of it (ctdean via Ashutosh Chauhan) (Revision 1309667)
        HIVE-2822 [jira] Add JSON output to the hive ddl commands
        (Chris Dean via Ashutosh Chauhan)

        Summary:
        JSON output for DDL commands

        By setting the variable hive.format=json then ddl commands will
        produce json output suitable for client side parsing. For example, to
        list all the databases one might get:

        { "databases": [ "default" ] }

        The goal is to have an option to produce JSON output of the DDL commands that is
        easily machine parseable.

        For example, "desc my_table" currently gives

        id bigint
        user string

        and we want to allow a json output:

        {
        "columns": [

        {"name": "id", "type": "bigint"}

        ,

        {"name": "user", "type": "string"}

        ]
        }

        Test Plan: Run the provided unit tests

        Reviewers: JIRA, ashutoshc

        Reviewed By: ashutoshc

        Differential Revision: https://reviews.facebook.net/D2475 (Revision 1309666)

        Result = FAILURE
        hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309667
        Files :

        • /hive/trunk/ql/src/test/results/clientnegative/column_rename1.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/column_rename4.q.out

        hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309666
        Files :

        • /hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
        • /hive/trunk/conf/hive-default.xml.template
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java
        • /hive/trunk/ql/src/test/queries/clientpositive/describe_database_json.q
        • /hive/trunk/ql/src/test/queries/clientpositive/describe_table_json.q
        • /hive/trunk/ql/src/test/queries/clientpositive/misc_json.q
        • /hive/trunk/ql/src/test/queries/clientpositive/partitions_json.q
        • /hive/trunk/ql/src/test/results/clientnegative/database_create_already_exists.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/describe_database_json.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/describe_table_json.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/misc_json.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/partitions_json.q.out
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #1353 (See https://builds.apache.org/job/Hive-trunk-h0.21/1353/ ) HIVE-2822 : Second part of it (ctdean via Ashutosh Chauhan) (Revision 1309667) HIVE-2822 [jira] Add JSON output to the hive ddl commands (Chris Dean via Ashutosh Chauhan) Summary: JSON output for DDL commands By setting the variable hive.format=json then ddl commands will produce json output suitable for client side parsing. For example, to list all the databases one might get: { "databases": [ "default" ] } The goal is to have an option to produce JSON output of the DDL commands that is easily machine parseable. For example, "desc my_table" currently gives id bigint user string and we want to allow a json output: { "columns": [ {"name": "id", "type": "bigint"} , {"name": "user", "type": "string"} ] } Test Plan: Run the provided unit tests Reviewers: JIRA, ashutoshc Reviewed By: ashutoshc Differential Revision: https://reviews.facebook.net/D2475 (Revision 1309666) Result = FAILURE hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309667 Files : /hive/trunk/ql/src/test/results/clientnegative/column_rename1.q.out /hive/trunk/ql/src/test/results/clientnegative/column_rename4.q.out hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1309666 Files : /hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java /hive/trunk/conf/hive-default.xml.template /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java /hive/trunk/ql/src/test/queries/clientpositive/describe_database_json.q /hive/trunk/ql/src/test/queries/clientpositive/describe_table_json.q /hive/trunk/ql/src/test/queries/clientpositive/misc_json.q /hive/trunk/ql/src/test/queries/clientpositive/partitions_json.q /hive/trunk/ql/src/test/results/clientnegative/database_create_already_exists.q.out /hive/trunk/ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out /hive/trunk/ql/src/test/results/clientpositive/describe_database_json.q.out /hive/trunk/ql/src/test/results/clientpositive/describe_table_json.q.out /hive/trunk/ql/src/test/results/clientpositive/misc_json.q.out /hive/trunk/ql/src/test/results/clientpositive/partitions_json.q.out
        Hide
        Ashutosh Chauhan added a comment -

        Committed to trunk. Thanks, Chris!

        Show
        Ashutosh Chauhan added a comment - Committed to trunk. Thanks, Chris!
        Hide
        Phabricator added a comment -

        ctdean has committed the revision "HIVE-2822 [jira] Add JSON output to the hive ddl commands".

        Change committed by hashutosh.

        REVISION DETAIL
        https://reviews.facebook.net/D2475

        COMMIT
        https://reviews.facebook.net/rHIVE1309666

        Show
        Phabricator added a comment - ctdean has committed the revision " HIVE-2822 [jira] Add JSON output to the hive ddl commands". Change committed by hashutosh. REVISION DETAIL https://reviews.facebook.net/D2475 COMMIT https://reviews.facebook.net/rHIVE1309666
        Hide
        Phabricator added a comment -

        ctdean updated the revision "HIVE-2822 [jira] Add JSON output to the hive ddl commands".
        Reviewers: JIRA, ashutoshc

        • Rebase against trunk
        • Remove dup conf entry

        REVISION DETAIL
        https://reviews.facebook.net/D2475

        AFFECTED FILES
        common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
        conf/hive-default.xml.template
        ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java
        ql/src/test/queries/clientpositive/describe_database_json.q
        ql/src/test/queries/clientpositive/describe_table_json.q
        ql/src/test/queries/clientpositive/misc_json.q
        ql/src/test/queries/clientpositive/partitions_json.q
        ql/src/test/results/clientnegative/database_create_already_exists.q.out
        ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out
        ql/src/test/results/clientpositive/describe_database_json.q.out
        ql/src/test/results/clientpositive/describe_table_json.q.out
        ql/src/test/results/clientpositive/misc_json.q.out
        ql/src/test/results/clientpositive/partitions_json.q.out

        Show
        Phabricator added a comment - ctdean updated the revision " HIVE-2822 [jira] Add JSON output to the hive ddl commands". Reviewers: JIRA, ashutoshc Rebase against trunk Remove dup conf entry REVISION DETAIL https://reviews.facebook.net/D2475 AFFECTED FILES common/src/java/org/apache/hadoop/hive/conf/HiveConf.java conf/hive-default.xml.template ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java ql/src/test/queries/clientpositive/describe_database_json.q ql/src/test/queries/clientpositive/describe_table_json.q ql/src/test/queries/clientpositive/misc_json.q ql/src/test/queries/clientpositive/partitions_json.q ql/src/test/results/clientnegative/database_create_already_exists.q.out ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out ql/src/test/results/clientpositive/describe_database_json.q.out ql/src/test/results/clientpositive/describe_table_json.q.out ql/src/test/results/clientpositive/misc_json.q.out ql/src/test/results/clientpositive/partitions_json.q.out
        Hide
        Phabricator added a comment -

        ashutoshc has accepted the revision "HIVE-2822 [jira] Add JSON output to the hive ddl commands".

        +1 patch looks good. But, doesn't apply cleanly, can you rebase it on trunk. Also, one minor comment on hive-default.xml.template.

        INLINE COMMENTS
        conf/hive-default.xml.template:1213 This seems like got copied over inadvertently. Please remove it.

        REVISION DETAIL
        https://reviews.facebook.net/D2475

        BRANCH
        HIVE-2822-dev-branch

        Show
        Phabricator added a comment - ashutoshc has accepted the revision " HIVE-2822 [jira] Add JSON output to the hive ddl commands". +1 patch looks good. But, doesn't apply cleanly, can you rebase it on trunk. Also, one minor comment on hive-default.xml.template. INLINE COMMENTS conf/hive-default.xml.template:1213 This seems like got copied over inadvertently. Please remove it. REVISION DETAIL https://reviews.facebook.net/D2475 BRANCH HIVE-2822 -dev-branch
        Hide
        Phabricator added a comment -

        ctdean updated the revision "HIVE-2822 [jira] Add JSON output to the hive ddl commands".
        Reviewers: JIRA, ashutoshc

        • added hive.ddl.output.format to hive-default.xml.template
        • Rolled back changes to
          ql/src/test/results/clientnegative/column_rename[14].q.out
        • Changed DDLTask.java to provide better error messages for missing
          and duplicate tables and databases.

        REVISION DETAIL
        https://reviews.facebook.net/D2475

        AFFECTED FILES
        common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
        conf/hive-default.xml.template
        ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java
        ql/src/test/queries/clientpositive/describe_database_json.q
        ql/src/test/queries/clientpositive/describe_table_json.q
        ql/src/test/queries/clientpositive/misc_json.q
        ql/src/test/queries/clientpositive/partitions_json.q
        ql/src/test/results/clientnegative/database_create_already_exists.q.out
        ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out
        ql/src/test/results/clientpositive/describe_database_json.q.out
        ql/src/test/results/clientpositive/describe_table_json.q.out
        ql/src/test/results/clientpositive/misc_json.q.out
        ql/src/test/results/clientpositive/partitions_json.q.out

        Show
        Phabricator added a comment - ctdean updated the revision " HIVE-2822 [jira] Add JSON output to the hive ddl commands". Reviewers: JIRA, ashutoshc added hive.ddl.output.format to hive-default.xml.template Rolled back changes to ql/src/test/results/clientnegative/column_rename [14] .q.out Changed DDLTask.java to provide better error messages for missing and duplicate tables and databases. REVISION DETAIL https://reviews.facebook.net/D2475 AFFECTED FILES common/src/java/org/apache/hadoop/hive/conf/HiveConf.java conf/hive-default.xml.template ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java ql/src/test/queries/clientpositive/describe_database_json.q ql/src/test/queries/clientpositive/describe_table_json.q ql/src/test/queries/clientpositive/misc_json.q ql/src/test/queries/clientpositive/partitions_json.q ql/src/test/results/clientnegative/database_create_already_exists.q.out ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out ql/src/test/results/clientpositive/describe_database_json.q.out ql/src/test/results/clientpositive/describe_table_json.q.out ql/src/test/results/clientpositive/misc_json.q.out ql/src/test/results/clientpositive/partitions_json.q.out
        Hide
        Chris Dean added a comment -

        Not sure what happened with the .q.out files. I'll roll back if needed.

        Show
        Chris Dean added a comment - Not sure what happened with the .q.out files. I'll roll back if needed.
        Hide
        Phabricator added a comment -

        ashutoshc has requested changes to the revision "HIVE-2822 [jira] Add JSON output to the hive ddl commands".

        Seems like output in *.q.out has changed in unintended ways.

        INLINE COMMENTS
        common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:560 This also needs to be added in file conf/hive-default.xml.template This template file is not used anywhere but exists for documentation purposes.
        ql/src/test/results/clientnegative/column_rename1.q.out:26 This line is certainly useful and should appear in the output. After the change it seems it will get lost.
        ql/src/test/results/clientnegative/column_rename4.q.out:26 Here also, column does not exist is useful bit of error message, which is not there anymore in patched version.
        ql/src/test/results/clientnegative/database_create_already_exists.q.out:14 Here, it seems wrong error message got generated. This will confuse users.
        ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out:9 Same as above.

        REVISION DETAIL
        https://reviews.facebook.net/D2475

        BRANCH
        HIVE-2822-dev-branch

        Show
        Phabricator added a comment - ashutoshc has requested changes to the revision " HIVE-2822 [jira] Add JSON output to the hive ddl commands". Seems like output in *.q.out has changed in unintended ways. INLINE COMMENTS common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:560 This also needs to be added in file conf/hive-default.xml.template This template file is not used anywhere but exists for documentation purposes. ql/src/test/results/clientnegative/column_rename1.q.out:26 This line is certainly useful and should appear in the output. After the change it seems it will get lost. ql/src/test/results/clientnegative/column_rename4.q.out:26 Here also, column does not exist is useful bit of error message, which is not there anymore in patched version. ql/src/test/results/clientnegative/database_create_already_exists.q.out:14 Here, it seems wrong error message got generated. This will confuse users. ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out:9 Same as above. REVISION DETAIL https://reviews.facebook.net/D2475 BRANCH HIVE-2822 -dev-branch
        Hide
        Phabricator added a comment -

        ctdean updated the revision "HIVE-2822 [jira] Add JSON output to the hive ddl commands".
        Reviewers: JIRA, ashutoshc

        • Change control variable to "hive.ddl.output.format"
        • Fixed negative tests that were failing because of changed error
          messages
        • Create org.apache.hadoop.hive.ql.metadata.formatting
        • Remove unused import in MetaDataFormatter
        • Fix mulitple stack trace generation in DDLTask.java
        • Be more consistent about errors going through the formatter in
          DDLTask
        • Added template types to JsonMetaDataFormatter and MapBuilder.
        • Merged a few methods in the formatters. Don't actually agree with
          this as it makes long methods longer, but got carried awaya and did
          it anyway.

        Unchanged:

        • MetaDataFormatter error codes - I think ints are clearer here, since
          the names are just human readable cues for the actual int error
          messages.

        REVISION DETAIL
        https://reviews.facebook.net/D2475

        AFFECTED FILES
        common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
        ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java
        ql/src/test/queries/clientpositive/describe_database_json.q
        ql/src/test/queries/clientpositive/describe_table_json.q
        ql/src/test/queries/clientpositive/misc_json.q
        ql/src/test/queries/clientpositive/partitions_json.q
        ql/src/test/results/clientnegative/column_rename1.q.out
        ql/src/test/results/clientnegative/column_rename4.q.out
        ql/src/test/results/clientnegative/database_create_already_exists.q.out
        ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out
        ql/src/test/results/clientpositive/describe_database_json.q.out
        ql/src/test/results/clientpositive/describe_table_json.q.out
        ql/src/test/results/clientpositive/misc_json.q.out
        ql/src/test/results/clientpositive/partitions_json.q.out

        Show
        Phabricator added a comment - ctdean updated the revision " HIVE-2822 [jira] Add JSON output to the hive ddl commands". Reviewers: JIRA, ashutoshc Change control variable to "hive.ddl.output.format" Fixed negative tests that were failing because of changed error messages Create org.apache.hadoop.hive.ql.metadata.formatting Remove unused import in MetaDataFormatter Fix mulitple stack trace generation in DDLTask.java Be more consistent about errors going through the formatter in DDLTask Added template types to JsonMetaDataFormatter and MapBuilder. Merged a few methods in the formatters. Don't actually agree with this as it makes long methods longer, but got carried awaya and did it anyway. Unchanged: MetaDataFormatter error codes - I think ints are clearer here, since the names are just human readable cues for the actual int error messages. REVISION DETAIL https://reviews.facebook.net/D2475 AFFECTED FILES common/src/java/org/apache/hadoop/hive/conf/HiveConf.java ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MapBuilder.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatUtils.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java ql/src/test/queries/clientpositive/describe_database_json.q ql/src/test/queries/clientpositive/describe_table_json.q ql/src/test/queries/clientpositive/misc_json.q ql/src/test/queries/clientpositive/partitions_json.q ql/src/test/results/clientnegative/column_rename1.q.out ql/src/test/results/clientnegative/column_rename4.q.out ql/src/test/results/clientnegative/database_create_already_exists.q.out ql/src/test/results/clientnegative/database_drop_does_not_exist.q.out ql/src/test/results/clientpositive/describe_database_json.q.out ql/src/test/results/clientpositive/describe_table_json.q.out ql/src/test/results/clientpositive/misc_json.q.out ql/src/test/results/clientpositive/partitions_json.q.out
        Hide
        Ashutosh Chauhan added a comment -

        Further, there are 4 failures in TestNegativeCliDriver

        • database_drop_does_not_exist.q
        • database_create_already_exists.q
        • column_rename4.q
        • column_rename1.q

        You can reproduce them via {{ ant test -Dtestcase=TestNegativeCliDriver -Dqfile=column_rename1.q }} and so on. Most of these looked like changes in .q.out files because of small change in error messages. If you expect these to happen then you can just overwrite them with -Doverwrite=true.

        Show
        Ashutosh Chauhan added a comment - Further, there are 4 failures in TestNegativeCliDriver database_drop_does_not_exist.q database_create_already_exists.q column_rename4.q column_rename1.q You can reproduce them via {{ ant test -Dtestcase=TestNegativeCliDriver -Dqfile=column_rename1.q }} and so on. Most of these looked like changes in .q.out files because of small change in error messages. If you expect these to happen then you can just overwrite them with -Doverwrite=true.
        Hide
        Phabricator added a comment -

        ashutoshc has requested changes to the revision "HIVE-2822 [jira] Add JSON output to the hive ddl commands".

        Since All the new introduced files deals with formatting output. I think they should be move to org.apache.hadoop.hive.ql.metadata.formatting package. Perhaps MetaDataFormatUtils.java should also be moved into this new package.

        Also, it would be good to add negative test cases in clientnegative for failure scenarios, like adding/dropping a table which doesn't exist.

        INLINE COMMENTS
        ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatter.java:23 Unused import.
        ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatter.java:40 Since there are only handful of them, will enum be a better choice here than ints?
        ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:397 Are you sure you want stack-trace here? In case, table already exists you just want to say that to user, not the full stack trace.
        ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:402 Are you sure you want stack-trace here? In case, db/table/partition doesnt exist you just want to say that to user, not the full stack trace.
        ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatter.java:38 Since all of the methods in the interface takes an output stream as an arg and writes to it, so interface is both formatter as well as writer. So, I wonder if better name for the interface is FormattedMetaDataWriter or something like that?
        ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:1855 For showDatabases/showTables you have made changes even for these exceptions. To keep it symmetrical, it makes sense to have these messages also go through formatter.
        ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:1858 For showDatabases/showTables you have made changes even for these exceptions. To keep it symmetrical, it makes sense to have these messages also go through formatter.
        ql/src/java/org/apache/hadoop/hive/ql/metadata/TextMetaDataFormatter.java:127 Whats the advantage of splitting it into two methods. You might as well inline content of this method here.
        ql/src/java/org/apache/hadoop/hive/ql/metadata/TextMetaDataFormatter.java:199 Whats the advantage of splitting it into two methods. You might as well inline content of this method here.
        ql/src/java/org/apache/hadoop/hive/ql/metadata/MapBuilder.java:28 This map can be parameterized to <String,Object>
        ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:163 Return type should be List<FieldSchema>
        ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:193 Genricize the return type.
        ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:210 Genricize the return type.
        ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:375 Genricize the return type.
        ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:389 Genricize the return type.
        ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:191 This config key should be defined into HiveConf.java and should be added in hive-site.xml.template. Also, instead of "hive.format" better name of this key would be "hive.ddl.output.format"

        REVISION DETAIL
        https://reviews.facebook.net/D2475

        BRANCH
        HIVE-2822-dev-branch

        Show
        Phabricator added a comment - ashutoshc has requested changes to the revision " HIVE-2822 [jira] Add JSON output to the hive ddl commands". Since All the new introduced files deals with formatting output. I think they should be move to org.apache.hadoop.hive.ql.metadata.formatting package. Perhaps MetaDataFormatUtils.java should also be moved into this new package. Also, it would be good to add negative test cases in clientnegative for failure scenarios, like adding/dropping a table which doesn't exist. INLINE COMMENTS ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatter.java:23 Unused import. ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatter.java:40 Since there are only handful of them, will enum be a better choice here than ints? ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:397 Are you sure you want stack-trace here? In case, table already exists you just want to say that to user, not the full stack trace. ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:402 Are you sure you want stack-trace here? In case, db/table/partition doesnt exist you just want to say that to user, not the full stack trace. ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatter.java:38 Since all of the methods in the interface takes an output stream as an arg and writes to it, so interface is both formatter as well as writer. So, I wonder if better name for the interface is FormattedMetaDataWriter or something like that? ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:1855 For showDatabases/showTables you have made changes even for these exceptions. To keep it symmetrical, it makes sense to have these messages also go through formatter. ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:1858 For showDatabases/showTables you have made changes even for these exceptions. To keep it symmetrical, it makes sense to have these messages also go through formatter. ql/src/java/org/apache/hadoop/hive/ql/metadata/TextMetaDataFormatter.java:127 Whats the advantage of splitting it into two methods. You might as well inline content of this method here. ql/src/java/org/apache/hadoop/hive/ql/metadata/TextMetaDataFormatter.java:199 Whats the advantage of splitting it into two methods. You might as well inline content of this method here. ql/src/java/org/apache/hadoop/hive/ql/metadata/MapBuilder.java:28 This map can be parameterized to <String,Object> ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:163 Return type should be List<FieldSchema> ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:193 Genricize the return type. ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:210 Genricize the return type. ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:375 Genricize the return type. ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java:389 Genricize the return type. ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java:191 This config key should be defined into HiveConf.java and should be added in hive-site.xml.template. Also, instead of "hive.format" better name of this key would be "hive.ddl.output.format" REVISION DETAIL https://reviews.facebook.net/D2475 BRANCH HIVE-2822 -dev-branch
        Hide
        Phabricator added a comment -

        ctdean requested code review of "HIVE-2822 [jira] Add JSON output to the hive ddl commands".
        Reviewers: JIRA

        JSON output for DDL commands

        By setting the variable hive.format=json then ddl commands will
        produce json output suitable for client side parsing. For example, to
        list all the databases one might get:

        { "databases": [ "default" ] }

        The goal is to have an option to produce JSON output of the DDL commands that is easily machine parseable.

        For example, "desc my_table" currently gives

        id bigint
        user string

        and we want to allow a json output:

        {
        "columns": [

        {"name": "id", "type": "bigint"}

        ,

        {"name": "user", "type": "string"}

        ]
        }

        TEST PLAN
        Run the provided unit tests

        REVISION DETAIL
        https://reviews.facebook.net/D2475

        AFFECTED FILES
        ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/MapBuilder.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatter.java
        ql/src/java/org/apache/hadoop/hive/ql/metadata/TextMetaDataFormatter.java
        ql/src/test/queries/clientpositive/describe_database_json.q
        ql/src/test/queries/clientpositive/describe_table_json.q
        ql/src/test/queries/clientpositive/misc_json.q
        ql/src/test/queries/clientpositive/partitions_json.q
        ql/src/test/results/clientpositive/describe_database_json.q.out
        ql/src/test/results/clientpositive/describe_table_json.q.out
        ql/src/test/results/clientpositive/misc_json.q.out
        ql/src/test/results/clientpositive/partitions_json.q.out

        MANAGE HERALD DIFFERENTIAL RULES
        https://reviews.facebook.net/herald/view/differential/

        WHY DID I GET THIS EMAIL?
        https://reviews.facebook.net/herald/transcript/5553/

        Tip: use the X-Herald-Rules header to filter Herald messages in your client.

        Show
        Phabricator added a comment - ctdean requested code review of " HIVE-2822 [jira] Add JSON output to the hive ddl commands". Reviewers: JIRA JSON output for DDL commands By setting the variable hive.format=json then ddl commands will produce json output suitable for client side parsing. For example, to list all the databases one might get: { "databases": [ "default" ] } The goal is to have an option to produce JSON output of the DDL commands that is easily machine parseable. For example, "desc my_table" currently gives id bigint user string and we want to allow a json output: { "columns": [ {"name": "id", "type": "bigint"} , {"name": "user", "type": "string"} ] } TEST PLAN Run the provided unit tests REVISION DETAIL https://reviews.facebook.net/D2475 AFFECTED FILES ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java ql/src/java/org/apache/hadoop/hive/ql/metadata/MapBuilder.java ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatter.java ql/src/java/org/apache/hadoop/hive/ql/metadata/TextMetaDataFormatter.java ql/src/test/queries/clientpositive/describe_database_json.q ql/src/test/queries/clientpositive/describe_table_json.q ql/src/test/queries/clientpositive/misc_json.q ql/src/test/queries/clientpositive/partitions_json.q ql/src/test/results/clientpositive/describe_database_json.q.out ql/src/test/results/clientpositive/describe_table_json.q.out ql/src/test/results/clientpositive/misc_json.q.out ql/src/test/results/clientpositive/partitions_json.q.out MANAGE HERALD DIFFERENTIAL RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/5553/ Tip: use the X-Herald-Rules header to filter Herald messages in your client.
        Hide
        Chris Dean added a comment -

        Submitted to phabricator. See https://reviews.facebook.net/D2475

        Show
        Chris Dean added a comment - Submitted to phabricator. See https://reviews.facebook.net/D2475
        Hide
        Alan Gates added a comment -

        Version of patch 5 branch 8 that applies after HIVE-2748 patch 3-1.

        Show
        Alan Gates added a comment - Version of patch 5 branch 8 that applies after HIVE-2748 patch 3-1.
        Hide
        Chris Dean added a comment -

        Fixes NPE in desc database.

        Show
        Chris Dean added a comment - Fixes NPE in desc database.
        Hide
        Alan Gates added a comment -

        I found an issue with the latest patch. If you do the following sequence of operations:

        drop database if exists hcat_database_1;
        create database hcat_database_1;
        alter database hcat_database_1 set dbproperties ('new.property'='some props');
        describe database hcat_database_1;
        show databases;
        use hcat_database_1;
        use default;
        drop database hcat_database_1;
        

        you get a null pointer exception in the describe. This is true with JSON formatting or standard formatting.

        Show
        Alan Gates added a comment - I found an issue with the latest patch. If you do the following sequence of operations: drop database if exists hcat_database_1; create database hcat_database_1; alter database hcat_database_1 set dbproperties (' new .property'='some props'); describe database hcat_database_1; show databases; use hcat_database_1; use default ; drop database hcat_database_1; you get a null pointer exception in the describe. This is true with JSON formatting or standard formatting.
        Hide
        Alan Gates added a comment -

        A version of the patch that applies against 0.8 branch and fixes compile issues. It also includes changes to ivy to pick up jackson.

        Show
        Alan Gates added a comment - A version of the patch that applies against 0.8 branch and fixes compile issues. It also includes changes to ivy to pick up jackson.
        Hide
        Chris Dean added a comment -

        Patch against 0.8 with unit tests

        Show
        Chris Dean added a comment - Patch against 0.8 with unit tests
        Hide
        Chris Dean added a comment -

        Unit tests (with license transfer)

        Show
        Chris Dean added a comment - Unit tests (with license transfer)
        Hide
        Chris Dean added a comment -

        Patch with unit tests

        Show
        Chris Dean added a comment - Patch with unit tests
        Hide
        Chris Dean added a comment -

        Patch against Hive 8

        Show
        Chris Dean added a comment - Patch against Hive 8
        Hide
        Chris Dean added a comment -

        @Carl: Sure thing. Let me add some tests and make a 0.8 patch as well.

        Show
        Chris Dean added a comment - @Carl: Sure thing. Let me add some tests and make a 0.8 patch as well.
        Hide
        Carl Steinbach added a comment -

        @Chris: Please submit a review request on phabricator. Instructions are here: https://cwiki.apache.org/Hive/phabricatorcodereview.html

        Show
        Carl Steinbach added a comment - @Chris: Please submit a review request on phabricator. Instructions are here: https://cwiki.apache.org/Hive/phabricatorcodereview.html
        Hide
        Chris Dean added a comment -

        Extended json patch to produce normal output and error messages for the hcat ddl commands.

        This patch is against Hive 9.

        Show
        Chris Dean added a comment - Extended json patch to produce normal output and error messages for the hcat ddl commands. This patch is against Hive 9.
        Hide
        Alan Gates added a comment -

        A version of the patch that applies cleanly to branch 0.8-r2

        Show
        Alan Gates added a comment - A version of the patch that applies cleanly to branch 0.8-r2
        Hide
        Chris Dean added a comment -

        JSON patch #1

        Show
        Chris Dean added a comment - JSON patch #1
        Hide
        Chris Dean added a comment -

        This is a work in progress snapshot of a json patch. Feedback appreciated – probably not ready for merging into the trunk.

        This patch implements and few of the ddl commands: describeTable, showTableStatus, and showTablePartitons. See org.apache.hadoop.hive.ql.metadata.MetaDataFormatter.

        Show
        Chris Dean added a comment - This is a work in progress snapshot of a json patch. Feedback appreciated – probably not ready for merging into the trunk. This patch implements and few of the ddl commands: describeTable, showTableStatus, and showTablePartitons. See org.apache.hadoop.hive.ql.metadata.MetaDataFormatter.

          People

          • Assignee:
            Chris Dean
            Reporter:
            Chris Dean
          • Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development