Hi, stack
Here is the method in org.apache.hadoop.fs.permission in hadoop 2:
/**
- Get the default permission for file.
*/
public static FsPermission getFileDefault()
{
return new FsPermission((short)00666);
}
This method is not in hadoop 1.
I put the same name with the same implementation in our HBase FSUtils for 0.96/0.98 so that 0.96/0.98 can use this implementation, even on hadoop 1.
In a sense e are actually always using hadoop 2 implementation.
Of course there is a risk with this hard-code approach, if the implementation evolves in hadoop 2. But it is a very small risk that we can live with in 0.96/0.98
To use the hadoop-compat modules, I think I will need to do these:
1. Have a wrapper interface in hadoop-compact.
2. In hadoop2-compact, the wrapper will directly call org.apache.hadoop.fs.permission#getFileDefault().
3. In hadoop1-compact, the wrapper will call an internal method that has the same implementation as org.apache.hadoop.fs.permission#getFileDefault()
Probably an over-kill?
+1 for 0.98