Skip to content

Commit

Permalink
[hotfix] Instantiate a HdfsConfiguration in HadoopUtils#getHadoopConf…
Browse files Browse the repository at this point in the history
…iguration()

Instantiate a HdfsConfiguration as the base configuration when calling
HadoopUtils#getHadoopConfiguration() to load the hdfs-site.xml and
hdfs-default.xml from the classpath before trying to load an explicitly
specified configuration.
  • Loading branch information
tillrohrmann committed Nov 2, 2017
1 parent f9b475f commit 8198967
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
import org.apache.flink.configuration.ConfigConstants;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdfs.HdfsConfiguration;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.security.token.TokenIdentifier;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -44,7 +44,9 @@ public class HadoopUtils {

public static Configuration getHadoopConfiguration(org.apache.flink.configuration.Configuration flinkConfiguration) {

Configuration result = new Configuration();
// Instantiate a HdfsConfiguration to load the hdfs-site.xml and hdfs-default.xml
// from the classpath
Configuration result = new HdfsConfiguration();
boolean foundHadoopConfiguration = false;

// We need to load both core-site.xml and hdfs-site.xml to determine the default fs path and
Expand Down

0 comments on commit 8198967

Please sign in to comment.