Merge branch 'cassandra-3.11' into trunk

This commit is contained in:
Jason Brown 2017-01-18 12:52:04 -08:00
commit d32ae4a60e
2 changed files with 18 additions and 34 deletions

View File

@ -140,6 +140,7 @@
* Restore resumable hints delivery (CASSANDRA-11960)
* Properly record CAS contention (CASSANDRA-12626)
Merged from 3.0:
* Stress daemon help is incorrect (CASSANDRA-12563)
* Replace empty strings with null values if they cannot be converted (CASSANDRA-12794)
* Remove support for non-JavaScript UDFs (CASSANDRA-12883)
* Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)

View File

@ -194,52 +194,35 @@ class SettingsMisc implements Serializable
static Runnable helpHelpPrinter()
{
return new Runnable()
{
@Override
public void run()
{
System.out.println("Usage: ./bin/cassandra-stress help <command|option>");
System.out.println("Commands:");
for (Command cmd : Command.values())
System.out.println(" " + cmd.names.toString().replaceAll("\\[|\\]", ""));
System.out.println("Options:");
for (CliOption op : CliOption.values())
System.out.println(" -" + op.toString().toLowerCase() + (op.extraName != null ? ", " + op.extraName : ""));
}
return () -> {
System.out.println("Usage: ./bin/cassandra-stress help <command|option>");
System.out.println("Commands:");
for (Command cmd : Command.values())
System.out.println(" " + cmd.names.toString().replaceAll("\\[|\\]", ""));
System.out.println("Options:");
for (CliOption op : CliOption.values())
System.out.println(" -" + op.toString().toLowerCase() + (op.extraName != null ? ", " + op.extraName : ""));
};
}
static Runnable printHelpPrinter()
{
return new Runnable()
return () -> GroupedOptions.printOptions(System.out, "print", new GroupedOptions()
{
@Override
public void run()
public List<? extends Option> options()
{
GroupedOptions.printOptions(System.out, "print", new GroupedOptions()
{
@Override
public List<? extends Option> options()
{
return Arrays.asList(new OptionDistribution("dist=", null, "A mathematical distribution"));
}
});
return Arrays.asList(new OptionDistribution("dist=", null, "A mathematical distribution"));
}
};
});
}
static Runnable sendToDaemonHelpPrinter()
{
return new Runnable()
{
@Override
public void run()
{
System.out.println("Usage: -sendToDaemon <host>");
System.out.println();
System.out.println("Specify a host running the stress server to send this stress command to");
}
return () -> {
System.out.println("Usage: -sendto <host>");
System.out.println();
System.out.println("Specify a host running the stress server to send this stress command to");
};
}
@ -253,7 +236,7 @@ class SettingsMisc implements Serializable
if (params.length != 1)
{
sendToDaemonHelpPrinter().run();
System.out.println("Invalid -send-to specifier: " + Arrays.toString(params));
System.out.println("Invalid -sendto specifier: " + Arrays.toString(params));
System.exit(1);
}
return params[0];