user2970770
user2970770

Reputation: 61

drill not showing hive or hbase tables

I've created both a hbase and hive table to store some data logging information. I can query both hbase and hive from the command line no prob.

hbase: scan MVLogger; // comes back with 9k plus records hive: select * from MVLogger; // comes back with 9k plus records

my hbase table definition is

'MVLogger', {NAME => 'dbLogData', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW',     REPLICATION_SCOPE => '0', VERSIONS true                                                               
  => '1', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false', BLOCKSIZE => '65                                                                    
 536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}  

My hive (external) table definition is:

CREATE EXTERNAL TABLE `MVLogger`(
`rowid` int, 
`ID` int, 
`TableName` string, 
`CreatedDate` string,
`RowData` string,
`ClientDB` string)
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,dbLogData:ID,dbLogData:TableName,dbLogData:CreatedDate,dbLogData:RowData,dbLogData:ClientDB')
TBLPROPERTIES (
'hbase.table.name'='MVLogger')

When I use sqlline and look at the drill schema this is what I see

0: jdbc:drill:zk=ip-*.compu> show schemas;

+-------------+
| SCHEMA_NAME |
+-------------+
| hive.default |
| dfs.default |
| dfs.root    |
| dfs.tmp     |
| cp.default  |
| hbase       |
| sys         |
| INFORMATION_SCHEMA |
+-------------+

and when I do a use [schema] (any of them but sys) and then do a show tables I get nothing... For example

0: jdbc:drill:zk=ip-*.compu> use hbase;
+------------+------------+
|     ok     |  summary   |
+------------+------------+
| true       | Default schema changed to 'hbase' |
+------------+------------+
1 row selected (0.071 seconds)
0: jdbc:drill:zk=ip-*.compu> show tables;
+--------------+------------+
| TABLE_SCHEMA | TABLE_NAME |
+--------------+------------+
+--------------+------------+
No rows selected (0.37 seconds)

In the Drill Web UI (ambari) under storage options for Drill I see an enabled hbase and hive. The configuration for the hive storage is the following.

{
  "type": "hive",
  "enabled": true,
  "configProps": {
    "hive.metastore.uris": "thrift://ip-*.compute.internal:9083",
    "hive.metastore.warehouse.dir": "/apps/hive/warehouse/",
    "fs.default.name": "hdfs://ip-*.compute.internal:8020/",
    "hive.metastore.sasl.enabled": "false"
  }
}

Any ideas of why I'm not able to query hive/hbase ?

Update: The table is showing up in the hive schema now but when I try to query it with a simple select * from ... it just hangs and I can't find anything in any of the log files. The hive table's actual data store is hbase BTW.

Found out Hbase .98 is not yet compatible with the drill/hbase plugin... http://mail-archives.apache.org/mod_mbox/incubator-drill-user/201410.mbox/%3CCAKa9qDmN_fZ8V8W1JKW8HVX%3DNJNae7gR-UMcZC9QwKVNynQJkA%40mail.gmail.com%3E

Upvotes: 1

Views: 2081

Answers (1)

tony
tony

Reputation: 1

it's maybe too late but for others who may see the post and having this issue .

0: jdbc:drill:zk=ip-*.compu> use hbase;
+------------+------------+
|     ok     |  summary   |
+------------+------------+
| true       | Default schema changed to 'hbase' |
+------------+------------+
1 row selected (0.071 seconds)
0: jdbc:drill:zk=ip-*.compu> show tables;
+--------------+------------+
| TABLE_SCHEMA | TABLE_NAME |
+--------------+------------+
+--------------+------------+
No rows selected (0.37 seconds)

the user that is running drill has no access permission on hbase . grant drill user access on hbase and you will see the tables .

try going to hbase shell with drill user and run "list" it will also be empty until you grant permission then u will see the tables .

Upvotes: -1

Related Questions