Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDF is trying to load its RData file from wrong directory #79

Open
alexvorobiev opened this issue Nov 25, 2014 · 3 comments
Open

UDF is trying to load its RData file from wrong directory #79

alexvorobiev opened this issue Nov 25, 2014 · 3 comments

Comments

@alexvorobiev
Copy link

I am trying to run examples from the RHive manual (I have just installed the latest version from github). The connection works, the UDF function gets installed into correct location (/rhive/udf/myuserid/sumCrimes.RData) but rhive.query fails:

rhive.query("SELECT urbanpop, R('sumCrimes', murder, assault, rape, 0.0) FROM usarrests")
Error: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 

The job's log file shows that it tries to load the file not from my user's subdirectory but from /rhive/udf:

Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.FileNotFoundException: Requested file /rhive/udf/sumCrimes.RData does not exist.

When I copied the sumCrimes.RData manually to that directory, everything worked.

Here is what rhive.env() returns:

> rhive.env()
hadoop home: /opt/mapr/hadoop/hadoop-0.20.2
hadoop conf: /opt/mapr/hadoop/hadoop-0.20.2/conf
fs: maprfs:///
hive home: /opt/mapr/hive/hive-0.13
user name: myuserid
user home: /u/myuserid
temp dir: /tmp/myuserid> 

Here is the value of mapred.child.env on the nodes (from the Job Configuration page):
RHIVE_UDF_DIR=/rhive/udf/myuserid

@ssshow16
Copy link
Contributor

I fixed it and release nexr-rhive-2.0.9.
Please, try it again.

@alexvorobiev
Copy link
Author

Just tried installing the latest from github - still the same problem. Is there anything I can do to help testing?

@ssshow16
Copy link
Contributor

At first, please remove all file and directory for RHive on HDFS, such as /rhive/tmp, lib, udf and etc..
After that, try it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants