[jira] [Updated] (HIVE-6853) show create table for hbase tables should exclude LOCATION
[ https://issues.apache.org/jira/browse/HIVE-6853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Miklos Christine updated HIVE-6853: --- Attachment: HIVE-6853.patch bq: is it needed to make a StringBuilder when there is only one string to return? Fixed. I removed it and just returned the string. > show create table for hbase tables should exclude LOCATION > --- > > Key: HIVE-6853 > URL: https://issues.apache.org/jira/browse/HIVE-6853 > Project: Hive > Issue Type: Bug > Components: StorageHandler >Affects Versions: 0.10.0 >Reporter: Miklos Christine > Attachments: HIVE-6853-0.patch, HIVE-6853.patch > > > If you create a table on top of hbase in hive and issue a "show create table > ", it gives a bad DDL. It should not show LOCATION: > > > [hive]$ cat /tmp/test_create.sql > CREATE EXTERNAL TABLE nba_twitter.hbase2( > key string COMMENT 'from deserializer', > name string COMMENT 'from deserializer', > pdt string COMMENT 'from deserializer', > service string COMMENT 'from deserializer', > term string COMMENT 'from deserializer', > update1 string COMMENT 'from deserializer') > ROW FORMAT SERDE > 'org.apache.hadoop.hive.hbase.HBaseSerDe' > STORED BY > 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' > WITH SERDEPROPERTIES ( > 'serialization.format'='1', > 'hbase.columns.mapping'=':key,srv:name,srv:pdt,srv:service,srv:term,srv:update') > LOCATION > 'hdfs://nameservice1/user/hive/warehouse/nba_twitter.db/hbase' > TBLPROPERTIES ( > 'hbase.table.name'='NBATwitter', > 'transient_lastDdlTime'='1386172188') > Trying to create a table using the above fails: > [hive]$ hive -f /tmp/test_create.sql > cli "-f /tmp/test_create.sql" > Logging initialized using configuration in > jar:file:/opt/cloudera/parcels/CDH-4.4.0-1.cdh4.4.0.p0.39/lib/hive/lib/hive-common-0.10.0-cdh4.4.0.jar!/hive-log4j.properties > FAILED: Error in metadata: MetaException(message:LOCATION may not be > specified for HBase.) > FAILED: Execution Error, return code 1 from > org.apache.hadoop.hive.ql.exec.DDLTask > However, if I remove the LOCATION, then the DDL is valid. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (HIVE-6853) show create table for hbase tables should exclude LOCATION
[ https://issues.apache.org/jira/browse/HIVE-6853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Miklos Christine updated HIVE-6853: --- Status: Patch Available (was: Open) Attaching a patch that checks if the table uses the HBaseStorageHandler and removes the LOCATION field in the show create table method. > show create table for hbase tables should exclude LOCATION > --- > > Key: HIVE-6853 > URL: https://issues.apache.org/jira/browse/HIVE-6853 > Project: Hive > Issue Type: Bug > Components: StorageHandler >Affects Versions: 0.10.0 >Reporter: Miklos Christine > Attachments: HIVE-6853-0.patch > > > If you create a table on top of hbase in hive and issue a "show create table > ", it gives a bad DDL. It should not show LOCATION: > > > [hive]$ cat /tmp/test_create.sql > CREATE EXTERNAL TABLE nba_twitter.hbase2( > key string COMMENT 'from deserializer', > name string COMMENT 'from deserializer', > pdt string COMMENT 'from deserializer', > service string COMMENT 'from deserializer', > term string COMMENT 'from deserializer', > update1 string COMMENT 'from deserializer') > ROW FORMAT SERDE > 'org.apache.hadoop.hive.hbase.HBaseSerDe' > STORED BY > 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' > WITH SERDEPROPERTIES ( > 'serialization.format'='1', > 'hbase.columns.mapping'=':key,srv:name,srv:pdt,srv:service,srv:term,srv:update') > LOCATION > 'hdfs://nameservice1/user/hive/warehouse/nba_twitter.db/hbase' > TBLPROPERTIES ( > 'hbase.table.name'='NBATwitter', > 'transient_lastDdlTime'='1386172188') > Trying to create a table using the above fails: > [hive]$ hive -f /tmp/test_create.sql > cli "-f /tmp/test_create.sql" > Logging initialized using configuration in > jar:file:/opt/cloudera/parcels/CDH-4.4.0-1.cdh4.4.0.p0.39/lib/hive/lib/hive-common-0.10.0-cdh4.4.0.jar!/hive-log4j.properties > FAILED: Error in metadata: MetaException(message:LOCATION may not be > specified for HBase.) > FAILED: Execution Error, return code 1 from > org.apache.hadoop.hive.ql.exec.DDLTask > However, if I remove the LOCATION, then the DDL is valid. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (HIVE-6853) show create table for hbase tables should exclude LOCATION
[ https://issues.apache.org/jira/browse/HIVE-6853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Miklos Christine updated HIVE-6853: --- Attachment: HIVE-6853-0.patch > show create table for hbase tables should exclude LOCATION > --- > > Key: HIVE-6853 > URL: https://issues.apache.org/jira/browse/HIVE-6853 > Project: Hive > Issue Type: Bug > Components: StorageHandler >Affects Versions: 0.10.0 >Reporter: Miklos Christine > Attachments: HIVE-6853-0.patch > > > If you create a table on top of hbase in hive and issue a "show create table > ", it gives a bad DDL. It should not show LOCATION: > > > [hive]$ cat /tmp/test_create.sql > CREATE EXTERNAL TABLE nba_twitter.hbase2( > key string COMMENT 'from deserializer', > name string COMMENT 'from deserializer', > pdt string COMMENT 'from deserializer', > service string COMMENT 'from deserializer', > term string COMMENT 'from deserializer', > update1 string COMMENT 'from deserializer') > ROW FORMAT SERDE > 'org.apache.hadoop.hive.hbase.HBaseSerDe' > STORED BY > 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' > WITH SERDEPROPERTIES ( > 'serialization.format'='1', > 'hbase.columns.mapping'=':key,srv:name,srv:pdt,srv:service,srv:term,srv:update') > LOCATION > 'hdfs://nameservice1/user/hive/warehouse/nba_twitter.db/hbase' > TBLPROPERTIES ( > 'hbase.table.name'='NBATwitter', > 'transient_lastDdlTime'='1386172188') > Trying to create a table using the above fails: > [hive]$ hive -f /tmp/test_create.sql > cli "-f /tmp/test_create.sql" > Logging initialized using configuration in > jar:file:/opt/cloudera/parcels/CDH-4.4.0-1.cdh4.4.0.p0.39/lib/hive/lib/hive-common-0.10.0-cdh4.4.0.jar!/hive-log4j.properties > FAILED: Error in metadata: MetaException(message:LOCATION may not be > specified for HBase.) > FAILED: Execution Error, return code 1 from > org.apache.hadoop.hive.ql.exec.DDLTask > However, if I remove the LOCATION, then the DDL is valid. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (HIVE-6853) show create table for hbase tables should exclude LOCATION
Miklos Christine created HIVE-6853: -- Summary: show create table for hbase tables should exclude LOCATION Key: HIVE-6853 URL: https://issues.apache.org/jira/browse/HIVE-6853 Project: Hive Issue Type: Bug Components: StorageHandler Affects Versions: 0.10.0 Reporter: Miklos Christine If you create a table on top of hbase in hive and issue a "show create table ", it gives a bad DDL. It should not show LOCATION: [hive]$ cat /tmp/test_create.sql CREATE EXTERNAL TABLE nba_twitter.hbase2( key string COMMENT 'from deserializer', name string COMMENT 'from deserializer', pdt string COMMENT 'from deserializer', service string COMMENT 'from deserializer', term string COMMENT 'from deserializer', update1 string COMMENT 'from deserializer') ROW FORMAT SERDE 'org.apache.hadoop.hive.hbase.HBaseSerDe' STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ( 'serialization.format'='1', 'hbase.columns.mapping'=':key,srv:name,srv:pdt,srv:service,srv:term,srv:update') LOCATION 'hdfs://nameservice1/user/hive/warehouse/nba_twitter.db/hbase' TBLPROPERTIES ( 'hbase.table.name'='NBATwitter', 'transient_lastDdlTime'='1386172188') Trying to create a table using the above fails: [hive]$ hive -f /tmp/test_create.sql cli "-f /tmp/test_create.sql" Logging initialized using configuration in jar:file:/opt/cloudera/parcels/CDH-4.4.0-1.cdh4.4.0.p0.39/lib/hive/lib/hive-common-0.10.0-cdh4.4.0.jar!/hive-log4j.properties FAILED: Error in metadata: MetaException(message:LOCATION may not be specified for HBase.) FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask However, if I remove the LOCATION, then the DDL is valid. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (HIVE-4775) getColumnTypeName returns string for int partition columns
Miklos Christine created HIVE-4775: -- Summary: getColumnTypeName returns string for int partition columns Key: HIVE-4775 URL: https://issues.apache.org/jira/browse/HIVE-4775 Project: Hive Issue Type: Bug Components: JDBC Affects Versions: 0.9.0 Reporter: Miklos Christine For an 'int' partition column, the 'getColumnTypeName' metadata call is returning type 'string'. However, a DESCRIBE correctly returns type 'int'. Doug Sedlak mentioned this issue in a comment of Hive-2315. https://issues.apache.org/jira/browse/HIVE-2315 A patch was submitted, but the ticket was closed before then. This appears to be a bug. Similar issue here to address the consistency of the call: https://issues.apache.org/jira/browse/HIVE-4519 Sample table is: create EXTERNAL table partition_by_int (str_val string) PARTITIONED BY (int_col INT) ROW FORMAT delimited fields terminated by ',' STORED AS TEXTFILE; And (shortened) JDBC code is: res = stmt.executeQuery("select * from partition_by_int"); ResultSetMetaData metaData = res.getMetaData(); for (int i = 0; i < metaData.getColumnCount(); i++) { System.out.print(metaData.getColumnName(i + 1) + " \t"); System.out.print(metaData.getColumnDisplaySize(i + 1) + "\t"); System.out.println(metaData.getColumnTypeName(i + 1)); } With output: str_val 2147483647 string int_col 2147483647 string In contrast, DESCRIBE partition_by_int generates: str_val string int_col int -- 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