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

2013-01-09 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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

idbigint
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-SVNview=revrev=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-SVNview=revrev=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}
 idbigint
 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


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

2012-04-05 Thread Phabricator (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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}
 idbigint
 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

2012-04-05 Thread Hudson (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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

idbigint
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-SVNview=revrev=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-SVNview=revrev=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}
 idbigint
 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

2012-04-05 Thread Hudson (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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

idbigint
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-SVNview=revrev=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-SVNview=revrev=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}
 idbigint
 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

2012-04-03 Thread Phabricator (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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}
 idbigint
 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

2012-04-02 Thread Phabricator (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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}
 idbigint
 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

2012-03-26 Thread Phabricator (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 ListFieldSchema
  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}
 idbigint
 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

2012-03-14 Thread Alan Gates (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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}
 idbigint
 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

2012-03-12 Thread Chris Dean (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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}
 idbigint
 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