提交 a76421ec 编写于 作者: Z zhangminglei 提交者: Greg Hogan

[FLINK-6842] [runtime] Uncomment and activate code in HadoopFileSystem

This closes #4219
上级 d1a0935e
......@@ -459,15 +459,12 @@ public final class HadoopFileSystem extends FileSystem implements HadoopFileSyst
@Override
public Class<?> getHadoopWrapperClassNameForFileSystem(String scheme) {
Configuration hadoopConf = getHadoopConfiguration();
Class<? extends org.apache.hadoop.fs.FileSystem> clazz;
// We can activate this block once we drop Hadoop1 support (only hd2 has the getFileSystemClass-method)
// try {
// clazz = org.apache.hadoop.fs.FileSystem.getFileSystemClass(scheme, hadoopConf);
// } catch (IOException e) {
// LOG.info("Flink could not load the Hadoop File system implementation for scheme "+scheme);
// return null;
// }
clazz = hadoopConf.getClass("fs." + scheme + ".impl", null, org.apache.hadoop.fs.FileSystem.class);
Class<? extends org.apache.hadoop.fs.FileSystem> clazz = null;
try {
clazz = org.apache.hadoop.fs.FileSystem.getFileSystemClass(scheme, hadoopConf);
} catch (IOException e) {
LOG.info("Flink could not load the Hadoop File system implementation for scheme " + scheme);
}
if (clazz != null && LOG.isDebugEnabled()) {
LOG.debug("Flink supports {} with the Hadoop file system wrapper, impl {}", scheme, clazz);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册