Review Board 1.7.22


SQOOP-1254 Sqoop2: Tool: Upgrade tool

Review Request #16113 - Created Dec. 8, 2013 and updated

Jarek Cecho
SQOOP-1254
Reviewers
Sqoop
sqoop-sqoop2
I've provided the upgrade tool.
I've took a 1.99.2 release, created couple of Connections and Jobs and tried the upgrade tool against HEAD of sqoop2 branch with this patch applied (and SQOOP-1258). Everything seems to be working as expected.
core/src/main/java/org/apache/sqoop/connector/ConnectorManager.java
Revision fa91d02ce084617dca327f3ec6528c143f37dc73 New Change
[20] 139 lines
[+20] [+] public SqoopConnector getConnector(long connectorId) {
140
  public SqoopConnector getConnector(String uniqueName) {
140
  public SqoopConnector getConnector(String uniqueName) {
141
    return handlerMap.get(uniqueName).getConnector();
141
    return handlerMap.get(uniqueName).getConnector();
142
  }
142
  }
143

    
   
143

   
144
  public synchronized void initialize() {
144
  public synchronized void initialize() {

    
   
145
    initialize(SqoopConfiguration.getInstance().getContext().getBoolean(ConfigurationConstants.CONNECTOR_AUTO_UPGRADE, DEFAULT_AUTO_UPGRADE));

    
   
146
  }

    
   
147

   

    
   
148
  public synchronized void initialize(boolean autoUpgrade) {
145
    if (LOG.isTraceEnabled()) {
149
    if (LOG.isTraceEnabled()) {
146
      LOG.trace("Begin connector manager initialization");
150
      LOG.trace("Begin connector manager initialization");
147
    }
151
    }
148

    
   
152

   
149
    List<URL> connectorConfigs = new ArrayList<URL>();
153
    List<URL> connectorConfigs = new ArrayList<URL>();
[+20] [20] 38 lines
[+20] public SqoopConnector getConnector(String uniqueName) {
188
      }
192
      }
189
    } catch (IOException ex) {
193
    } catch (IOException ex) {
190
      throw new SqoopException(ConnectorError.CONN_0001, ex);
194
      throw new SqoopException(ConnectorError.CONN_0001, ex);
191
    }
195
    }
192

    
   
196

   
193
    boolean autoUpgrade = SqoopConfiguration.getInstance().getContext().getBoolean(

   
194
        ConfigurationConstants.CONNECTOR_AUTO_UPGRADE, DEFAULT_AUTO_UPGRADE);

   
195
    registerConnectors(autoUpgrade);
197
    registerConnectors(autoUpgrade);
196

    
   
198

   
197
    SqoopConfiguration.getInstance().getProvider().registerListener(new CoreConfigurationListener(this));
199
    SqoopConfiguration.getInstance().getProvider().registerListener(new CoreConfigurationListener(this));
198

    
   
200

   
199
    if (LOG.isInfoEnabled()) {
201
    if (LOG.isInfoEnabled()) {
[+20] [20] 56 lines
core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java
Revision 424285c8ea907e50aabdc1a711bcd33f46a13ea5 New Change
 
core/src/main/java/org/apache/sqoop/repository/RepositoryManager.java
Revision 25d5d9d03532c677b524512aa0d175c969805b10 New Change
 
tools/src/main/java/org/apache/sqoop/tools/ConfiguredTool.java
New File
 
tools/src/main/java/org/apache/sqoop/tools/tool/BuiltinTools.java
Revision 0045511feb045b85363e97484204acc0f0baeb35 New Change
 
tools/src/main/java/org/apache/sqoop/tools/tool/UpgradeTool.java
New File
 
  1. core/src/main/java/org/apache/sqoop/connector/ConnectorManager.java: Loading...
  2. core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java: Loading...
  3. core/src/main/java/org/apache/sqoop/repository/RepositoryManager.java: Loading...
  4. tools/src/main/java/org/apache/sqoop/tools/ConfiguredTool.java: Loading...
  5. tools/src/main/java/org/apache/sqoop/tools/tool/BuiltinTools.java: Loading...
  6. tools/src/main/java/org/apache/sqoop/tools/tool/UpgradeTool.java: Loading...