Skip to content

Commit

Permalink
Merge pull request brianfrankcooper#305 from gkamat/issue_302
Browse files Browse the repository at this point in the history
closes brianfrankcooper#302 ycsb launcher should only include binding specific jars in the classpath
  • Loading branch information
busbey committed Jun 20, 2015
2 parents 514e2a5 + 372d230 commit 74f4ef4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions bin/ycsb
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,8 @@ def usage():
def find_jars(dir, database):
jars = []
for (dirpath, dirnames, filenames) in os.walk(dir):
if dirpath.endswith("conf"):
jars.append(dirpath)
for filename in filenames:
if filename.endswith(".jar") and \
(filename.startswith("core") or \
filename.startswith(database.split("-")[0]) or \
not "binding" in filename):
if filename.endswith(".jar"):
jars.append(os.path.join(dirpath, filename))
return jars

Expand Down Expand Up @@ -134,7 +129,11 @@ def main():
db_classname = DATABASES[args.database]
command = COMMANDS[args.command]["command"]
main_classname = COMMANDS[args.command]["main"]
classpath = os.pathsep.join(find_jars(ycsb_home, args.database))
db_dir = os.path.join(ycsb_home, args.database + "-binding")
cp = [ os.path.join(db_dir, "conf") ]
cp.extend(find_jars(os.path.join(ycsb_home, "lib"), args.database))
cp.extend(find_jars(os.path.join(db_dir, "lib"), args.database))
classpath = os.pathsep.join(cp)
if args.classpath:
classpath = os.pathsep.join([args.classpath, classpath])

Expand Down

0 comments on commit 74f4ef4

Please sign in to comment.