Commit Graph

1378 Commits

Author SHA1 Message Date
Adrian Cole 6242eae0f4 JCLOUDS-774 cleanup derived location suppliers and backfill test for inconsistent region and zone mappings. 2014-11-18 09:40:37 -08:00
Adrian Cole d6aeb77cae Finished partial fix in 91f405c9fe. 2014-11-18 09:40:37 -08:00
Zack Shoylev ca58491ce8 Small cleanup of how RegionToEndpoint checks arguments. 2014-11-18 09:40:37 -08:00
Andrew Phillips 229fdd70cb 'iso8601DateParseWithOptionalTZ' -> 'iso8601DateOrSecondsDateParse' in DateService
Follow-up to d57bbebe
2014-07-28 12:24:21 -04:00
Shri Javadekar 8ce9f79fde 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-27 18:29:43 -07:00
Ignasi Barrera 3b2f02b723 Removed unnecessary whitespaces and fixed formatting 2014-07-14 11:03:47 +02:00
Christopher Dancy 7641bd61cd JCLOUDS-607: ComputeService.createNodesInGroup throws NPE on FloatingIPApi.create() 2014-07-09 17:26:57 +02:00
Andrew Gaul c85d728a5a Handle short reads in BasePayloadSlicer
InputStream.read(byte[]) can return fewer bytes than requested.
Specifically ByteSource.concat(ByteSource...).openStream() will only
return as many bytes as the current ByteSource contains.  Thus
ByteSources.repeatingArrayByteSource(byte[]).openStream() will return
short reads despite the byte[] input from its single logical
InputStream.
2014-07-02 15:30:15 -07:00
Andrew Gaul b41c4c2ab0 Backport ByteSources.repeatingArrayByteSource 2014-07-02 15:30:15 -07:00
Andrew Gaul cb53eee8aa JCLOUDS-597: HashCode methods for Content-MD5
This works more naturally with Guava Hashing methods and immutability
provides better safety guarantees.  Also deprecate existing byte[]
methods.
2014-06-12 15:55:41 -07:00
Andrew Bayer 735324c121 [maven-release-plugin] prepare for next development iteration 2014-05-27 10:26:42 -07:00
Andrew Bayer 8e34e00dff [maven-release-plugin] prepare release jclouds-1.7.3-rc1 2014-05-27 10:26:42 -07:00
Aled Sage 25c37fc8ca JCLOUDS-549: Fix NPE in LoginCredentials.toString 2014-04-26 18:01:43 -04:00
Andrew Phillips a459b310bf [maven-release-plugin] prepare for next development iteration 2014-04-15 14:09:16 -04:00
Andrew Phillips 418f3c59d9 [maven-release-plugin] prepare release jclouds-1.7.2-rc2 2014-04-09 22:37:56 -04:00
Andrew Phillips 19e58f62e2 Revert "[maven-release-plugin] prepare release jclouds-1.7.2-rc1"
This reverts commit 14b07712fd.
2014-04-09 14:27:15 -04:00
Andrew Phillips 14b07712fd [maven-release-plugin] prepare release jclouds-1.7.2-rc1 2014-04-07 14:26:48 -04:00
Pasi Niemi 63d6d97553 JCLOUDS-516: Add ssh agent support via sch agentproxy 2014-03-27 11:04:14 +01:00
Andrew Gaul fe79885663 JCLOUDS-460: Add jitter to avoid thundering herd
When issuing many simultaneous requests to Synaptic Atmos I observed:

HTTP/1.1 failed with code 500, error: AtmosError
[code=1040, message=The server is busy. Please try again.]

Previously all clients slept for fixed intervals and thus retried
around the same time.  This commit adds a random delay which should
better distribute load on the provider.
2014-03-03 22:30:50 -08:00
Andrew Gaul 08992c7a3d Deprecate WriteTo
Use Payload.getInput and Guava helpers instead
2014-02-21 17:11:22 -08:00
Andrew Gaul b3f7838958 Deprecate StreamingPayload 2014-02-19 21:14:52 -08:00
Andrew Gaul c2397f80ca JCLOUDS-459: Limit maximum user threads
Previously jclouds could use an unlimited number of threads on its
user ExecutorService.  While this ExecutorService will go away when we
complete deasyncafication, we should prevent jclouds from misbehaving
until that time.
2014-02-19 10:05:18 -08:00
Andrew Gaul 9dae3a692e JCLOUDS-473: Close FileInputStream in Wire.copy
FileBackedOutputStream.asByteSource.getInput returns a FileInputStream
which we do not close.  We later call FileBackedOutputStream.reset
which removes the underlying File.  This fails on Windows which does
not support deleting an open file and leaks resources on other
platforms.  Eagerly close to address this issue.
2014-02-18 16:43:19 -08:00
Andrew Phillips b1a2baee62 Cleaning up checkstyle warnings caused by 5976159
Looks like the workaround for Guava 1635 will be with us for a while on 1.7.x
2014-02-12 02:12:09 -05:00
Ignasi Barrera a9ccef2b9b [maven-release-plugin] prepare for next development iteration 2014-02-06 10:16:10 +01:00
Ignasi Barrera cbe0e7bedd [maven-release-plugin] prepare release jclouds-1.7.1-rc1 2014-02-06 10:16:08 +01:00
Andrew Gaul e7795c8755 Store propagatable exceptions in a static field
Also include ResourceAlreadyExistsException.  References JCLOUDS-438.
2014-01-29 10:30:37 -08:00
Andrew Gaul b8fae85eaf JCLOUDS-438: Map S3 code BucketAlreadyExists
Mapping to ResourceAlreadyExistsException allows external callers to
handle this situation specifically.
2014-01-28 21:22:44 -08:00
Andrew Phillips 742003ab3a Fixing an error message about an unassignable backend 2014-01-28 09:21:54 -05:00
Andrew Phillips dc7bad39cc JCLOUDS-415: Preparing for Guava 16.0
Invokable.equals has changed from 15 to 16 so we need to implement the check differently ourselves.
2014-01-28 07:59:45 -05:00
Andrew Gaul 114872483b Address Checkstyle violations 2014-01-27 19:06:46 -05:00
Andrew Phillips 597615977e JCLOUDS-427: Avoiding Guava reflection code broken in Java 7u51
- Adding a version of TypeToken.where that replaces two parameters in one go
- Avoiding TypeToken type parameter replacement with wildcard bounds

Works around https://code.google.com/p/guava-libraries/issues/detail?id=1635
2014-01-24 01:07:50 -05:00
Andrew Gaul 0843c36dd2 JCLOUDS-428: Address Java 8 compatibility nits
Tested with JDK 1.6.0_45, 1.7.0_45, and 1.8.0-ea-b123.
2014-01-19 20:38:32 -08:00
Ignasi Barrera 1ebfc7d43a Added OkHttp driver to support modern HTTP verbs 2014-01-14 13:11:31 +01:00
Andrew Gaul c444b5bf72 Remove erroneous deprecation of ByteSource method 2013-12-26 10:38:15 -08:00
Andrew Gaul bfff3c421f Replace calls to Closeables.closeQuietly
Guava 16 removes this API.  Replace with Closeables2.closeQuietly.
References JCLOUDS-413 and JCLOUDS-415.
2013-12-24 18:02:43 -08:00
Andrew Gaul 75561b5c60 Address miscellaneous Guava deprecations
References JCLOUDS-415.
2013-12-24 18:02:43 -08:00
Andrew Bayer ed663fb825 [maven-release-plugin] prepare for next development iteration 2013-12-20 10:32:48 -05:00
Andrew Bayer 52605675c5 [maven-release-plugin] prepare release jclouds-1.7.0-rc2 2013-12-20 10:32:48 -05:00
Andrew Gaul 9d2e4759a3 JCLOUDS-410. Correctly override getInput
Payload.getInput must always call openStream to handle overridden
methods correctly.  Previously this caused errors in jclouds-chef in
BaseCipherPayload.
2013-12-17 08:02:03 -08:00
Andrew Gaul e48d4985ea JCLOUDS-410. Add support for ByteSource Payloads
Also deprecate byte[], File, InputSupplier<InputStream>, and String
Payloads.  Callers should instead provide a ByteSource via
ByteSource.wrap(byte[]) and Files.asByteSource(File)
2013-12-16 13:06:30 -08:00
Andrew Gaul f3dcd3fe86 JCLOUDS-410. Deprecate Payload.getInput
We plan to transition Payload to ByteSource in the next major release.
Unfortunately Payload.getInput masks its checked exception and
ByteSource.getInput is final so we cannot continue to mask the
exceptions.  Deprecation of getInput and addition openStream allows us
to transition callers from the former to the latter.
2013-12-16 13:02:37 -08:00
Andrew Gaul ac1f05ffac Remove unneeded calls to ByteSources.asByteSource 2013-12-15 22:57:32 -08:00
Andrew Gaul 8bf23069d9 Prefer Math.max over Ints.max to avoid varargs 2013-12-12 17:53:34 -08:00
Ignasi Barrera cec0981bb9 Properly set the request method in HTTPS connections 2013-12-12 12:30:06 -06: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
Eric Evans 15a3c04fb7 JCLOUDS-356 multipart uploads with InputStream payloads
This changeset introduces an alternative to PayloadSlicer,
IterablePayloadSlicer, with a method for returning a Payload iterator.

...swift.blobstore.strategy.internal.SequentialMultipartUploadStrategy
has been updated to to use a payload iterator.
2013-12-11 16:34:19 +01:00
Everett Toews c40dc996d9 JCLOUDS-400: Allow the HeaderParam annotation to be used in a Caller.
This allows jclouds to factor out common headers into the Caller so they don't
have to be repeated in the Callee.

The Produces/Consumes annotations (Content-Type/Accept headers) will also
propagate from the Caller to the Callee.
2013-12-11 13:24:07 +01:00
Andrew Gaul 4cef85d1cd Address Checkstyle violations in tests 2013-12-09 14:40:07 -08:00
Ignacio Mulas 6d7bde9676 PATCH HTTP request implementation 2013-11-13 23:23:40 +01:00