Commit Graph

291 Commits

Author SHA1 Message Date
Andrea Turli 61b06329d8 create java-xmlbuilder.version property for maven
add java-xmlbuilder to dependencyManagement so downstream project don't need to specify the version
2015-06-29 08:47:54 +02:00
Andrew Gaul ae157991ba JCLOUDS-894: Add portable multipart upload for S3 2015-06-06 16:32:16 -07:00
Andrew Gaul 00734ee755 JCLOUDS-894: Move MultipartUploadSlicingAlgorithm to core 2015-06-06 16:32:16 -07:00
Andrew Gaul 5095590d60 JCLOUDS-894: Do not add unnecessary ETag quotes
Previously
AWSS3BlobIntegrationLiveTest.testMultipartUploadMultipleParts failed.
2015-05-26 11:19:58 -07:00
Andrew Gaul 9128ae515f JCLOUDS-894: Expose S3 multipart operations 2015-05-01 13:32:35 -07:00
Andrew Gaul ca543f3cdd Add S3 list multipart parts
TODO: pagination, etc.?
2015-05-01 13:32:35 -07:00
Andrew Gaul 21a422bc71 Fix testCopyIfModifiedSince for AWS S3 2015-04-10 23:11:21 -07:00
Andrew Gaul a43dcece16 JCLOUDS-651: S3 copy object content metadata 2015-04-08 18:07:28 -07:00
Andrew Gaul b85068ca7f JCLOUDS-651: Add S3 server-side copyBlob 2015-04-02 15:36:53 -07:00
Ignasi Barrera f469cf8b51 Next development version 2.0.0-SNAPSHOT 2015-03-24 10:52:01 +01:00
Ignasi Barrera bb41ed4341 Apache jclouds 1.9.0 release 2015-03-24 10:35:42 +01:00
Andrew Gaul 85637ccee2 Fix ParseS3ErrorFromXmlContentTest
References JCLOUDS-794.
2015-02-25 18:29:17 -08:00
Andrew Gaul d7e25d9cc6 Use injected metadata instead of new instance
This addresses a regression from JCLOUDS-794.
2015-02-25 17:24:44 -08:00
Andrew Gaul 6c8be12703 JCLOUDS-732: S3 portable object ACLs 2015-02-21 10:28:02 -08:00
Andrew Gaul 2553b09bb4 Build S3 multi-delete request with an XML library
This commit addresses test failures in
AWSS3BlobIntegrationLiveTest.deleteMultipleObjects.
2015-02-15 10:25:23 -08:00
Andrew Gaul ecc8548fbd JCLOUDS-144: S3 multi-blob delete 2015-02-15 01:06:03 -08:00
Andrew Gaul 4bb319a0cc JCLOUDS-820: Support multi-delete for generic S3
Tested against AWS and DreamObjects.  This commit only moves and
renames code.
2015-02-13 06:23:16 -08:00
Andrew Gaul ba2f8ac232 JCLOUDS-258: Support MPU for generic S3
Tested against AWS-S3 and DreamObjects.  This commit only moves and
renames code although some classes are duplicated for deprecation
purposes.
2015-02-12 17:59:33 -08:00
Andrew Gaul ec3f035487 JCLOUDS-660: S3 portable container ACLs 2015-02-12 17:26:48 -08:00
Andrew Gaul eacfc8fdf1 Handle removal during iteration
Previously this threw UnsupportedOperationException due to
findGrantsForGrantee returning an immutable view.
2015-02-12 17:26:47 -08:00
Andrew Gaul 8a2c821e13 JCLOUDS-794: Use bogus URL for generic S3 endpoint
This prevents users from accidentally connecting to AWS.
2015-02-04 13:42:03 -08:00
Andrew Gaul affad9fa3b JCLOUDS-96: JCLOUDS-351: Fix S3 copy if tests
Use correct options in testCopyIfUnmodifiedSince, use looser time
bounds, and ensure that tests throw HttpResponseException when
expected.
2015-01-24 10:56:21 -08:00
Andrew Gaul c770ffbeb0 Use sorted set to order relative paths correctly 2015-01-22 11:37:46 -08:00
Andrew Gaul fae097e144 JCLOUDS-654: Add object size to StorageMetadata
This allows callers to read the content length during container
listing.  Tested against: atmosonline, aws-s3, azureblob, filesystem,
and transient.  Intentionally not implemented for legacy swift
provider.
2015-01-09 22:34:56 -08:00
Jeremy Daggett d3c1e2eab4 Use AutoService to generate service loader metadata 2015-01-09 11:22:12 -08:00
Adrian Cole 90a6bb19f4 Finished partial fix in 91f405c9fe. 2014-11-16 10:37:31 -08:00
Adrian Cole 3980cd791b Revert "JCLOUDS-653: Address Guava 18 deprecations"
This reverts commit 95cfc0d950.

Many conflicts due to duration between above commit and now
2014-10-24 10:45:58 -07:00
Adrian Cole b9525a0877 JCLOUDS-40 unasync Fallback 2014-10-06 13:14:59 -07:00
Adrian Cole 0a236f59ad JCLOUDS-153 remove IO Executor and usage of it. 2014-10-06 07:56:31 -07:00
Adrian Cole 100d43360a JCLOUDS-150 clear remaining async stuff from aws 2014-10-05 22:32:27 -07:00
Adrian Cole 044223efcb Rather than rely on or work around JRE behavior based, lock S3ClientMockTest using OkHttp. 2014-10-05 20:14:45 -07:00
Adrian Cole 99e217b720 Move off confusing test names. 2014-10-05 17:22:18 -07:00
Adrian Cole cacc986dc4 JCLOUDS-40 Remove AsyncBlobStore references from s3 api 2014-10-05 13:18:12 -07:00
Adrian Cole dfb583b67a JCLOUDS-40 remove all implementations of AsyncBlobStore except Submission in preparation for complete removal. 2014-10-05 08:49:38 -07:00
Adrian Cole b6497556f6 JCLOUDS-150 add SubmissionAsyncBlobStore; unasync s3 and aws-s3 2014-10-03 13:18:29 -07:00
Andrew Gaul 58438d7d1e Address Checkstyle violations 2014-09-04 17:24:27 -07:00
Andrew Gaul 0b89b1fd10 Ensure that Content-MD5 has 128 bits
Update many tests Content-MD5 headers and ETag responses.
2014-09-04 16:57:48 -07:00
Andrew Gaul 195998b3b6 Miscellaneous FindBugs fixes 2014-08-30 14:33:10 -07:00
Andrew Gaul df996f3231 Set Content-MD5 only if ETag has correct format
Previously this check was more lenient than it should have been.
2014-08-28 21:50:57 -07:00
Andrew Gaul 1b824afbfc Remove redundant modifiers from interfaces 2014-08-26 17:34:13 -07:00
Andrew Gaul 480f0e883d Prevent instantiation of utility classes
Also prevent extension.
2014-08-26 12:23:36 -07:00
Andrew Gaul 80a4430035 JCLOUDS-679: Use HEAD for S3 bucketExists
This method costs 0.4 cents per 10,000 requests instead of 0.5 cents
per 1,000 requests:

http://aws.amazon.com/s3/pricing/

API reference:

http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketHEAD.html
2014-08-20 12:44:20 -07:00
Jeremy Daggett e711275fb1 Prefer isEmpty() for collections rather than size() 2014-08-20 11:07:48 -07:00
Andrew Gaul 95cfc0d950 JCLOUDS-653: Address Guava 18 deprecations
Mostly renaming Objects.toStringHelper to MoreObjects.toStringHelper.
2014-08-08 11:12:21 -07:00
Andrew Gaul 59462747e7 Reset StringBuilder instead of creating new ones
This avoids unneeded garbage, especially during XML parsing.  Replaced
with:

find -name \*.java | xargs sed -i 's/^\( *[^ ]*\) = new StringBuilder();$/\1.setLength(0);/'
2014-08-06 11:22:49 -07:00
Andrew Phillips e3d9851216 Up to 2.0.0-SNAPSHOT after the 1.8.0 release 2014-08-05 09:10:24 +02:00
Andrew Phillips eba727fef7 'iso8601DateParseWithOptionalTZ' -> 'iso8601DateOrSecondsDateParse' in DateService
Follow-up to d57bbebe
2014-07-28 12:20:49 -04:00
Shri Javadekar d57bbebe7e Try iso8601SecondsDateParse if iso8601DateParse fails.
S3 compatible blobStores sometimes return date in the format:
"2014-07-23T20:53:17+0000" instead of the more common
"2014-07-23T18:09:39.944Z". This caused jclouds to barf with an
IllegalArgumentException.

This commit tries to parse both the formats for S3. The exception
is thrown if both fail.

Added unit tests for the same.
2014-07-26 22:19:54 -07:00
Andrew Gaul fb60d76704 JCLOUDS-622: Remove most vestiges of InputSupplier
Guava 16 deprecated InputSupplier and a future release will remove it.
2014-07-16 16:07:59 -07:00
Andrew Gaul 05c37c2c77 Consistently use Square's mockwebserver
Google mockwebserver merged into OkHttp as per:

https://code.google.com/p/mockwebserver/
2014-07-03 14:39:07 -04:00
Andrew Gaul 9cdd53b0b7 JCLOUDS-546: Remove Javadoc @author annotations
Annotations removed with:

find -name \*.java | xargs sed -i /@author/d

Empty Javadoc removed with multiple iterations of:

find -name \*.java | xargs sed -i -z 's/ \*\n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/ \* \n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/\/\*\*\n \*\/\n//'
2014-06-07 21:44:54 -07:00
Andrew Gaul 70cf3e1f7c Make constants final classes instead of interfaces
This commit prohibits implementation of the empty interface and
instantiation of the class.  Refer to _Effective Java_ item 19 for
more background.
2014-05-16 09:45:52 -07:00
Andrew Gaul 8d51ad6f87 Prefer Guava HttpHeaders over JAX-RS
jclouds code contains more instances of the former and Guava has
additional constants like CONTENT_MD5.
2014-05-15 01:55:51 -07:00
Andrew Gaul 67c2b5f6b9 Enable whitespace around Checkstyle rule 2014-05-08 18:31:47 -07:00
Andrew Gaul 2d88f5164e Enforce that all commas have trailing whitespace 2014-05-08 18:28:08 -07:00
Andrew Bayer c1ee11d9bd Updating to 1.8.0-SNAPSHOT 2013-12-17 11:31:56 -08:00
Andrew Gaul 828d8790c2 Enforce no unused imports via Checkstyle
Removed with:

mvn checkstyle:checkstyle --quiet -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain | tac | while read i; do echo $i | sed -n 's/\([^:]*\):\([^:]*\):.*/sed -i \2d \1/p' | bash; done
2013-12-11 17:27:43 -08:00
Andrew Gaul 4cef85d1cd Address Checkstyle violations in tests 2013-12-09 14:40:07 -08:00
Andrew Gaul cb98a47173 Correct jcloud -> jclouds typos
Corrected with:

find -name pom.xml | xargs sed -i 's/jcloud\>/jclouds/'
2013-12-01 11:21:26 -08:00
Andrew Gaul 6c5effcdb1 Address error-prone empty statement warnings 2013-11-05 16:22:44 -08:00
Andrew Gaul 17ce72794c Enable RedundantModifier for Checkstyle 2013-10-31 10:23:30 -07:00
Niraj Tolia 53146fb7bb [JCLOUD 301]: Make increased use of Invokable params cache
This patch moves the Invokable Parameter cache to Reflection2 and adds
a convenience method for it to allow it to be shared by multiple
callers. The subsequent ability of S3Utils to use this cache results
in a ~40% improvement in performance for generating signed GETs and
PUTs for S3. This commit also converts a few others calls to
Invokable.getParameters() but the observed benefit from those was
small in microbenchmarks.
2013-10-14 17:44:03 -07:00
Andrew Gaul f1fc63ab76 Add whitespace around keywords and braces 2013-09-30 09:39:29 -07:00
Andrew Gaul 06b8cd7ac5 JCLOUDS-305. Disable S3 virtual host buckets for generic S3
Not all S3-compatible providers support virtual host buckets and thus
we should disable this feature by default.  Continue to enable virtual
host buckets for AWS-S3 which supports this although this feature
suffers from DNS settling issues.  Ran ran integration tests against
AWS-S3 and Scality using its S3 API.
2013-09-27 16:22:42 -07:00
Niraj Tolia e8ef5c0665 [JCLOUDS-301] Reduce reflection overhead of Invokable.getParameters()
By caching the results from Invokable.getParameters(), this commit
improves request signing performance (GETs and PUTs) for S3 by >
3X. These performance problems were seen in production and diagnosed
using the YourKit profiler.
2013-09-27 07:49:09 -07:00
Andrew Gaul 5f8961723f Remove BlobStore Map abstractions
These provide little end-user benefit and make evolving the core API
more difficult.  We deprecated these in 1.6.0.
2013-09-25 20:46:31 -07:00
Andrew Gaul 15d9abead0 Skip testDirectory on S3
This test cannot succeed due to the way directories are implemented as
prefix pseudo-files in S3.
2013-08-27 23:01:04 -07:00
Andrew Phillips f6b5b67b5b JCLOUDS-200: Consolidate all feature-specific in the AWS provider
Follow-up to c64c7423
2013-07-26 15:03:12 -04:00
Diwaker Gupta c64c7423cd AWS-S3 configurable temporary signed URL support
Introduces AWSS3BlobRequestSigner, which reuses the
RequestAuthorizeSignature filter for most of the heavy lifting.
Other implementation details based on [1].

Tested with AWSS3BlobSignerLiveTest, in particular,
testSign(Get|Put)UrlWithTime.

Closes JCLOUDS-200

[1] http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html
2013-07-24 15:22:45 -07:00
Andrew Bayer 75385ee57d JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased back
off time.
2013-06-17 16:48:15 -07:00
Andrew Gaul 64e9a4e4c6 Remove Strings2.replaceAll(String, char, String)
String.replace(String, String) serves this purpose better.
2013-06-03 14:41:18 -07:00
adriancole ed2f18a1af JCLOUDS-31. updated to ASF headers via mvn com.mycila.maven-license-plugin:maven-license-plugin:format 2013-05-16 21:30:37 -07:00
adriancole fa10fc4838 JCLOUDS-31. remove malformed, duplicate, or unnecessary headers 2013-05-16 21:30:32 -07:00
Andrew Bayer 446ac67884 JCLOUDS-30. Switch to 2 space indents for POM files. 2013-05-13 12:04:43 -07:00
Andrew Bayer 259b04ff1c JCLOUDS-16. Switch groupId to org.apache.jclouds, change parent POM, remove old distributionManagement content, add ASF repos. 2013-05-13 12:04:42 -07:00
Andrew Gaul fff2fa6e05 Address Checkstyle violations
This commit requires temporarily disabling some checks.
2013-04-17 16:21:21 -07:00
Andrew Phillips 282f3e2a37 Trying to get the test to *pass* now 2013-04-10 13:04:44 +02:00
Andrew Phillips 52301e0a86 Fixing S3ClientMockTest hanging on Java 7 since 843ed57 2013-04-10 12:03:34 +02:00
adriancole f56da43db1 deprecated blobstore interfaces that imply complex internal code 2013-04-09 14:37:34 -07:00
adriancole 053197fe61 deprecated all top-level Async apis and clients 2013-04-09 10:18:31 -07:00
adriancole 36dd831b84 moved all code off use of RestContext except CloudStackContext, which will use it until 1.7 2013-04-09 09:23:31 -07:00
adriancole 88871c9fe9 issue #1501: add Closeable annotation to all top-level apis 2013-04-08 16:13:09 -07:00
Andrew Gaul 371db8d18f Address Xlint warnings 2013-03-13 22:23:19 -07:00
Adrian Cole fb69ae0fa9 bump master to 1.7.0-SNAPSHOT 2013-03-08 23:02:40 -08:00
adriancole c31145e42e [maven-release-plugin] prepare for next development iteration 2013-03-04 06:13:59 -08:00
adriancole 0eb3ee8091 [maven-release-plugin] prepare release jclouds-1.6.0-alpha.4 2013-03-04 06:13:57 -08:00
adriancole 1c2090fd08 s3: explicitly set Expect header on methods that need it 2013-03-03 21:09:49 -08:00
Shri Javadekar 7bfa6649ce Make AWS-S3 use the right directory suffix.
Fixes #1336.
2013-02-26 10:18:57 -08:00
Adrian Cole 37f07f98d2 rename TemporaryCredentials to SessionCredentials per aws sdk 2013-02-25 20:02:48 -08:00
Andrew Gaul ff42fdfa13 Address FindBugs warnings 2013-02-24 20:17:50 -08:00
Andrew Gaul b51ce5994a Expose resource creation date 2013-02-18 11:26:44 -08:00
adriancole 89fda8ee28 [maven-release-plugin] prepare for next development iteration 2013-02-04 17:30:46 -08:00
adriancole 2b0ad28f26 [maven-release-plugin] prepare release jclouds-1.6.0-alpha.2 2013-02-04 17:30:44 -08:00
adriancole 6c658f6450 fix issue #1297 put with zero length payload 2013-02-04 10:32:03 -08:00
adriancole 267069755e [maven-release-plugin] prepare for next development iteration 2013-02-02 08:41:53 -08:00
adriancole 7c924b312f [maven-release-plugin] prepare release jclouds-1.6.0-alpha.1 2013-02-02 08:41:51 -08:00
Adrian Cole 5aa41d07aa Merge pull request #1261 from jclouds/aws-action-names
changed aws apis to use Action key for config instead of more verbose iam names
2013-01-29 05:53:06 -08:00
adriancole b3c3cb0a88 issue #1184 changed aws apis to use Action key for config instead of more verbose iam names 2013-01-29 04:45:42 -08:00
adriancole a51e6a8323 issue #1089 removed default timeout values so that those not using async will have simpler debugging 2013-01-29 04:19:00 -08:00
adriancole 40d9f8bfe7 changes that facilitate synchronous fallbacks and http invocation 2013-01-29 04:09:45 -08:00