Skip to main content
Marks_08
Silver ⭐️⭐️⭐️
August 2, 2024
Question

Issue trying to insert into Managed Table from an External Table in Hive using beeline.

I'm trying to Insert into a table located in /warehouse/tablespace/managed/hive from a table located in /warehouse/tablespace/external/hive using beeline. 

But I'm getting:

 

ERROR : Status: Failed
ERROR : Vertex failed, vertexName=Map 1, vertexId=vertex_1707433862019_0104_2_00, diagnostics=[Vertex vertex_1707433862019_0104_2_00 [Map 1] killed/failed due to:ROOT_INPUT_INIT_FAILURE, Vertex Input: countries_src_ap initializer failed, vertex=vertex_1707433862019_0104_2_00 [Map 1], org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=16, exceptions:
2024-08-02T20:24:47.396Z, java.net.SocketTimeoutException: callTimeout=60000, callDuration=68708: Call to HOST/IP HOST:16020 failed on local exception: org.apache.hadoop.hbase.exceptions.ConnectionClosedException: Connection closed row 'countries_src,,' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=HOST_NAME,16020,1722553888133, seqNum=-1
 
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.throwEnrichedException(RpcRetryingCallerWithReadReplicas.java:299)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:251)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:58)

 

Select * from both tables works fine. 

INSERT OVERWRITE TABLE <Managed_Table> 
SELECT FROM .... <External_Table>  ... Fails. 

Any Idea?

2 replies

cloude
Gold ⭐️
Gold ⭐️
August 3, 2024

Hi, it seems like your external table is on top of the HBase table, you can check the application logs and see which container is failing and on which node and look into that node manager logs.

Translate
Mounika_Reddy
Gold ⭐️
Gold ⭐️
September 11, 2024

Hi @Marks_08 
In Hive is HBase dependency is enabled? If No, can you follow the below doc 
https://docs.cloudera.com/cdp-private-cloud-base/7.1.6/accessing-hbase/topics/hbase-configure-hive-hbase-pvc.html
If yes, we require the complete HS2 logs as well as the Yarn application logs to troubleshoot further.
Along with that share us the DDL for both Managed and external tables
DESCRIBE FORMATTED <TABLE_NAME>;
SHOW CREATE  TABLE <TABLE_NAME>;

Replace TABLE_NAME with the managed and external tables.

Thank You.

Translate