Documentation > Configuration > Cluster Configuration File

The H-Store cluster configuration file defines what nodes will be used in a benchmark run for the database. H-Store assumes that each of these nodes has passwordless SSH logins enabled. Note that the cluster configuration file is different from where the benchmark clients will run.

By default, hstore-prepare creates a catalog with a cluster of only one host (global.defaulthost) two sites, each with two partitions. You can create a custom specification file that defines the host/site/partition layout of the target cluster. This specification file should be a plain text file, where each line contains a triplet HOSTNAME:SITE#:PARTITION#. The following is an example of how to create a cluster configuration with two hosts (i.e., host0.cs.brown.edu and host1.cs.brown.edu), where host0.cs.brown.edu only has one site with two partitions and host1.cs.brown.edu has two sites each with one partition:

host0.cs.brown.edu:0:0
host0.cs.brown.edu:0:1
host1.cs.brown.edu:1:2
host1.cs.brown.edu:1:3
host1.cs.brown.edu:2:4
host1.cs.brown.edu:1:5
host1.cs.brown.edu:2:6
host1.cs.brown.edu:2:7

Alternatively, you can specify the partitions at each site using non-overlapping ranges or comma-delimited lists:

host0.cs.brown.edu:0:0-1
host1.cs.brown.edu:1:2,3,5
host1.cs.brown.edu:2:4,6-7

Note that both the site numbers and partition numbers start at zero. The partition number should always be unique. This file can now be passed in as the using hosts parameter to hstore-prepare. You can also use hstore-jar to update an existing catalog with the new cluster layout:

ant hstore-prepare -Dproject=$BENCHMARK -Dhosts=/path/to/cluster.txt

Instead of using a file, the cluster configuration can be passed as a semi-colon delimited list using the hosts parameter. It is important that you wrap the value portion of the parameter in quotation marks to ensure proper escaping:

ant hstore-jar -Dproject=$BENCHMARK \
    -Dhosts="host0.cs.brown.edu:0:0-1;host1.cs.brown.edu:1:2,3,5;host1.cs.brown.edu:2:4,6-7"

You can view the cluster configuration in the project jar using either the catalog viewer tool, or the catalog-info task:

ant catalog-info -Dproject=tpcc

Sample Output:

Catalog File:    tpcc.jar
# of Hosts:      2
# of Sites:      3
# of Partitions: 8
----------------------------------------------------------------------
Cluster Information:

[00] HOST host0.cs.brown.edu ┃ [01] HOST host1.cs.brown.edu
     └ SITE H00: [0, 1]      ┃      ├ SITE H01: [2, 3, 5]  
                             ┃      └ SITE H02: [4, 6, 7]