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
This commit is contained in:
Steve Loughran 2012-02-18 21:05:06 +00:00
parent 2147427bd2
commit 145338bc44
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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};