How to load native-hadoop library in Hadoop cluster?

549 Views Asked by At

I am running Revolution R Enterprise version 7.0 in Cloudera Hadoop (CDH) version 4.6 to generate a decision tree, using MapReduce service.

When I am running a Hadoop cluster compute context, it seems the native-hadoop library is not loading. I loaded the RevoScaleR package.

I already checked the Revolution Analitics blog, pdf manuals and this forum and I haven't found the solution yet.

> rxSetComputeContext(myHadoopCluster)
> BetterTree <- rxDTree(CountryCode ~ IndicatorCode + 1960 + 1961 + 1962 + 1963 + 1964 + 1965 + 1966 + 1967 + 1968 + 1969 + 1970 + 1971 + 1972 + 1973 + 1974 + 1975 + 1976 + 1977 + 1978 + 1979 + 1980 + 1981 + 1982 + 1983 + 1984 + 1985 + 1986 + 1987 + 1988 + 1989 + 1990 + 1991 + 1992 + 1993 + 1994 + 1995 + 1996 + 1997 + 1998 + 1999 + 2000 + 2001 + 2002 + 2003 + 2004 + 2005 + 2006 + 2007 + 2008 + 2009 + 2010 + 2011 + 2012 + 2013, data=salida, blocksPerRead=30, maxUnorderedLevels = 1300,  cp=1e-5)
======  localhost.localdomain (Master HPA Process) has started run at Fri May 23 16:45:42 2014  ======
RxInitializeHadoop sSystemCommand: hadoop RevoScaleR -Dmapred.reduce.tasks=1     -Dmapred.min.split.size=9223372036854775807 /user/RevoShare/cloudera/F8D3BB9C6CDE411CA0F48520656EFE19    /.input /user/RevoShare/cloudera/F8D3BB9C6CDE411CA0F48520656EFE19/IRO.iro /share/better localhost.localdomain 8020 /usr/bin/Revoscript
14/05/23 16:46:40 WARN util.NativeCodeLoader: **Unable to load native-hadoop library for your  platform... using builtin-java classes where applicable**
RxInitializeHadoop after fixup sSystemCommand: hadoop  RevoScaleR  -Dmapred.reduce.tasks=1  -Dmapred.min.split.size=9223372036854775807  /user/RevoShare/cloudera/F8D3BB9C6CDE411CA0F48520656EFE19/.input  /user/RevoShare/cloudera/F8D3BB9C6CDE411CA0F48520656EFE19/IRO.iro  /share/better/*  localhost.localdomain  8020  /usr/bin/Revoscript
Exception in thread "main" java.lang.NoClassDefFoundError: RevoScaleR
Caused by: java.lang.ClassNotFoundException: RevoScaleR
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: RevoScaleR.  Program will exit.

HadoopMR output object '/user/RevoShare/cloudera/F8D3BB9C6CDE411CA0F48520656EFE19/IRO.iro' does not exist. Job has failed.
Error in rxCall("RxDTree", params) :
Error:  Error in rxCall("RxDTree", params) :

======  localhost.localdomain (Master HPA Process) has completed run at Fri May 23 16:51:50 2014  ======
Error in rxuHandleClusterJobTryFailure(retObject, hpcServerJob, autoCleanup,  :
Error completing job on cluster:
Error in rxCall("RxDTree", params) :

I've written the following commands in R symbol to check RevoScaleR, but is not loaded.

> library(RevoScaleR)
> is.loaded("RevoScaleR")
[1] FALSE

Could you give me some advice, please?

Thanks.

1

There are 1 best solutions below

0
On

Your problem isn't native hadoop library. That is just a warning. It could be that you don't have RevoScaleR mapreduce jar in your hadoop classpath. Try to copy that jar into your hadoop lib folder.It should be named something like scaleR-hadoop-0.1-SNAPSHOT.jar and maybe under /usr/lib64/Revo-7.x/hadoop/scripts. I am not sure about the paths as I don't have access to a 7.0 installation.