Java Manta Client SDK
java-manta is a community-maintained Java
SDK for interacting with Joyent’s Manta system.
Java 1.8 is required for SDK compilation.
It effectively supports both Java 8 and Java 11
in application usage. The main client module can be installed by adding the following dependency using
Maven 3.1.x:
<dependency>
<groupId>com.joyent.manta</groupId>
<artifactId>java-manta-client</artifactId>
<version>LATEST</version>
</dependency>
and the unshaded module can be installed by adding the following dependency using Maven 3.1.x:
<dependency>
<groupId>com.joyent.manta</groupId>
<artifactId>java-manta-client-unshaded</artifactId>
<version>LATEST</version>
</dependency>
Please refer to the installation documentation for more details about the following topics:
Configuration can be done through system properties or environment variables.
Listed below are the most commonly used configuration options:
System Property | Environment Variable | Default |
---|---|---|
manta.url | MANTA_URL | https://us-east.manta.joyent.com:443 |
manta.user | MANTA_USER | |
manta.key_id | MANTA_KEY_ID | |
manta.key_path | MANTA_KEY_PATH | $HOME/.ssh/id_rsa (if exists) |
manta.url
( MANTA_URL )manta.user
( MANTA_USER )manta.key_id
: ( MANTA_KEY_ID)ssh-keygen -l -f ${MANTA_KEY_PATH} -E md5 | cut -d' ' -f 2
manta.key_path
( MANTA_KEY_PATH)Please refer to the configuration documentation for example code and the full
list of configuration options which include retry and performance tuning in addition to encryption and authentication
parameters.
You’ll need a manta login, an associated key, and its corresponding key
fingerprint.
You will then create or use an implementation of ConfigContext
to set up
your configuration. Once you have an instance of your configuration class,
you will then construct a MantaClient
instance. The MantaClient
class
is intended to be used per Manta account. It is thread-safe and you should
share one instance across multiple threads.
For detailed usage instructions consult the provided JavaDoc and examples. The
JavaDoc can also be browsed online at javadoc.io
Jobs can be created directly with the MantaClient
class or they can be created
using the MantaJobBuilder
class. MantaJobBuilder
provides a fluent interface
that allows for an easier API for job creation and it provides a number of
useful functions for common use cases.
For more examples, check the included examples module and the
integration test module.
Known edge cases and other topics are covered in the FAQ.
Contributions are welcome! Please read the CONTRIBUTING.md document for details
on getting started.
There are portions of the SDK that are somewhat complex or fiddly. Please read the DEVELOPING.md
document for details, before developing the Java SDK.
Contributing developers are strongly encouraged to add unit-tests and integration-tests. Refer to the testing documentation
for information on full test suite requirements.
Please refer to the release documentation.
See https://github.com/joyent/java-manta/issues.
Java Manta is licensed under the MPLv2. Please see the LICENSE.txt
file for more details. The license was changed from the MIT license to the MPLv2
license starting at version 2.3.0.
We are grateful for the functionality provided by the libraries that this project
depends on. Without them, we would be building everything from scratch. A thank you
goes out to: