jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Coedo <notificati...@github.com>
Subject Re: [jclouds-labs] JCLOUDS-826: Add blob operations (#176)
Date Sat, 13 Jun 2015 16:15:25 GMT
> +      String key = blob.getMetadata().getName();
> +      Date creationDate = null;
> +      BlobEntity oldBlobEntity = findBlobById(containerName, key);
> +      if (oldBlobEntity != null) {
> +         creationDate = oldBlobEntity.getCreationDate();
> +         deleteBlob(containerName, key);
> +      }
> +      BlobEntity blobEntity = blobToBlobEntity.apply(blob);
> +      blobEntity.getPayload().setChunks(storeData(blob.getPayload().openStream()));
> +      blobEntity.setContainerEntity(containerRepository.findContainerByName(containerName));
> +      blobEntity.setKey(key);
> +      blobEntity.setBlobAccess(blobAccess);
> +      blobEntity.setCreationDate(creationDate);
> +
> +
> +      HashCode hash = ByteStreams2.hashAndClose(blob.getPayload().openStream(), Hashing.md5());

A test fails if I don't do the integrity check. What's a good place to document this behavior?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/176/files#r32371719
Mime
View raw message