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.

RHive package rhive.connect() error: cannot modify RHIVE_UDF_DIR

Highlighted

RHive package rhive.connect() error: cannot modify RHIVE_UDF_DIR

I am trying to connect to Hive from R with the RHive package in HDP 2.4. When I execute

rhive.connect(host="192.168.56.101",port=10000, hiveServer2=TRUE)

I got this error message:

Cannot modify mapred.child.env at runtime. It is not in list of params that are allowed to be modified at runtime.

After some googling around, I added the following to the hive-site.xml file:

 <property>
      <name>hive.security.authorization.sqlstd.confwhitelist.append</name>
      <value>mapred.child.env</value>
  </property>

The original error message now is replaced by this one:

Cannot modify RHIVE_UDF_DIR at runtime. It is not in list of params that are allowed to be modified at runtime.

I tried adding RHIVE_UDF_DIR right next to map.child.env, like this,

 <property>
      <name>hive.security.authorization.sqlstd.confwhitelist.append</name>
      <value>mapred.child.env,RHIVE_UDF_DIR</value>
  </property>

But this did not resolve the problem; it brought back the original error message that I was getting at the very beginning. Any pointers will be much appreciated!

4 REPLIES 4
Highlighted

Re: RHive package rhive.connect() error: cannot modify RHIVE_UDF_DIR

@JJ Yang

Rhive is a third party software and here is the link for downloading software:

https://github.com/nexr/RHive

Here are few important commands for installaing RHive:

yum install -y java-1.7.0-openjdk-devel.x86_64

yum install -y mesa-libGL-devel

yum install -y mesa-libGLU-devel

R CMD javareconf

install.packages(“rJava”)

install.packages(“HiveR”)

install.packages(“png”)

install.packages(“Rserve”)

R CMD INSTALL RHive_2.0-0.10.tar.gz

Just FYI: Rhive & rhdfs both are same, if you have any issue with Rhive please try with rhdfs.

Highlighted

Re: RHive package rhive.connect() error: cannot modify RHIVE_UDF_DIR

I actually do have rhdfs up and running, but my issue with rhdfs is that when I load a csv file from hdfs, it does not correctly handle the headers (headers need to be removed from the original csv file, otherwise they become the first row in the data frame with the columns names being "v1", "v2", etc). This is exactly why I am switching to rhive package, hoping that I can first read the csv file into hive tables, then read into R using rhive.

Highlighted

Re: RHive package rhive.connect() error: cannot modify RHIVE_UDF_DIR

Super Collaborator

@JJ Yang , it is little late but I just came across this thread. If you are still looking for the answer, just use java regex instead of comma separated values.

Write mapred\.child\.env|RHIVE_UDF_DIR in hive.security.authorization.sqlstd.confwhitelist.append

Re: RHive package rhive.connect() error: cannot modify RHIVE_UDF_DIR

Contributor

Thanks a lot @Mushtaq, this helped me.

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