Commit Graph

253 Commits

Author SHA1 Message Date
Zack Shoylev ab25fc7259 putblob fails when file exists 2015-11-23 16:01:46 -06:00
Ka-Hing Cheung ca70d44143 don't remove directory if it's a blob
the filesystem blob store was always removing a/ when a/b was
removed, even if the client explicitly created a/. this patch
fixes that
2015-11-20 17:27:19 -08:00
Andrew Gaul f706d9c13a JCLOUDS-835: Atomically put filesystem blobs
Write to a temporary file and rename to the desired destination to
better match object store semantics.
2015-11-20 14:44:02 -08:00
Zack Shoylev 2efcb2c5a9 Fixes a windows locale bug with the "Everyone" principal 2015-11-19 11:50:15 -06:00
Zack Shoylev 41ce90ec36 Fixes tests failing on windows filesystems Makes windows behavior more consistent, especially for deletes 2015-11-11 21:01:13 -06:00
Timur Alperovich 85357cf92a JCLOUDS-217: Filesystem: avoid trailing spaces.
On Windows, we need to avoid trailing spaces, as the test fails to
create the required blob. Specifically, we should not test blobs named
" " and "%20 ".
2015-09-08 15:19:03 -07:00
Nate Rosenblum 496e27f1af Always return ETag from filesystem object store
If the Content-MD5 extended attribute is missing for an object,
recompute it and return as the ETag. Primarily affects OS X.
2015-08-20 14:46:17 -07:00
Zack Shoylev 6945b04243 Fixes a small test bug on windows 2015-07-08 20:19:33 -05:00
Timur Alperovich 5383148d9e Filesystem: disable directory integration test.
There is no notion of marker blobs in the file system blob store,
which means that when listing results after issuing the
"createDirectory" request, the marker blob will not be in the result
set.
2015-07-07 18:00:32 -07:00
Timur Alperovich 8c9344b501 JCLOUDS-930: Regression in a File System test.
Fix a regression in the file system blob store, where a test does not
expect the trailing delimiter character.
2015-06-29 21:41:33 -07:00
Andrew Gaul 1dcd4500ea JCLOUDS-930: disable testListDirectoryBlobsS3FS
Regression from 8677ffcb21.
2015-06-29 19:36:20 -07:00
Ka-Hing Cheung 8b325d585e object stores typically sort the list of containers 2015-06-24 15:08:23 -07:00
Andrew Gaul 38fa41d056 JCLOUDS-941: Ignore metadata tests on Mac OS X
Also make testOverwriteBlobMetadata consistent with other tests.
2015-06-22 11:50:20 -07:00
Iván López 37a014ae00 JCLOUDS-941: Auto-detect filesystem Content-Type
When a filesystem blob does not have content metadata and when users
set jclouds.filesystem.auto-detect-content-type to tru, probe the file
type to return to clients.  This is useful when using jclouds to serve
an existing filesystem.
2015-06-21 22:55:57 -07:00
Zack Shoylev 786e5d8e25 Adds windows ACL code for file permissions, fixes build. 2015-04-28 14:35:58 -05:00
Andrew Gaul fadbbad8ac JCLOUDS-732: Filesystem portable object ACLs 2015-03-31 15:33:34 -07:00
Andrew Gaul deff8d8413 JCLOUDS-660: Filesystem portable container ACLs 2015-03-31 15:33:33 -07:00
Andrew Gaul 4f566d3b6e Address and suppress FindBugs warnings 2015-03-30 20:40:10 -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
Ka-Hing Cheung a2ee7341e3 fix non-recursive list of dir with empty prefix 2015-02-23 17:52:42 -08:00
Andrew Gaul d8aea21f72 JCLOUDS-732: Local blobstore portable object ACLs
Intentionally unimplemented.
2015-02-21 10:28:02 -08:00
Ka-Hing Cheung be7b9f4cc4 fix non-recursive list with empty prefix 2015-02-20 23:29:48 -08:00
Andrew Gaul 994f84e4f5 JCLOUDS-660: Local blobstore portable container ACLs
Intentionally unimplemented.
2015-02-12 17:26:47 -08:00
Andrew Gaul 10690f9293 Handle null return value from File.listFiles
This matches the behavior of other call sites.
Fixes andrewgaul/s3proxy#39.
2015-02-03 20:22:58 -08:00
Zack Shoylev a8c5e28129 Windows fixes, mostly separator related. 2015-01-28 19:47:19 -06:00
Ka-Hing Cheung 3cabb196ce fix usermetadata check on OS X
Java on OS X does not support extended attributes, which the
filesystem blobstore uses to implement user metadata. This disable
the relevant test on OS X
2015-01-20 17:33:22 -08:00
Ka-Hing Cheung 5edd5de38c make xattr work in docker volume
when you bind a host volume into docker, java does not correctly
detect that and checks the xattr support on the root fs instead
of the host fs. The root fs often does not support xattr, so
the check would fail even if the target really does support xattr.

the fix is just try setting the xattrs anyway, and let them fail
if there really isn't xattrs support
2015-01-13 18:08:55 -08:00
Ka-Hing Cheung 5cc3b243fc disable directory blob tests in OS X
On OS X, java doesn't support xattrs, which is required by
directory blobs. Disable those tests on OS X
2015-01-12 12:32:41 -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
Ka-Hing Cheung b7ab8b18a0 support directory blobs
make the filesystem blob store distinguish between a/ and a. a/
must be a directory blob with no content and only metadata

on listing, only directories with md5 attribute is considered a
blob and returned
2015-01-09 16:28:16 -08:00
Andrew Gaul 77eaa2c1f9 Add container creation date to local blobstores 2015-01-09 14:10:33 -08:00
Jeremy Daggett d3c1e2eab4 Use AutoService to generate service loader metadata 2015-01-09 11:22:12 -08:00
Ka-Hing Cheung 692691bcdc fix fs container validator test
previoisly it was testing blob key validator instead of container
name validator
2015-01-07 11:36:47 -08:00
Ignasi Barrera 7775f1a6b0 JCLOUDS-747: Configured Animal Sniffer plugin to check runtime compatibility 2014-11-27 18:06:19 +01:00
Adrian Cole 0012e6f950 JCLOUDS-534 Avoid runtime incompatibility introduced by Guava's closeQuietly. 2014-10-29 17:01:26 -07:00
Adrian Cole 2a1dff243d JCLOUDS-652 Pin filesystem api to Java 7+. 2014-10-25 10:29:33 -07:00
Adrian Cole a22a725293 JCLOUDS-40 Remove AsyncBlobStore references from filesystem api 2014-10-05 13:18:02 -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
Andrew Gaul 000a505360 Prefer Files.delete(Path) over File.delete
The former throws an exception including the cause if the operation
fails while the latter merely returns a boolean.
2014-09-08 18:41:27 -07:00
Andrew Gaul fc4b072a26 Ignore non-existent container in deleteContainer
All other blobstore providers allow this operation.  Further this
matches the behavior of TransientStorageStrategy.deleteContainer.
This commit prevents a spurious error message from
deleteContainerOrWarnIfUnable after test suite completion.
2014-09-08 18:37:19 -07:00
Andrew Gaul 7869d92b29 Skip test when filesystem does not have xattr
Addresses regression from a104944 seen on CloudBees.
2014-09-05 17:53:59 -07:00
Andrew Gaul a1049449f4 Reset xattr on overwrite in filesystem provider 2014-09-04 17:22:26 -07:00
Andrew Gaul 550018a68d Use randomByteSource to generate test data
This avoids buffering the entire bolus of data in-memory.
2014-08-27 15:59:36 -07:00
Andrew Gaul 9009bb5268 JCLOUDS-658: use xattr only on supported systems
Mac OS X HFS+ does not support UserDefinedFileAttributeView:

https://bugs.openjdk.java.net/browse/JDK-8030048
2014-08-12 12:30:06 -07:00
Andrew Gaul 204a6c7f3b JCLOUDS-658: xattr for filesystem blob metadata
This allows the filesystem blobstore to mimic real blobstores more
accurately.  This also doubles the speed of getBlob by storing the
Content-MD5 header instead of recalculating it.
2014-08-11 12:56:14 -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 Gaul 1e1eb5a092 Add deleteContainerIfEmpty to BlobStore
This matches how most blobstores operate: delete container is a single
operation, not a compound operation which recursively deletes blobs.
Azure is the only provider which allows deleting a non-empty
container.
2014-07-25 23:02:39 -07:00
Andrew Phillips 365ac21f1e Addressing a Checkstyle violation 2014-07-22 13:35:43 -04:00
Andrew Gaul d1bd551edf Add support for filesystem last modified 2014-07-21 12:25:04 -07:00
Andrew Gaul 370194b2be Enable more filesystem integration tests
Other tests will require Java 7 xattr support.
2014-07-19 12:17:23 -07:00
Andrew Gaul dd3dc9790e Close streams in integration tests
Also remove bogus delete workaround.  Previously unclosed
FileInputStream caused test failures on Windows which cannot delete
open files.  Found with Kohsuke's file-leak-detector.
2014-07-19 05:25:20 -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 a8b106c2bb JCLOUDS-622: remove calls to InputSupplier methods
Guava 16 deprecated these methods and Guava 18 will remove them.
2014-07-15 03:09:58 -07:00
Andrew Gaul f4eca0422d Enforce correct MD5 for local blobstores
Matches behavior of real blobstores.
2014-07-10 22:19:42 -07:00
Andrew Gaul e799a7409c 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:29:17 -07: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 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 0d2c7ed6ff Use HashingInputStream to avoid buffering Payload 2014-05-27 15:53:06 -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 67c2b5f6b9 Enable whitespace around Checkstyle rule 2014-05-08 18:31:47 -07:00
Andrew Gaul d0bd30cc15 Address several Guava InputSupplier deprecations
Many remain due to Payload implementing InputSupplier<InputStream>.  Guava 18
will remove InputSupplier.
2014-04-12 12:02:26 -07:00
Andrew Gaul 266d7f847b Prefer ByteSource over deprecated InputSupplier 2014-02-18 22:35:10 -08:00
Andrew Gaul c7b0f66544 Replace calls to Closeables.closeQuietly
Guava 16 removes this API.  Replace with Closeables2.closeQuietly.
References JCLOUDS-413 and JCLOUDS-415.
2013-12-21 12:30:59 -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 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
Zack Shoylev 6e663be20a Fixes filesystem tests sometimes failing on Windows. 2013-11-26 16:12:46 -06:00
Andrew Gaul 6c5effcdb1 Address error-prone empty statement warnings 2013-11-05 16:22:44 -08:00
Zack Shoylev 7593935380 JCLOUDS-332 Skips tests broken on windows 2013-10-08 15:07:35 -05: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 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 65729acd6e Explain expected result in filesystem test 2013-09-06 09:26:43 -07:00
Andrew Gaul 3ad6b275d4 Run some filesystem integration tests
Previously no integration tests ran, now we see:

Tests run: 43, Failures: 0, Errors: 0, Skipped: 8
2013-09-04 13:26:46 -07:00
Andrew Gaul 1a003ee731 Handle large putBlob with filesystem blobstore
Previously large putBlob caused an OutOfMemoryError even with
repeatable Payloads.  Fixes JCLOUDS-248.
2013-08-26 20:17:46 -04:00
Andrew Gaul fcdc3d6138 Expect exception from FilePayload.getInput
Previously the constructor threw this.  Fixes regression from ac58a70.
2013-07-16 08:26:50 -07:00
Andrew Gaul 1a6be0eb67 Do not repeat array type in initializers 2013-06-18 21:02:50 -07:00
Andrew Bayer 32ea520f34 Add license headers to src/test/resources where possible, more fine-grained RAT exclusions 2013-06-12 16:45:29 -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
adriancole fbe9f945e7 rename bindMappedApi -> bindSyncToAsyncApi 2013-04-10 08:57:32 -07:00
adriancole 61067d3683 Deprecated remaining code related to RestContext, RestApiMetadata, and RestClientModule for ApiContext, HttpApiMetadata, HttpApiModule 2013-04-09 22:07:43 -07:00
Andrew Gaul 648e6c2a8a Remove InputSuppliers.of(InputStream)
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.
2013-04-03 13:19:42 -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
Andrew Gaul ff42fdfa13 Address FindBugs warnings 2013-02-24 20:17:50 -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 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
Andrew Gaul ac9acb8808 Dynamically generate filesystem blobstore input
This removes several large images from the source tree.
2013-01-22 10:57:11 -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 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 2523ab54ac removed use of static fields to share type mapping info 2012-12-30 17:22:03 -08:00