This method informs callers of the expected blobstore behavior,
avoiding unnecessary work for providers which support strict
consistency (Azure, mock blobstores).
The only users of this seem to be
org.jclouds.atmos.blobstore.strategy.FindMD5InUserMetadata and
org.jclouds.azureblob.blobstore.strategy.FindMD5InBlobProperties which
are themselves unused.
The existing approach for deleting objects in a container suffers
from a head-of-line blocking problem. This commit implements a better
scheme which does not have that problem. This scheme uses a counting
semaphore for making sure that a certain number of futures are
issued in parallel. As each of these futures is completed, one
permit of the semaphore is released.
Added unit tests for testing this new scheme.
Callers should instead call BlobBuilder.contentMD5, usually with the
results from Guava Hashing.md5(). This narrows the API and removes a
strange IOException from callers.
Also deprecate byte[], File, InputSupplier<InputStream>, and String
Payloads. Callers should instead provide a ByteSource via
ByteSource.wrap(byte[]) and Files.asByteSource(File)
Previously this test downloaded 45 MB in 30 seconds which failed on
slower connections, causing spurious test failures. The larger input
size provides no benefit.
Previously this test uploaded ~10 MB in 30 seconds which failed on
slower connections, causing spurious test failures. The larger input
size provides no benefit.
Before we used the previous container name, which kept appending and
hit S3 limits during integration tests like:
Caused by: java.lang.IllegalArgumentException: Object 'gaul-blobstore27-4348532805015069992-1155797412711190448-1465016400636204031' doesn't match S3 bucket virtual host naming convention. Reason: Can't be null or empty. Length must be 3 to 63 symbols.. For more info, please refer to http://docs.amazonwebservices.com/AmazonS3/latest/index.html?BucketRestrictions.html
Also:
- Make SwiftBlobIntegrationLiveTest.testMultipartChunkedFileStream more realistic by uploading a file large enough to be split into parts.
- JavaDoc fixes for SwiftBlobStore: don't reference nonexistent methods.
This method breaks the contract of an InputSupplier since every call
to getInput returns the same InputStream instance. This is
particularly dangerous when one of the callers mutates or closes the
InputStream which causes all others callers to fail.