Hi all,

In the current test case of hadoop, if we want to corrupt or disable one
directory or file,
we use File.setWritable(false) such as in TestStorageRestore.java and
TestCheckpoint.java.

But we all know, the implementation of function setWritable() in Java API
is system-dependent,
and there are some jdk bugs in this function implementation.

In https://issues.apache.org/jira/browse/HADOOP-4824 , the patch had remove
the setWritable() function in 0.18.

We can use the Filesystem.setPermission() to change the file's access
permission,
and it supplies native method which invoke the operating system API in
Hadoop source code.

So should we change setWritable() to setPermission()?

Thanks,
Yanbo

Reply via email to