Permalink
Browse files

gh-66 added shell command

  • Loading branch information...
m1ch1
m1ch1 committed Feb 24, 2012
1 parent acef6b4 commit 076cb3ffdf965667069f25c68e6646550dce14d2
Showing with 10 additions and 1 deletion.
  1. +10 −1 bin/ycsb
View
@@ -6,13 +6,20 @@ import subprocess
BASE_URL = "https://github.com/brianfrankcooper/YCSB/tree/master/"
COMMANDS = {
+ "shell" : {
+ "command" : "",
+ "description" : "Interactive mode",
+ "main" : "com.yahoo.ycsb.CommandLine",
+ },
"load" : {
"command" : "-load",
"description" : "Execute the load phase",
+ "main" : "com.yahoo.ycsb.Client",
},
"run" : {
"command" : "-t",
"description" : "Execute the transaction phase",
+ "main" : "com.yahoo.ycsb.Client",
},
}
@@ -96,7 +103,9 @@ workload = sys.argv[3]
options = sys.argv[4:]
ycsb_command = ["java", "-cp", ":".join(find_jars(ycsb_home, database)), \
- "com.yahoo.ycsb.Client", command, "-db", db_classname, \
+ COMMANDS[sys.argv[1]]["main"], "-db", db_classname, \
"-P", workload] + options
+if command:
+ ycsb_command.append(command)
print " ".join(ycsb_command)
subprocess.call(ycsb_command)

0 comments on commit 076cb3f

Please sign in to comment.