sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mau...@apache.org
Subject sqoop git commit: SQOOP-3140: Removing deprecated mapred.map.max.attempts, mapred.reduce.max.attempts entries and using the new constants directly from Hadoop instead
Date Fri, 24 Feb 2017 06:54:58 GMT
Repository: sqoop
Updated Branches:
  refs/heads/trunk 0bb039a00 -> 2b70666b0


SQOOP-3140: Removing deprecated mapred.map.max.attempts,
mapred.reduce.max.attempts entries and using the new constants directly from
Hadoop instead

(Anna Szonyi via Attila Szabo)


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

Branch: refs/heads/trunk
Commit: 2b70666b04822ade910326b9665061e0a7f0eebe
Parents: 0bb039a
Author: Attila Szabo <maugli@apache.org>
Authored: Fri Feb 24 07:53:08 2017 +0100
Committer: Attila Szabo <maugli@apache.org>
Committed: Fri Feb 24 07:53:08 2017 +0100

----------------------------------------------------------------------
 src/java/org/apache/sqoop/manager/oracle/OraOopConstants.java   | 4 ++--
 .../org/apache/sqoop/manager/oracle/OraOopManagerFactory.java   | 5 +++--
 src/java/org/apache/sqoop/mapreduce/ExportJobBase.java          | 3 ---
 src/java/org/apache/sqoop/mapreduce/JobBase.java                | 4 ++++
 .../apache/sqoop/mapreduce/postgresql/PGBulkloadExportJob.java  | 4 ++--
 5 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/2b70666b/src/java/org/apache/sqoop/manager/oracle/OraOopConstants.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/manager/oracle/OraOopConstants.java b/src/java/org/apache/sqoop/manager/oracle/OraOopConstants.java
index 26f1901..ced4f18 100644
--- a/src/java/org/apache/sqoop/manager/oracle/OraOopConstants.java
+++ b/src/java/org/apache/sqoop/manager/oracle/OraOopConstants.java
@@ -18,6 +18,8 @@
 
 package org.apache.sqoop.manager.oracle;
 
+import static org.apache.sqoop.mapreduce.JobBase.HADOOP_MAP_TASK_MAX_ATTEMTPS;
+
 /**
  * Constants for OraOop.
  */
@@ -470,8 +472,6 @@ public final class OraOopConstants {
     }
 
     public static final String IMPORT_TOOL_NAME = "import";
-    public static final String MAX_MAPREDUCE_ATTEMPTS =
-        "mapred.map.max.attempts";
   }
 
 /**

http://git-wip-us.apache.org/repos/asf/sqoop/blob/2b70666b/src/java/org/apache/sqoop/manager/oracle/OraOopManagerFactory.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/manager/oracle/OraOopManagerFactory.java b/src/java/org/apache/sqoop/manager/oracle/OraOopManagerFactory.java
index 17873bc..1cc8a04 100644
--- a/src/java/org/apache/sqoop/manager/oracle/OraOopManagerFactory.java
+++ b/src/java/org/apache/sqoop/manager/oracle/OraOopManagerFactory.java
@@ -40,6 +40,8 @@ import org.apache.sqoop.manager.oracle.OraOopOutputFormatUpdate.UpdateMode;
 import org.apache.sqoop.manager.oracle.OraOopUtilities.
            JdbcOracleThinConnectionParsingError;
 
+import static org.apache.sqoop.mapreduce.JobBase.HADOOP_MAP_TASK_MAX_ATTEMTPS;
+
 /**
  * OraOop manager - if OraOop cannot be used it should fall back to the default
  * OracleManager.
@@ -781,8 +783,7 @@ public class OraOopManagerFactory extends ManagerFactory {
   private void showUserTheOracleCommandToKillOraOop(SqoopOptions sqoopOptions) {
 
     int taskAttempts =
-        sqoopOptions.getConf().getInt(
-            OraOopConstants.Sqoop.MAX_MAPREDUCE_ATTEMPTS, -1);
+        sqoopOptions.getConf().getInt(HADOOP_MAP_TASK_MAX_ATTEMTPS, -1);
 
     // If killing the Oracle session if futile - because the job will be
     // reattempted, then don't

http://git-wip-us.apache.org/repos/asf/sqoop/blob/2b70666b/src/java/org/apache/sqoop/mapreduce/ExportJobBase.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/mapreduce/ExportJobBase.java b/src/java/org/apache/sqoop/mapreduce/ExportJobBase.java
index c7609a5..9946f14 100644
--- a/src/java/org/apache/sqoop/mapreduce/ExportJobBase.java
+++ b/src/java/org/apache/sqoop/mapreduce/ExportJobBase.java
@@ -91,9 +91,6 @@ public class ExportJobBase extends JobBase {
   public static final String SQOOP_EXPORT_MAP_TASK_MAX_ATTEMTPS =
     "sqoop.export.mapred.map.max.attempts";
 
-  private static final String HADOOP_MAP_TASK_MAX_ATTEMTPS =
-    "mapred.map.max.attempts";
-
   /** Start and endtime captured for export job. */
   private long startTime;
   public static final String OPERATION = "export";

http://git-wip-us.apache.org/repos/asf/sqoop/blob/2b70666b/src/java/org/apache/sqoop/mapreduce/JobBase.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/mapreduce/JobBase.java b/src/java/org/apache/sqoop/mapreduce/JobBase.java
index 256d4f7..62aa3a9 100644
--- a/src/java/org/apache/sqoop/mapreduce/JobBase.java
+++ b/src/java/org/apache/sqoop/mapreduce/JobBase.java
@@ -52,6 +52,10 @@ public class JobBase {
 
   public static final String SERIALIZE_SQOOPOPTIONS = "sqoop.jobbase.serialize.sqoopoptions";
   public static final boolean SERIALIZE_SQOOPOPTIONS_DEFAULT = false;
+  public static final String HADOOP_MAP_TASK_MAX_ATTEMTPS =
+      "mapreduce.map.maxattempts";
+  public static final String HADOOP_REDUCE_TASK_MAX_ATTEMTPS =
+      "mapreduce.reduce.maxattempts";
 
   protected SqoopOptions options;
   protected Class<? extends Mapper> mapperClass;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/2b70666b/src/java/org/apache/sqoop/mapreduce/postgresql/PGBulkloadExportJob.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/mapreduce/postgresql/PGBulkloadExportJob.java b/src/java/org/apache/sqoop/mapreduce/postgresql/PGBulkloadExportJob.java
index c0c6039..3a5f277 100644
--- a/src/java/org/apache/sqoop/mapreduce/postgresql/PGBulkloadExportJob.java
+++ b/src/java/org/apache/sqoop/mapreduce/postgresql/PGBulkloadExportJob.java
@@ -136,8 +136,8 @@ public class PGBulkloadExportJob extends ExportJobBase {
     conf.set("mapred.jar", context.getJarFile());
     conf.setBoolean("mapred.map.tasks.speculative.execution", false);
     conf.setBoolean("mapred.reduce.tasks.speculative.execution", false);
-    conf.setInt("mapred.map.max.attempts", 1);
-    conf.setInt("mapred.reduce.max.attempts", 1);
+    conf.setInt(HADOOP_MAP_TASK_MAX_ATTEMTPS, 1);
+    conf.setInt(HADOOP_REDUCE_TASK_MAX_ATTEMTPS, 1);
   }
 
 


Mime
View raw message