Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hbase table created from hive ( Hue Interface) not visible from hbase shell

Hbase table created from hive ( Hue Interface) not visible from hbase shell

New Contributor

 

 

Steps performed from hive 

 

step1) 

  1. CREATE TABLE hive_table(
  2.   empno int,
  3.   ename string,
  4.   designation string,
  5.   manager int,
  6.   sal int,
  7.   deptno int)
  8. ROW FORMAT DELIMITED
  9.   FIELDS TERMINATED BY '\t'
  10.   LINES TERMINATED BY '\n'
  11. STORED AS TEXTFILE;

step2) 


INSERT INTO hive_table VALUES ( 5 , 'SIVA23' , 'VdP' , 234 , 1000 , 10 )
INSERT INTO hive_table VALUES ( 9 , 'SIASDVA23' , 'cVP' , 234 , 1000 , 10 )
INSERT INTO hive_table VALUES ( 8 , 'SIXVVA23' , 'VP' , 234 , 1000 , 10 )
INSERT INTO hive_table VALUES ( 1 , 'SIVA' , 'VP' , 234 , 1000 , 10 )

 

step3)

hive mapping table 

 

  1. CREATE TABLE hbase_table_employee
  2.   (
  3.      empno       INT,
  4.      ename       STRING,
  5.      designation STRING,
  6.      manager     INT,
  7.      sal         INT,
  8.      deptno      INT
  9.   )
  10. STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
  11. WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:ename,cf:designation,cf:manager,cf:sal,cf:deptno")
  12. TBLPROPERTIES ("hbase.table.name" = "employee_hbase");

 

 

step 4) 

Data migration from Hive to HBase - BIG DATA PROGRAMMERS

  1. CREATE EXTERNAL TABLE hbase_table_employee_2
  2.   (
  3.      empno       INT,
  4.      ename       STRING,
  5.      designation STRING,
  6.      manager     INT,
  7.      sal         INT,
  8.      deptno      INT
  9.   )
  10. STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
  11. WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:ename,cf:designation,cf:manager,cf:sal,cf:deptno")
  12. TBLPROPERTIES ("hbase.table.name" = "employee_hbase_2");\

step 5) 

 

  1. INSERT INTO TABLE hbase_table_employee SELECT * FROM hive_table;

but could not see this table in hbase shell , can you please explain which part i missing 

 

Thanks 

Siva

2 REPLIES 2

Re: Hbase table created from hive ( Hue Interface) not visible from hbase shell

Master Guru
Do you have ACLs/Authorization enabled on your HBase service? If yes, does your authenticating user (for hbase shell) have grants to view all tables under all applicable namespaces?

If you use HiveServer2 with impersonation disabled (Sentry), then Hive may be accessing and creating all HBase tables as the 'hive' user, which may have all applicable grants. But to view the same tables via HBase shell directly as an end-user, you'll need similar rights granted on the HBase tables.

For more on HBase Authz: https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_sg_hbase_authorization.html

Re: Hbase table created from hive ( Hue Interface) not visible from hbase shell

New Contributor
This issue is resolved when we use same user id in hive and hbase