Skip to content
cowtowncoder edited this page May 1, 2013 · 9 revisions

Installing TransiStore

What you need before starting

To run a TransiStore storage cluster, all you need is:

  • TransiStore server jar (see [Download] page) -- usually artifact built by ts-server sub-module
  • Configuration file for nodes. Sample configurations can be found from sample/ directory of the project
  • Directory for data files (defined in configuration)

and obviously a system to run node(s) of the cluster on. Since we start with a single-node cluster, one is needed. (NOTE: you can run multiple nodes on a single host, but this is mostly useful for testing).

Setting up your TransiStore environment

The easiest way to getting a working setup locally is to simply git clone this project:

git clone https://github.com/FasterXML/TransiStore.git

which creates the project structure. This structure is used and assumed to exist for the rest of instructions.

After cloning, you should usually build artifacts with:

mvn clean install

(for which you must have Maven build too, version 3)

Your Very First Running Cluster

So assuming that you have simply downloaded project, and built it with mvn clean install, you could run a single node "cluster" using script run-9090.sh from project main directory (it works on Unix systems; can be modified easily for Windows):

#!/bin/sh
java -Xmx1024M -Xms1024M -Xmn512M -XX:-UseParallelOldGC \
  -Ddw.http.port=9090 -Ddw.http.adminPort=9090 \
  -jar ts-server/target/transistore-server-0.9.6-SNAPSHOT.jar \
  server ./sample/single-node-9090.yml

what this does is to run a TransiStore node locally, listening to port 9090, using sample configuration file from sample/single-node-9090.yml. (NOTE: to see a more complete configuration example, peek into sample/single-node-full-9090.yml)

Assuming you do this, you should have a running instance.

NOTE: alternatively you can also find actual TransiStore jars from Maven: for example, command jar can be found here

How do I know it works?

By default, you should see log entries on console, and hopefully no errors. But to ensure things are working we can use the simple command-line client project also provides.

Command line client can be invoked with ./tstore.sh wrapper script (TODO: add Windows wrapper). We can start by listing all entries in partition "p1" with:

./tstore.sh list tstore://p1@

which should list nothing, since the store is empty. (NOTE: 'list' command lists anything within specified partition having specified path prefix -- when using directory-style naming convention we can use it to simulate directories, even though TransiStore itself does not have such concept).

So let's store something in there; say, pom.xml from project directory:

./tstore.sh put pom.xml tstore://p1@/

and when running ./tstore.sh list tstore://p1@ again, we should see something like:

8061 43s    14d    tstore://p1@/pom.xml

(where 8061 is size in bytes; 43 seconds age of entry; 14d meaning entry expires in 14 days, and last part is full path)

And finally, we can similarly download stored content with:

./tstore.sh get tstore://p1@/ copy

which should copy the pom.xml that was uploaded earlier.

Next Steps

After having set up our example toy cluster, you could consider trying to Install a 2-node cluster.

Clone this wiki locally