Hi,

I'm testing out native lib support on our test amd64 test cluster running 0.20.205 running the following

./bin/hadoop jar hadoop-test-0.20.205.0.jar testsequencefile -seed 0 -count 1000 -compressType RECORD xxx -codec org.apache.hadoop.io.compress.GzipCodec -check 2

it fails with

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

Looking at

bin/hadoop

it seems to successfully detect that the native libs are available (they seem to come pre-compiled with 0.20.205 which is nice)

  if [ -d "${HADOOP_HOME}/lib/native" ]; then
    if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then

JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}:${HADOOP_HOME}/lib/native/${JAVA_PLATFORM}
    else
      JAVA_LIBRARY_PATH=${HADOOP_HOME}/lib/native/${JAVA_PLATFORM}
    fi
  fi

and sets JAVA_LIBRARY_PATH to contain them.

Then in the following line, if ${HADOOP_HOME}/lib contains libhadoop.a (which is seems to in the stock tar) then it proceeds to ignore the native libs

  if [ -e "${HADOOP_PREFIX}/lib/libhadoop.a" ]; then
    JAVA_LIBRARY_PATH=${HADOOP_PREFIX}/lib
  fi

Is this intentional or a bug? I can successfully use the native libs if I comment this out but just wondering why it would prefer ${HADOOP_PREFIX}/lib/libhadoop.a?

Thanks,

-stephen

--
Stephen Mulcahy, DI2, Digital Enterprise Research Institute,
NUI Galway, IDA Business Park, Lower Dangan, Galway, Ireland
http://di2.deri.ie    http://webstar.deri.ie    http://sindice.com

Reply via email to