{"id":678,"date":"2011-05-31T22:44:31","date_gmt":"2011-06-01T02:44:31","guid":{"rendered":"http:\/\/hstore.cs.brown.edu\/?page_id=678"},"modified":"2012-03-14T11:52:47","modified_gmt":"2012-03-14T15:52:47","slug":"cluster-file","status":"publish","type":"page","link":"https:\/\/hstore.cs.brown.edu\/documentation\/configuration\/cluster-file\/","title":{"rendered":"Cluster Configuration File"},"content":{"rendered":"
The H-Store<\/b> 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<\/a>. Note that the cluster configuration file is different from where the benchmark clients will run.<\/p>\n By default, hstore-prepare<\/tt> creates a catalog with a cluster of only one host (global.defaulthost<\/a>) 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#<\/tt>. The following is an example of how to create a cluster configuration with two hosts (i.e., host0.cs.brown.edu<\/tt> and host1.cs.brown.edu<\/tt>), where host0.cs.brown.edu<\/tt> only has one site with two partitions and host1.cs.brown.edu<\/tt> has two sites each with one partition:<\/p>\n Alternatively, you can specify the partitions at each site using non-overlapping ranges or comma-delimited lists:<\/p>\n 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<\/tt> parameter to hstore-prepare<\/tt>. You can also use hstore-jar<\/tt> to update an existing catalog with the new cluster layout:<\/p>\n Instead of using a file, the cluster configuration can be passed as a semi-colon delimited list using the hosts<\/tt> parameter. It is important that you wrap the value portion of the parameter in quotation marks to ensure proper escaping:<\/p>\n You can view the cluster configuration in the project jar using either the catalog viewer tool<\/a>, or the catalog-info<\/tt> task:<\/p>\n Sample Output:<\/p>\n\r\nhost0.cs.brown.edu:0:0\r\nhost0.cs.brown.edu:0:1\r\nhost1.cs.brown.edu:1:2\r\nhost1.cs.brown.edu:1:3\r\nhost1.cs.brown.edu:2:4\r\nhost1.cs.brown.edu:1:5\r\nhost1.cs.brown.edu:2:6\r\nhost1.cs.brown.edu:2:7\r\n<\/pre>\n
\r\nhost0.cs.brown.edu:0:0-1\r\nhost1.cs.brown.edu:1:2,3,5\r\nhost1.cs.brown.edu:2:4,6-7\r\n<\/pre>\n
\r\nant hstore-prepare<\/tt> -Dproject=$BENCHMARK -Dhosts=\/path\/to\/cluster.txt\r\n<\/pre>\n
\r\nant hstore-jar<\/tt> -Dproject=$BENCHMARK \\\r\n -Dhosts=\"host0.cs.brown.edu:0:0-1;host1.cs.brown.edu:1:2,3,5;host1.cs.brown.edu:2:4,6-7\"\r\n<\/pre>\n
ant catalog-info<\/tt> -Dproject=tpcc<\/pre>\n
\r\nCatalog File: tpcc.jar\r\n# of Hosts: 2\r\n# of Sites: 3\r\n# of Partitions: 8\r\n----------------------------------------------------------------------\r\nCluster Information:\r\n\r\n[00] HOST host0.cs.brown.edu \u2503 [01] HOST host1.cs.brown.edu\r\n \u2514 SITE H00: [0, 1] \u2503 \u251c SITE H01: [2, 3, 5] \r\n \u2503 \u2514 SITE H02: [4, 6, 7]<\/pre>\n