瀏覽代碼

HDFS-2325. Fuse-DFS fails to build on Hadoop 20.203.0. Contributed by Kihwal Lee.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-205@1175658 13f79535-47bb-0310-9956-ffa450edef68
Matthew Foley 14 年之前
父節點
當前提交
ff1c027799
共有 3 個文件被更改,包括 13 次插入6 次删除
  1. 3 0
      CHANGES.txt
  2. 9 2
      src/contrib/fuse-dfs/build.xml
  3. 1 4
      src/contrib/fuse-dfs/src/fuse_connect.c

+ 3 - 0
CHANGES.txt

@@ -47,6 +47,9 @@ Release 0.20.205.0 - 2011.09.12
 
 
   BUG FIXES
   BUG FIXES
 
 
+    HDFS-2325. Fuse-DFS fails to build on Hadoop 20.203.0
+    (Kihwal Lee via mattf)
+
     HDFS-2342. add Jersey libraries to ivy.xml files in contrib, to fix
     HDFS-2342. add Jersey libraries to ivy.xml files in contrib, to fix
     TestSleepJob and TestHdfsProxy. (Tsz Wo (Nicholas), SZE via mattf)
     TestSleepJob and TestHdfsProxy. (Tsz Wo (Nicholas), SZE via mattf)
 
 

+ 9 - 2
src/contrib/fuse-dfs/build.xml

@@ -32,13 +32,20 @@
 
 
 
 
   <target name="check-libhdfs-exists" if="fusedfs">
   <target name="check-libhdfs-exists" if="fusedfs">
-  <property name="libhdfs.lib" value="${hadoop.root}/build/libhdfs/libhdfs.so"/>
+    <patternset id="empty.exclude.list.id" />
+        <exec executable="sed" inputstring="${os.name}"
+            outputproperty="nonspace.os">
+          <arg value="s/ /_/g"/>
+        </exec>
+    <property name="build.platform" 
+            value="${nonspace.os}-${os.arch}-${sun.arch.data.model}"/>
+    <property name="libhdfs.lib" value="${hadoop.root}/build/c++/${build.platform}/lib/libhdfs.so"/>
         <available file="${libhdfs.lib}" property="libhdfs-exists"/>
         <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">
     <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>
          <condition>
             <not><isset property="libhdfs-exists"/></not>
             <not><isset property="libhdfs-exists"/></not>
           </condition>
           </condition>
-   </fail>
+     </fail>
    </target>
    </target>
 
 
   <!-- override compile target !-->
   <!-- override compile target !-->

+ 1 - 4
src/contrib/fuse-dfs/src/fuse_connect.c

@@ -35,10 +35,7 @@ hdfsFS doConnectAsUser(const char *hostname, int port) {
   char *user = getUsername(uid);
   char *user = getUsername(uid);
   if (NULL == user)
   if (NULL == user)
     return NULL;
     return NULL;
-  int numgroups = 0;
-  char **groups = getGroups(uid, &numgroups);
-  hdfsFS fs = hdfsConnectAsUser(hostname, port, user, (const char **)groups, numgroups);
-  freeGroups(groups, numgroups);
+  hdfsFS fs = hdfsConnectAsUser(hostname, port, user);
   if (user) 
   if (user) 
     free(user);
     free(user);
   return fs;
   return fs;