Review Board 1.7.22


Fix for SQOOP-1017

Review Request #11982 - Created June 19, 2013 and updated

Venkat Ranganathan
Reviewers
Sqoop
sqoop-sqoop2
This addresses SQOOP-1017

I have split FrameworkManager into FrameworkManager and JobManager - one to handle framework related activities and another to handle job management activities
Ran all tests and all pass.   No new tests added as it was refactoring existing functionality
core/src/main/java/org/apache/sqoop/core/SqoopServer.java
Revision 84896d6 New Change
[20] 17 lines
[+20]
18
package org.apache.sqoop.core;
18
package org.apache.sqoop.core;
19

    
   
19

   
20
import org.apache.log4j.Logger;
20
import org.apache.log4j.Logger;
21
import org.apache.sqoop.connector.ConnectorManager;
21
import org.apache.sqoop.connector.ConnectorManager;
22
import org.apache.sqoop.framework.FrameworkManager;
22
import org.apache.sqoop.framework.FrameworkManager;

    
   
23
import org.apache.sqoop.framework.JobManager;
23
import org.apache.sqoop.repository.RepositoryManager;
24
import org.apache.sqoop.repository.RepositoryManager;
24

    
   
25

   
25
/**
26
/**
26
 * Entry point for initializing and destroying Sqoop server
27
 * Entry point for initializing and destroying Sqoop server
27
 */
28
 */
28
public class SqoopServer {
29
public class SqoopServer {
29

    
   
30

   
30
  private static final Logger LOG = Logger.getLogger(SqoopServer.class);
31
  private static final Logger LOG = Logger.getLogger(SqoopServer.class);
31

    
   
32

   
32
  public static void destroy() {
33
  public static void destroy() {
33
    LOG.info("Shutting down Sqoop server");
34
    LOG.info("Shutting down Sqoop server");

    
   
35
    JobManager.getInstance().destroy();
34
    FrameworkManager.getInstance().destroy();
36
    FrameworkManager.getInstance().destroy();
35
    ConnectorManager.getInstance().destroy();
37
    ConnectorManager.getInstance().destroy();
36
    RepositoryManager.getInstance().destroy();
38
    RepositoryManager.getInstance().destroy();
37
    SqoopConfiguration.getInstance().destroy();
39
    SqoopConfiguration.getInstance().destroy();
38
    LOG.info("Sqoop server has been correctly terminated");
40
    LOG.info("Sqoop server has been correctly terminated");
[+20] [20] 4 lines
[+20] [+] public static void initialize() {
43
      LOG.info("Booting up Sqoop server");
45
      LOG.info("Booting up Sqoop server");
44
      SqoopConfiguration.getInstance().initialize();
46
      SqoopConfiguration.getInstance().initialize();
45
      RepositoryManager.getInstance().initialize();
47
      RepositoryManager.getInstance().initialize();
46
      ConnectorManager.getInstance().initialize();
48
      ConnectorManager.getInstance().initialize();
47
      FrameworkManager.getInstance().initialize();
49
      FrameworkManager.getInstance().initialize();

    
   
50
      JobManager.getInstance().initialize();
48
      LOG.info("Sqoop server has successfully boot up");
51
      LOG.info("Sqoop server has successfully boot up");
49
    } catch (Exception ex) {
52
    } catch (Exception ex) {
50
      LOG.error("Server startup failure", ex);
53
      LOG.error("Server startup failure", ex);
51
      throw new RuntimeException("Failure in server initialization", ex);
54
      throw new RuntimeException("Failure in server initialization", ex);
52
    }
55
    }
53
  }
56
  }
54
}
57
}
core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java
Revision 145a2c1 New Change
 
core/src/main/java/org/apache/sqoop/framework/JobManager.java
New File
 
server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java
Revision de9a24b New Change
 
  1. core/src/main/java/org/apache/sqoop/core/SqoopServer.java: Loading...
  2. core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java: Loading...
  3. core/src/main/java/org/apache/sqoop/framework/JobManager.java: Loading...
  4. server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java: Loading...