浏览代码

HADOOP-7680 TestHardLink fails on Mac OS X, when gnu stat is in path.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1290868 13f79535-47bb-0310-9956-ffa450edef68
Steve Loughran 13 年之前
父节点
当前提交
145338bc44

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -209,6 +209,9 @@ Release 0.23.2 - UNRELEASED
     HADOOP-8057 hadoop-setup-conf.sh not working because of some extra spaces.
     (Vinayakumar B via stevel)
 
+    HADOOP-7680 TestHardLink fails on Mac OS X, when gnu stat is in path.
+    (Milind Bhandarkar via stevel)
+
 Release 0.23.1 - 2012-02-17 
 
   INCOMPATIBLE CHANGES

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HardLink.java

@@ -64,7 +64,7 @@ public class HardLink {
       //override getLinkCountCommand for the particular Unix variant
       //Linux is already set as the default - {"stat","-c%h", null}
       if (osType == OSType.OS_TYPE_MAC) {
-        String[] linkCountCmdTemplate = {"stat","-f%l", null};
+        String[] linkCountCmdTemplate = {"/usr/bin/stat","-f%l", null};
         HardLinkCGUnix.setLinkCountCmdTemplate(linkCountCmdTemplate);
       } else if (osType == OSType.OS_TYPE_SOLARIS) {
         String[] linkCountCmdTemplate = {"ls","-l", null};