in flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/AbstractHDFSWriter.java [211:233]
private Method reflectGetDefaultReplication(FileSystem fileSystem) {
Method m = null;
if (fileSystem != null) {
Class<?> fsClass = fileSystem.getClass();
try {
m = fsClass.getMethod("getDefaultReplication",
new Class<?>[] { Path.class });
} catch (NoSuchMethodException e) {
logger.debug("FileSystem implementation doesn't support"
+ " getDefaultReplication(Path); -- HADOOP-8014 not available; " +
"className = " + fsClass.getName() + "; err = " + e);
} catch (SecurityException e) {
logger.debug("No access to getDefaultReplication(Path) on "
+ "FileSystem implementation -- HADOOP-8014 not available; " +
"className = " + fsClass.getName() + "; err = " + e);
}
}
if (m != null) {
logger.debug("Using FileSystem.getDefaultReplication(Path) from " +
"HADOOP-8014");
}
return m;
}