hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands
Date Wed, 09 Jan 2013 10:29:15 GMT

    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13548141#comment-13548141
] 

Hudson commented on HIVE-2822:
------------------------------

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: New Feature
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>             Fix For: 0.9.0
>
>         Attachments: ASF.LICENSE.NOT.GRANTED--HIVE-2822.D2475.1.patch, ASF.LICENSE.NOT.GRANTED--HIVE-2822.D2475.2.patch,
ASF.LICENSE.NOT.GRANTED--HIVE-2822.D2475.3.patch, ASF.LICENSE.NOT.GRANTED--HIVE-2822.D2475.4.patch,
HIVE-2822.03b.patch, HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.04-branch-08.patch,
HIVE-2822.05-branch0-8-1.patch, HIVE-2822.05-branch0-8.patch, HIVE-2822.05.patch, hive-json-01-branch0-8.patch,
hive-json-01.patch, hive-json-02-branch0-8.patch, hive-json-02.patch
>
>
> 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
> {noformat}
>     id    bigint
>     user  string
> {noformat} 
> and we want to allow a json output:
> {noformat}
>     {
>       "columns": [
>         {"name": "id", "type": "bigint"},
>         {"name": "user", "type": "string"}
>       ]
>     }
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message