You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Chris Dean (Created) (JIRA)" <ji...@apache.org> on 2012/02/25 00:23:48 UTC

[jira] [Created] (HIVE-2822) Add JSON output to the hive ddl commands

Add JSON output to the hive ddl commands
----------------------------------------

                 Key: HIVE-2822
                 URL: https://issues.apache.org/jira/browse/HIVE-2822
             Project: Hive
          Issue Type: Improvement
            Reporter: Chris Dean


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"}
      ]
    }


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Ashutosh Chauhan (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239651#comment-13239651 ] 

Ashutosh Chauhan commented on HIVE-2822:
----------------------------------------

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.

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237623#comment-13237623 ] 

Chris Dean commented on HIVE-2822:
----------------------------------

Submitted to phabricator.  See https://reviews.facebook.net/D2475
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Alan Gates (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates updated HIVE-2822:
-----------------------------

    Attachment: HIVE-2822.04-branch-08.patch

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.
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.patch, HIVE-2822.04-branch-08.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Dean updated HIVE-2822:
-----------------------------

    Attachment: HIVE-2822.03-branch0-8.patch

Patch against 0.8 with unit tests

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247537#comment-13247537 ] 

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

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>             Fix For: 0.9.0
>
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.patch, HIVE-2822.D2475.3.patch, HIVE-2822.D2475.4.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Dean updated HIVE-2822:
-----------------------------

    Attachment: HIVE-2822.03.patch

Patch with unit tests
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244740#comment-13244740 ] 

Chris Dean commented on HIVE-2822:
----------------------------------

Not sure what happened with the .q.out files.  I'll roll back if needed.
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Alan Gates (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229430#comment-13229430 ] 

Alan Gates commented on HIVE-2822:
----------------------------------

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

{code}
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;
{code}

you get a null pointer exception in the describe.  This is true with JSON formatting or standard formatting.
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.patch, HIVE-2822.04-branch-08.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phabricator updated HIVE-2822:
------------------------------

    Attachment: HIVE-2822.D2475.2.patch

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Dean updated HIVE-2822:
-----------------------------

    Attachment: hive-json-01.patch

JSON patch #1

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: hive-json-01.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Dean updated HIVE-2822:
-----------------------------

    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
{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} 


  was:
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"}
      ]
    }


    
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247055#comment-13247055 ] 

Phabricator commented on HIVE-2822:
-----------------------------------

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.patch, HIVE-2822.D2475.3.patch, HIVE-2822.D2475.4.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Dean updated HIVE-2822:
-----------------------------

    Attachment: hive-json-02-branch0-8.patch

Patch against Hive 8
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phabricator updated HIVE-2822:
------------------------------

    Attachment: HIVE-2822.D2475.4.patch

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.patch, HIVE-2822.D2475.3.patch, HIVE-2822.D2475.4.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13228023#comment-13228023 ] 

Chris Dean commented on HIVE-2822:
----------------------------------

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Dean updated HIVE-2822:
-----------------------------

    Attachment: hive-json-02.patch

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

This patch is against Hive 9.
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: hive-json-01-branch0-8.patch, hive-json-01.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Carl Steinbach (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-2822:
---------------------------------

    Status: Open  (was: Patch Available)

@Chris: Please submit a review request on phabricator. Instructions are here: https://cwiki.apache.org/Hive/phabricatorcodereview.html
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: hive-json-01-branch0-8.patch, hive-json-01.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phabricator updated HIVE-2822:
------------------------------

    Attachment: HIVE-2822.D2475.3.patch

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.patch, HIVE-2822.D2475.3.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated HIVE-2822:
-----------------------------------

    Issue Type: New Feature  (was: Improvement)
    
> 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: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.patch, HIVE-2822.D2475.3.patch, HIVE-2822.D2475.4.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Dean updated HIVE-2822:
-----------------------------

    Status: Patch Available  (was: Open)

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.
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: hive-json-01.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Ashutosh Chauhan (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan resolved HIVE-2822.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9.0

Committed to trunk. Thanks, Chris!
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>             Fix For: 0.9.0
>
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.patch, HIVE-2822.D2475.3.patch, HIVE-2822.D2475.4.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phabricator updated HIVE-2822:
------------------------------

    Attachment: HIVE-2822.D2475.1.patch

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.

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Dean updated HIVE-2822:
-----------------------------

    Attachment: HIVE-2822.03b.patch

Unit tests (with license transfer)
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03.patch, HIVE-2822.03b.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Chris Dean (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Dean updated HIVE-2822:
-----------------------------

    Attachment: HIVE-2822.05-branch0-8.patch
                HIVE-2822.05.patch

Fixes NPE in desc database.
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.patch, HIVE-2822.04-branch-08.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247079#comment-13247079 ] 

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

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>             Fix For: 0.9.0
>
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.patch, HIVE-2822.D2475.3.patch, HIVE-2822.D2475.4.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Alan Gates (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates updated HIVE-2822:
-----------------------------

    Attachment: hive-json-01-branch0-8.patch

A version of the patch that applies cleanly to branch 0.8-r2
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: hive-json-01-branch0-8.patch, hive-json-01.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Ashutosh Chauhan (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan reassigned HIVE-2822:
--------------------------------------

    Assignee: Chris Dean
    
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238967#comment-13238967 ] 

Phabricator commented on HIVE-2822:
-----------------------------------

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Alan Gates (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates updated HIVE-2822:
-----------------------------

    Attachment: HIVE-2822.05-branch0-8-1.patch

Version of patch 5 branch 8 that applies after HIVE-2748 patch 3-1.
                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244556#comment-13244556 ] 

Phabricator commented on HIVE-2822:
-----------------------------------

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-2822) Add JSON output to the hive ddl commands

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246025#comment-13246025 ] 

Phabricator commented on HIVE-2822:
-----------------------------------

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

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>            Assignee: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, HIVE-2822.03b.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-2822.D2475.1.patch, HIVE-2822.D2475.2.patch, HIVE-2822.D2475.3.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira