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-2446: Sqoop2: Fix incorrect notification URL for execution engine
Date Mon, 10 Aug 2015 20:37:22 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 a0ef3fc55 -> 7202fe3a5


SQOOP-2446: Sqoop2: Fix incorrect notification URL for execution engine

(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/7202fe3a
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/7202fe3a
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/7202fe3a

Branch: refs/heads/sqoop2
Commit: 7202fe3a50520cfb846791b52714373ad4b4670b
Parents: a0ef3fc
Author: Abraham Elmahrek <abe@apache.org>
Authored: Mon Aug 10 13:36:51 2015 -0700
Committer: Abraham Elmahrek <abe@apache.org>
Committed: Mon Aug 10 13:36:51 2015 -0700

----------------------------------------------------------------------
 core/src/main/java/org/apache/sqoop/driver/JobManager.java   | 2 +-
 .../java/org/apache/sqoop/handler/JobRequestHandler.java     | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/7202fe3a/core/src/main/java/org/apache/sqoop/driver/JobManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/sqoop/driver/JobManager.java b/core/src/main/java/org/apache/sqoop/driver/JobManager.java
index e8ca17c..d4e0655 100644
--- a/core/src/main/java/org/apache/sqoop/driver/JobManager.java
+++ b/core/src/main/java/org/apache/sqoop/driver/JobManager.java
@@ -355,7 +355,7 @@ public class JobManager implements Reconfigurable {
     jobRequest.setDriverConfig(driverConfig);
     jobRequest.setJobName(job.getName());
     jobRequest.setJobId(job.getPersistenceId());
-    jobRequest.setNotificationUrl(notificationBaseUrl + jobId);
+    jobRequest.setNotificationUrl(notificationBaseUrl + jobId + "/status");
     jobRequest.setIntermediateDataFormat(fromConnector.getIntermediateDataFormat(), Direction.FROM);
     jobRequest.setIntermediateDataFormat(toConnector.getIntermediateDataFormat(), Direction.TO);
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/7202fe3a/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 5e314d0..0d06085 100644
--- a/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
+++ b/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
@@ -368,12 +368,14 @@ public class JobRequestHandler implements RequestHandler {
 
     AuditLoggerManager.getInstance().logAuditEvent(ctx.getUserName(),
         ctx.getRequest().getRemoteAddr(), "submit", "job", String.valueOf(jobId));
-    // TODO(SQOOP-1638): This should be outsourced somewhere more suitable than
-    // here
+    // TODO(SQOOP-1638): This should be outsourced somewhere more suitable than here
+    // Current approach is to point JobManager to use /v1/job/notification/$JOB_ID/status
+    // and depend on the behavior of status that for running jobs will go to the cluster
+    // and fetch the latest state. We don't have notification first class
     if (JobManager.getInstance().getNotificationBaseUrl() == null) {
       String url = ctx.getRequest().getRequestURL().toString();
       JobManager.getInstance().setNotificationBaseUrl(
-          url.split("v1")[0] + "/v1/job/status/notification/");
+          url.split("v1")[0] + "/v1/job/notification/");
     }
 
     MSubmission submission = JobManager.getInstance()


Mime
View raw message