Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Development Setup How To
Clone this wiki locally
This document will guide you through each step required for having Hybris code set up for compiling and running it within Eclipse.
Hybris is developed in Java 8 using Eclipse IDE.
We used Maven 3 as building tool and Git 1.8 for source version control.
Provided that you have installed all the tools mentioned above, you'll may still want to use the following Eclipse plugins: Egit and m2e. (NB: m2e is included in the Eclipse IDE for Java Developers package for versions equal or greater than 3.7 (Indigo))
For installing them:
- on Eclipse EE: menu
- on Eclipse Standard:
Install New Software...
Getting the code
After having downloaded and installed the tools and Eclipse plugins listed above, import the project by downloading the code from the git repository hosted by BitBucket:
Projects from git
- at the end of the wizard choose
Import as a general project
- right click on the project ->
Convert to Maven project
Although having ZooKeeper running is not required by the unit tests included in the source code (thanks to the Apache Curator Test Server), at some point you'll want having it installed on your machine anyway.
To do so, you have to download the ZooKeeper distribution from its website and follow this brief tutorial to set a basic configuration and start it locally.
Alternately, Consul is also supported as metadata store.
At this point you'll may want to set up Hybris configuration according to your likings, so let's see which are the two configuration files:
hybris.properties: includes the main Hybris settings
accounts.properties: includes the cloud storage accounts credentials and configurations
In particular, as a first step, in
hybris.properties you'd need to fill the
hybris.mds.address setting with the address of the Zookeeper server you've just started (e.g. "localhost:2181").
After that, you will need to fill the details about each of yours cloud storage accounts in
accounts.properties, namely the access key (
hybris.kvs.drivers.<account id>.akey) and the secret key (
hybris.kvs.drivers.<account id>.skey) for each of them.
hybris.t parameter in
hybris.properties sets the maximum number of tolerated failing clouds; so if you set it to 1, than you will need at least
2t+1, thus 3 cloud accounts to run Hybris.
Otherwise, for test sake, you may just want to use the transient fake in-memory key-value store instead, as in
accounts-test.properties. In this case change the
hybris.kvs.accountsfile property of
hybris.properties to "accounts-test.properties".
Running the test CLI
Hopefully, at this point you should have a compiling copy of Hybris code along with your desired configuration.
To try Hybris run the simple command line interface testing client contained in
With this client you'll be able to issue few commands that will let you store, delete, retrieve and list data on Hybris.
Erasure coding support
Erasure coding support is provided thanks to the jerasure library and its JNI bindings.
In the erasure coding parlance, k devices (clouds) are used for storing data blocks, while m are used instead for coding information. The original data is reconstructed using any k of the (k+m) stored blocks, so m devices (clouds) are allowed to fail. The size of the block stored in each cloud is about the original size divided by k.
k and m can be set respectively as
To run Hybris with erasure coding support you should set as
hybris.erasurecoding property and make sure that the jerasure library is compiled and linked to the project. For compiling the jerasure library shipped with Hybris just issue
make from command line on the project root. For linking it to the project you must do one of the following:
- or install both libraries (jerasure and jerasure.jni) into standard libs directories.
Git and Maven guides
Some useful links for getting started with Git and Maven: