Skip to content

Commit

Permalink
[FLINK-10383] [s3] Prevent Hadoop configs in the classpath to seep in…
Browse files Browse the repository at this point in the history
…to S3 configuration

The S3 connectors are based on a self-contained shaded Hadoop and should not load implicitly
configs from the classpath, like Hadoop does it. Instead, they should only use config value
from the Flink configuration.
  • Loading branch information
StephanEwen committed Sep 24, 2018
1 parent 8aa128b commit 51f6f7f
Show file tree
Hide file tree
Showing 4 changed files with 2,797 additions and 4,758 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,21 +657,7 @@ private void handleDeprecation() {
static {
// Add default resources
addDefaultResource("core-default-shaded.xml");
addDefaultResource("core-site.xml");

// print deprecation warning if hadoop-site.xml is found in classpath
ClassLoader cL = Thread.currentThread().getContextClassLoader();
if (cL == null) {
cL = Configuration.class.getClassLoader();
}
if (cL.getResource("hadoop-site.xml") != null) {
LOG.warn("DEPRECATED: hadoop-site.xml found in the classpath. " +
"Usage of hadoop-site.xml is deprecated. Instead use core-site.xml, "
+ "mapred-site.xml and hdfs-site.xml to override properties of " +
"core-default.xml, mapred-default.xml and hdfs-default.xml " +
"respectively");
addDefaultResource("hadoop-site.xml");
}
addDefaultResource("core-default-testing.xml");
}

private Properties properties;
Expand Down
Loading

0 comments on commit 51f6f7f

Please sign in to comment.