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.

Beeline statement processing error

Beeline statement processing error

New Contributor

Hello!

While going through the following MongoDB Tutorial (https://github.com/dbist/hdp-mongo-tutorial), and I had no issues up to the point where I got to the steps related to beeline. I had no issues connecting to the localhost, but while trying to get the .jars from the the Hortonworks server I'm encountering the following error:

Error: Error while processing statement: Failed to read external resource hdfs:/                                                                                                 /sandbox.hortonworks.com:8020/tmp/udfs/mongo-hadoop-hive-1.5.0-SNAPSHOT.jar (sta                                                                                                 te=,code=1)

Screenshot

Thank you for help in advance,

Alexander Lukyanov

9 REPLIES 9
Highlighted

Re: Beeline statement processing error

Mentor

Try running command below and post screenshot.

hdfs dfs -ls /tmp/udfs
Highlighted

Re: Beeline statement processing error

New Contributor
Highlighted

Re: Beeline statement processing error

Mentor

Run

hdfs dfs -put ~/drivers/mongo-hadoop-hive*.jar /tmp/udfs
Highlighted

Re: Beeline statement processing error

New Contributor
Highlighted

Re: Beeline statement processing error

Mentor
Highlighted

Re: Beeline statement processing error

New Contributor

Having a bit of an issue with the installation process, my gradle refuses to compile anything, was trying to get the JAR driver since the connector was installed in the tutorial. The compile command is not even in the list of tasks in gradle for me .

Highlighted

Re: Beeline statement processing error

Mentor

Get the 1.4.2 version as listed on the mongo github page. If you still run into problems I'll build it for you and upload.

https://github.com/mongodb/mongo-hadoop/releases

Highlighted

Re: Beeline statement processing error

Mentor

@Alexander Lukyanov

 ##### Download mongo-connector from releases page
```
wget https://github.com/mongodb/mongo-hadoop/archive/r1.4.2.zip
unzip mongo-hadoop-r1.4.2.zip
cd mongo-hadoop-r1.4.2
./gradlew jar
```
##### the built connectors for each package will be in project/build/libs, i.e. hive/build/libs
```
ls -ltra mongo-hadoop-r1.4.2/*/build/libs
```
```
mongo-hadoop-r1.4.2/core/build/libs:
total 232
-rw-r--r--  1 aervits  staff  116190 Mar 12 21:26 mongo-hadoop-core-1.4.2.jar
drwxr-xr-x  6 aervits  staff     204 Mar 12 21:26 ..
##### Download mongo-connector from releases page
drwxr-xr-x  3 aervits  staff     102 Mar 12 21:26 .

mongo-hadoop-r1.4.2/flume/build/libs:
total 24
-rw-r--r--  1 aervits  staff  11553 Mar 12 21:26 flume-1.4.2.jar
drwxr-xr-x  6 aervits  staff    204 Mar 12 21:26 ..
drwxr-xr-x  3 aervits  staff    102 Mar 12 21:26 .


mongo-hadoop-r1.4.2/hive/build/libs:
total 48
-rw-r--r--  1 aervits  staff  22198 Mar 12 21:26 mongo-hadoop-hive-1.4.2.jar
drwxr-xr-x  3 aervits  staff    102 Mar 12 21:26 .
drwxr-xr-x  6 aervits  staff    204 Mar 12 21:28 ..


mongo-hadoop-r1.4.2/pig/build/libs:
total 2784
-rw-r--r--  1 aervits  staff  1423793 Mar 12 21:26 mongo-hadoop-pig-1.4.2.jar
drwxr-xr-x  6 aervits  staff      204 Mar 12 21:26 ..
drwxr-xr-x  3 aervits  staff      102 Mar 12 21:26 .


mongo-hadoop-r1.4.2/streaming/build/libs:
total 2736
-rw-r--r--  1 aervits  staff  1396944 Mar 12 21:26 mongo-hadoop-streaming-1.4.2.jar
drwxr-xr-x  6 aervits  staff      204 Mar 12 21:26 ..
drwxr-xr-x  3 aervits  staff      102 Mar 12 21:26 .
```


Highlighted

Re: Beeline statement processing error

Contributor

0: jdbc:hive2://localhost:10000> add jar hdfs://sandbox.hortonworks.com:8020/tmp/udfs/mongo-hadoop-hive-1.5.1.jar 0: jdbc:hive2://localhost:10000> add jar hdfs://sandbox.hortonworks.com:8020/tmp/udfs/mongo-hadoop-pig-1.5.1.jar 0: jdbc:hive2://localhost:10000> add jar hdfs://sandbox.hortonworks.com:8020/tmp/udfs/mongo-hadoop-core-1.5.1.jar

may be java version change try that

2929-12.png

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