Commit Graph

180 Commits

Author SHA1 Message Date
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