Skip to content

Commit

Permalink
Add comments to the tools
Browse files Browse the repository at this point in the history
  • Loading branch information
voldemort authored and jayjwylie committed Jun 20, 2013
1 parent e40f793 commit 3122693
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/java/voldemort/tools/PartitionAnalysisCLI.java
Expand Up @@ -36,6 +36,11 @@

import com.google.common.base.Joiner;

/*
* Analyzes the partition layout of a cluster based on the storage definitions
* for that cluster and determines how well balanced the partition layout is.
*/

public class PartitionAnalysisCLI {

private final static Logger logger = Logger.getLogger(PartitionAnalysisCLI.class);
Expand Down
4 changes: 4 additions & 0 deletions src/java/voldemort/tools/RebalanceControllerCLI.java
Expand Up @@ -39,6 +39,10 @@

import com.google.common.base.Joiner;

/*
* Executes the actual rebalance operation againt a server.
*/

public class RebalanceControllerCLI {

private final static Logger logger = Logger.getLogger(RebalanceControllerCLI.class);
Expand Down
11 changes: 9 additions & 2 deletions src/java/voldemort/tools/RebalancePlanCLI.java
Expand Up @@ -37,6 +37,12 @@

import com.google.common.base.Joiner;

/*
* This tool generates a rebalance plan based on current and final xml. The plan
* will contain steps on how to rebalance the server such that its layout
* changes from the 'current' state to the 'final' state.
*/

public class RebalancePlanCLI {

private final static Logger logger = Logger.getLogger(RebalancePlanCLI.class);
Expand Down Expand Up @@ -75,8 +81,9 @@ private static void setupParser() {
private static void printUsage() {
StringBuilder help = new StringBuilder();
help.append("RebalancePlanCLI\n");
help.append(" Moves partitions to achieve better balance. This can be done for shuffling (improve balance among existing nodes),"
+ " cluster expansion (adding nodes to some zones), and zone expansion (adding an entire new zone).\n");
help.append("Generates a rebalance plan based on current and final xml. The plan will "
+ "contain steps on how to rebalance the server such that its layout"
+ "changes from current to final state");
help.append("Options:\n");
help.append(" Required:\n");
help.append(" --current-cluster <clusterXML>\n");
Expand Down
13 changes: 13 additions & 0 deletions src/java/voldemort/tools/RepartitionerCLI.java
Expand Up @@ -37,6 +37,19 @@

import com.google.common.base.Joiner;

/*
* This tool accepts an existing cluster.xml and generates a new cluster.xml.
*
* The tool reads the existing cluster.xml to understand the partition layout.
* It then moves the partitions around (according to some intelligent mechanism)
* with the goal of achieving a better balanced state. A new cluster.xml is then
* generated according to what the tool believes is a better partition layout.
*
* A better balanced state might be needed for : (1) Improving balance among
* existing nodes (2) Cluster expansion (adding nodes to some zones) (3) Zone
* expansion (adding an entire new zone)
*/

public class RepartitionerCLI {

private final static Logger logger = Logger.getLogger(RepartitionerCLI.class);
Expand Down

0 comments on commit 3122693

Please sign in to comment.