Examples of ProgressReport


Examples of com.cloudera.iterativereduce.yarn.avro.generated.ProgressReport

    return nextUpdate;
  }

  private ProgressReport createProgressReport() {
    if (progressReport == null) {
      progressReport = new ProgressReport();
      progressReport.setWorkerId(workerId);
    }

    // Create a new report
    Map<CharSequence, CharSequence> report = new HashMap<CharSequence, CharSequence>();
View Full Code Here

Examples of com.cloudera.iterativereduce.yarn.avro.generated.ProgressReport

   
    // Progress
    HashMap<CharSequence, CharSequence> counters = new HashMap<CharSequence, CharSequence>();
    counters.put("counter1", "1");
   
    ProgressReport progress = ProgressReport.newBuilder()
        .setWorkerId(workerOne)
        .setReport(counters)
        .build();
   
    assertEquals(true, masterPrc.progress(workerOne, progress));
View Full Code Here

Examples of de.idos.updates.store.ProgressReport

    verify(versionStore, atLeastOnce()).reportAllProgressTo(Mockito.isA(ProgressReport.class));
  }

  @Test
  public void reportsToAnyNumberOfListeners() throws Exception {
    ProgressReport firstReport = mock(ProgressReport.class);
    ProgressReport secondReport = mock(ProgressReport.class);
    updateSystem.reportAllProgressTo(firstReport);
    updateSystem.reportAllProgressTo(secondReport);
    Updater updater = updateSystem.checkForUpdates();
    updater.runCheck();
    verify(firstReport).lookingUpLatestAvailableVersion();
View Full Code Here

Examples of de.idos.updates.store.ProgressReport

    verify(secondReport).lookingUpLatestAvailableVersion();
  }

  @Test
  public void doesNotReportToRemovedListener() throws Exception {
    ProgressReport firstReport = mock(ProgressReport.class);
    updateSystem.reportAllProgressTo(firstReport);
    updateSystem.stopReportingTo(firstReport);
    updateSystem.checkForUpdates();
    verifyZeroInteractions(firstReport);
  }
View Full Code Here

Examples of de.idos.updates.store.ProgressReport

                             VersionDiscovery availableDiscovery, VersionTransfer transfer) {
    this.availableDiscovery = availableDiscovery;
    this.installedDiscovery = installedDiscovery;
    this.transfer = transfer;
    this.receptacle = receptacle;
    ProgressReport announcingReport = progressAnnouncer.announce();
    installedDiscovery.reportAllProgressTo(announcingReport);
    availableDiscovery.reportAllProgressTo(announcingReport);
    transfer.reportAllProgressTo(announcingReport);
    receptacle.reportAllProgressTo(announcingReport);
  }
View Full Code Here

Examples of de.idos.updates.store.ProgressReport

  }

  @SuppressWarnings("unchecked")
  @Test
  public void createsDefaultInstallerForConvenience() throws Exception {
    ProgressReport report = mock(ProgressReport.class);
    InstallationStrategy strategy = mock(InstallationStrategy.class);
    ThreadedInstaller.PrepareInstallation(strategy, report).install(version);
    Thread.sleep(10);
    verify(report).startingInstallationOf(version);
  }
View Full Code Here

Examples of de.idos.updates.store.ProgressReport

public class AnnouncerTest {

    @Test
    public void allowsAdditionOfListenersAfterAnnouncementStarted() throws Exception {
        ProgressReport report = mock(ProgressReport.class);
        Announcer<ProgressReport> announcer = Announcer.to(ProgressReport.class);
        ProgressReport proxyReport = announcer.announce();
        announcer.addListener(report);
        proxyReport.updateAlreadyInProgress();
        verify(report).updateAlreadyInProgress();
    }
View Full Code Here

Examples of de.idos.updates.store.ProgressReport

    NumericVersion version = new NumericVersion(4, 2, 1);
    CountDownLatch latch = new CountDownLatch(1);
    Installation installation = new SlowInstallation(new NullInstallation(), latch);
    when(store.beginInstallation(version)).thenReturn(installation);
    FilesystemRepository repository = new FilesystemRepository(folder.getRoot());
    ProgressReport report = mock(ProgressReport.class);
    repository.reportAllProgressTo(report);
    repository.transferVersionTo(version, store);
    verify(report, never()).finishedInstallation();
  }
View Full Code Here

Examples of de.idos.updates.store.ProgressReport

    assertThat(discovery.getLatestVersion(), is(original));
  }

  @Test
  public void forwardsReportingToWrapped() throws Exception {
    ProgressReport report = mock(ProgressReport.class);
    discovery.reportAllProgressTo(report);
    verify(wrapped).reportAllProgressTo(report);
  }
View Full Code Here

Examples of de.idos.updates.store.ProgressReport

        assertThat(store.getLatestVersion(), is(version));
    }

    @Test
    public void forwardsReportingToWrappedStore() throws Exception {
        ProgressReport report = mock(ProgressReport.class);
        store.reportAllProgressTo(report);
        verify(wrapped).reportAllProgressTo(report);
    }
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.