AnsweredAssumed Answered

rhive.connect() issues with MapR distribution

Question asked by clsc_stat_mach_lrng on Dec 26, 2012
Latest reply on Jan 2, 2013 by clsc_stat_mach_lrng
**After loading and initializing RHive (using rhive.init()) I get the following errors with rhive.connect():**

java.lang.UnsatisfiedLinkError: no MapRClient in java.library.path
>
>         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734) 
>         at java.lang.Runtime.loadLibrary0(Runtime.java:823) 
>         at java.lang.System.loadLibrary(System.java:1028) 
>         at com.mapr.fs.MapRFileSystem.<clinit>(MapRFileSystem.java:1298) 
>         at java.lang.Class.forName0(Native
> Method) 
>         at java.lang.Class.forName(Class.java:247) 
>         at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1028) 
>         at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1079) 
>         at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1413) 
>         at org.apache.hadoop.fs.FileSystem.access$100(FileSystem.java:69) 
>         at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:1453) 
>         at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1435) 
>         at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:232) 
>         at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:115) 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) 
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
>         at java.lang.reflect.Method.invoke(Method.java:597) 
>         at RJavaTools.invokeMethod(RJavaTools.java:386) 


Unable to load libMapRClient.so native library


Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod",cl, : 
> java.lang.UnsatisfiedLinkError: no
> MapRClient in java.library.path

**I get the same errors when I run rhive.connect("10.2.138.168") using the hive server ip address. My environment variables are set as:**

*MAHOUT_HOME=/opt/mapr/mahout/mahout-0.7* 
*JAVA_HOME=/usr/java/default* 
*HADOOP_HOME=/opt/mapr/hadoop/hadoop-0.20.2* 
*HADOOP_CONF_DIR=/opt/mapr/hadoop/hadoop-0.20.2/conf* 
*HIVE_HOME=/opt/mapr/hive/hive-0.9.0*

**If I run rhive.env(), I get the following errors:**

Hive Home Directory : /opt/mapr/hive/hive-0.9.0 
Hadoop Home Directory : /opt/mapr/hadoop/hadoop-0.20.2 
Hadoop Conf Directory : /opt/mapr/hadoop/hadoop-0.20.2/conf 
Default RServe List

\################################# IMPORTANT############################################# ############################### /\/\/\/\/\/\/\########################################## # Use of slaves and masters file to start/stop jobtracker/tasktracker is not supported. # Please use maprcli: #/opt/mapr/bin/maprcli node services -nodes <list of ip addrs> -jobtracker start # /opt/mapr/bin/maprcli node services -nodes <list of ip addrs> -tasktracker start # /opt/mapr/bin/maprcli node services -nodes <list of ip addrs> -jobtracker stop # /opt/mapr/bin/maprcli node services -nodes <list of ip addrs> -tasktracker stop #########################################################################################warning: cant't connect to a Rserver at
 ################################# IMPORTANT
 #############################################:6311warning: cant't connect to a Rserver at
 ############################### /\/\/\/\/\/\/\
 ##########################################:6311warning: cant't connect to a Rserver at \# Use
 of slaves and masters file to
 start/stop jobtracker/tasktracker is
 not supported.:6311warning: cant't
 connect to a Rserver at # Please use
 maprcli::6311warning: cant't connect
 to a Rserver at \#
 /opt/mapr/bin/maprcli node services
 -nodes <list of ip addrs> -jobtracker start:6311warning: cant't connect to a
 Rserver at # /opt/mapr/bin/maprcli
 node services -nodes <list of ip
 addrs> -tasktracker start:6311warning:
 cant't connect to a Rserver at #
 /opt/mapr/bin/maprcli node services
 -nodes <list of ip addrs> -jobtracker stop:6311warning: cant't connect to a
 Rserver at # /opt/mapr/bin/maprcli
 node services -nodes <list of ip
 addrs> -tasktracker stop:6311warning:
 cant't connect to a Rserver at
 #########################################################################################:6311

Disconnected HiveServer and HDFS 
Warning messages: 
1: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
  ################################# IMPORTANT #############################################:6311 cannot be opened 
2: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
  ############################### /\/\/\/\/\/\/\ ##########################################:6311 cannot be opened 
3: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
  # Use of slaves and masters file to start/stop jobtracker/tasktracker is not supported.:6311 cannot be opened 
4: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
  # Please use maprcli::6311 cannot be opened 
5: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
  # /opt/mapr/bin/maprcli node services -nodes <list of ip addrs> -jobtracker start:6311 cannot be opened 
6: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
  # /opt/mapr/bin/maprcli node services -nodes <list of ip addrs> -tasktracker start:6311 cannot be opened 
7: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
  # /opt/mapr/bin/maprcli node services -nodes <list of ip addrs> -jobtracker stop:6311 cannot be opened 
8: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
  # /opt/mapr/bin/maprcli node services -nodes <list of ip addrs> -tasktracker stop:6311 cannot be opened 
9: In socketConnection(host, port, open = "a+b", blocking = TRUE) :
  #########################################################################################:6311 cannot be opened

**What exactly is going on and how can I get RHive to connect to the Hive server? Thanks in advance!**

Outcomes