Package org.apache.sqoop.model

Examples of org.apache.sqoop.model.MJobForms


      for (MJob job : jobs) {
        // Make a new copy of the forms from the connector,
        // else the values will get set in the forms in the connector for
        // each connection.
        List<MForm> forms = newConnector.getJobForms(job.getType()).clone(false).getForms();
        MJobForms newJobForms = new MJobForms(job.getType(), forms);
        upgrader.upgrade(job.getConnectorPart(), newJobForms);
        MJob newJob = new MJob(connectorID, job.getConnectionId(),
          job.getType(), newJobForms, job.getFrameworkPart());
        newJob.setPersistenceId(job.getPersistenceId());
View Full Code Here


      for (MJob job : jobs) {
        // Make a new copy of the forms from the framework,
        // else the values will get set in the forms in the connector for
        // each connection.
        List<MForm> forms = framework.getJobForms(job.getType()).clone(false).getForms();
        MJobForms newJobForms = new MJobForms(job.getType(), forms);
        upgrader.upgrade(job.getFrameworkPart(), newJobForms);
        MJob newJob = new MJob(job.getConnectorId(), job.getConnectionId(),
          job.getType(), job.getConnectorPart(), newJobForms);
        newJob.setPersistenceId(job.getPersistenceId());
View Full Code Here

    // Job object
    MJob job = jobs.get(0);

    // Verify that user is not trying to spoof us
    MJobForms connectorForms
      = ConnectorManager.getInstance().getConnectorMetadata(job.getConnectorId())
      .getJobForms(job.getType());
    MJobForms frameworkForms = FrameworkManager.getInstance().getFramework()
      .getJobForms(job.getType());

    if(!connectorForms.equals(job.getConnectorPart())
      || !frameworkForms.equals(job.getFrameworkPart())) {
      throw new SqoopException(ServerError.SERVER_0003,
        "Detected incorrect form structure");
    }

    // Responsible connector for this session
View Full Code Here

    ((MStringInput)forms.get(1).getInputs().get(0)).setValue("Value15");
  }

  protected List<MJobForms> getJobForms() {
    List <MJobForms> jobForms = new LinkedList<MJobForms>();
    jobForms.add(new MJobForms(MJob.Type.IMPORT, getForms()));
    jobForms.add(new MJobForms(MJob.Type.EXPORT, getForms()));
    return jobForms;
  }
View Full Code Here

    fail("Should throw out an exception with message: " + exception.getMessage());
  }

  private MConnector connector(long id, String version) {
    List<MJobForms> jobForms = new LinkedList<MJobForms>();
    jobForms.add(new MJobForms(MJob.Type.IMPORT, FormUtils.toForms(ImportJobConfiguration.class)));

    MConnector connector = new MConnector("A" + id, "A" + id, version + id,
        new MConnectionForms(new LinkedList<MForm>()), jobForms);
    connector.setPersistenceId(id);
    return connector;
View Full Code Here

    return connector(id, "1.0");
  }

  private MFramework framework() {
    List<MJobForms> jobForms = new LinkedList<MJobForms>();
    jobForms.add(new MJobForms(MJob.Type.IMPORT, FormUtils.toForms(ImportJobConfiguration.class)));

    MFramework framework = new MFramework(new MConnectionForms(new LinkedList<MForm>()),
      jobForms, FrameworkManager.CURRENT_FRAMEWORK_VERSION);
    framework.setPersistenceId(1);
    return framework;
View Full Code Here

    connection.setPersistenceId(id);
    return connection;
  }

  private MJob job(long id, long cid, long xid) {
    MJob job = new MJob(cid, xid, Type.IMPORT, new MJobForms(Type.IMPORT, new LinkedList<MForm>()),
        new MJobForms(Type.IMPORT, new LinkedList<MForm>()));
    job.setPersistenceId(id);
    return job;
  }
View Full Code Here

          formConnectorFetchStmt, inputFetchStmt, 2);
        loadForms(frameworkConnForms, frameworkJobForms,
          formFrameworkFetchStmt, inputFetchStmt, 2);

        MJob job = new MJob(connectorId, connectionId, type,
          new MJobForms(type, connectorJobForms.get(type)),
          new MJobForms(type, frameworkJobForms.get(type)));

        job.setPersistenceId(id);
        job.setName(name);
        job.setCreationUser(createBy);
        job.setCreationDate(creationDate);
View Full Code Here

    for (Map.Entry<MJob.Type, List<MForm>> entry : l.entrySet()) {
      MJob.Type type = entry.getKey();
      List<MForm> forms = entry.getValue();

      ret.add(new MJobForms(type, forms));
    }

    return ret;
  }
View Full Code Here

      MJob job = new MJob(
        connectorId,
        connectionId,
        type,
        new MJobForms(type, connectorForms),
        new MJobForms(type, frameworkForms)
      );

      job.setPersistenceId((Long) object.get(ID));
      job.setName((String) object.get(NAME));
      job.setEnabled((Boolean) object.get(ENABLED));
View Full Code Here

TOP

Related Classes of org.apache.sqoop.model.MJobForms

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.