Elasticsearch for Apache Hadoop doesn't work


(Arthur Luz) #1

Hello, guys.

I need some help with Elasticsearch for Apache Hadoop connector.

I have on my environment a hortonworks hdp cluster and with hive. I need to create a external table for elasticsearch to move data from my hdfs to elasticsearch.

Ok, I followed elasticsearch documentation and I used Add jar command to import jars. Ok. it's fine.

But, when I try to create external table I receive this error: Error:

Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: MetaException(message:java.lang.NoClassDefFoundError org/apache/commons/httpclient/Credentials) (state=08S01,code=1)

I'm using the version 3.1 of hdp cluster.

What I need to do to make this work?

can you help me?

Best regards!


(Naveen R Vinayak) #2

Hi Arthur,
Even I am facing the same issue. Did you find any solution for this?

Thanks


(Sergio) #3

hi, i don't know but in new versions is necessary to do reference to commons-httpclient-3.0.1.jar

on the hive session:

add jar /your_hdphome/hadoop/lib/commons-httpclient-3.0.1.jar;
create external table etc etc

try doing this roadmap:


(Arthur Luz) #4

Hi Sergio.

Thank you for you answer. I really appreciate it.

So, I try to do what you show above, but, the same error appear to me. :confused:

I don't know but I think that this error is related to httpclient jar. The version of hortonworks hdp used in exemple is 2.6.4 and my is 3.1.0.

Maybe I need another jar to this version.


(Naveen R Vinayak) #5

Hi Sergio,

Thanks for the reply. Where can I download this jar? Seems that version of the jar is not available now.


(Arthur Luz) #6

Hi, guys.

I solved the problem. Is the jar.

I followed the roadmap proposed by Sergio, but used this jar:

https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient/3.1.0.redhat-8

Now it's works.

Thank you very much, Sergio.


(Sergio) #7

:+1::+1:


(swapnali) #8

Hi sir,
Thank you for the answer. we really appreciate your answer regarding hadoop.


(system) closed #9

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.