Review Board 1.7.22


SQOOP-643 Implement simple listings for connector and job objects

Review Request #8883 - Created Jan. 8, 2013 and submitted

Jarek Cecho
SQOOP-643
Reviewers
Sqoop
sqoop-sqoop2
I've created simple listing of three basic components - connector, connection and job. Examples:

sqoop:000> show connector 
+----+------------------------+----------------+------------------------------------------------------+
| Id |          Name          |    Version     |                        Class                         |
+----+------------------------+----------------+------------------------------------------------------+
| 1  | generic-jdbc-connector | 2.0.0-SNAPSHOT | org.apache.sqoop.connector.jdbc.GenericJdbcConnector |
+----+------------------------+----------------+------------------------------------------------------+
sqoop:000> show job      
+----+----------+--------+-----------+
| Id |   Name   |  Type  | Connector |
+----+----------+--------+-----------+
| 1  | fist job | IMPORT | 1         |
+----+----------+--------+-----------+
sqoop:000> show connection
+----+-------+-----------+
| Id | Name  | Connector |
+----+-------+-----------+
| 1  | mysql | 1         |
+----+-------+-----------+
sqoop:000>

I've tested it on real cluster, no unit tests provided at the moment.
client/src/main/java/org/apache/sqoop/client/core/Constants.java
Revision 8ede0292274abf705bbf9742fdaea067cd4d1ae3 New Change
[20] 297 lines
[+20] [+] public class Constants {
298
      "update.conn_successful";
298
      "update.conn_successful";
299
  public static final String RES_UPDATE_UPDATING_JOB =
299
  public static final String RES_UPDATE_UPDATING_JOB =
300
      "update.job";
300
      "update.job";
301
  public static final String RES_UPDATE_JOB_SUCCESSFUL =
301
  public static final String RES_UPDATE_JOB_SUCCESSFUL =
302
      "update.job_successful";
302
      "update.job_successful";

    
   
303

   

    
   
304
  public static final String RES_TABLE_HEADER_ID =

    
   
305
      "table.header.id";

    
   
306
  public static final String RES_TABLE_HEADER_NAME =

    
   
307
      "table.header.name";

    
   
308
  public static final String RES_TABLE_HEADER_VERSION =

    
   
309
      "table.header.version";

    
   
310
  public static final String RES_TABLE_HEADER_CLASS =

    
   
311
      "table.header.class";

    
   
312
  public static final String RES_TABLE_HEADER_TYPE =

    
   
313
      "table.header.type";

    
   
314
  public static final String RES_TABLE_HEADER_CONNECTOR =

    
   
315
      "table.header.connector";

    
   
316

   
303
  private Constants() {
317
  private Constants() {
304
    // Instantiation is prohibited
318
    // Instantiation is prohibited
305
  }
319
  }
306
}
320
}
client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java
Revision 8066789a55993d1c533476aa02bdb6beb0c1f912 New Change
 
client/src/main/java/org/apache/sqoop/client/shell/ShowConnectorFunction.java
Revision 6276b3eafa9c12f42c6856fede0e876fb8f6f42a New Change
 
client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java
Revision 851ddcacbd74a0322c5bf012c6019940f1df9d7d New Change
 
client/src/main/java/org/apache/sqoop/client/utils/TableDisplayer.java
New File
 
client/src/main/resources/client-resource.properties
Revision 8d6946325ebd2dbe364877c63ddcb7c868cd30bb New Change
 
  1. client/src/main/java/org/apache/sqoop/client/core/Constants.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java: Loading...
  3. client/src/main/java/org/apache/sqoop/client/shell/ShowConnectorFunction.java: Loading...
  4. client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java: Loading...
  5. client/src/main/java/org/apache/sqoop/client/utils/TableDisplayer.java: Loading...
  6. client/src/main/resources/client-resource.properties: Loading...