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.

Unable to Load the data into Hive External table inside the Docker cloudera container

Unable to Load the data into Hive External table inside the Docker cloudera container

New Contributor

Hi all,

 

I facing critical issue when Load the data into hive External table for pushing the index to Kibana via Elastic search in Docker cloudera container. The same i did Ubuntu 18.04, direct installation of cloudera and successfully done. But Inside the Docker Container i unable to do.  Below mentioned screen shots for your reference. Tried many solutions from internet based on error but it wont workout.

 

I did follow the steps:

1) Add Jars to that hive lib locations

add jar /usr/lib/hive/lib/elasticsearch-hadoop-hive-7.5.1.jar
add jar /usr/lib/hive/lib/commons-httpclient-3.1.jar

2) Setted Hive engine as,

set hive.execution.engine=mr

3) created sample External Table as es_test

CREATE EXTERNAL TABLE es_test (sno int, name string)

STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'

TBLPROPERTIES ('es.resource'='test/type', 'es.nodes'='http://localhost:9200', 'es.net.http.auth.user'='elastic', 'es.net.http.auth.pass'='changeme', 'es.index.auto.create'='TRUE');

Table created successfully, but unable to load data

4) Load data script,

insert overwrite table es_test select * from emp (this "emp" table already created internally in hive)

 

Got error message as:

Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

 

Screenshot from 2020-01-23 11-07-18.pngScreenshot from 2020-01-23 11-10-40.png

Any one pls help us to shortout this issue.

Thanks in advance.

Don't have an account?
Coming from Hortonworks? Activate your account here