Examples of MSubmission


Examples of org.apache.sqoop.model.MSubmission

    assertNotNull(targets.get(1));
    assertEquals(SubmissionStatus.BOOTING, targets.get(1).getStatus());
  }

  public void testTransferExternalId() {
    MSubmission source = new MSubmission();
    source.setExternalId("Job-x");

    MSubmission target = transfer(source);
    assertEquals("Job-x", target.getExternalId());

    List<MSubmission> sources = new ArrayList<MSubmission>();
    MSubmission sourcex = new MSubmission();
    sourcex.setExternalId("Job-y");
    sources.add(sourcex);
    MSubmission sourcey = new MSubmission();
    sourcey.setExternalId("Job-z");
    sources.add(sourcey);

    List<MSubmission> targets = transfer(sources);
    assertNotNull(targets.get(0));
    assertEquals("Job-y", targets.get(0).getExternalId());
View Full Code Here

Examples of org.apache.sqoop.model.MSubmission

    assertNotNull(targets.get(1));
    assertEquals("Job-z", targets.get(1).getExternalId());
  }

  public void testTransferExternalLink() {
    MSubmission source = new MSubmission();
    source.setExternalLink("http://");

    MSubmission target = transfer(source);
    assertEquals("http://", target.getExternalLink());

    List<MSubmission> sources = new ArrayList<MSubmission>();
    MSubmission sourcex = new MSubmission();
    sourcex.setExternalLink("http://localhost:80");
    sources.add(sourcex);
    MSubmission sourcey = new MSubmission();
    sourcey.setExternalLink("http://localhost:8080");
    sources.add(sourcey);

    List<MSubmission> targets = transfer(sources);
    assertNotNull(targets.get(0));
    assertEquals("http://localhost:80", targets.get(0).getExternalLink());
View Full Code Here

Examples of org.apache.sqoop.model.MSubmission

    assertNotNull(targets.get(1));
    assertEquals("http://localhost:8080", targets.get(1).getExternalLink());
  }

  public void testTransferException() {
    MSubmission source = new MSubmission();
    source.setExceptionInfo("EndOfTheWorldException");

    MSubmission target = transfer(source);
    assertEquals("EndOfTheWorldException", target.getExceptionInfo());

    List<MSubmission> sources = new ArrayList<MSubmission>();
    MSubmission sourcex = new MSubmission();
    sourcex.setExceptionInfo("TheNewEraException");
    sources.add(sourcex);
    MSubmission sourcey = new MSubmission();
    sourcey.setExceptionInfo("EndOfTheWorldAgainException");
    sources.add(sourcey);

    List<MSubmission> targets = transfer(sources);
    assertNotNull(targets.get(0));
    assertEquals("TheNewEraException", targets.get(0).getExceptionInfo());
View Full Code Here

Examples of org.apache.sqoop.model.MSubmission

    assertNotNull(targets.get(1));
    assertEquals("EndOfTheWorldAgainException", targets.get(1).getExceptionInfo());
  }

  public void testTransferExceptionTrace() {
    MSubmission source = new MSubmission();
    source.setExceptionStackTrace("void.java(3): line infinity");

    MSubmission target = transfer(source);
    assertEquals("void.java(3): line infinity", target.getExceptionStackTrace());

    List<MSubmission> sources = new ArrayList<MSubmission>();
    MSubmission sourcex = new MSubmission();
    sourcex.setExceptionStackTrace("void.java(4): segment fault in Java");
    sources.add(sourcex);
    MSubmission sourcey = new MSubmission();
    sourcey.setExceptionStackTrace("void.java(5): core dumps in Java");
    sources.add(sourcey);

    List<MSubmission> targets = transfer(sources);
    assertNotNull(targets.get(0));
    assertEquals("void.java(4): segment fault in Java", targets.get(0).getExceptionStackTrace());
View Full Code Here

Examples of org.apache.sqoop.model.MSubmission

    assertNotNull(targets.get(1));
    assertEquals("void.java(5): core dumps in Java", targets.get(1).getExceptionStackTrace());
  }

  public void testTransferProgress() {
    MSubmission source = new MSubmission();
    source.setProgress(25.0);

    MSubmission target = transfer(source);
    assertEquals(25.0, target.getProgress());

    List<MSubmission> sources = new ArrayList<MSubmission>();
    MSubmission sourcex = new MSubmission();
    sourcex.setProgress(50.0);
    sources.add(sourcex);
    MSubmission sourcey = new MSubmission();
    sourcey.setProgress(99.9);
    sources.add(sourcey);

    List<MSubmission> targets = transfer(sources);
    assertNotNull(targets.get(0));
    assertEquals(50.0, targets.get(0).getProgress());
View Full Code Here

Examples of org.apache.sqoop.model.MSubmission

    counters.addCounterGroup(new CounterGroup("B")
      .addCounter(new Counter("XX", 11))
      .addCounter(new Counter("YY", 22))
    );

    MSubmission source = new MSubmission();
    source.setCounters(counters);

    Counters target;
    CounterGroup group;
    Counter counter;

    target = transfer(source).getCounters();
    group = target.getCounterGroup("A");
    assertNotNull(group);
    counter = group.getCounter("X");
    assertNotNull(counter);
    assertEquals(1, counter.getValue());
    counter = group.getCounter("Y");
    assertNotNull(counter);
    assertEquals(2, counter.getValue());

    target = transfer(source).getCounters();
    group = target.getCounterGroup("B");
    assertNotNull(group);
    counter = group.getCounter("XX");
    assertNotNull(counter);
    assertEquals(11, counter.getValue());
    counter = group.getCounter("YY");
    assertNotNull(counter);
    assertEquals(22, counter.getValue());

    Counters countersx = new Counters();
    countersx.addCounterGroup(new CounterGroup("C")
      .addCounter(new Counter("XXX", 111))
      .addCounter(new Counter("YYY", 222))
    );
    countersx.addCounterGroup(new CounterGroup("D")
      .addCounter(new Counter("XXXX", 1111))
      .addCounter(new Counter("YYYY", 2222))
    );

    Counters countersy = new Counters();
    countersy.addCounterGroup(new CounterGroup("E")
      .addCounter(new Counter("XXXXX", 11111))
      .addCounter(new Counter("YYYYY", 22222))
    );
    countersy.addCounterGroup(new CounterGroup("F")
      .addCounter(new Counter("XXXXXX", 111111))
      .addCounter(new Counter("YYYYYY", 222222))
    );

    List<MSubmission> sources = new ArrayList<MSubmission>();
    MSubmission sourcex = new MSubmission();
    sourcex.setCounters(countersx);
    sources.add(sourcex);
    MSubmission sourcey = new MSubmission();
    sourcey.setCounters(countersy);
    sources.add(sourcey);

    List<MSubmission> targets = transfer(sources);
    assertNotNull(targets.get(0));
    target = targets.get(0).getCounters();
View Full Code Here

Examples of org.apache.sqoop.model.MSubmission

    assertNotNull(counter);
    assertEquals(222222, counter.getValue());
  }

  public void testTransferConnectorSchema() {
    MSubmission source = new MSubmission();
    source.setConnectorSchema(getSchema());

    Schema target = transfer(source).getConnectorSchema();
    assertNotNull(target);
    assertEquals(getSchema(), target);
  }
View Full Code Here

Examples of org.apache.sqoop.model.MSubmission

    assertNotNull(target);
    assertEquals(getSchema(), target);
  }

  public void testTransferHioSchema() {
    MSubmission source = new MSubmission();
    source.setHioSchema(getSchema());

    Schema target = transfer(source).getHioSchema();
    assertNotNull(target);
    assertEquals(getSchema(), target);
  }
View Full Code Here

Examples of org.apache.sqoop.model.MSubmission

    return null;
  }

  private JsonBean submissionStop(long jid) {
    MSubmission submission = FrameworkManager.stop(jid);
    return new SubmissionBean(submission);
  }
View Full Code Here

Examples of org.apache.sqoop.model.MSubmission

    MSubmission submission = FrameworkManager.stop(jid);
    return new SubmissionBean(submission);
  }

  private JsonBean submissionSubmit(long jid) {
    MSubmission submission = FrameworkManager.submit(jid);
    return new SubmissionBean(submission);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.