https://github.com/malvag/jclouds-h3
A Jclouds API provider for H3 object store
https://github.com/malvag/jclouds-h3
cloud h3 jclouds key-value s3 storage
Last synced: 11 months ago
JSON representation
A Jclouds API provider for H3 object store
- Host: GitHub
- URL: https://github.com/malvag/jclouds-h3
- Owner: malvag
- Created: 2020-11-26T17:03:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-07T18:44:43.000Z (almost 5 years ago)
- Last Synced: 2025-01-08T00:15:03.428Z (about 1 year ago)
- Topics: cloud, h3, jclouds, key-value, s3, storage
- Language: Java
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JClouds-H3 Storage Api Provider
Jclouds-H3 is a [Jclouds](https://github.com/apache/jclouds) API provider for [H3](https://github.com/CARV-ICS-FORTH/H3/) object store.
Provides a minimal but functional storage API for jclouds-compatible technologies(i.e. [s3proxy](https://github.com/gaul/s3proxy)).
Implemented the Jclouds BlobStore interface, utilizing H3's Java wrapper(JH3),
similar to Amazon's S3, providing an efficient execution throughout the stack.
## Installation
Detailed instructions on how to install, configure, and get the project running.
-To install locally:
**Note**: Firstly we need to have H3 and its wrappers installed locally:
- Instructions of how to install the shared libraries of H3lib, are [here](https://github.com/CARV-ICS-FORTH/H3/tree/master/h3lib) .
- Instructions of how to install the Java wrapper of H3, are [here](https://github.com/CARV-ICS-FORTH/H3/tree/master/JH3lib) .
**Note**: use JDK 9+ to avoid JH3's class missmatch.
##### Install Module with:
``` mvn install -Drat.skip=true -Dcheckstyle.skip=true ```
- need to skip RAT::check
- need to skip checkstyle::check
## Configuration
```properties
jclouds.provider=h3
jclouds.h3.basedir=file:///tmp/demo_h3via_jclouds
```
## Usage test
```java
// setup where the provider must store the files
Properties properties = new Properties();
properties.setProperty(H3Constants.PROPERTY_BASEDIR, "file:///tmp/demo_h3via_jclouds");
// setup the container name used by the provider (like bucket in S3)
String containerName = "testbucket";
// get a context with h3 that offers the portable BlobStore api
BlobStoreContext context = ContextBuilder.newBuilder("h3")
.overrides(properties)
.buildView(BlobStoreContext.class);
// create a container in the default location
BlobStore blobStore = context.getBlobStore();
blobStore.createContainerInLocation(null, containerName);
// add blob
BlobBuilder builder = blobStore.blobBuilder("test");
builder.payload("test data");
Blob blob = builder.build();
blobStore.putBlob(containerName, blob);
// retrieve blob
Blob blobRetrieved = blobStore.getBlob(containerName, "test");
// delete blob
blobStore.removeBlob(containerName, "test");
//close context
context.close();
```
## Known issues
- Unstable download when downloading parts with multiple connections per file (>100MB).