Package org.apache.sqoop.json

Examples of org.apache.sqoop.json.ConnectorBean


    ConsoleReader reader = new ConsoleReader();

    FrameworkBean frameworkBean = readFramework();
    ConnectionBean connectionBean = readConnection(connectionId);
    ConnectorBean connectorBean;

    MFramework framework = frameworkBean.getFramework();
    ResourceBundle frameworkBundle = frameworkBean.getResourceBundle();

    MConnection connection = connectionBean.getConnections().get(0);

    connectorBean = readConnector(String.valueOf(connection.getConnectorId()));
    MConnector connector = connectorBean.getConnectors().get(0);
    ResourceBundle connectorBundle = connectorBean.getResourceBundles().get(connector.getPersistenceId());

    MJob.Type jobType = MJob.Type.valueOf(type.toUpperCase());

    MJob job = new MJob(
      connector.getPersistenceId(),
View Full Code Here


   * Getting connectors one by one should not be equivalent to getting all connectors
   * at once as Client do not know how many connectors server have.
   */
  @Test
  public void testGetConnectorOneByOne() {
    ConnectorBean bean = connectorBean(connector(1), connector(2));
    when(requests.readConnector(null)).thenReturn(bean);
    when(requests.readConnector(1L)).thenReturn(bean);
    when(requests.readConnector(2L)).thenReturn(bean);

    client.getResourceBundle(1);
View Full Code Here

    for(MConnector connector : connectors) {
      connectorList.add(connector);
      bundles.put(connector.getPersistenceId(), null);
    }
    return new ConnectorBean(connectorList, bundles);
  }
View Full Code Here

      connectors.add(ConnectorManager.getInstance().getConnectorMetadata(id));
      bundles.put(id, ConnectorManager.getInstance().getResourceBundle(id, locale));
    }

    return new ConnectorBean(connectors, bundles);
  }
View Full Code Here

   * Retrieve connector structure from server and cache it.
   *
   * @param cid Connector id
   */
  private void retrieveConnector(long cid) {
    ConnectorBean request = requests.readConnector(cid);
    connectors.put(cid, request.getConnectors().get(0));
    bundles.put(cid, request.getResourceBundles().get(cid));
  }
View Full Code Here

  public Collection<MConnector> getConnectors() {
    if(allConnectors) {
      return connectors.values();
    }

    ConnectorBean bean = requests.readConnector(null);
    allConnectors = true;
    for(MConnector connector : bean.getConnectors()) {
      connectors.put(connector.getPersistenceId(), connector);
    }
    bundles = bean.getResourceBundles();

    return connectors.values();
  }
View Full Code Here

TOP

Related Classes of org.apache.sqoop.json.ConnectorBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.