Review Board 1.7.22


SQOOP-1022. Metadata upgrade fails with NPE getConnector method

Review Request #10875 - Created April 30, 2013 and updated

Hari Shreedharan
SQOOP-1022
Reviewers
Sqoop
sqoop-sqoop2
Introduce a new method to pull the connector from ConnectorManager

 
core/src/main/java/org/apache/sqoop/connector/ConnectorManager.java
Revision 298e322 New Change
[20] 126 lines
[+20] [+] public MConnector getConnectorMetadata(long connectorId) {
127
  public SqoopConnector getConnector(long connectorId) {
127
  public SqoopConnector getConnector(long connectorId) {
128
    ConnectorHandler handler = handlerMap.get(nameMap.get(connectorId));
128
    ConnectorHandler handler = handlerMap.get(nameMap.get(connectorId));
129
    return handler.getConnector();
129
    return handler.getConnector();
130
  }
130
  }
131

    
   
131

   

    
   
132
  public SqoopConnector getConnector(String uniqueName) {

    
   
133
    return handlerMap.get(uniqueName).getConnector();

    
   
134
  }

    
   
135

   
132
  public synchronized void initialize() {
136
  public synchronized void initialize() {
133
    if (LOG.isTraceEnabled()) {
137
    if (LOG.isTraceEnabled()) {
134
      LOG.trace("Begin connector manager initialization");
138
      LOG.trace("Begin connector manager initialization");
135
    }
139
    }
136

    
   
140

   
[+20] [20] 93 lines
core/src/main/java/org/apache/sqoop/repository/Repository.java
Revision 57c9be4 New Change
 
  1. core/src/main/java/org/apache/sqoop/connector/ConnectorManager.java: Loading...
  2. core/src/main/java/org/apache/sqoop/repository/Repository.java: Loading...