org.jclouds.blobstore.BlobStore.getBlob()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(156)

本文整理了Java中org.jclouds.blobstore.BlobStore.getBlob()方法的一些代码示例,展示了BlobStore.getBlob()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlobStore.getBlob()方法的具体详情如下:
包路径:org.jclouds.blobstore.BlobStore
类名称:BlobStore
方法名:getBlob

BlobStore.getBlob介绍

[英]Retrieves a Blob representing the data at location container/name
[中]检索表示位置容器/名称处的数据的Blob

代码示例

代码示例来源:origin: apache/usergrid

Blob blob = blobStore.getBlob(bucketName, blobFileName);
if ( blob == null) {
  throw new RuntimeException(

代码示例来源:origin: gaul/s3proxy

if (Quirks.MULTIPART_REQUIRES_STUB.contains(getBlobStoreType(
    blobStore))) {
  Blob stubBlob = blobStore.getBlob(containerName, uploadId);
  BlobAccess access = blobStore.getBlobAccess(containerName,
      uploadId);

代码示例来源:origin: gaul/s3proxy

@Override
  public String call() {
    Blob nearBlob = writeStore.getBlob(containerName, nearName);
    String farETag = delegate().putBlob(containerName,
        nearBlob, options);
    return farETag;
  }
});

代码示例来源:origin: apache/usergrid

Assert.fail("Blob does not exist: " + expectedFileName);
Blob bo = blobStore.getBlob(bucketName, expectedFileName);

代码示例来源:origin: apache/usergrid

assertEquals( numOfFiles, numWeWant );
bo = blobStore.getBlob( bucketName, expectedFileName );

代码示例来源:origin: apache/usergrid

Blob bo = blobStore.getBlob(bucketName, expectedFileName);
Long numWeWant = 5L;
blobStore.deleteContainer( bucketName );

代码示例来源:origin: rackerlabs/blueflood

public String call() throws Exception {
  Blob blob = store.getBlob(container, name);
  Payload payload = blob.getPayload();
  InputStream is = payload.getInput();

代码示例来源:origin: gaul/s3proxy

Blob blob = blobStore.getBlob(containerName, blobName, options);
if (blob == null) {
  throw new S3Exception(S3ErrorCode.NO_SUCH_KEY);

代码示例来源:origin: jclouds/legacy-jclouds

@Override
public InputStream get(Object o) {
 String realKey = prefixer.apply(o.toString());
 Blob blob = blobstore.getBlob(containerName, realKey);
 return getInputStreamOrNull(blob);
}

代码示例来源:origin: jclouds/legacy-jclouds

@Override
public Blob get(Object key) {
 String realKey = prefixer.apply(checkNotNull(key, "key").toString());
 Blob blob = blobstore.getBlob(containerName, realKey);
 return blob != null ? stripPrefix(blob) : null;
}

代码示例来源:origin: org.jclouds/jclouds-blobstore

@Override
public Blob get(Object key) {
 String realKey = prefixer.apply(checkNotNull(key, "key").toString());
 Blob blob = blobstore.getBlob(containerName, realKey);
 return blob != null ? stripPrefix(blob) : null;
}

代码示例来源:origin: org.gaul/s3proxy

@Override
  public String call() {
    Blob nearBlob = writeStore.getBlob(containerName, nearName);
    String farETag = delegate().putBlob(containerName,
        nearBlob, options);
    return farETag;
  }
});

代码示例来源:origin: apache/jclouds

@Override
public Blob getBlob(String containerName, String blobName,
   GetOptions getOptions) {
 return delegate().getBlob(containerName, blobName, getOptions);
}

代码示例来源:origin: Nextdoor/bender

@Override
  public String call() {
    Blob nearBlob = writeStore.getBlob(containerName, nearName);
    String farETag = delegate().putBlob(containerName,
        nearBlob, options);
    return farETag;
  }
});

代码示例来源:origin: apache/attic-whirr

@Override
public Cluster load() throws IOException {
 Blob blob = context.getBlobStore().getBlob(container, blobName);
 if (blob != null) {
  return unserialize(spec,
   IOUtils.toString(blob.getPayload().getInput(), "utf-8"));
 }
 return null;
}

代码示例来源:origin: jclouds/legacy-jclouds

public void run() {
   try {
     Location actualLoc = view.getBlobStore().getBlob(containerName, blobName).getMetadata().getLocation();
          assert loc.equals(actualLoc) : String.format(
        "blob %s in %s, in location %s instead of %s", blobName, containerName, actualLoc, loc);
   } catch (Exception e) {
     Throwables.propagate(e);
   }
  }
});

代码示例来源:origin: apache/jclouds

public void run() {
   try {
     Location actualLoc = view.getBlobStore().getBlob(containerName, blobName).getMetadata().getLocation();
     assert loc.equals(actualLoc) : String.format(
        "blob %s in %s, in location %s instead of %s", blobName, containerName, actualLoc, loc);
   } catch (Exception e) {
     Throwables.propagate(e);
   }
  }
});

代码示例来源:origin: jclouds/legacy-jclouds

public void run() {
   try {
     Blob blob = view.getBlobStore().getBlob(containerName, blobName);
     Date actualExpires = blob.getPayload().getContentMetadata().getExpires();
     assert expectedExpires.equals(actualExpires) : "expires=" + actualExpires + "; expected="
         + expectedExpires;
   } catch (Exception e) {
     Throwables.propagateIfPossible(e);
   }
  }
});

代码示例来源:origin: jclouds/legacy-jclouds

protected Blob validateContent(String container, String name) throws InterruptedException {
 assertConsistencyAwareContainerSize(container, 1);
 Blob newObject = view.getBlobStore().getBlob(container, name);
 assert newObject != null;
 validateMetadata(newObject.getMetadata(), container, name);
 try {
   assertEquals(getContentAsStringOrNullAndClose(newObject), TEST_STRING);
 } catch (IOException e) {
   throw new RuntimeException(e);
 }
 return newObject;
}

代码示例来源:origin: jclouds/legacy-jclouds

@Test(groups = { "integration", "live" })
public void testGetTwoRanges() throws InterruptedException, IOException {
 String container = getContainerName();
 try {
   String name = "apples";
   addObjectAndValidateContent(container, name);
   Blob blob = view.getBlobStore().getBlob(container, name, range(0, 5).range(6, TEST_STRING.length()));
   validateMetadata(blob.getMetadata(), container, name);
   assertEquals(getContentAsStringOrNullAndClose(blob), TEST_STRING);
 } finally {
   returnContainer(container);
 }
}

相关文章