My Oracle Support Banner

Big Data SQL Query for Access to HBase Table Fails With "KUP-11504: error from external driver: java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/util/Bytes" or "org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations" (Doc ID 2130264.1)

Last updated on MAY 01, 2018

Applies to:

Oracle Big Data SQL - Version 1.1 and later
Linux x86-64

Symptoms

Using Oracle BigData SQL 1.1 and Oracle Big Data Appliance (BDA) V4.2.0, you can access to HBase table in BDA from Oracle Database in Oracle Exadata as follows:

1. Create a Hive external table in BDA for a HBase table.
2. Create a Oracle external table in Exadata for the Hive external table.


However, "select" SQL for access to the HBase table on BDA fails with the following errors (error message is depend on the configuration settings):

Error-type-1:

ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-11504: error from external driver: java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/util/Bytes

OR

Error-type-2:

ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-11504: error from external driver:
oracle.hadoop.sql.xcat.common.XCatException : 1001 : Error getting splits
document. Cause : org.apache.hadoop.hbase.client.RetriesExhaustedException:
Can't get the locations

 

Here's a sample procedures to reproduce these issues:  See "Creating an Oracle External Table for Apache HBase" in "Oracle Big Data Appliance Software User's Guide".

1. Create an HBase table ("tab_hbase1") on BDA cluster with 'oracle' user:

[oracle@rack1bda01 ~]$ hbase shell

### create 'tab_hbase1' with 'col' column
hbase(main):001:0> create 'tab_hbase1', 'col'
0 row(s) in 2.7920 seconds

=> Hbase::Table - tab_hbase1

### confirm the 'tab_hbase1' description
hbase(main):002:0> describe 'tab_hbase1'
Table tab_hbase1 is ENABLED
tab_hbase1
COLUMN FAMILIES DESCRIPTION
{NAME => 'col', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', COMPRESSION => 'NONE', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'}
1 row(s) in 0.1460 seconds

### put a testing data
hbase(main):003:0> put 'tab_hbase1', 'row01', 'col:col01', '99'
0 row(s) in 1.7710 seconds

hbase(main):004:0> put 'tab_hbase1', 'row01', 'col:col02', 'ABC'
0 row(s) in 0.0130 seconds

### confirm the testing data
hbase(main):005:0> scan 'tab_hbase1'
ROW COLUMN+CELL
row01 column=col:col01, timestamp=1461314172048, value=99
row01 column=col:col02, timestamp=1461314183956, value=ABC
1 row(s) in 0.0580 seconds

hbase(main):006:0> exit

2. On BDA side, Create a Hive external table in order to connect to HBase:

[oracle@rack1bda01 ~]$ hive

hive> create external table tab_hbase2 (key int, col01 int, col02 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#b,col:col01,col:col02')
> tblproperties('hbase.table.name' = 'tab_hbase1');
OK
Time taken: 5.558 seconds

### confirm if you can get the testing data
hive> select * from tab_hbase2;
OK
1919907632 99 ABC
Time taken: 0.531 seconds, Fetched: 1 row(s)

hive> describe tab_hbase2;
OK
key int from deserializer
col01 int from deserializer
col02 string from deserializer
Time taken: 0.064 seconds, Fetched: 3 row(s)
hive> exit

3. On Exadata compute (DB) node with 'oracle' user, create a Oracle External Table in order to connect to the Hive external table:

[oracle@ExaComputeXX ~]$ sqlplus TESTUSER/xxxxx@PDB

SQL> create table tab_hbase2 (key VARCHAR2(100), col01 NUMBER, col02 VARCHAR(255))
2 organization external
3 (
4 type oracle_hive
5 default directory default_dir
6 access parameters()
7 )reject limit unlimited;

Table created.

 4. Finally, run "select" for the table, but it fails:

SQL> select * from tab_hbase2;

Error-type-1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-11504: error from external driver: java.lang.NoClassDefFoundError:
org/apache/hadoop/hbase/util/Bytes

OR

Error-type-2:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-11504: error from external driver:
oracle.hadoop.sql.xcat.common.XCatException : 1001 : Error getting splits
document. Cause : org.apache.hadoop.hbase.client.RetriesExhaustedException:
Can't get the locations

 

The expected result for "select * from tab_hbase2" is:

KEY
--------------------------------------------------------------------------------
COL01
----------
COL02
--------------------------------------------------------------------------------
1919907632
99
ABC
--------------------------

  

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.