From 2cfb144ad62b270861e27b5434e535db5e59744a Mon Sep 17 00:00:00 2001
From: m1ch1 <michi@cs.stanford.edu>
Date: Wed, 22 Feb 2012 01:32:13 -0800
Subject: [PATCH] gh-66 added more stuff in BUILD. added db links in ycsb.

---
 BUILD    | 7 +++++++
 bin/ycsb | 9 ++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/BUILD b/BUILD
index 00952033..e520c2d9 100644
--- a/BUILD
+++ b/BUILD
@@ -4,6 +4,13 @@ To build YCSB, run:
 
     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 binding doesn't get built by default because there is no
diff --git a/bin/ycsb b/bin/ycsb
index 6771c8bd..9c521c22 100755
--- a/bin/ycsb
+++ b/bin/ycsb
@@ -4,6 +4,7 @@ import os
 import sys
 import subprocess
 
+BASE_URL = "https://github.com/brianfrankcooper/YCSB/tree/master/"
 COMMANDS = {
     "load" : {
         "command"     : "-load",
@@ -47,7 +48,7 @@ def usage():
 
     print "\nDatabases:"
     for db in sorted(DATABASES.keys()):
-        print "    %s" % db
+        print "    {0:13} {1}".format(db, BASE_URL + db.split("-")[0])
 
     print """\nWorkload Files:
     There are various predefined workloads under workloads/ directory.
@@ -66,8 +67,9 @@ def find_jars(dir, database):
             jars.append(dirpath)
         for filename in filenames:
             if filename.endswith(".jar") and \
-               filename.startswith("core") or \
-               filename.startswith(database.split("-")[0]):
+               (filename.startswith("core") or \
+                filename.startswith(database.split("-")[0]) or \
+                not "binding" in filename):
                 jars.append(os.path.join(dirpath, filename))
     return jars
 
@@ -96,4 +98,5 @@ options = sys.argv[4:]
 ycsb_command = ["java", "-cp", ":".join(find_jars(ycsb_home, database)), \
                 "com.yahoo.ycsb.Client", command, "-db", db_classname, \
                 "-P", workload] + options
+print " ".join(ycsb_command)
 subprocess.call(ycsb_command)
-- 
GitLab