hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swarnim Kulkarni (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-3894) Dropping managed HBase table fails
Date Tue, 11 Aug 2015 21:11:49 GMT

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

Swarnim Kulkarni commented on HIVE-3894:
----------------------------------------

Ping [~ndimiduk]. I know this was a while back but is this still an issue or we are good to
close this one? I just tested this out on hive 1.1.0 and confirmed that this problem does
not exist anymore.

{noformat}
hive> CREATE TABLE test_hbase(key string, col1 string, col2 string) 
    > STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
    > WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:col1,cf:col2")
    > TBLPROPERTIES ("hbase.table.name" = "test_hbase");
OK
Time taken: 0.928 seconds

hive> drop table test_hbase;
OK
{noformat}

> Dropping managed HBase table fails
> ----------------------------------
>
>                 Key: HIVE-3894
>                 URL: https://issues.apache.org/jira/browse/HIVE-3894
>             Project: Hive
>          Issue Type: Bug
>          Components: HBase Handler
>            Reporter: Nick Dimiduk
>            Assignee: Swarnim Kulkarni
>         Attachments: hbase_managed_table.q, hbase_managed_table.q.out
>
>
> {{HBaseStorageHandler}} does not delete managed tables from HBase.
> {code}
> hive> CREATE TABLE foo (bar INT, baz INT) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ('hbase.columns.mapping' = 'f1:baz') TBLPROPERTIES ('hbase.table.name'
= 'foo');
> OK
> Time taken: 1.277 seconds
> hive> drop table foo;
> FAILED: Error in metadata: MetaException(message:org.apache.hadoop.hbase.TableNotDisabledException:
org.apache.hadoop.hbase.TableNotDisabledException: foo
> 	at org.apache.hadoop.hbase.master.HMaster.checkTableModifiable(HMaster.java:1396)
> 	at org.apache.hadoop.hbase.master.handler.TableEventHandler.<init>(TableEventHandler.java:70)
> 	at org.apache.hadoop.hbase.master.handler.DeleteTableHandler.<init>(DeleteTableHandler.java:42)
> 	at org.apache.hadoop.hbase.master.HMaster.deleteTable(HMaster.java:1249)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364)
> 	at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1426)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> 	at org.apache.hadoop.hbase.RemoteExceptionHandler.decodeRemoteException(RemoteExceptionHandler.java:96)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.deleteTable(HBaseAdmin.java:482)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.deleteTable(HBaseAdmin.java:465)
> 	at org.apache.hadoop.hive.hbase.HBaseStorageHandler.commitDropTable(HBaseStorageHandler.java:120)
> 	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropTable(HiveMetaStoreClient.java:599)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:74)
> 	at $Proxy9.dropTable(Unknown Source)
> 	at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:846)
> 	at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:813)
> 	at org.apache.hadoop.hive.ql.exec.DDLTask.dropTable(DDLTask.java:3398)
> 	at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:279)
> 	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:138)
> 	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
> 	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1334)
> 	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1120)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:934)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:756)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> )
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
> {code}
> The table is gone from Hive metadata though:
> {code}
> hive> show tables;    
> OK
> Time taken: 0.029 seconds
> {code}
> Attempting to recreate it results in the expected:
> {code}
> hive> CREATE TABLE foo (bar INT, baz INT) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ('hbase.columns.mapping' = 'f1:baz') TBLPROPERTIES ('hbase.table.name'
= 'foo');
> FAILED: Error in metadata: MetaException(message:Table foo already exists within HBase;
use CREATE EXTERNAL TABLE instead to register it in Hive.)
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message