Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up bin/ycsb. #276

Merged
merged 1 commit into from
Jun 4, 2015
Merged

Clean up bin/ycsb. #276

merged 1 commit into from
Jun 4, 2015

Conversation

cmccoy
Copy link
Collaborator

@cmccoy cmccoy commented Jun 3, 2015

  • Use argparse for argument parsing.
  • Add a '--jvm-args' flag, to pass arbirary options to java.
  • Add a '-cp' flag, which allows prepending paths to the java classpath.
  • Exit with the return code from java.

Requires Python 2.7.

@busbey
Copy link
Collaborator

busbey commented Jun 3, 2015

nit: could you include a prefix in the commit message's first line for what got altered. We don't have a good list of these yet, but something like [deployment], [packaging], or [shellcode] would all be great.

(this is one of the things I want to make sure we cover in the contribution guide, but I recognize without that document for guidance this will be inconsistent for some time.)

@cmccoy
Copy link
Collaborator Author

cmccoy commented Jun 3, 2015

Sure - added [scripts]. Seem OK?

"-target n" : "Target ops/sec (default: unthrottled)",
"-threads n" : "Number of client threads (default: 1)",
"-cp path" : "Additional Java classpath entries",
"--jvm-args args" : "Additional arguments to the JVM",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above we use single dash for long-form arguments, and here we're using gnu style '--'. I don't have a strong preference one way or the other, but we should be consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used -cp since it gets passed directly to java. Seems like single dash long form is more consistent - I'll change --jvm-args to -jvm-args.

@busbey
Copy link
Collaborator

busbey commented Jun 3, 2015

yeah [scripts] is fine by me.

* Use argparse for argument parsing.
* Add a '-jvm-args' flag, to pass arbirary options to java.
* Exit with the return code from java.

Requires Python 2.7.
@cmccoy
Copy link
Collaborator Author

cmccoy commented Jun 3, 2015

I tested this against HBase:

bin/ycsb -jvm-args='-Xmx1024m' -cp /tmp/hbase-1.0.1.1/conf load hbase -P workloads/workloadc -p columnfamily=cf 

worked for me.

@busbey
Copy link
Collaborator

busbey commented Jun 3, 2015

👍 presuming Travis comes back clean.

cmccoy added a commit that referenced this pull request Jun 4, 2015
@cmccoy cmccoy merged commit 9dacfe7 into brianfrankcooper:master Jun 4, 2015
@cmccoy cmccoy deleted the cleanup-ycsb-script branch June 4, 2015 01:42
jaricftw pushed a commit to jaricftw/YCSB that referenced this pull request Jul 19, 2016
jaricftw pushed a commit to jaricftw/YCSB that referenced this pull request Jul 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants