sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject git commit: SQOOP-876: Expose the xid and cid when show status of job in sqoop2 client
Date Sat, 13 Apr 2013 18:18:27 GMT
Updated Branches:
  refs/heads/sqoop2 3f574f981 -> 3865f7dee


SQOOP-876: Expose the xid and cid when show status of job in sqoop2 client

(Vasanth kumar RJ via Jarek Jarcec Cecho)


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

Branch: refs/heads/sqoop2
Commit: 3865f7deec722948a60cc1746e2330bd1c5cb9e4
Parents: 3f574f9
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Sat Apr 13 11:17:23 2013 -0700
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Sat Apr 13 11:17:23 2013 -0700

----------------------------------------------------------------------
 .../org/apache/sqoop/client/core/Constants.java    |    4 ++++
 .../client/shell/CreateConnectionFunction.java     |    2 +-
 .../sqoop/client/shell/ShowConnectionFunction.java |    1 +
 .../apache/sqoop/client/shell/ShowJobFunction.java |    3 +++
 .../src/main/resources/client-resource.properties  |    2 ++
 5 files changed, 11 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/3865f7de/client/src/main/java/org/apache/sqoop/client/core/Constants.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/sqoop/client/core/Constants.java b/client/src/main/java/org/apache/sqoop/client/core/Constants.java
index cc956d0..027173c 100644
--- a/client/src/main/java/org/apache/sqoop/client/core/Constants.java
+++ b/client/src/main/java/org/apache/sqoop/client/core/Constants.java
@@ -222,6 +222,8 @@ public class Constants {
       "show.prompt_conns_to_show";
   public static final String RES_SHOW_PROMPT_CONN_INFO =
       "show.prompt_conn_info";
+  public static final String RES_SHOW_PROMPT_CONN_CID_INFO =
+      "show.prompt_conn_cid_info";
 
   public static final String RES_SHOW_PROMPT_DISPLAY_ALL_CONNECTORS =
       "show.prompt_display_all_connectors";
@@ -249,6 +251,8 @@ public class Constants {
       "show.prompt_jobs_to_show";
   public static final String RES_SHOW_PROMPT_JOB_INFO =
       "show.prompt_job_info";
+  public static final String RES_SHOW_PROMPT_JOB_XID_CID_INFO =
+      "show.prompt_job_xid_cid_info";
 
   public static final String RES_SHOW_PROMPT_DISPLAY_ALL_SERVERS =
       "show.prompt_display_all_servers";

http://git-wip-us.apache.org/repos/asf/sqoop/blob/3865f7de/client/src/main/java/org/apache/sqoop/client/shell/CreateConnectionFunction.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/sqoop/client/shell/CreateConnectionFunction.java
b/client/src/main/java/org/apache/sqoop/client/shell/CreateConnectionFunction.java
index 04238ee..04b240c 100644
--- a/client/src/main/java/org/apache/sqoop/client/shell/CreateConnectionFunction.java
+++ b/client/src/main/java/org/apache/sqoop/client/shell/CreateConnectionFunction.java
@@ -40,7 +40,7 @@ public class CreateConnectionFunction extends SqoopFunction {
   @SuppressWarnings("static-access")
   public CreateConnectionFunction() {
     this.addOption(OptionBuilder
-      .withDescription(Constants.RES_CONNECTOR_ID)
+      .withDescription(resourceString(Constants.RES_CONNECTOR_ID))
       .withLongOpt(Constants.OPT_CID)
       .hasArg()
       .create(Constants.OPT_CID_CHAR));

http://git-wip-us.apache.org/repos/asf/sqoop/blob/3865f7de/client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java
b/client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java
index 4fe20c1..32bca71 100644
--- a/client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java
+++ b/client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java
@@ -108,6 +108,7 @@ public class ShowConnectionFunction extends SqoopFunction {
     );
 
     long connectorId = connection.getConnectorId();
+    printlnResource(Constants.RES_SHOW_PROMPT_CONN_CID_INFO, connectorId);
 
     // Display connector part
     displayForms(connection.getConnectorPart().getForms(),

http://git-wip-us.apache.org/repos/asf/sqoop/blob/3865f7de/client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java b/client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java
index 5505d51..590e4e7 100644
--- a/client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java
+++ b/client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java
@@ -108,6 +108,9 @@ public class ShowJobFunction extends SqoopFunction {
       formatter.format(job.getCreationDate()),
       formatter.format(job.getLastUpdateDate())
     );
+    printlnResource(Constants.RES_SHOW_PROMPT_JOB_XID_CID_INFO,
+        job.getConnectionId(),
+        job.getConnectorId());
 
     // Display connector part
     displayForms(job.getConnectorPart().getForms(),

http://git-wip-us.apache.org/repos/asf/sqoop/blob/3865f7de/client/src/main/resources/client-resource.properties
----------------------------------------------------------------------
diff --git a/client/src/main/resources/client-resource.properties b/client/src/main/resources/client-resource.properties
index feb09e0..374ed4e 100644
--- a/client/src/main/resources/client-resource.properties
+++ b/client/src/main/resources/client-resource.properties
@@ -122,6 +122,7 @@ show.prompt_display_conn_xid = Display the connection with xid
 show.conn_usage = Usage: show connection
 show.prompt_conns_to_show = @|bold {0} connection(s) to show: |@
 show.prompt_conn_info = Connection with id {0} and name {1} (Created {2}, Updated {3})
+show.prompt_conn_cid_info = Using Connector id {0}
 
 show.prompt_display_all_connectors = Display all connectors
 show.prompt_display_connector_cid = Display the connector with cid
@@ -138,6 +139,7 @@ show.prompt_display_job_jid = Display jobwith given jid
 show.job_usage = Usage: show job
 show.prompt_jobs_to_show = @|bold {0} job(s) to show: |@
 show.prompt_job_info = Job with id {0} and name {1} (Created {2}, Updated {3})
+show.prompt_job_xid_cid_info = Using Connection id {0} and Connector id {1}
 
 show.prompt_display_all_servers = Display all server information
 show.prompt_display_server_host = Display server host name


Mime
View raw message