Review Board 1.7.22


SQOOP-1142 Sqoop2: Provide creater and last edited by to metadata structures

Review Request #12713 - Created July 17, 2013 and submitted

Mengwei Ding
SQOOP-1142
Reviewers
Sqoop
abe, hshreedharan, jarcec
sqoop-sqoop2
commit a0121f728cbdc02bc3cba3dde462f817c4694f9f
Author: Mengwei Ding <mengwei.ding@gmail.com>
Date:   Wed Jul 17 10:48:05 2013 -0700

    SQOOP-1142 Sqoop2: Provide creater and last edited by to metadata structures

:100644 100644 a014ddd... 688bb64... M	common/src/main/java/org/apache/sqoop/json/ConnectionBean.java
:100644 100644 4685797... 1555bd5... M	common/src/main/java/org/apache/sqoop/json/JobBean.java
:100644 100644 79490f8... 61d6576... M	common/src/main/java/org/apache/sqoop/json/SubmissionBean.java
:100644 100644 3daf8d2... 9558941... M	common/src/main/java/org/apache/sqoop/json/util/FormSerialization.java
:100644 100644 5524983... 8af7c15... M	common/src/main/java/org/apache/sqoop/model/MAccountableEntity.java
:100644 100644 2f2b974... 19f81a8... M	common/src/test/java/org/apache/sqoop/json/TestConnectionBean.java
:100644 100644 3b56171... d87655e... M	common/src/test/java/org/apache/sqoop/json/TestSubmissionBean.java
:100644 100644 bf103e4... f3d4166... M	common/src/test/java/org/apache/sqoop/model/TestMAccountableEntity.java
:100644 100644 d0a087d... e052584... M	core/src/main/java/org/apache/sqoop/framework/JobManager.java
:000000 100644 0000000... fda75eb... A	core/src/main/java/org/apache/sqoop/request/HttpEventContext.java
:100644 100644 f025ee9... f6bd5b5... M	repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
:100644 100644 49bf607... fcbb475... M	repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java
:100644 100644 b08f7ab... 1bbba8a... M	repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
:100644 100644 eac87b8... 8a5aee8... M	repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
:100644 100644 875729f... c9c7648... M	server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java
:100644 100644 59a4511... 362ba79... M	server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
:100644 100644 6d9777a... 6e21dd9... M	server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java
:100644 100644 b7204ff... b55d5d1... M	shell/src/main/java/org/apache/sqoop/shell/ShowConnectionFunction.java
:100644 100644 fc6f416... da4a4ff... M	shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java
:100644 100644 0e33d42... 475f41c... M	shell/src/main/java/org/apache/sqoop/shell/core/Constants.java
:100644 100644 1f61fb2... 6dbd870... M	shell/src/main/java/org/apache/sqoop/shell/utils/SubmissionDisplayer.java
:100644 100644 1a8f963... df9457d... M	shell/src/main/resources/shell-resource.properties
Unit tests for 'common' module passed. I also did several manual tests to check the new functionalities.

Diff revision 7 (Latest)

1 2 3 4 5 6 7
1 2 3 4 5 6 7

  1. common/src/main/java/org/apache/sqoop/json/ConnectionBean.java: Loading...
  2. common/src/main/java/org/apache/sqoop/json/JobBean.java: Loading...
  3. common/src/main/java/org/apache/sqoop/json/SubmissionBean.java: Loading...
  4. common/src/main/java/org/apache/sqoop/json/util/FormSerialization.java: Loading...
  5. common/src/main/java/org/apache/sqoop/model/MAccountableEntity.java: Loading...
  6. common/src/test/java/org/apache/sqoop/json/TestConnectionBean.java: Loading...
  7. common/src/test/java/org/apache/sqoop/json/TestSubmissionBean.java: Loading...
  8. common/src/test/java/org/apache/sqoop/model/TestMAccountableEntity.java: Loading...
  9. core/src/main/java/org/apache/sqoop/framework/JobManager.java: Loading...
  10. core/src/main/java/org/apache/sqoop/request/HttpEventContext.java: Loading...
  11. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java: Loading...
  12. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java: Loading...
  13. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java: Loading...
  14. repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java: Loading...
  15. server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java: Loading...
  16. server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java: Loading...
  17. server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java: Loading...
  18. shell/src/main/java/org/apache/sqoop/shell/ShowConnectionFunction.java: Loading...
  19. shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java: Loading...
  20. shell/src/main/java/org/apache/sqoop/shell/core/Constants.java: Loading...
  21. shell/src/main/java/org/apache/sqoop/shell/utils/SubmissionDisplayer.java: Loading...
  22. shell/src/main/resources/shell-resource.properties: Loading...
common/src/main/java/org/apache/sqoop/json/ConnectionBean.java
Revision a014ddd New Change
[20] 101 lines
[+20] [+] public JSONObject extract(boolean skipSensitive) {
102
    for(MConnection connection : connections) {
102
    for(MConnection connection : connections) {
103
      JSONObject object = new JSONObject();
103
      JSONObject object = new JSONObject();
104

    
   
104

   
105
      object.put(ID, connection.getPersistenceId());
105
      object.put(ID, connection.getPersistenceId());
106
      object.put(NAME, connection.getName());
106
      object.put(NAME, connection.getName());
107
      object.put(CREATED, connection.getCreationDate().getTime());

   
108
      object.put(UPDATED, connection.getLastUpdateDate().getTime());

   
109
      object.put(ENABLED, connection.getEnabled());
107
      object.put(ENABLED, connection.getEnabled());

    
   
108
      object.put(CREATION_USER, connection.getCreationUser());

    
   
109
      object.put(CREATION_DATE, connection.getCreationDate().getTime());

    
   
110
      object.put(UPDATE_USER, connection.getLastUpdateUser());

    
   
111
      object.put(UPDATE_DATE, connection.getLastUpdateDate().getTime());
110
      object.put(CONNECTOR_ID, connection.getConnectorId());
112
      object.put(CONNECTOR_ID, connection.getConnectorId());
111
      object.put(CONNECTOR_PART,
113
      object.put(CONNECTOR_PART,
112
        extractForms(connection.getConnectorPart().getForms(), skipSensitive));
114
        extractForms(connection.getConnectorPart().getForms(), skipSensitive));
113
      object.put(FRAMEWORK_PART,
115
      object.put(FRAMEWORK_PART,
114
        extractForms(connection.getFrameworkPart().getForms(), skipSensitive));
116
        extractForms(connection.getFrameworkPart().getForms(), skipSensitive));
[+20] [20] 41 lines
[+20] [+] public void restore(JSONObject jsonObject) {
156
        new MConnectionForms(connectorForms),
158
        new MConnectionForms(connectorForms),
157
        new MConnectionForms(frameworkForms));
159
        new MConnectionForms(frameworkForms));
158

    
   
160

   
159
      connection.setPersistenceId((Long) object.get(ID));
161
      connection.setPersistenceId((Long) object.get(ID));
160
      connection.setName((String) object.get(NAME));
162
      connection.setName((String) object.get(NAME));
161
      connection.setCreationDate(new Date((Long) object.get(CREATED)));

   
162
      connection.setLastUpdateDate(new Date((Long) object.get(UPDATED)));

   
163
      connection.setEnabled((Boolean) object.get(ENABLED));
163
      connection.setEnabled((Boolean) object.get(ENABLED));

    
   
164
      connection.setCreationUser((String) object.get(CREATION_USER));

    
   
165
      connection.setCreationDate(new Date((Long) object.get(CREATION_DATE)));

    
   
166
      connection.setLastUpdateUser((String) object.get(UPDATE_USER));

    
   
167
      connection.setLastUpdateDate(new Date((Long) object.get(UPDATE_DATE)));
164

    
   
168

   
165
      connections.add(connection);
169
      connections.add(connection);
166
    }
170
    }
167

    
   
171

   
168
    if(jsonObject.containsKey(CONNECTOR_RESOURCES)) {
172
    if(jsonObject.containsKey(CONNECTOR_RESOURCES)) {
[+20] [20] 13 lines
common/src/main/java/org/apache/sqoop/json/JobBean.java
Revision 4685797 New Change
 
common/src/main/java/org/apache/sqoop/json/SubmissionBean.java
Revision 79490f8 New Change
 
common/src/main/java/org/apache/sqoop/json/util/FormSerialization.java
Revision 3daf8d2 New Change
 
common/src/main/java/org/apache/sqoop/model/MAccountableEntity.java
Revision 5524983 New Change
 
common/src/test/java/org/apache/sqoop/json/TestConnectionBean.java
Revision 2f2b974 New Change
 
common/src/test/java/org/apache/sqoop/json/TestSubmissionBean.java
Revision 3b56171 New Change
 
common/src/test/java/org/apache/sqoop/model/TestMAccountableEntity.java
Revision bf103e4 New Change
 
core/src/main/java/org/apache/sqoop/framework/JobManager.java
Revision d0a087d New Change
 
core/src/main/java/org/apache/sqoop/request/HttpEventContext.java
New File
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
Revision f025ee9 New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java
Revision 49bf607 New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
Revision b08f7ab New Change
 
repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
Revision eac87b8 New Change
 
server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java
Revision 875729f New Change
 
server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
Revision 59a4511 New Change
 
server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java
Revision 6d9777a New Change
 
shell/src/main/java/org/apache/sqoop/shell/ShowConnectionFunction.java
Revision b7204ff New Change
 
shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java
Revision fc6f416 New Change
 
shell/src/main/java/org/apache/sqoop/shell/core/Constants.java
Revision 0e33d42 New Change
 
shell/src/main/java/org/apache/sqoop/shell/utils/SubmissionDisplayer.java
Revision 1f61fb2 New Change
 
shell/src/main/resources/shell-resource.properties
Revision 1a8f963 New Change
 
  1. common/src/main/java/org/apache/sqoop/json/ConnectionBean.java: Loading...
  2. common/src/main/java/org/apache/sqoop/json/JobBean.java: Loading...
  3. common/src/main/java/org/apache/sqoop/json/SubmissionBean.java: Loading...
  4. common/src/main/java/org/apache/sqoop/json/util/FormSerialization.java: Loading...
  5. common/src/main/java/org/apache/sqoop/model/MAccountableEntity.java: Loading...
  6. common/src/test/java/org/apache/sqoop/json/TestConnectionBean.java: Loading...
  7. common/src/test/java/org/apache/sqoop/json/TestSubmissionBean.java: Loading...
  8. common/src/test/java/org/apache/sqoop/model/TestMAccountableEntity.java: Loading...
  9. core/src/main/java/org/apache/sqoop/framework/JobManager.java: Loading...
  10. core/src/main/java/org/apache/sqoop/request/HttpEventContext.java: Loading...
  11. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java: Loading...
  12. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java: Loading...
  13. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java: Loading...
  14. repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java: Loading...
  15. server/src/main/java/org/apache/sqoop/handler/ConnectionRequestHandler.java: Loading...
  16. server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java: Loading...
  17. server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java: Loading...
  18. shell/src/main/java/org/apache/sqoop/shell/ShowConnectionFunction.java: Loading...
  19. shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java: Loading...
  20. shell/src/main/java/org/apache/sqoop/shell/core/Constants.java: Loading...
  21. shell/src/main/java/org/apache/sqoop/shell/utils/SubmissionDisplayer.java: Loading...
  22. shell/src/main/resources/shell-resource.properties: Loading...