Commit Graph

731 Commits

Author SHA1 Message Date
roded 76f9a53247
JCLOUDS-1543: remove unused imports from FetchBlobMetadataTest.java (#70)
Co-authored-by: Roded Bahat <roded.bahat@model9.io>
2020-04-22 09:49:53 +02:00
Roded Bahat a04484122a JCLOUDS-1543: change FetchBlobMetadata to retain original blob order 2020-04-17 19:22:17 +09:00
Timur Alperovich e66bffa521 Hash the content for fs MPU ETag if no xattr.
If there is no extended attribute support in the file system, the blobs
will not have their associated ETags available. In that case, the file
system blob store should rehash the content while producing the combined
blob and return the expected S3-style ETag.
2020-04-04 18:43:29 +09:00
Andrew Gaul f34cdb98d5 Fix TOCTOU issue when getting blob during removal
Fixes gaul/s3proxy#318.
2019-11-09 12:09:31 +09:00
Ignasi Barrera 71c7f528b4 Upgrade to 2.2.1-SNAPSHOT 2019-10-21 10:41:48 +02:00
Ignasi Barrera fb8db4937f Apache jclouds 2.2.0-rc1 release 2019-10-13 10:51:16 +02:00
Andrew Gaul 222fb84f5c Add test for aborting a single part MPU
Also tighten up checks to ensure there is no litter, mostly for
transient and filesystem blobstores.
2019-02-06 17:13:05 -08:00
Andrew Gaul fd7bacbfd3 Correct some Checkstyle violations
Follow-on to 13f32b28c9.
2019-02-01 08:57:57 -08:00
Andrew Gaul 13f32b28c9 Lazily open InputStream during complete MPU
Previously the filesystem provider could exhaust file descriptors by
eagerly opening up to 10,000 parts.  This partially undoes
JCLOUDS-1367.
2019-01-29 21:54:47 -08:00
Andrew Gaul 29eec441e9 JCLOUDS-1371: JCLOUDS-1488: list optimize prefix
Previously getBlobKeysInsideContainer returned all keys and filtered
in LocalBlobStore.  Now getBlobKeysInsideContainer filters via prefix
which can dramatically decrease the number of keys returned,
especially for the filesystem provider.  Further optimizations are
possible for delimiter.
2019-01-29 17:39:51 -08:00
Andrew Gaul 2393c7920b JCLOUDS-1366: JCLOUDS-1472: Fix InputStream MPU
Previously jclouds attempted to slice non-repeatable InputStream
Payloads in order to upload sequentially.  This never worked due to
mutating the single stream via skip and close.  Also backfill test
which spuriously succeeded.
2019-01-04 15:42:17 -08:00
Joe Meiring a36c9dcef0 Fix for FileSystem blob store clearContainer with options 2019-01-04 14:17:00 -08:00
Timur Alperovich 896e99df09 Filesystem: Fix the MPU ETags to match S3.
Prior commit introduced a bug in the computation of the MPU ETag value,
where it was concatenating strings, rather than operating on the bytes
of the integer value.
2018-11-02 12:25:17 -07:00
Joe Meiring 22ce5484a4 Removed unneeded check for prefix in clearContainer 2018-11-02 12:19:01 -07:00
Timur Alperovich 539a9854c1 JCLOUDS-1450: Use S3-style ETags for MPUs.
S3 uses a different ETag for multipart uploads (MPUs) than regular
objects. The ETag consists of the md5 hash of the concatenated ETags of
individual parts followed by the number of parts (separated by "-").

The patch changes the LocalBlobStore's implementation of
CompleteMultipartUpload to set the S3-style ETag before calling
putBlob() and return that ETag to the caller.

To simplify testing, a new protected method with a default NOOP
implementation is added to the BaseBlobIntegrationTest. It allows
providers to further verify MPUs (i.e. ensuring the correct ETag has
been stored alongside the object).
2018-10-24 13:25:00 -07:00
Andrew Gaul cc65957997 Error-prone 2.3.2 fixes 2018-10-12 23:28:00 -07:00
Jesse Glick 36353d6157 [JCLOUDS-1422] Ensure that LocalBlobStore.list honors !recursive even when a prefix is defined. 2018-06-06 22:47:56 -07:00
Jesse Glick 11fac4f020 Include the delimiter field in ListContainerOptions.toString. 2018-06-06 22:47:56 -07:00
Andrew Gaul 7d40cedb20 JCLOUDS-1400: Test PUT signed URL Content-Type 2018-04-12 22:43:43 -07:00
Andrew Gaul f6d47b9c0e JCLOUDS-1333: Fix Java 8 and Guava 21 issues 2018-04-10 08:17:35 -07:00
Andrew Gaul 1eec2b6e01 JCLOUDS-1367: Return InputStream from getBlob
Previously filesystem and transient returned ByteSource while all
other providers returned InputStream.
2018-03-24 12:13:25 -07:00
Andrew Gaul 90fac3b683 JCLOUDS-1271: Remove BlobStore.signRemoveBlob
Most providers never supported this functionality and the portable
abstraction should not have included it.
2018-03-09 20:52:12 -08:00
Alin Dreghiciu 584ca19fad JCLOUDS-1392: Do not filter non BLOBs during list 2018-03-08 22:39:26 -08:00
andreaturli d17487b223 fix typo in project.version
- from 2.2.0-SNAPSHOST to 2.2.0-SNAPSHOT
2018-02-21 16:45:43 +01:00
andreaturli a5db565581 Next development version 2.2.0-SNAPSHOST 2018-02-16 11:23:12 +01:00
andreaturli 9273bd56ad Apache jclouds 2.1.0-rc3 release 2018-02-16 11:20:21 +01:00
Andrew Gaul eb5db026da JCLOUDS-1368: Fix off-by-one in slicing algorithm 2018-02-08 21:00:33 -08:00
Andrew Gaul 8cd68a3503 JCLOUDS-1369: improving slicing with many parts
Previously with GCS and its maximum 32 parts, the slicing algorithm
would sliced 3.2 GB blobs into (31) 32 MB parts and (1) 2.3 GB part.
With this algorithm it creates (31) 100 MB parts and (1) smaller part.
2018-01-09 12:56:00 -08:00
Andrew Gaul d05be89614 JCLOUDS-1368: Correct use of slicing algorithm
MultipartUploadSlicingAlgorithm creates multiple equal-sized parts and
a remaining amount.  BaseBlobStore.putMultipartBlob used this
interface incorrectly, which could create more parts than intended
since the remaining size could be larger than the part size.  This
manifested with Google Cloud Storage which only allows 32 parts.
2018-01-09 12:56:00 -08:00
Yuval Kashtan 17cef5652f [JCLOUDS-1363] - Fix case sensitivity of blobstore metadata
HTTP headers are case insensitive by nature (see RFC 2616). When addUserMetadataTo check if this is indeed a user metadata header, it must properly ignore case.
The fix make sure that both metadataPrefix and the header key are compared with toLowerCase().

This solves issue with minio metadata read
2017-12-07 08:52:50 +01:00
Andrew Gaul d29b79674d JCLOUDS-1358: Fix zero byte InputStream test input
Do not use ByteSource.empty() since it is backed by a
ByteArrayInputStream which supports reset.
2017-11-21 10:50:56 -08:00
Andrew Gaul e473d7df6a Tighten up test expectations
Follow on to 8b94febfeb.
2017-11-11 07:45:23 -08:00
Andrew Gaul 26570db680 Include HTTP status code in illegal range error 2017-11-10 22:49:45 -08:00
Andrew Gaul 8b94febfeb Throw consistent exception on invalid range read
Previously S3, Swift, and local blobstores threw a generic
IllegalArgumentException for this uncommon error.  Instead
consistently throw HttpResponseException.
2017-11-10 21:39:47 -08:00
Timur Alperovich 343897d6d8 Use different content on overwrite.
When testing blobstore overwrite behavior, jclouds should use a blob
with different content (but same name).
2017-11-06 17:22:32 -08:00
Andrew Gaul 83d10e8194 JCLOUDS-1337: restore tier from stub blob
This allows completeMultipartUpload to propagate the tier set in
initiateMultipartUpload.
2017-11-03 09:52:42 -07:00
Andrew Gaul 7fbef10d57 JCLOUDS-1337: Include tier in object listing
This requires hoisting Tier from BlobMetadata to StorageMetadata.
2017-11-02 16:24:34 -07:00
Andrew Gaul 9a0b51a4d4 Include trailing slash in prefix test 2017-10-30 18:31:40 -07:00
Andrew Gaul af05e24ae9 Implement partial prefix support for Atmos
Atmos only supports listing by directories while other blobstores
allow listing via arbitrary prefixes.  Allow requests which list
directories via both prefix and delimiter = "/" to succeed instead of
failing all requests.  Also change a test which specified recursive to
instead be delimiter = "/".  Fixes gaul/s3proxy#244.
2017-10-30 17:51:35 -07:00
Ignasi Barrera f7b74d95c9 Exclude tier tests on OSX 2017-10-25 08:30:49 +02:00
Andrew Gaul f513bf7c40 JCLOUDS-1337: Atmos putBlob portable storage tiers 2017-10-23 21:31:48 -07:00
Andrew Gaul 6158b60954 JCLOUDS-1337: Portable storage tiers 2017-10-11 12:04:02 -07:00
Andrew Gaul 7704893650 Remove Inject on constructors for abstract classes
This is not meaningful since these classes cannot be instantiated.
Found via error-prone.
2017-09-07 23:37:24 -07:00
Andrew Gaul 517323fbd5 JCLOUDS-1225: Address Guava 18 MoreExecutors changes
Fixed with:

find -name \*.java | xargs sed -i 's/sameThreadExecutor/newDirectExecutorService/g'
2017-08-22 17:14:22 -07:00
Andrew Gaul a493e2ca2f JCLOUDS-1225: Address Guava 18 Objects changes
Fixed with:

find -name \*.java | xargs sed -i 's/Objects.[Tt]oStringHelper/More&/g'
find -name \*.java | xargs sed -i 's/Objects.firstNonNull/More&/g'
find -name \*.java | xargs sed -i 's/^\(import com.google.common.base.\)\(Objects.*\)/\1More\2\n\1\2/g'
find -name \*.java | xargs java -jar google-java-format-1.3-all-deps.jar -i --fix-imports-only --skip-sorting-imports
2017-08-22 17:12:53 -07:00
Chaithanya Ganta d6038487f7 JCLOUDS-1327: Add tests for zero-length blobs 2017-08-06 13:51:07 -07:00
Timur Alperovich d07c4a215e Handle empty delimiter/prefix in FS store.
When delimiter/prefix is an empty string, jclouds filesystem blobstore
should treat them as not being set.
2017-08-03 14:37:12 -07:00
Andrew Gaul 0bc935dd57 Remove clojure bindings
These have not seen any development in many years.
2017-07-10 11:39:11 -07:00
Andrew Gaul e446b5b8b4 JCLOUDS-1111: Force overwriting Atmos objects
This avoids a racy delete then write in the portable abstraction.
2017-07-08 15:50:04 -07:00
Andrew Gaul 2b49bf3618 JCLOUDS-1299: Handle % in names during Swift list
uriBuilder.appendPath assumes an encoded path.
2017-05-16 17:29:02 -07:00