Review Board 1.7.22


SQOOP-1141 Sqoop2: Provide ability to enable/disable connections and jobs

Review Request #12593 - Created July 16, 2013 and submitted

Mengwei Ding
SQOOP-1141
Reviewers
Sqoop
abe, hshreedharan, jarcec
sqoop-sqoop2
commit a3c6f9d77694936a30f4cbef97ede6954aba4004
Author: Mengwei Ding <mengwei.ding@gmail.com>
Date:   Tue Jul 16 10:41:12 2013 -0700

    SQOOP-1141 Sqoop2: Provide ability to enable/disable connections and jobs

:100644 100644 4ca71a4... 158e46c... M	client/src/main/java/org/apache/sqoop/client/SqoopClient.java
:100644 100644 b7b0436... 999790d... M	client/src/main/java/org/apache/sqoop/client/core/Constants.java
:100644 100644 a69e009... f523abb... M	client/src/main/java/org/apache/sqoop/client/request/ConnectionRequest.java
:100644 100644 55ba9db... 6dee2c8... M	client/src/main/java/org/apache/sqoop/client/request/JobRequest.java
:100644 100644 f102c8f... ffaa84f... M	client/src/main/java/org/apache/sqoop/client/request/SqoopRequests.java
:000000 100644 0000000... 5cbd6db... A	client/src/main/java/org/apache/sqoop/client/shell/DisableCommand.java
:000000 100644 0000000... e04292a... A	client/src/main/java/org/apache/sqoop/client/shell/DisableConnectionFunction.java
:000000 100644 0000000... 5962cd2... A	client/src/main/java/org/apache/sqoop/client/shell/DisableJobFunction.java
:000000 100644 0000000... 8a2c1c7... A	client/src/main/java/org/apache/sqoop/client/shell/EnableCommand.java
:000000 100644 0000000... ed6dc3c... A	client/src/main/java/org/apache/sqoop/client/shell/EnableConnectionFunction.java
:000000 100644 0000000... 9e4e320... A	client/src/main/java/org/apache/sqoop/client/shell/EnableJobFunction.java
:100644 100644 32bca71... 94f92b3... M	client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java
:100644 100644 590e4e7... 97a240b... M	client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java
:100644 100644 aa87f20... f4ea3be... M	client/src/main/java/org/apache/sqoop/client/shell/SqoopShell.java
:100644 100644 5537a8e... 1a8f963... M	client/src/main/resources/client-resource.properties
:100644 100644 b4e986a... a014ddd... M	common/src/main/java/org/apache/sqoop/json/ConnectionBean.java
:100644 100644 a830646... 4685797... M	common/src/main/java/org/apache/sqoop/json/JobBean.java
:100644 100644 98768d6... ba12b39... M	common/src/main/java/org/apache/sqoop/json/util/FormSerialization.java
:100644 100644 137e71c... 5524983... M	common/src/main/java/org/apache/sqoop/model/MAccountableEntity.java
:100644 100644 dd1d75b... 2f2b974... M	common/src/test/java/org/apache/sqoop/json/TestConnectionBean.java
:100644 100644 6af1d8b... e42b7df... M	common/src/test/java/org/apache/sqoop/json/TestJobBean.java
:100644 100644 4ea42b1... bf103e4... M	common/src/test/java/org/apache/sqoop/model/TestMAccountableEntity.java
:100644 100644 4277311... f7a6b67... M	core/src/main/java/org/apache/sqoop/framework/FrameworkError.java
:100644 100644 9f09982... d0a087d... M	core/src/main/java/org/apache/sqoop/framework/JobManager.java
:100644 100644 095f3e9... 7768b13... M	core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
:100644 100644 d468b79... 9299484... M	core/src/main/java/org/apache/sqoop/repository/JdbcRepositoryHandler.java
:100644 100644 92e11d2... 7c7673f... M	core/src/main/java/org/apache/sqoop/repository/Repository.java
:100644 100644 aeb7533... 455eb64... M	repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoError.java
:100644 100644 f717abf... 771673d... M	repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
:100644 100644 68cb1c0... 49bf607... M	repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java
:100644 100644 b2cd6cc... b08f7ab... M	repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
:100644 100644 677b0be... b766b09... M	repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
:100644 100644 8266b46... 6959f2d... M	repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectionHandling.java
:100644 100644 4c97e1e... a3d804e... M	repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestJobHandling.java
:100644 100644 038f602... 62be8f4... M	server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java
:100644 100644 ab3f9d0... 0d15329... M	server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
Did some manual tests to check whether job could be started if either job or connection has been disabled.
common/src/test/java/org/apache/sqoop/json/TestJobBean.java
Revision 6af1d8b New Change
[20] 39 lines
[+20] [+] public void testSerialization() throws ParseException {
40
    MJob job = getJob("ahoj", MJob.Type.IMPORT);
40
    MJob job = getJob("ahoj", MJob.Type.IMPORT);
41
    job.setName("The big job");
41
    job.setName("The big job");
42
    job.setPersistenceId(666);
42
    job.setPersistenceId(666);
43
    job.setCreationDate(created);
43
    job.setCreationDate(created);
44
    job.setLastUpdateDate(updated);
44
    job.setLastUpdateDate(updated);

    
   
45
    job.setEnabled(false);
45

    
   
46

   
46
    // Fill some data at the beginning
47
    // Fill some data at the beginning
47
    MStringInput input = (MStringInput) job.getConnectorPart().getForms()
48
    MStringInput input = (MStringInput) job.getConnectorPart().getForms()
48
      .get(0).getInputs().get(0);
49
      .get(0).getInputs().get(0);
49
    input.setValue("Hi there!");
50
    input.setValue("Hi there!");
[+20] [20] 15 lines
[+20] public void testSerialization() throws ParseException {
65
    assertEquals(666, target.getPersistenceId());
66
    assertEquals(666, target.getPersistenceId());
66
    assertEquals(MJob.Type.IMPORT, target.getType());
67
    assertEquals(MJob.Type.IMPORT, target.getType());
67
    assertEquals("The big job", target.getName());
68
    assertEquals("The big job", target.getName());
68
    assertEquals(created, target.getCreationDate());
69
    assertEquals(created, target.getCreationDate());
69
    assertEquals(updated, target.getLastUpdateDate());
70
    assertEquals(updated, target.getLastUpdateDate());

    
   
71
    assertEquals(false, target.getEnabled());
70

    
   
72

   
71
    // Test that value was correctly moved
73
    // Test that value was correctly moved
72
    MStringInput targetInput = (MStringInput) target.getConnectorPart()
74
    MStringInput targetInput = (MStringInput) target.getConnectorPart()
73
      .getForms().get(0).getInputs().get(0);
75
      .getForms().get(0).getInputs().get(0);
74
    assertEquals("Hi there!", targetInput.getValue());
76
    assertEquals("Hi there!", targetInput.getValue());
75
  }
77
  }
76
}
78
}
common/src/test/java/org/apache/sqoop/model/TestMAccountableEntity.java
Revision 4ea42b1 New Change
 
core/src/main/java/org/apache/sqoop/framework/FrameworkError.java
Revision 4277311 New Change
 
core/src/main/java/org/apache/sqoop/framework/JobManager.java
Revision 9f09982 New Change
 
core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
Revision 095f3e9 New Change
 
core/src/main/java/org/apache/sqoop/repository/JdbcRepositoryHandler.java
Revision d468b79 New Change
 
core/src/main/java/org/apache/sqoop/repository/Repository.java
Revision 92e11d2 New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoError.java
Revision aeb7533 New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
Revision f717abf New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java
Revision 68cb1c0 New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
Revision b2cd6cc New Change
 
repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectionHandling.java
Revision 8266b46 New Change
 
repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestJobHandling.java
Revision 4c97e1e New Change
 
server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java
Revision 038f602 New Change
 
server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
Revision ab3f9d0 New Change
 
  1. common/src/test/java/org/apache/sqoop/json/TestJobBean.java: Loading...
  2. common/src/test/java/org/apache/sqoop/model/TestMAccountableEntity.java: Loading...
  3. core/src/main/java/org/apache/sqoop/framework/FrameworkError.java: Loading...
  4. core/src/main/java/org/apache/sqoop/framework/JobManager.java: Loading...
  5. core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java: Loading...
  6. core/src/main/java/org/apache/sqoop/repository/JdbcRepositoryHandler.java: Loading...
  7. core/src/main/java/org/apache/sqoop/repository/Repository.java: Loading...
  8. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoError.java: Loading...
  9. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java: Loading...
  10. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java: Loading...
  11. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java: Loading...
  12. repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectionHandling.java: Loading...
  13. repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestJobHandling.java: Loading...
  14. server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java: Loading...
  15. server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java: Loading...
This diff has been split across 2 pages: < 1 2