Prechádzať zdrojové kódy

HADOOP-3908. Better error message if llibhdfs.so doesn't exist. Contributed by Pete Wyckoff.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@689666 13f79535-47bb-0310-9956-ffa450edef68
Zheng Shao 17 rokov pred
rodič
commit
96a15cd8e7
2 zmenil súbory, kde vykonal 15 pridanie a 1 odobranie
  1. 3 0
      CHANGES.txt
  2. 12 1
      src/contrib/fuse-dfs/build.xml

+ 3 - 0
CHANGES.txt

@@ -106,6 +106,9 @@ Trunk (unreleased changes)
 
   IMPROVEMENTS
 
+    HADOOP-3908. Fuse-dfs: better error message if llibhdfs.so doesn't exist.
+    (Pete Wyckoff through zshao)
+
     HADOOP-3732. Delay intialization of datanode block verification till
     the verification thread is started. (rangadi)
 

+ 12 - 1
src/contrib/fuse-dfs/build.xml

@@ -30,8 +30,19 @@
     </condition>
   </target>
 
+
+  <target name="check-libhdfs-exists" if="fusedfs">
+  <property name="libhdfs.lib" value="${hadoop.root}/build/libhdfs/libhdfs.so"/>
+        <available file="${libhdfs.lib}" property="libhdfs-exists"/>
+    <fail message="libhdfs.so does not exist: ${libhdfs.lib}. Please check flags -Dlibhdfs=1 -Dfusedfs=1 are set or first try ant compile-libhdfs -Dlibhdfs=1">
+         <condition>
+            <not><isset property="libhdfs-exists"/></not>
+          </condition>
+   </fail>
+   </target>
+
   <!-- override compile target !-->
-  <target name="compile" depends="check-libhdfs-fuse" if="libhdfs-fuse">
+  <target name="compile" depends="check-libhdfs-fuse,check-libhdfs-exists" if="libhdfs-fuse">
     <echo message="contrib: ${name}"/>
 
     <exec executable="/bin/sh" failonerror="true">