提交 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 ...@@ -459,15 +459,12 @@ public final class HadoopFileSystem extends FileSystem implements HadoopFileSyst
@Override @Override
public Class<?> getHadoopWrapperClassNameForFileSystem(String scheme) { public Class<?> getHadoopWrapperClassNameForFileSystem(String scheme) {
Configuration hadoopConf = getHadoopConfiguration(); Configuration hadoopConf = getHadoopConfiguration();
Class<? extends org.apache.hadoop.fs.FileSystem> clazz; Class<? extends org.apache.hadoop.fs.FileSystem> clazz = null;
// We can activate this block once we drop Hadoop1 support (only hd2 has the getFileSystemClass-method) try {
// try { clazz = org.apache.hadoop.fs.FileSystem.getFileSystemClass(scheme, hadoopConf);
// clazz = org.apache.hadoop.fs.FileSystem.getFileSystemClass(scheme, hadoopConf); } catch (IOException e) {
// } catch (IOException e) { LOG.info("Flink could not load the Hadoop File system implementation for scheme " + scheme);
// 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);
if (clazz != null && LOG.isDebugEnabled()) { if (clazz != null && LOG.isDebugEnabled()) {
LOG.debug("Flink supports {} with the Hadoop file system wrapper, impl {}", scheme, clazz); 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.
先完成此消息的编辑!
想要评论请 注册