Reputation: 4010
Is there any command to get complete description about hbase table such as owner, database, modified time, etc.
In hive, i can get those information using
desc formatted tablename
But in hbase desc 'tablename'
shows size, version, replication_scope, etc.
I want to get owner details of hbase table.
Thanks.
Upvotes: 0
Views: 1729
Reputation: 4486
First, add access control
related config to hbase-site.xml :
<property>
<name>hbase.security.authorization</name>
<value>true</value>
</property>
<property>
<name>hbase.coprocessor.master.classes</name>
<value>org.apache.hadoop.hbase.security.access.AccessController</value>
</property>
<property>
<name>hbase.coprocessor.region.classes</name>
<value>org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.AccessController</value>
</property>
You can follow the instructions here, maybe have to restart hbase after the modification.
Then, set the owner of one table, and describe it
hbase(main):007:0> alter 'MyTable', {OWNER => 'sel-fish'}
Updating all regions with the new schema...
1/1 regions updated.
Done.
0 row(s) in 1.9980 seconds
hbase(main):008:0> desc 'MyTable'
Table MyTable is ENABLED
MyTable, {TABLE_ATTRIBUTES => {METADATA => {'OWNER' => 'sel-fish'}}
COLUMN FAMILIES DESCRIPTION
{NAME => 'cf', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '2147483647', TTL => '500 SECONDS (8 MINUTES 20 SECO
NDS)', MIN_VERSIONS => '0', KEEP_DELETED_CELLS => 'FALSE', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}
1 row(s) in 0.0300 seconds
Upvotes: 1