Examples of Snapshot


Examples of org.jclouds.cloudstack.domain.Snapshot

      for (String id : snapshotIds) {
         Set<Snapshot> found = client.getSnapshotClient().listSnapshots(ListSnapshotsOptions.Builder.id(id));
         assertNotNull(found);
         assertEquals(1, found.size());
         Snapshot snapshot = Iterables.getOnlyElement(found);
         assertEquals(id, snapshot.getId());
         checkSnapshot(snapshot);
      }
   }
View Full Code Here

Examples of org.jclouds.ec2.domain.Snapshot

      assertEquals(volume.getId(), expected.getId());
   }

   @Test(dependsOnMethods = "testCreateVolumeInAvailabilityZone")
   void testCreateSnapshotInRegion() {
      Snapshot snapshot = client.createSnapshotInRegion(defaultRegion, volumeId);
      Predicate<Snapshot> snapshotted = retry(new SnapshotCompleted(client), 600, 10, SECONDS);
      assert snapshotted.apply(snapshot);

      Snapshot result = Iterables.getOnlyElement(client.describeSnapshotsInRegion(snapshot.getRegion(),
            snapshotIds(snapshot.getId())));

      assertEquals(result.getProgress(), 100);
      this.snapshot = result;
   }
View Full Code Here

Examples of org.jclouds.googlecomputeengine.domain.Snapshot

              TIME_WAIT);
   }

   @Test(groups = "live", dependsOnMethods = "testCreateSnapshot")
   public void testGetSnapshot() {
      Snapshot snapshot = api().get(SNAPSHOT_NAME);

      assertEquals(snapshot.getName(), SNAPSHOT_NAME);
      assertSnapshotEquals(snapshot);
   }
View Full Code Here

Examples of org.jclouds.openstack.cinder.v1.domain.Snapshot

   public void testListSnapshots() {
      Set<? extends Snapshot> snapshots = snapshotApi.list().toSet();
      assertNotNull(snapshots);
      boolean foundIt = false;
      for (Snapshot snap : snapshots) {
         Snapshot details = snapshotApi.get(snap.getId());
         if (Objects.equal(snap.getVolumeId(), testVolume.getId())) {
            foundIt = true;
         }
         assertNotNull(details);
         assertEquals(details.getId(), snap.getId());
         assertEquals(details.getVolumeId(), snap.getVolumeId());
      }
      assertTrue(foundIt, "Failed to find the snapshot we previously created in listSnapshots() response");
   }
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.Snapshot

        this.serverInstance= serverInstance;
    }

    @Override
    public DataPoint<Snapshot> collect() throws Exception {
        Snapshot current = dataProvider.fetchSnapshot(getServerInstance());
        current.setInstanceName(getServerInstance());
        return new DataPoint<>(getServerInstance(), current);
    }
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.Snapshot

    public void escalate(@Observes @Severity(Severity.Level.HEARTBEAT) Snapshot current) {
        List<Script> scripts = this.scripting.activeScripts();
        try {
            Bindings binding = this.scriptEngine.createBindings();
            binding.put("current", current);
            Snapshot recent = this.recentSnapshots.get(current.getInstanceName());
            binding.put("previous", recent);
            long start = System.currentTimeMillis();
            try {
                if (recent != null) {
                    for (Script script : scripts) {
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.Snapshot

            LOG.info("Loaded DataCollector: " + collector);
        }
    }

    public Snapshot fetchSnapshot(String instanceName) throws Exception {
        Snapshot snapshot = null;
        Date start = new Date();

        if (parallelDataCollection.get()) {
            snapshot = parallelDataCollection(instanceName);
        } else {
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.Snapshot

        return snapshot;

    }

    private Snapshot serialDataCollection(String instanceName) throws Exception {
        Snapshot snapshot = new Snapshot.Builder().build();
        DataCollectionBehaviour dataCollectionBehaviour = new DataCollectionBehaviour(mapper, snapshot);
        for (DataCollector collector : retrieveDataCollectorList(instanceName)) {
            DataPoint dataPoint = serialDataCollect(collector, 0);
            dataCollectionBehaviour.perform(dataPoint);
        }
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.Snapshot

            }
        }
    }

    private Snapshot parallelDataCollection(String instanceName) throws Exception {
        Snapshot snapshot = new Snapshot.Builder().build();
        parallelExecutor.execute(new DataCollectionBehaviour(mapper, snapshot), retrieveDataCollectorList(instanceName));

        return snapshot;
    }
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.Snapshot

        }
    }

    private void handleRoundCompletion() {
        LOG.info("All snapshots collected for this round!");
        Snapshot combinedSnapshot = combineSnapshots(currentSnapshots.values());
        em.persist(combinedSnapshot);
        em.flush();
        fireHeartbeat(combinedSnapshot);

        currentSnapshots.clear();
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.