flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhue...@apache.org
Subject [2/3] flink git commit: [FLINK-3218] Fix overriding of user parameters when merging Hadoop configurations
Date Tue, 12 Jan 2016 23:36:18 GMT
[FLINK-3218] Fix overriding of user parameters when merging Hadoop configurations

This closes #1496


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/e6e0fd92
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/e6e0fd92
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/e6e0fd92

Branch: refs/heads/release-0.10
Commit: e6e0fd927af50d33308c90fae4338ee10d899103
Parents: ab2f14a
Author: Greg Hogan <code@greghogan.com>
Authored: Mon Jan 11 12:56:48 2016 -0500
Committer: Fabian Hueske <fhueske@apache.org>
Committed: Wed Jan 13 00:25:34 2016 +0100

----------------------------------------------------------------------
 .../apache/flink/api/java/hadoop/mapred/utils/HadoopUtils.java | 4 +++-
 .../flink/api/java/hadoop/mapreduce/utils/HadoopUtils.java     | 6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/e6e0fd92/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapred/utils/HadoopUtils.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapred/utils/HadoopUtils.java
b/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapred/utils/HadoopUtils.java
index 9bfc09a..d279e54 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapred/utils/HadoopUtils.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapred/utils/HadoopUtils.java
@@ -47,7 +47,9 @@ public final class HadoopUtils {
 	public static void mergeHadoopConf(JobConf jobConf) {
 		org.apache.hadoop.conf.Configuration hadoopConf = getHadoopConfiguration();
 		for (Map.Entry<String, String> e : hadoopConf) {
-			jobConf.set(e.getKey(), e.getValue());
+			if (jobConf.get(e.getKey()) == null) {
+				jobConf.set(e.getKey(), e.getValue());
+			}
 		}
 	}
 	

http://git-wip-us.apache.org/repos/asf/flink/blob/e6e0fd92/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapreduce/utils/HadoopUtils.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapreduce/utils/HadoopUtils.java
b/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapreduce/utils/HadoopUtils.java
index fd530c4..9ca3d70 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapreduce/utils/HadoopUtils.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapreduce/utils/HadoopUtils.java
@@ -28,7 +28,7 @@ import org.apache.hadoop.mapreduce.TaskAttemptContext;
 import org.apache.hadoop.mapreduce.TaskAttemptID;
 
 /**
- * Utility class to work with next generatio of Apache Hadoop MapReduce classes.
+ * Utility class to work with next generation of Apache Hadoop MapReduce classes.
  */
 public final class HadoopUtils {
 	
@@ -39,7 +39,9 @@ public final class HadoopUtils {
 		Configuration hadoopConf = org.apache.flink.api.java.hadoop.mapred.utils.HadoopUtils.getHadoopConfiguration();
 		
 		for (Map.Entry<String, String> e : hadoopConf) {
-			configuration.set(e.getKey(), e.getValue());
+			if (configuration.get(e.getKey()) == null) {
+				configuration.set(e.getKey(), e.getValue());
+			}
 		}
 	}
 	


Mime
View raw message