我们下载对应hadoop源代码,hadoop-2.x.x-src.tar.gz解压,hadoop-2.x.x-src\hadoop-common-project\hadoop-common\src\main\java\org\apache\hadoop\io\nativeio下NativeIO.java 复制到Eclipse的project(在project下建包org.apache.hadoop.io.nativeio)下的对应包中,然后修改public static boolean access(String path, AccessRight desiredAccess)方法改成:
public static boolean access(String path, AccessRight desiredAccess)
throws IOException {
// return access0(path, desiredAccess.accessRight());
return true;
}