Review Board 1.7.22


SQOOP-739 Connectors in Sqoop 2 should be versionable

Review Request #8347 - Created Dec. 5, 2012 and submitted

Jarek Cecho
SQOOP-739
Reviewers
Sqoop
sqoop-sqoop2
I've extended connector interface to require a string based version.
Unit tests seems to be passing and I've tested it on real cluster.
client/src/main/java/org/apache/sqoop/client/shell/ShowConnectorFunction.java
Revision ac2683c New Change
[20] 79 lines
[+20] [+] public Object execute(List<String> args) {
80
    ConnectorBean connectorBean = readConnector(cid);
80
    ConnectorBean connectorBean = readConnector(cid);
81
    List<MConnector> connectors = connectorBean.getConnectors();
81
    List<MConnector> connectors = connectorBean.getConnectors();
82
    Map<Long, ResourceBundle> bundles = connectorBean.getResourceBundles();
82
    Map<Long, ResourceBundle> bundles = connectorBean.getResourceBundles();
83

    
   
83

   
84
    io.out.println("@|bold " + connectors.size() + " connector(s) to show: |@");
84
    io.out.println("@|bold " + connectors.size() + " connector(s) to show: |@");
85
    for (int i = 0; i < connectors.size(); i++) {
85
    for (MConnector connector : connectors) {
86
      MConnector connector = connectors.get(i);

   
87

    
   

   
88
      io.out.print("Connector with id ");
86
      io.out.print("Connector with id ");
89
      io.out.print(connector.getPersistenceId());
87
      io.out.print(connector.getPersistenceId());
90
      io.out.println(":");
88
      io.out.println(":");
91

    
   
89

   
92
      io.out.print("  Name: ");
90
      io.out.print("  Name: ");
93
      io.out.println(connector.getUniqueName());
91
      io.out.println(connector.getUniqueName());
94
      io.out.print("  Class: ");
92
      io.out.print("  Class: ");
95
      io.out.println(connector.getClassName());
93
      io.out.println(connector.getClassName());

    
   
94
      io.out.print("  Version: ");

    
   
95
      io.out.println(connector.getVersion());
96

    
   
96

   
97
      displayFormMetadataDetails(io, connector, bundles.get(connector.getPersistenceId()));
97
      displayFormMetadataDetails(io, connector, bundles.get(connector.getPersistenceId()));
98

    
   
98

   
99
    }
99
    }
100

    
   
100

   
101
    io.out.println();
101
    io.out.println();
102
  }
102
  }
103
}
103
}
common/src/main/java/org/apache/sqoop/json/ConnectorBean.java
Revision 82d865c New Change
 
common/src/main/java/org/apache/sqoop/json/util/FormSerialization.java
Revision 732293a New Change
 
common/src/main/java/org/apache/sqoop/model/MConnector.java
Revision 5b3b884 New Change
 
common/src/test/java/org/apache/sqoop/json/TestUtil.java
Revision 791e999 New Change
 
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
Revision 26daaf7 New Change
 
core/src/main/java/org/apache/sqoop/connector/ConnectorHandler.java
Revision 00315ea New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
Revision b9ba746 New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java
Revision 1d1fc09 New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
Revision f836500 New Change
 
repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
Revision 0efa19d New Change
 
spi/src/main/java/org/apache/sqoop/connector/spi/SqoopConnector.java
Revision 52d0852 New Change
 
  1. client/src/main/java/org/apache/sqoop/client/shell/ShowConnectorFunction.java: Loading...
  2. common/src/main/java/org/apache/sqoop/json/ConnectorBean.java: Loading...
  3. common/src/main/java/org/apache/sqoop/json/util/FormSerialization.java: Loading...
  4. common/src/main/java/org/apache/sqoop/model/MConnector.java: Loading...
  5. common/src/test/java/org/apache/sqoop/json/TestUtil.java: Loading...
  6. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java: Loading...
  7. core/src/main/java/org/apache/sqoop/connector/ConnectorHandler.java: Loading...
  8. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java: Loading...
  9. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaConstants.java: Loading...
  10. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java: Loading...
  11. repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java: Loading...
  12. spi/src/main/java/org/apache/sqoop/connector/spi/SqoopConnector.java: Loading...