java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream Im traying to integrate Hadoop and R, I was install the pachages rJava and Rhipe in R, I do this steps to start Hadoop and R:
-starting Hadoop services.,
-loading rJava and Rhipe packages by library function.
-Calling rhinit() to initialize Rhipe.
the problem here is when I call rhinit() funtion, it show this error:


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


please some helps to fixe this problem.
This issue is caused because the following environment variables are not set correctly
PKG_CONFIG_PATH and LD_LIBRARY_PATH
for my configuration, i should execute this:

export PKG_CONFIG_PATH = /usr/local/lib 
export LD_LIBRARY_PATH = /usr/local/lib

also set this commands on 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")