Examples of GlacierClient


Examples of com.splunk.shuttl.archiver.filesystem.glacier.GlacierClient

    final LocalBucket realBucketThatGotThawed = archiveAndThawBucket(splunkHome);
    assertBucketWasSuccessfullyThawedAndImported(realBucketThatGotThawed);
  }

  private void setup(ArchiveConfiguration config) throws IllegalIndexException {
    GlacierClient client = new GlacierClient(new FakeArchiveTransferManager(
        createDirectory()), "vault", new HashMap<String, String>());
    LocalFileSystemPaths localFileSystemPaths = new LocalFileSystemPaths(
        createDirectory());

    GlacierArchiveFileSystem glacierArchive = getGlacierArchiveFileSystem(
View Full Code Here

Examples of org.jclouds.glacier.GlacierClient

      }
   }

   private static void providerExample(BlobStoreContext context) throws IOException {
      // Get the provider API
      GlacierClient client = context.unwrapApi(GlacierClient.class);

      // Create a vault
      final String vaultName =  "jclouds_providerExample_" + UUID.randomUUID().toString();
      client.createVault(vaultName);

      // Upload an archive
      Payload payload = new ByteSourcePayload(buildData(16));
      payload.getContentMetadata().setContentType(PLAIN_TEXT_UTF_8.toString());
      payload.getContentMetadata().setContentLength(16L);
      String archiveId = client.uploadArchive(vaultName, payload);

      // Create an archive retrieval job request
      JobRequest archiveRetrievalJobRequest = ArchiveRetrievalJobRequest.builder()
            .archiveId(archiveId)
            .description("retrieval job")
            .build();

      // Initiate job
      String jobId = client.initiateJob(vaultName, archiveRetrievalJobRequest);
      try {
         // Poll until the job is done
         new BasePollingStrategy(client).waitForSuccess(vaultName, jobId);

         // Get the job output
         Payload result = client.getJobOutput(vaultName, jobId);

         // Print the result
         System.out.println("The retrieved payload is: " + Strings2.toStringAndClose(result.openStream()));
      } catch (InterruptedException e) {
         Throwables.propagate(e);
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.