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

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

  1. Setted Hive engine as,

set hive.execution.engine=mr

  1. 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

  1. 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

Any one pls help us to shortout this issue.

Thanks in advance.