import voldemort.xml.ClusterMapper;
public class ReadOnlyStorePerformanceTest {
public static void main(String[] args) throws FileNotFoundException, IOException {
OptionParser parser = new OptionParser();
parser.accepts("help", "print usage information");
parser.accepts("threads", "number of threads").withRequiredArg().ofType(Integer.class);
parser.accepts("requests", "[REQUIRED] number of requests")
.withRequiredArg()
.ofType(Integer.class);
parser.accepts("store-dir", "[REQUIRED] store directory")
.withRequiredArg()
.describedAs("directory");
parser.accepts("cluster-xml", "Path to cluster.xml").withRequiredArg().describedAs("path");
parser.accepts("node-id", "Id of node")
.withRequiredArg()
.ofType(Integer.class)
.describedAs("node-id");
parser.accepts("search-strategy", "class of the search strategy to use")
.withRequiredArg()
.describedAs("class_name");
parser.accepts("build", "If present, first build the data");
parser.accepts("num-values", "The number of values in the store")
.withRequiredArg()
.describedAs("count")
.ofType(Integer.class);
parser.accepts("num-chunks", "The number of chunks per partition")
.withRequiredArg()
.describedAs("chunks")
.ofType(Integer.class);
parser.accepts("internal-sort-size", "The number of items to sort in memory at a time")
.withRequiredArg()
.describedAs("size")
.ofType(Integer.class);
parser.accepts("value-size", "The size of the values in the store")
.withRequiredArg()
.describedAs("size")
.ofType(Integer.class);
parser.accepts("working-dir", "The directory in which to store temporary data")
.withRequiredArg()
.describedAs("dir");
parser.accepts("gzip", "Compress the intermediate temp files used in building the store");
parser.accepts("request-file", "file get request ids from").withRequiredArg();
parser.accepts("version",
"Version of read-only store [" + ReadOnlyStorageFormat.READONLY_V0 + ","
+ ReadOnlyStorageFormat.READONLY_V1 + ","
+ ReadOnlyStorageFormat.READONLY_V2 + " (default)]")
.withRequiredArg()
.describedAs("version");
parser.accepts("test-gz", "Path to gzip containing data. Works with --build only")
.withRequiredArg()
.describedAs("path");
OptionSet options = parser.parse(args);
if(options.has("help")) {
parser.printHelpOn(System.out);
System.exit(0);
}
CmdUtils.croakIfMissing(parser, options, "requests", "store-dir");