Skip to content
Snippets Groups Projects
Commit 2cfb144a authored by m1ch1's avatar m1ch1
Browse files

gh-66 added more stuff in BUILD. added db links in ycsb.

parent c2aadd36
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,13 @@ To build YCSB, run: ...@@ -4,6 +4,13 @@ To build YCSB, run:
mvn clean package mvn clean package
# Running YCSB
Once `mvn clean package` succeeds, you can run `ycsb` command:
./bin/ycsb load basic workloads/workloada
./bin/ycsb run basic workloads/workloada
# Oracle NoSQL Database # Oracle NoSQL Database
Oracle NoSQL Database binding doesn't get built by default because there is no Oracle NoSQL Database binding doesn't get built by default because there is no
......
...@@ -4,6 +4,7 @@ import os ...@@ -4,6 +4,7 @@ import os
import sys import sys
import subprocess import subprocess
BASE_URL = "https://github.com/brianfrankcooper/YCSB/tree/master/"
COMMANDS = { COMMANDS = {
"load" : { "load" : {
"command" : "-load", "command" : "-load",
...@@ -47,7 +48,7 @@ def usage(): ...@@ -47,7 +48,7 @@ def usage():
print "\nDatabases:" print "\nDatabases:"
for db in sorted(DATABASES.keys()): for db in sorted(DATABASES.keys()):
print " %s" % db print " {0:13} {1}".format(db, BASE_URL + db.split("-")[0])
print """\nWorkload Files: print """\nWorkload Files:
There are various predefined workloads under workloads/ directory. There are various predefined workloads under workloads/ directory.
...@@ -66,8 +67,9 @@ def find_jars(dir, database): ...@@ -66,8 +67,9 @@ def find_jars(dir, database):
jars.append(dirpath) jars.append(dirpath)
for filename in filenames: for filename in filenames:
if filename.endswith(".jar") and \ if filename.endswith(".jar") and \
filename.startswith("core") or \ (filename.startswith("core") or \
filename.startswith(database.split("-")[0]): filename.startswith(database.split("-")[0]) or \
not "binding" in filename):
jars.append(os.path.join(dirpath, filename)) jars.append(os.path.join(dirpath, filename))
return jars return jars
...@@ -96,4 +98,5 @@ options = sys.argv[4:] ...@@ -96,4 +98,5 @@ options = sys.argv[4:]
ycsb_command = ["java", "-cp", ":".join(find_jars(ycsb_home, database)), \ ycsb_command = ["java", "-cp", ":".join(find_jars(ycsb_home, database)), \
"com.yahoo.ycsb.Client", command, "-db", db_classname, \ "com.yahoo.ycsb.Client", command, "-db", db_classname, \
"-P", workload] + options "-P", workload] + options
print " ".join(ycsb_command)
subprocess.call(ycsb_command) subprocess.call(ycsb_command)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment