Commit Graph

189 Commits

Author SHA1 Message Date
Andrew Gaul 186f052022 Remove BlobBuilder and Payloads.calculateMD5
Callers should instead explicitly set contentMD5, usually with the
results from Guava Hashing.md5(). This narrows the API and removes a
strange IOException from callers.  Further it removes a dangerous
rebuffering of arbitrarily-large non-repeatable Payloads.
2014-05-28 12:54:18 -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 2d88f5164e Enforce that all commas have trailing whitespace 2014-05-08 18:28:08 -07:00
Andrew Gaul a45124c51a JCLOUDS-505: Remove unused ObjectMD5
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.
2014-05-07 10:16:18 +02:00
Andrew Gaul e7fccd6528 Address Checkstyle violations 2014-03-13 14:06:38 -07:00
Roman C. Coedo 8dafeacfed Fixing a couple of typos 2014-03-12 14:41:23 -07:00
Andrew Gaul 8c495ddee4 JCLOUDS-137: Retry on HTTP 500 AtmosError 1040 2014-02-11 12:12:54 -08:00
Andrew Gaul 53134dfa4e Improve use of Splitter in Atmos code 2014-02-10 09:39:44 -08: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 17ce72794c Enable RedundantModifier for Checkstyle 2013-10-31 10:23:30 -07:00
Andrew Gaul 04c9c6afd2 JCLOUDS-339. Handle zero-length objects in Atmos
Atmos does not return a location header when writing zero-length
objects, which normally throws an HttpResponseException: no uri in
headers or content.
2013-10-08 22:14:37 -07:00
Andrew Gaul 7d20658b02 JCLOUDS-334. Return URI only if container created
This allows us to honor the BlobStore.createContainerInLocation
interface and gives consistency with other providers.
2013-10-08 13:03:55 -07:00
Andrew Gaul 103dd7315b Skip failing testCreateBlobWithExpiry on Atmos 2013-10-08 11:45:25 -07:00
Niraj Tolia e017b8904c Trivial: Remove unnecessary for loop in Atmos signing 2013-10-07 15:00:51 -07:00
Andrew Gaul f1fc63ab76 Add whitespace around keywords and braces 2013-09-30 09:39:29 -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 b2016703ad Add Atmos-specific MD5 checksum header
Tested against Atmos Online.
2013-09-11 18:05:47 -07:00
Andrew Gaul 6cc8e36f43 Add test for correct and incorrect contentMD5
Tested against atmos (skipped), aws-s3, azureblob, cloudfiles-us, and
filesystem (skipped).
2013-09-11 16:10:45 -07:00
Andrew Gaul b80bb48be3 Add trailing slash to Atmos listDirectories
This is more consistent with examples in the Atmos programmer's guide
and allows this operation to succeed when used with ViPR.
2013-08-30 09:07:12 -07:00
Andrew Gaul e14e23be52 Revert "Add Atmos-specific MD5 checksum header"
This reverts commit 98230e60a4.

This succeeded in my tests but integration tests fail.
2013-07-17 10:29:42 -07:00
Andrew Gaul 98230e60a4 Add Atmos-specific MD5 checksum header
Tested that Atmos Online and Synaptic Atmos both enforce this.
2013-07-10 22:16:44 -07:00
Andrew Gaul 0d310f3643 [trivial] demote Boolean to primitive 2013-07-10 22:12:24 -07:00
Andrew Gaul d5fd35b45a Set provider id in AtmosClientLiveTest
This allows Atmos live tests to run.
2013-07-10 21:16:07 -07:00
Andrew Gaul d113b0ba63 Remove Strings2.replaceAll(String, Pattern, String)
Replace with direct calls to
Pattern.matcher(String).replaceAll(String).
2013-06-03 14:41:27 -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
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 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 b186220ff7 atmos: explicitly set Expect header on methods that need it 2013-03-03 21:09:48 -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 8c327f036b issue 1184 add named for Atmos commands 2013-02-02 18:12:49 -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
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
Adrian Cole 37e587ee51 changes related to centralizing construction of invokables 2013-01-19 17:17:30 -08:00
Adrian Cole 4980367991 centralize TypeToken creation 2013-01-19 11:31:55 -08:00
adriancole 04fe89b75a update to guava 14.0-rc2 2013-01-18 16:02:25 -08:00
Adrian Cole 1ab3f0bb44 accomodate runtime credential changes 2013-01-15 22:26:50 -08:00
Adrian Cole a49a060152 There can be only one retryable predicate; use Predicates2.retry decorator 2013-01-13 20:30:34 -08:00
Adrian Cole 3962b30808 updated to use standard guava Futures and ListenableFuture 2013-01-13 09:31:10 -08:00
Adrian Cole 015fbf22a2 removed redundant retrying assertion code 2013-01-12 14:04:47 -08:00
Adrian Cole 47c215c63c removed custom guava code for scoped binding and type params 2013-01-08 22:48:10 -08:00
Adrian Cole 2480481835 dependent changes on tests and internal classes 2013-01-08 00:32:45 -08:00
Adrian Cole 3089111621 refactored internal code and tests to use FunctionalReflection 2013-01-07 00:36:31 -08:00
Adrian Cole 74c633f90a moved all providers and test cases from j.l.r.Method -> Invokable 2013-01-05 18:51:38 -08:00
Adrian Cole 42c7037a59 removed unused code or duplicated code; moved code only used once to where its used 2013-01-01 00:08:34 -08:00
Adrian Cole 9745e9dc2f fixed covariance and warnings on ApiMetadata subclasses 2012-12-31 19:40:49 -08:00
Adrian Cole bb953c981e fix issue #1101: Move to Guava 14 BaseEncoding and Hashing 2012-12-31 14:48:31 -08:00
Adrian Cole cddd35bc51 removed unnecessary generic types and made RestAnnotationProcessor immutable 2012-12-30 23:18:59 -08:00
Adrian Cole 13d8b9c402 replaced @Timeout w/explicit properties 2012-12-30 12:31:43 -08:00
Adrian Cole 9b1872c6ff removed custom code that duplicates functionality of guava fallbacks 2012-12-27 16:54:31 -08:00
Adrian Cole 20c3426fc8 replaced jersey w/Uris & UriTemplates; removed complexity in url encoding and edge cases like matrix params 2012-12-24 14:32:59 -08:00
Adrian Cole 878ec1bcab undid Serializable and added checkstyle InterfaceIsType:allowMarkerInterfaces=false 2012-11-18 09:23:44 -08:00
Andrew Gaul 3d191253ec Enforce use of Collection helpers via Checkstyle
This ensures that we do not repeat the type name.  Some instances remain
due to auto-generated code in dmtf/cim/Cim*.
2012-11-04 20:45:49 -08:00
Adrian Cole f4333157b9 make tests that decode credentials use valid base64 encoded strings 2012-11-04 15:37:49 -08:00
Andrew Gaul 0761874578 Prefer Assert.fail over assert
The former cannot be disabled.
2012-11-03 14:51:52 -07:00
Adrian Cole 5da5161485 Merge pull request #909 from andrewgaul/clear-container-timeout-exception
Throw TimeoutException from awaitCompletion
2012-10-30 08:57:20 -07:00
Andrew Gaul 93d69ece2b Enforce newline at end of file via Checkstyle
Also address all warnings, via:

find -name \*.java | while read i; do if [ x`tail -c 1 $i` != x"" ]; then echo >> $i; fi; done
2012-10-29 22:12:44 -07:00
Andrew Gaul 709ca69a2d Enforce that all imports are used via Checkstyle
Also remove all unused imports, via:

mvn checkstyle:checkstyle -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain | tac | awk -v FS=: '/warning/{print "sed -i " $2 "d " $1}' | while read i; do $i; done
2012-10-29 17:11:08 -07:00
Aled Sage 09425f4f69 Version upgrades
- gson from 2.2 to 2.2.2
- guava from 13.0 to 13.0.1
- rocoto from 6.1 to 6.2
- log4j from 1.2.16 to 1.2.17
- log back from 1.0.0 to 1.0.7
- httpclient from 4.1.3 to 4.2.2
- netty from 3.3.1 to 3.5.9
- slf4j from 1.6.4 to 1.7.2
- testing from various to 6.8
- jetty from 8.1.1 to 8.1.7
- snakeyaml from 1.10 to 1.11
2012-10-29 13:00:44 +00:00
Andrew Gaul 336ccfa2e6 Throw TimeoutException from awaitCompletion
This is a common error that callers should interpret correctly.  For
DeleteAllKeysInList, we integrate into its retry and backoff logic,
and for other callers, we continue to propagate RuntimeException.
2012-10-25 13:50:29 -07:00
Andrei Savu 0d8848b397 Replaced IllegalStateException with KeyAlreadyExistsException and fixed '\n' typo 2012-10-08 18:07:43 +03:00
Andrei Savu 03dc864115 Issue 973. Performance problems with Synaptic's Atmos service and writing new blobs 2012-10-08 16:26:40 +03:00
Adrian Cole 28d766b9df bumped to 1.6.0-SNAPSHOT 2012-09-17 01:43:52 -07:00
Andrei Savu 49bde19fa0 Add support for Swift TempURL Middleware 2012-09-10 13:45:55 +03:00
Andrew Gaul e7040f8cc8 Use appropriate Predicates helpers
Also capitalize constant.
2012-08-16 13:35:28 -07:00
Andrew Gaul 562f8277d3 Introduce LocalAsyncBlobStore
This commit unifies the filesystem and transient blobstores.
2012-07-23 09:20:41 -07:00
Andrew Gaul 985cccff9a Prefer valueOf over explicit object creation
This allows use of cached values.  Patched with:

find -name \*.java | xargs sed -i 's/new Boolean(false)/Boolean.FALSE/g'
find -name \*.java | xargs sed -i 's/new Boolean(true)/Boolean.TRUE/g'
find -name \*.java | xargs sed -i 's/new Boolean(/Boolean.valueOf(/g'
find -name \*.java | xargs sed -i 's/new Integer(/Integer.valueOf(/g'
find -name \*.java | xargs sed -i 's/new Long(/Long.valueOf(/g'
2012-07-22 21:01:46 -07:00
Andrew Gaul a40983a39d Prefer InputSupplier helpers
These ensure that inputs are closed properly.

Updated with: find -name \*.java | xargs sed -i
's/toStringAndClose(\(.*\)\.getInput())/toString(\1)/'
2012-07-18 17:42:48 -07:00
Adrian Cole b49f2e99c7 Issue 1022: naming conventions 2012-07-15 13:57:44 -07:00
Adrian Cole 05fd64af44 cleaned up http builders and expect tests 2012-07-15 01:50:38 -07:00
Ioannis Canellos b078adc3ce Removed fragments and dynamic imports. Added centralized control of the maven-bundle-plugin. 2012-06-03 19:41:54 +03:00
Aled Sage cd9c830c5a Issue 647: store Expires as Date; added ContentMetadataCodec for converting to/from HTTP headers 2012-05-17 11:24:50 +01:00
Aled Sage 9aedf7b6f6 Issue 647: added "Expires" header for ContentMetadata 2012-05-17 11:24:45 +01:00
Andrew Gaul 74440a7a87 Eliminate Throwables2.propagateOrNull
Throwables.propagate always propagates the Throwable; there is no need
to return null.
2012-05-02 13:51:36 -07:00
Andrew Phillips 42d57c5d15 Fix a test compilation error in Atmos caused by 755d51ad27 2012-05-02 08:04:40 -07:00
Adrian Cole df7d2acbb4 wrapper -> view 2012-04-23 19:14:36 -07:00
Adrian Cole 886d2cafb9 created base Context class with ProviderMetadata and Identity 2012-04-23 16:16:51 -07:00
Adrian Cole dab1dd69fc fix covariance/assignability in RestContext<? extends Client> subclasses 2012-04-18 15:05:39 -07:00
Adrian Cole 0b59dea073 removed ContextBuilder subclasses; added unwrap; undid generic params 2012-04-16 00:44:20 -07:00
Adrian Cole 23cb01f977 refactor PropertiesBuilder and related types into ApiMetadata and ProviderMetadata, and update all usage 2012-04-11 19:47:09 -06:00
Andrew Gaul b47860afc1 Use inference to elide duplicated type parameters
Found with:
grep 'Builder.*<.*>.*Immutable.*<.*>.*builder();'
2012-04-08 22:32:04 -07:00
Adrian Cole 764e0907f7 Issue 657:ApiMetadata 2012-04-01 18:43:31 -07:00
Adrian Cole 5c6ce9f081 organize imports 2012-03-28 03:37:48 -04:00
Andrew Gaul e2417605a2 Prefer Guava.nullToEmpty and HttpUtils.nullToEmpty
Make HttpUtils.valueOrEmpty static and change method name to
nullToEmpty to mimic Guava.
2012-03-19 20:48:52 -07:00
Ioannis Canellos 5490b3068c [842] Added required import packages to cloudfiles api bundle. Improved import packages in all bundles. 2012-02-17 00:49:39 +02:00
Adrian Cole fe4d148528 updated current version to 1.5.0-SNAPSHOT 2012-02-04 11:06:07 -08:00