sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject sqoop git commit: SQOOP-1785: Sqoop2: Send driver validation results back to client when creating job
Date Wed, 26 Nov 2014 10:13:13 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 fd962761a -> 78b012698


SQOOP-1785: Sqoop2: Send driver validation results back to client when creating job

(Jarek Jarcec Cecho via Abraham Elmahrek)


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

Branch: refs/heads/sqoop2
Commit: 78b012698a320419d6a9cdac972ba8dab510772e
Parents: fd96276
Author: Abraham Elmahrek <abraham@elmahrek.com>
Authored: Wed Nov 26 02:01:27 2014 -0800
Committer: Abraham Elmahrek <abraham@elmahrek.com>
Committed: Wed Nov 26 02:01:27 2014 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/sqoop/client/SqoopClient.java   | 11 ++++++-----
 .../java/org/apache/sqoop/handler/JobRequestHandler.java |  3 +--
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/78b01269/client/src/main/java/org/apache/sqoop/client/SqoopClient.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/sqoop/client/SqoopClient.java b/client/src/main/java/org/apache/sqoop/client/SqoopClient.java
index e139132..e1f009c 100644
--- a/client/src/main/java/org/apache/sqoop/client/SqoopClient.java
+++ b/client/src/main/java/org/apache/sqoop/client/SqoopClient.java
@@ -558,8 +558,7 @@ public class SqoopClient {
   private Status applyJobValidations(ValidationResultBean bean, MJob job) {
     ConfigValidationResult fromConfig = bean.getValidationResults()[0];
     ConfigValidationResult toConfig = bean.getValidationResults()[1];
-    // TODO(VB): fix this as part of SQOOP 1509
-    //ConfigValidationResult driverConfig = bean.getValidationResults()[2];
+    ConfigValidationResult driver = bean.getValidationResults()[2];
 
     ConfigUtils.applyValidation(
         job.getJobConfig(Direction.FROM).getConfigs(),
@@ -567,14 +566,16 @@ public class SqoopClient {
     ConfigUtils.applyValidation(
         job.getJobConfig(Direction.TO).getConfigs(),
         toConfig);
-    //ConfigUtils.applyValidation(job.getDriverConfig().getSelf().getConfigs(), driverConfig);
+    ConfigUtils.applyValidation(
+      job.getDriverConfig().getConfigs(),
+      driver
+    );
 
     Long id = bean.getId();
     if(id != null) {
       job.setPersistenceId(id);
     }
 
-    return Status.getWorstStatus(fromConfig.getStatus(), toConfig.getStatus());
-       // driverConfig.getStatus());
+    return Status.getWorstStatus(fromConfig.getStatus(), toConfig.getStatus(), driver.getStatus());
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/78b01269/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java b/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
index 75a069a..1312941 100644
--- a/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
+++ b/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
@@ -226,8 +226,7 @@ public class JobRequestHandler implements RequestHandler {
     Status finalStatus = Status.getWorstStatus(fromConfigValidator.getStatus(),
         toConfigValidator.getStatus(), driverConfigValidator.getStatus());
     // Return back validations in all cases
-    ValidationResultBean validationResultBean = new ValidationResultBean(fromConfigValidator,
-        toConfigValidator);
+    ValidationResultBean validationResultBean = new ValidationResultBean(fromConfigValidator,
toConfigValidator, driverConfigValidator);
 
     // If we're good enough let's perform the action
     if (finalStatus.canProceed()) {


Mime
View raw message