How to resolve the java.lang.NoClassDefFoundError error when running rhinit () on R

8

I am integrating Hadoop with R using Rhipe and my configuration is as follows:

  • Ubuntu 14.
  • Hadoop 1.0.3
  • R 3.2.2
  • Rhipe 0.73.1

When you start in the environment R o rhinit() the following message appears:

  

rhinit () Rhipe: Using Rhipe.jar file Initializing Rhipe v0.73 Error in   .jnew ("org / godhuli / rhipe / PersonalServer"):
  java.lang.NoClassDefFoundError: org / apache / hadoop / fs / FSDataInputStream

I've done a lot of research on other forums and so far I have not found a solution yet.

I'm counting on your help, thank you in advance.

    
asked by anonymous 18.01.2016 / 21:20

1 answer

1

This problem is caused because the following environment variables are not set correctly: PKG_CONFIG_PATH and LD_LIBRARY_PATH

Configuring R

  

export PKG_CONFIG_PATH = / usr / local / lib

     

export LD_LIBRARY_PATH = / usr / local / lib

Also write these commands in the R console:

  

Sys.setenv (HADOOP_HOME="/ usr / local / hadoop /")

     

Sys.setenv (HADOOP_BIN="/ usr / local / hadoop / bin")

     

Sys.setenv (HADOOP_CONF_DIR="/ usr / local / hadoop / conf")

    
23.06.2016 / 00:40