Review Board 1.7.22


Sqoop2: Client side caching input forms

Review Request #11368 - Created May 24, 2013 and updated

Vasanth kumar RJ
SQOOP-1019
Reviewers
Sqoop
sqoop-sqoop2
Problem is when we create a connection or job using sqoop2 client, first time connector and framework input forms are empty. Again create the same, input forms are filled with values. 

After introducing the cloning of model classes, solves this problem. So on second time creation, form input values are empty.
Done

Diff revision 1 (Latest)

  1. client/src/main/java/org/apache/sqoop/client/SqoopClient.java: Loading...
client/src/main/java/org/apache/sqoop/client/SqoopClient.java
Revision 3253bd5 New Change
[20] 132 lines
[+20] [+] public void clearCache() {
133
   * @param cid Connector id.
133
   * @param cid Connector id.
134
   * @return
134
   * @return
135
   */
135
   */
136
  public MConnector getConnector(long cid) {
136
  public MConnector getConnector(long cid) {
137
    if(connectors.containsKey(cid)) {
137
    if(connectors.containsKey(cid)) {
138
      return connectors.get(cid);
138
      return connectors.get(cid).clone(false);
139
    }
139
    }
140

    
   
140

   
141
    retrieveConnector(cid);
141
    retrieveConnector(cid);
142
    return connectors.get(cid);
142
    return connectors.get(cid).clone(false);
143
  }
143
  }
144

    
   
144

   
145
  /**
145
  /**
146
   * Retrieve connector structure from server and cache it.
146
   * Retrieve connector structure from server and cache it.
147
   *
147
   *
[+20] [20] 45 lines
[+20] [+] public ResourceBundle getResourceBundle(long cid) {
193
   *
193
   *
194
   * @return
194
   * @return
195
   */
195
   */
196
  public MFramework getFramework() {
196
  public MFramework getFramework() {
197
    if(framework != null) {
197
    if(framework != null) {
198
      return framework;
198
      return framework.clone(false);
199
    }
199
    }
200

    
   
200

   
201
    retrieveFramework();
201
    retrieveFramework();
202
    return framework;
202
    return framework.clone(false);
203

    
   
203

   
204
  }
204
  }
205

    
   
205

   
206
  /**
206
  /**
207
   * Retrieve framework structure and cache it.
207
   * Retrieve framework structure and cache it.
[+20] [20] 263 lines
  1. client/src/main/java/org/apache/sqoop/client/SqoopClient.java: Loading...