mirror of https://github.com/apache/cassandra
Cassandra-stress should dump all settings on startup
Patch by Ben Slater; reviewed by tjake for CASSANDRA-11914
This commit is contained in:
parent
cee22ad54d
commit
938faa2169
|
|
@ -1,4 +1,5 @@
|
|||
3.10
|
||||
* Cassandra stress should dump all setting on startup (CASSANDRA-11914)
|
||||
* Make it possible to compact a given token range (CASSANDRA-10643)
|
||||
* Allow updating DynamicEndpointSnitch properties via JMX (CASSANDRA-12179)
|
||||
* Collect metrics on queries by consistency level (CASSANDRA-7384)
|
||||
|
|
|
|||
|
|
@ -86,7 +86,14 @@ public final class Stress
|
|||
}
|
||||
|
||||
MultiPrintStream logout = settings.log.getOutput();
|
||||
if (settings.graph.inGraphMode()) {
|
||||
|
||||
if (! settings.log.noSettings)
|
||||
{
|
||||
settings.printSettings(logout);
|
||||
}
|
||||
|
||||
if (settings.graph.inGraphMode())
|
||||
{
|
||||
logout.addStream(new PrintStream(settings.graph.temporaryLogFile));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import org.apache.cassandra.stress.operations.userdefined.SchemaQuery;
|
|||
import org.apache.cassandra.stress.operations.userdefined.ValidatingSchemaQuery;
|
||||
import org.apache.cassandra.stress.settings.*;
|
||||
import org.apache.cassandra.stress.util.JavaDriverClient;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
import org.apache.cassandra.stress.util.ThriftClient;
|
||||
import org.apache.cassandra.stress.util.Timer;
|
||||
import org.apache.cassandra.thrift.Compression;
|
||||
|
|
@ -76,6 +77,7 @@ public class StressProfile implements Serializable
|
|||
private Map<String, StressYaml.QueryDef> queries;
|
||||
public Map<String, StressYaml.TokenRangeQueryDef> tokenRangeQueries;
|
||||
private Map<String, String> insert;
|
||||
private boolean schemaCreated=false;
|
||||
|
||||
transient volatile TableMetadata tableMetaData;
|
||||
transient volatile Set<TokenRange> tokenRanges;
|
||||
|
|
@ -96,6 +98,38 @@ public class StressProfile implements Serializable
|
|||
|
||||
private static final Pattern lowercaseAlphanumeric = Pattern.compile("[a-z0-9_]+");
|
||||
|
||||
|
||||
public void printSettings(MultiPrintStream out, StressSettings stressSettings)
|
||||
{
|
||||
out.printf(" Keyspace Name: %s%n", keyspaceName);
|
||||
out.printf(" Keyspace CQL: %n***%n%s***%n%n", keyspaceCql);
|
||||
out.printf(" Table Name: %s%n", tableName);
|
||||
out.printf(" Table CQL: %n***%n%s***%n%n", tableCql);
|
||||
out.printf(" Extra Schema Definitions: %s%n", extraSchemaDefinitions);
|
||||
out.printf(" Generator Configs:%n");
|
||||
columnConfigs.forEach((k,v)->out.printf(" %s: %s%n", k, v.getConfigAsString()));
|
||||
out.printf(" Query Definitions:%n");
|
||||
queries.forEach((k,v)->out.printf(" %s: %s%n", k, v.getConfigAsString()));
|
||||
out.printf(" Token Range Queries:%n");
|
||||
tokenRangeQueries.forEach((k,v)->out.printf(" %s: %s%n", k, v.getConfigAsString()));
|
||||
out.printf(" Insert Settings:%n");
|
||||
insert.forEach((k,v)->out.printf(" %s: %s%n", k, v));
|
||||
|
||||
PartitionGenerator generator = newGenerator(stressSettings);
|
||||
Distribution visits = stressSettings.insert.visits.get();
|
||||
SchemaInsert tmp = getInsert(null, generator, null, stressSettings); //just calling this to initialize selectchance and partitions vals for calc below
|
||||
|
||||
double minBatchSize = selectchance.get().min() * partitions.get().minValue() * generator.minRowCount * (1d / visits.maxValue());
|
||||
double maxBatchSize = selectchance.get().max() * partitions.get().maxValue() * generator.maxRowCount * (1d / visits.minValue());
|
||||
out.printf("Generating batches with [%d..%d] partitions and [%.0f..%.0f] rows (of [%.0f..%.0f] total rows in the partitions)%n",
|
||||
partitions.get().minValue(), partitions.get().maxValue(),
|
||||
minBatchSize, maxBatchSize,
|
||||
partitions.get().minValue() * generator.minRowCount,
|
||||
partitions.get().maxValue() * generator.maxRowCount);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void init(StressYaml yaml) throws RequestValidationException
|
||||
{
|
||||
keyspaceName = yaml.keyspace;
|
||||
|
|
@ -175,54 +209,58 @@ public class StressProfile implements Serializable
|
|||
|
||||
public void maybeCreateSchema(StressSettings settings)
|
||||
{
|
||||
JavaDriverClient client = settings.getJavaDriverClient(false);
|
||||
|
||||
if (keyspaceCql != null)
|
||||
if (!schemaCreated)
|
||||
{
|
||||
try
|
||||
{
|
||||
client.execute(keyspaceCql, org.apache.cassandra.db.ConsistencyLevel.ONE);
|
||||
}
|
||||
catch (AlreadyExistsException e)
|
||||
{
|
||||
}
|
||||
}
|
||||
JavaDriverClient client = settings.getJavaDriverClient(false);
|
||||
|
||||
client.execute("use " + keyspaceName, org.apache.cassandra.db.ConsistencyLevel.ONE);
|
||||
|
||||
if (tableCql != null)
|
||||
{
|
||||
try
|
||||
if (keyspaceCql != null)
|
||||
{
|
||||
client.execute(tableCql, org.apache.cassandra.db.ConsistencyLevel.ONE);
|
||||
}
|
||||
catch (AlreadyExistsException e)
|
||||
{
|
||||
}
|
||||
|
||||
System.out.println(String.format("Created schema. Sleeping %ss for propagation.", settings.node.nodes.size()));
|
||||
Uninterruptibles.sleepUninterruptibly(settings.node.nodes.size(), TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
if (extraSchemaDefinitions != null)
|
||||
{
|
||||
for (String extraCql : extraSchemaDefinitions)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
client.execute(extraCql, org.apache.cassandra.db.ConsistencyLevel.ONE);
|
||||
client.execute(keyspaceCql, org.apache.cassandra.db.ConsistencyLevel.ONE);
|
||||
}
|
||||
catch (AlreadyExistsException e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(String.format("Created extra schema. Sleeping %ss for propagation.", settings.node.nodes.size()));
|
||||
Uninterruptibles.sleepUninterruptibly(settings.node.nodes.size(), TimeUnit.SECONDS);
|
||||
}
|
||||
client.execute("use " + keyspaceName, org.apache.cassandra.db.ConsistencyLevel.ONE);
|
||||
|
||||
if (tableCql != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
client.execute(tableCql, org.apache.cassandra.db.ConsistencyLevel.ONE);
|
||||
}
|
||||
catch (AlreadyExistsException e)
|
||||
{
|
||||
}
|
||||
|
||||
System.out.println(String.format("Created schema. Sleeping %ss for propagation.", settings.node.nodes.size()));
|
||||
Uninterruptibles.sleepUninterruptibly(settings.node.nodes.size(), TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
if (extraSchemaDefinitions != null)
|
||||
{
|
||||
for (String extraCql : extraSchemaDefinitions)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
client.execute(extraCql, org.apache.cassandra.db.ConsistencyLevel.ONE);
|
||||
}
|
||||
catch (AlreadyExistsException e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(String.format("Created extra schema. Sleeping %ss for propagation.", settings.node.nodes.size()));
|
||||
Uninterruptibles.sleepUninterruptibly(settings.node.nodes.size(), TimeUnit.SECONDS);
|
||||
}
|
||||
schemaCreated = true;
|
||||
}
|
||||
maybeLoadSchemaInfo(settings);
|
||||
|
||||
}
|
||||
|
||||
public void truncateTable(StressSettings settings)
|
||||
|
|
@ -550,11 +588,7 @@ public class StressProfile implements Serializable
|
|||
// guarantee the vast majority of actions occur in these bounds
|
||||
double minBatchSize = selectchance.get().min() * partitions.get().minValue() * generator.minRowCount * (1d / visits.maxValue());
|
||||
double maxBatchSize = selectchance.get().max() * partitions.get().maxValue() * generator.maxRowCount * (1d / visits.minValue());
|
||||
System.out.printf("Generating batches with [%d..%d] partitions and [%.0f..%.0f] rows (of [%.0f..%.0f] total rows in the partitions)%n",
|
||||
partitions.get().minValue(), partitions.get().maxValue(),
|
||||
minBatchSize, maxBatchSize,
|
||||
partitions.get().minValue() * generator.minRowCount,
|
||||
partitions.get().maxValue() * generator.maxRowCount);
|
||||
|
||||
if (generator.maxRowCount > 100 * 1000 * 1000)
|
||||
System.err.printf("WARNING: You have defined a schema that permits very large partitions (%.0f max rows (>100M))%n", generator.maxRowCount);
|
||||
if (batchType == BatchStatement.Type.LOGGED && maxBatchSize > 65535)
|
||||
|
|
@ -628,6 +662,7 @@ public class StressProfile implements Serializable
|
|||
{
|
||||
synchronized (this)
|
||||
{
|
||||
maybeCreateSchema(settings);
|
||||
maybeLoadSchemaInfo(settings);
|
||||
if (generatorFactory == null)
|
||||
generatorFactory = new GeneratorFactory();
|
||||
|
|
|
|||
|
|
@ -42,12 +42,20 @@ public class StressYaml
|
|||
{
|
||||
public String cql;
|
||||
public String fields;
|
||||
public String getConfigAsString()
|
||||
{
|
||||
return String.format("CQL:%s;Fields:%s;", cql, fields);
|
||||
}
|
||||
}
|
||||
|
||||
public static class TokenRangeQueryDef
|
||||
{
|
||||
public String columns;
|
||||
public int page_size = 5000;
|
||||
public String getConfigAsString()
|
||||
{
|
||||
return String.format("Columns:%s;", columns);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,5 +27,6 @@ public interface DistributionFactory extends Serializable
|
|||
{
|
||||
|
||||
Distribution get();
|
||||
String getConfigAsString();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,5 +27,6 @@ public interface RatioDistributionFactory extends Serializable
|
|||
{
|
||||
|
||||
RatioDistribution get();
|
||||
String getConfigAsString();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,4 +62,18 @@ public class GeneratorConfig implements Serializable
|
|||
return (sizeDistributions == null ? deflt : sizeDistributions).get();
|
||||
}
|
||||
|
||||
public String getConfigAsString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (clusteringDistributions != null){
|
||||
sb.append(String.format("Clustering: %s;", clusteringDistributions.getConfigAsString()));
|
||||
}
|
||||
if (sizeDistributions != null){
|
||||
sb.append(String.format("Size: %s;", sizeDistributions.getConfigAsString()));
|
||||
}
|
||||
if (identityDistributions != null){
|
||||
sb.append(String.format("Identity: %s;", identityDistributions.getConfigAsString()));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ import java.util.Set;
|
|||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public abstract class GroupedOptions
|
||||
{
|
||||
|
||||
|
|
@ -114,6 +116,18 @@ public abstract class GroupedOptions
|
|||
}
|
||||
}
|
||||
|
||||
public String getOptionAsString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Option option : options())
|
||||
{
|
||||
sb.append(option.getOptionAsString());
|
||||
sb.append("; ");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
public static List<? extends Option> merge(List<? extends Option> ... optionss)
|
||||
{
|
||||
ImmutableList.Builder<Option> builder = ImmutableList.builder();
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ abstract class Option
|
|||
abstract boolean happy();
|
||||
abstract String shortDisplay();
|
||||
abstract String longDisplay();
|
||||
abstract String getOptionAsString(); // short and longDisplay print help text getOptionAsString prints value
|
||||
abstract List<String> multiLineDisplay();
|
||||
abstract boolean setByUser();
|
||||
abstract boolean present();
|
||||
|
|
|
|||
|
|
@ -58,6 +58,15 @@ public final class OptionAnyProbabilities extends OptionMulti
|
|||
{
|
||||
return null;
|
||||
}
|
||||
public String getOptionAsString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Map.Entry<String, Double> entry : options.entrySet())
|
||||
{
|
||||
sb.append(entry.getKey() + "=" + entry.getValue() + ",");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
String longDisplay()
|
||||
{
|
||||
|
|
@ -91,5 +100,14 @@ public final class OptionAnyProbabilities extends OptionMulti
|
|||
{
|
||||
return ratios.options;
|
||||
}
|
||||
public String getOptionAsString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(super.getOptionAsString());
|
||||
sb.append(" [Ratios: ");
|
||||
sb.append(ratios.getOptionAsString());
|
||||
sb.append("];");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -145,6 +145,11 @@ public class OptionDistribution extends Option
|
|||
return (defaultSpec != null ? "[" : "") + prefix + "DIST(?)" + (defaultSpec != null ? "]" : "");
|
||||
}
|
||||
|
||||
public String getOptionAsString()
|
||||
{
|
||||
return prefix + (spec == null ? defaultSpec : spec);
|
||||
}
|
||||
|
||||
private static final Map<String, Impl> LOOKUP;
|
||||
static
|
||||
{
|
||||
|
|
@ -358,6 +363,8 @@ public class OptionDistribution extends Option
|
|||
{
|
||||
return new DistributionInverted(wrapped.get());
|
||||
}
|
||||
public String getConfigAsString(){return "Inverse: " + wrapped.getConfigAsString();};
|
||||
|
||||
}
|
||||
|
||||
// factories
|
||||
|
|
@ -378,6 +385,10 @@ public class OptionDistribution extends Option
|
|||
{
|
||||
return new DistributionOffsetApache(new ExponentialDistribution(new JDKRandomGenerator(), mean, ExponentialDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY), min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigAsString(){return String.format("Exponential: min=%d,max=%d,mean=%f", min, max, mean);}
|
||||
|
||||
}
|
||||
|
||||
private static class ExtremeFactory implements DistributionFactory
|
||||
|
|
@ -397,6 +408,10 @@ public class OptionDistribution extends Option
|
|||
{
|
||||
return new DistributionOffsetApache(new WeibullDistribution(new JDKRandomGenerator(), shape, scale, WeibullDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY), min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigAsString(){return String.format("Extreme: min=%d,max=%d,shape=%f, scale=%f", min, max, shape, scale);}
|
||||
|
||||
}
|
||||
|
||||
private static final class QuantizedExtremeFactory extends ExtremeFactory
|
||||
|
|
@ -432,6 +447,10 @@ public class OptionDistribution extends Option
|
|||
{
|
||||
return new DistributionBoundApache(new NormalDistribution(new JDKRandomGenerator(), mean, stdev, NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY), min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigAsString(){return String.format("Gaussian: min=%d,max=%d,mean=%f,stdev=%f", min, max, stdev, mean);}
|
||||
|
||||
}
|
||||
|
||||
private static final class UniformFactory implements DistributionFactory
|
||||
|
|
@ -448,6 +467,10 @@ public class OptionDistribution extends Option
|
|||
{
|
||||
return new DistributionBoundApache(new UniformRealDistribution(new JDKRandomGenerator(), min, max + 1), min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigAsString(){return String.format("Uniform: min=%d,max=%d", min, max);}
|
||||
|
||||
}
|
||||
|
||||
private static final class FixedFactory implements DistributionFactory
|
||||
|
|
@ -463,6 +486,10 @@ public class OptionDistribution extends Option
|
|||
{
|
||||
return new DistributionFixed(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigAsString(){return String.format("Fixed: key=%d", key);}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -109,6 +109,21 @@ abstract class OptionMulti extends Option
|
|||
{
|
||||
return (happy() ? "[" : "") + name + "(?)" + (happy() ? "]" : "");
|
||||
}
|
||||
public String getOptionAsString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(name + ": ");
|
||||
sb.append(delegate.getOptionAsString());
|
||||
sb.append(";");
|
||||
if (collectAsMap != null)
|
||||
{
|
||||
sb.append("[");
|
||||
sb.append(collectAsMap.getOptionAsString());
|
||||
sb.append("];");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String longDisplay()
|
||||
|
|
@ -168,6 +183,17 @@ abstract class OptionMulti extends Option
|
|||
return "[<option 1..N>=?]";
|
||||
}
|
||||
|
||||
public String getOptionAsString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Map.Entry<String, String> entry : options.entrySet())
|
||||
{
|
||||
sb.append(entry.getKey() + "=" + entry.getValue() + ",");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
String longDisplay()
|
||||
{
|
||||
return GroupedOptions.formatLong(shortDisplay(), description);
|
||||
|
|
|
|||
|
|
@ -134,6 +134,11 @@ public class OptionRatioDistribution extends Option
|
|||
{
|
||||
return delegate.shortDisplay();
|
||||
}
|
||||
public String getOptionAsString()
|
||||
{
|
||||
return delegate.getOptionAsString();
|
||||
}
|
||||
|
||||
|
||||
// factories
|
||||
|
||||
|
|
@ -153,6 +158,10 @@ public class OptionRatioDistribution extends Option
|
|||
{
|
||||
return new RatioDistribution(delegate.get(), divisor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigAsString(){return String.format("Ration: divisor=%f;delegate=%s",divisor, delegate.getConfigAsString());};
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -162,6 +162,20 @@ class OptionSimple extends Option implements Serializable
|
|||
return GroupedOptions.formatLong(sb.toString(), description);
|
||||
}
|
||||
|
||||
public String getOptionAsString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(displayPrefix);
|
||||
|
||||
if (!(displayPrefix.endsWith("=") || displayPrefix.endsWith("<") || displayPrefix.endsWith(">")))
|
||||
{
|
||||
sb.append(setByUser() ? ":*set*" : ":*not set*");
|
||||
}else{
|
||||
sb.append(value == null ? defaultValue : value);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public List<String> multiLineDisplay()
|
||||
{
|
||||
return Collections.emptyList();
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import org.apache.cassandra.db.marshal.*;
|
|||
import org.apache.cassandra.stress.generate.Distribution;
|
||||
import org.apache.cassandra.stress.generate.DistributionFactory;
|
||||
import org.apache.cassandra.stress.generate.DistributionFixed;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
import org.apache.cassandra.utils.ByteBufferUtil;
|
||||
|
||||
/**
|
||||
|
|
@ -114,6 +115,8 @@ public class SettingsColumn implements Serializable
|
|||
{
|
||||
return new DistributionFixed(nameCount);
|
||||
}
|
||||
@Override
|
||||
public String getConfigAsString(){return String.format("Count: fixed=%d", nameCount);}
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
@ -175,6 +178,22 @@ public class SettingsColumn implements Serializable
|
|||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.printf(" Max Columns Per Key: %d%n",maxColumnsPerKey);
|
||||
out.printf(" Column Names: %s%n",namestrs);
|
||||
out.printf(" Comparator: %s%n", comparator);
|
||||
out.printf(" Timestamp: %s%n", timestamp);
|
||||
out.printf(" Variable Column Count: %b%n", variableColumnCount);
|
||||
out.printf(" Slice: %b%n", slice);
|
||||
if (sizeDistribution != null){
|
||||
out.println(" Size Distribution: " + sizeDistribution.getConfigAsString());
|
||||
};
|
||||
if (sizeDistribution != null){
|
||||
out.println(" Count Distribution: " + countDistribution.getConfigAsString());
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
static SettingsColumn get(Map<String, String[]> clArgs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import com.google.common.util.concurrent.Uninterruptibles;
|
|||
|
||||
import org.apache.cassandra.stress.operations.OpDistributionFactory;
|
||||
import org.apache.cassandra.stress.util.JavaDriverClient;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
import org.apache.cassandra.thrift.ConsistencyLevel;
|
||||
|
||||
// Generic command settings - common to read/write/etc
|
||||
|
|
@ -172,6 +173,27 @@ public abstract class SettingsCommand implements Serializable
|
|||
|
||||
// CLI Utility Methods
|
||||
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.printf(" Type: %s%n", type.toString().toLowerCase());
|
||||
out.printf(" Count: %,d%n", count);
|
||||
if (durationUnits != null)
|
||||
{
|
||||
out.printf(" Duration: %,d %s%n", duration, durationUnits.toString());
|
||||
}
|
||||
out.printf(" No Warmup: %s%n", noWarmup);
|
||||
out.printf(" Consistency Level: %s%n", consistencyLevel.toString());
|
||||
if (targetUncertainty != -1)
|
||||
{
|
||||
out.printf(" Target Uncertainty: %.3f%n", targetUncertainty);
|
||||
out.printf(" Minimum Uncertainty Measurements: %,d%n", minimumUncertaintyMeasurements);
|
||||
out.printf(" Maximum Uncertainty Measurements: %,d%n", maximumUncertaintyMeasurements);
|
||||
} else {
|
||||
out.printf(" Target Uncertainty: not applicable%n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static SettingsCommand get(Map<String, String[]> clArgs)
|
||||
{
|
||||
for (Command cmd : Command.values())
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import org.apache.cassandra.stress.operations.FixedOpDistribution;
|
|||
import org.apache.cassandra.stress.operations.OpDistribution;
|
||||
import org.apache.cassandra.stress.operations.OpDistributionFactory;
|
||||
import org.apache.cassandra.stress.operations.predefined.PredefinedOperation;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
import org.apache.cassandra.stress.util.Timing;
|
||||
|
||||
// Settings unique to the mixed command type
|
||||
|
|
@ -45,6 +46,7 @@ public class SettingsCommandPreDefined extends SettingsCommand
|
|||
|
||||
public final DistributionFactory add;
|
||||
public final int keySize;
|
||||
public final Options options;
|
||||
|
||||
public OpDistributionFactory getFactory(final StressSettings settings)
|
||||
{
|
||||
|
|
@ -85,6 +87,7 @@ public class SettingsCommandPreDefined extends SettingsCommand
|
|||
public SettingsCommandPreDefined(Command type, Options options)
|
||||
{
|
||||
super(type, options.parent);
|
||||
this.options = options;
|
||||
add = options.add.get();
|
||||
keySize = Integer.parseInt(options.keysize.value());
|
||||
}
|
||||
|
|
@ -116,6 +119,13 @@ public class SettingsCommandPreDefined extends SettingsCommand
|
|||
|
||||
// CLI utility methods
|
||||
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
super.printSettings(out);
|
||||
out.printf(" Key Size (bytes): %d%n", keySize);
|
||||
out.printf(" Counter Increment Distibution: %s%n", options.add.getOptionAsString());
|
||||
}
|
||||
|
||||
public static SettingsCommandPreDefined build(Command type, String[] params)
|
||||
{
|
||||
GroupedOptions options = GroupedOptions.select(params,
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import org.apache.cassandra.stress.generate.SeedManager;
|
|||
import org.apache.cassandra.stress.operations.OpDistributionFactory;
|
||||
import org.apache.cassandra.stress.operations.SampledOpDistributionFactory;
|
||||
import org.apache.cassandra.stress.operations.predefined.PredefinedOperation;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
import org.apache.cassandra.stress.util.Timer;
|
||||
|
||||
// Settings unique to the mixed command type
|
||||
|
|
@ -39,6 +40,7 @@ public class SettingsCommandPreDefinedMixed extends SettingsCommandPreDefined
|
|||
// Ratios for selecting commands - index for each Command, NaN indicates the command is not requested
|
||||
private final Map<Command, Double> ratios;
|
||||
private final DistributionFactory clustering;
|
||||
private final Options options;
|
||||
|
||||
public SettingsCommandPreDefinedMixed(Options options)
|
||||
{
|
||||
|
|
@ -46,6 +48,7 @@ public class SettingsCommandPreDefinedMixed extends SettingsCommandPreDefined
|
|||
|
||||
clustering = options.clustering.get();
|
||||
ratios = options.probabilities.ratios();
|
||||
this.options = options;
|
||||
if (ratios.size() == 0)
|
||||
throw new IllegalArgumentException("Must specify at least one command with a non-zero ratio");
|
||||
}
|
||||
|
|
@ -109,6 +112,13 @@ public class SettingsCommandPreDefinedMixed extends SettingsCommandPreDefined
|
|||
|
||||
}
|
||||
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
super.printSettings(out);
|
||||
out.printf(" Command Ratios: %s%n", ratios);
|
||||
out.printf(" Command Clustering Distribution: %s%n", options.clustering.getOptionAsString());
|
||||
}
|
||||
|
||||
// CLI utility methods
|
||||
|
||||
public static SettingsCommandPreDefinedMixed build(String[] params)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import org.apache.cassandra.stress.generate.SeedManager;
|
|||
import org.apache.cassandra.stress.generate.TokenRangeIterator;
|
||||
import org.apache.cassandra.stress.operations.OpDistributionFactory;
|
||||
import org.apache.cassandra.stress.operations.SampledOpDistributionFactory;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
import org.apache.cassandra.stress.util.Timer;
|
||||
|
||||
// Settings unique to the mixed command type
|
||||
|
|
@ -46,11 +47,13 @@ public class SettingsCommandUser extends SettingsCommand
|
|||
private final Map<String, Double> ratios;
|
||||
private final DistributionFactory clustering;
|
||||
public final StressProfile profile;
|
||||
private final Options options;
|
||||
|
||||
public SettingsCommandUser(Options options)
|
||||
{
|
||||
super(Command.USER, options.parent);
|
||||
|
||||
this.options = options;
|
||||
clustering = options.clustering.get();
|
||||
ratios = options.ops.ratios();
|
||||
|
||||
|
|
@ -122,6 +125,16 @@ public class SettingsCommandUser extends SettingsCommand
|
|||
|
||||
// CLI utility methods
|
||||
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
super.printSettings(out);
|
||||
out.printf(" Command Ratios: %s%n", ratios);
|
||||
out.printf(" Command Clustering Distribution: %s%n", options.clustering.getOptionAsString());
|
||||
out.printf(" Profile File: %s%n", options.profile.value());
|
||||
// profile.noSettings(out);
|
||||
}
|
||||
|
||||
|
||||
public static SettingsCommandUser build(String[] params)
|
||||
{
|
||||
GroupedOptions options = GroupedOptions.select(params,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public class SettingsErrors implements Serializable
|
||||
{
|
||||
|
||||
|
|
@ -53,6 +55,12 @@ public class SettingsErrors implements Serializable
|
|||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.printf(" Ignore: %b%n", ignore);
|
||||
out.printf(" Tries: %d%n", tries);
|
||||
}
|
||||
|
||||
|
||||
public static SettingsErrors get(Map<String, String[]> clArgs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public class SettingsGraph implements Serializable
|
||||
{
|
||||
public final String file;
|
||||
|
|
@ -88,6 +90,15 @@ public class SettingsGraph implements Serializable
|
|||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.println(" File: " + file);
|
||||
out.println(" Revision: " + revision);
|
||||
out.println(" Title: " + title);
|
||||
out.println(" Operation: " + operation);
|
||||
}
|
||||
|
||||
|
||||
public static SettingsGraph get(Map<String, String[]> clArgs, SettingsCommand stressCommand)
|
||||
{
|
||||
String[] params = clArgs.remove("-graph");
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import java.util.Map;
|
|||
import com.datastax.driver.core.BatchStatement;
|
||||
import org.apache.cassandra.stress.generate.DistributionFactory;
|
||||
import org.apache.cassandra.stress.generate.RatioDistributionFactory;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public class SettingsInsert implements Serializable
|
||||
{
|
||||
|
|
@ -72,6 +73,37 @@ public class SettingsInsert implements Serializable
|
|||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
|
||||
if (revisit != null)
|
||||
{
|
||||
out.println(" Revisits: " +revisit.getConfigAsString());
|
||||
}
|
||||
if (visits != null)
|
||||
{
|
||||
out.println(" Visits: " + visits.getConfigAsString());
|
||||
}
|
||||
if (batchsize != null)
|
||||
{
|
||||
out.println(" Batchsize: " +batchsize.getConfigAsString());
|
||||
}
|
||||
if (batchsize != null)
|
||||
{
|
||||
out.println(" Select Ratio: " +selectRatio.getConfigAsString());
|
||||
}
|
||||
if (rowPopulationRatio != null)
|
||||
{
|
||||
out.println(" Row Population Ratio: " +rowPopulationRatio.getConfigAsString());
|
||||
}
|
||||
if (batchType != null)
|
||||
{
|
||||
out.printf(" Batch Type: %s%n", batchType);
|
||||
} else {
|
||||
out.println(" Batch Type: not batching");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static SettingsInsert get(Map<String, String[]> clArgs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ public class SettingsLog implements Serializable
|
|||
}
|
||||
|
||||
public final boolean noSummary;
|
||||
public final boolean noSettings;
|
||||
public final File file;
|
||||
public final File hdrFile;
|
||||
public final int intervalMillis;
|
||||
|
|
@ -43,7 +44,9 @@ public class SettingsLog implements Serializable
|
|||
|
||||
public SettingsLog(Options options)
|
||||
{
|
||||
|
||||
noSummary = options.noSummmary.setByUser();
|
||||
noSettings = options.noSettings.setByUser();
|
||||
|
||||
if (options.outputFile.setByUser())
|
||||
file = new File(options.outputFile.value());
|
||||
|
|
@ -81,6 +84,7 @@ public class SettingsLog implements Serializable
|
|||
public static final class Options extends GroupedOptions
|
||||
{
|
||||
final OptionSimple noSummmary = new OptionSimple("no-summary", "", null, "Disable printing of aggregate statistics at the end of a test", false);
|
||||
final OptionSimple noSettings = new OptionSimple("no-settings", "", null, "Disable printing of settings values at start of test", false);
|
||||
final OptionSimple outputFile = new OptionSimple("file=", ".*", null, "Log to a file", false);
|
||||
final OptionSimple hdrOutputFile = new OptionSimple("hdrfile=", ".*", null, "Log to a file", false);
|
||||
final OptionSimple interval = new OptionSimple("interval=", "[0-9]+(ms|s|)", "1s", "Log progress every <value> seconds or milliseconds", false);
|
||||
|
|
@ -89,11 +93,20 @@ public class SettingsLog implements Serializable
|
|||
@Override
|
||||
public List<? extends Option> options()
|
||||
{
|
||||
return Arrays.asList(level, noSummmary, outputFile, hdrOutputFile, interval);
|
||||
return Arrays.asList(level, noSummmary, outputFile, hdrOutputFile, interval, noSettings);
|
||||
}
|
||||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.printf(" No Summary: %b%n", noSummary);
|
||||
out.printf(" Print Setting: %b%n", noSettings);
|
||||
out.printf(" File: %s%n", file);
|
||||
out.printf(" Interval Millis: %d%n", intervalMillis);
|
||||
out.printf(" Level: %s%n", level);
|
||||
}
|
||||
|
||||
|
||||
public static SettingsLog get(Map<String, String[]> clArgs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import com.datastax.driver.core.AuthProvider;
|
|||
import com.datastax.driver.core.PlainTextAuthProvider;
|
||||
import com.datastax.driver.core.ProtocolOptions;
|
||||
import com.datastax.driver.core.ProtocolVersion;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public class SettingsMode implements Serializable
|
||||
{
|
||||
|
|
@ -49,6 +50,7 @@ public class SettingsMode implements Serializable
|
|||
|
||||
private final String compression;
|
||||
|
||||
|
||||
public SettingsMode(GroupedOptions options)
|
||||
{
|
||||
if (options instanceof Cql3Options)
|
||||
|
|
@ -162,8 +164,8 @@ public class SettingsMode implements Serializable
|
|||
final OptionSimple user = new OptionSimple("user=", ".+", null, "username", false);
|
||||
final OptionSimple password = new OptionSimple("password=", ".+", null, "password", false);
|
||||
final OptionSimple authProvider = new OptionSimple("auth-provider=", ".*", null, "Fully qualified implementation of com.datastax.driver.core.AuthProvider", false);
|
||||
final OptionSimple maxPendingPerConnection = new OptionSimple("maxPending=", "[0-9]+", "", "Maximum pending requests per connection", false);
|
||||
final OptionSimple connectionsPerHost = new OptionSimple("connectionsPerHost=", "[0-9]+", "", "Number of connections per host", false);
|
||||
final OptionSimple maxPendingPerConnection = new OptionSimple("maxPending=", "[0-9]+", "128", "Maximum pending requests per connection", false);
|
||||
final OptionSimple connectionsPerHost = new OptionSimple("connectionsPerHost=", "[0-9]+", "8", "Number of connections per host", false);
|
||||
|
||||
abstract OptionSimple mode();
|
||||
@Override
|
||||
|
|
@ -205,6 +207,21 @@ public class SettingsMode implements Serializable
|
|||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.printf(" API: %s%n", api);
|
||||
out.printf(" Connection Style: %s%n", style);
|
||||
out.printf(" CQL Version: %s%n", cqlVersion);
|
||||
out.printf(" Protocol Version: %s%n", protocolVersion);
|
||||
out.printf(" Username: %s%n", username);
|
||||
out.printf(" Password: %s%n", (password==null?password:"*suppressed*"));
|
||||
out.printf(" Auth Provide Class: %s%n", authProviderClassname);
|
||||
out.printf(" Max Pending Per Connection: %d%n", maxPendingPerConnection);
|
||||
out.printf(" Connections Per Host: %d%n", connectionsPerHost);
|
||||
out.printf(" Compression: %s%n", compression);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static SettingsMode get(Map<String, String[]> clArgs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import java.net.UnknownHostException;
|
|||
import java.util.*;
|
||||
|
||||
import com.datastax.driver.core.Host;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public class SettingsNode implements Serializable
|
||||
{
|
||||
|
|
@ -148,6 +149,12 @@ public class SettingsNode implements Serializable
|
|||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.println(" Nodes: " + nodes);
|
||||
out.println(" Is White List: " + isWhiteList);
|
||||
out.println(" Datacenter: " + datacenter);
|
||||
}
|
||||
|
||||
public static SettingsNode get(Map<String, String[]> clArgs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import com.google.common.collect.ImmutableList;
|
|||
|
||||
import org.apache.cassandra.stress.generate.DistributionFactory;
|
||||
import org.apache.cassandra.stress.generate.PartitionGenerator;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public class SettingsPopulation implements Serializable
|
||||
{
|
||||
|
|
@ -126,6 +127,26 @@ public class SettingsPopulation implements Serializable
|
|||
|
||||
// CLI Utility Methods
|
||||
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
if (distribution != null)
|
||||
{
|
||||
out.println(" Distribution: " +distribution.getConfigAsString());
|
||||
}
|
||||
|
||||
if (sequence != null)
|
||||
{
|
||||
out.printf(" Sequence: %d..%d%n", sequence[0], sequence[1]);
|
||||
}
|
||||
if (readlookback != null)
|
||||
{
|
||||
out.println(" Read Look Back: " + readlookback.getConfigAsString());
|
||||
}
|
||||
|
||||
out.printf(" Order: %s%n", order);
|
||||
out.printf(" Wrap: %b%n", wrap);
|
||||
}
|
||||
|
||||
public static SettingsPopulation get(Map<String, String[]> clArgs, SettingsCommand command)
|
||||
{
|
||||
// set default size to number of commands requested, unless set to err convergence, then use 1M
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public class SettingsPort implements Serializable
|
||||
{
|
||||
|
||||
|
|
@ -56,6 +58,13 @@ public class SettingsPort implements Serializable
|
|||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.printf(" Native Port: %d%n", nativePort);
|
||||
out.printf(" Thrift Port: %d%n", thriftPort);
|
||||
out.printf(" JMX Port: %d%n", nativePort);
|
||||
}
|
||||
|
||||
|
||||
public static SettingsPort get(Map<String, String[]> clArgs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public class SettingsRate implements Serializable
|
||||
{
|
||||
|
||||
|
|
@ -94,6 +96,19 @@ public class SettingsRate implements Serializable
|
|||
|
||||
// CLI Utility Methods
|
||||
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.printf(" Auto: %b%n", auto);
|
||||
if (auto)
|
||||
{
|
||||
out.printf(" Min Threads: %d%n", minThreads);
|
||||
out.printf(" Max Threads: %d%n", maxThreads);
|
||||
} else {
|
||||
out.printf(" Thread Count: %d%n", threadCount);
|
||||
out.printf(" OpsPer Sec: %d%n", opsPerSecond);
|
||||
}
|
||||
}
|
||||
|
||||
public static SettingsRate get(Map<String, String[]> clArgs, SettingsCommand command)
|
||||
{
|
||||
String[] params = clArgs.remove("-rate");
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import java.util.*;
|
|||
|
||||
import com.datastax.driver.core.exceptions.AlreadyExistsException;
|
||||
import org.apache.cassandra.stress.util.JavaDriverClient;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
import org.apache.cassandra.thrift.*;
|
||||
import org.apache.cassandra.utils.ByteBufferUtil;
|
||||
|
||||
|
|
@ -299,6 +300,18 @@ public class SettingsSchema implements Serializable
|
|||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.println(" Keyspace: " + keyspace);
|
||||
out.println(" Replication Strategy: " + replicationStrategy);
|
||||
out.println(" Replication Strategy Pptions: " + replicationStrategyOptions);
|
||||
|
||||
out.println(" Table Compression: " + compression);
|
||||
out.println(" Table Compaction Strategy: " + compactionStrategy);
|
||||
out.println(" Table Compaction Strategy Options: " + compactionStrategyOptions);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static SettingsSchema get(Map<String, String[]> clArgs, SettingsCommand command)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,13 +24,17 @@ import java.util.Map;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.primitives.Ints;
|
||||
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
|
||||
public class SettingsTokenRange
|
||||
{
|
||||
public final boolean wrap;
|
||||
public final int splitFactor;
|
||||
private final TokenRangeOptions options;
|
||||
|
||||
public SettingsTokenRange(TokenRangeOptions options)
|
||||
{
|
||||
this.options = options;
|
||||
this.wrap = options.wrap.setByUser();
|
||||
this.splitFactor = Ints.checkedCast(OptionDistribution.parseLong(options.splitFactor.value()));
|
||||
}
|
||||
|
|
@ -65,6 +69,12 @@ public class SettingsTokenRange
|
|||
return new SettingsTokenRange(options);
|
||||
}
|
||||
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.printf(" Wrap: %b%n", wrap);
|
||||
out.printf(" Split Factor: %d%n", splitFactor);
|
||||
}
|
||||
|
||||
public static void printHelp()
|
||||
{
|
||||
GroupedOptions.printOptions(System.out, "-tokenrange", new TokenRangeOptions());
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.apache.cassandra.config.EncryptionOptions;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
import org.apache.cassandra.thrift.ITransportFactory;
|
||||
import org.apache.cassandra.thrift.SSLTransportFactory;
|
||||
import org.apache.cassandra.thrift.TFramedTransportFactory;
|
||||
|
|
@ -145,6 +146,10 @@ public class SettingsTransport implements Serializable
|
|||
}
|
||||
|
||||
// CLI Utility Methods
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.println(" " + options.getOptionAsString());
|
||||
}
|
||||
|
||||
public static SettingsTransport get(Map<String, String[]> clArgs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ package org.apache.cassandra.stress.settings;
|
|||
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.cassandra.stress.util.MultiPrintStream;
|
||||
import java.util.*;
|
||||
|
||||
import com.datastax.driver.core.Metadata;
|
||||
|
|
@ -337,6 +338,54 @@ public class StressSettings implements Serializable
|
|||
SettingsMisc.printHelp();
|
||||
}
|
||||
|
||||
public void printSettings(MultiPrintStream out)
|
||||
{
|
||||
out.println("******************** Stress Settings ********************");
|
||||
// done
|
||||
out.println("Command:");
|
||||
command.printSettings(out);
|
||||
out.println("Rate:");
|
||||
rate.printSettings(out);
|
||||
out.println("Population:");
|
||||
generate.printSettings(out);
|
||||
out.println("Insert:");
|
||||
insert.printSettings(out);
|
||||
if (command.type != Command.USER)
|
||||
{
|
||||
out.println("Columns:");
|
||||
columns.printSettings(out);
|
||||
}
|
||||
out.println("Errors:");
|
||||
errors.printSettings(out);
|
||||
out.println("Log:");
|
||||
log.printSettings(out);
|
||||
out.println("Mode:");
|
||||
mode.printSettings(out);
|
||||
out.println("Node:");
|
||||
node.printSettings(out);
|
||||
out.println("Schema:");
|
||||
schema.printSettings(out);
|
||||
out.println("Transport:");
|
||||
transport.printSettings(out);
|
||||
out.println("Port:");
|
||||
port.printSettings(out);
|
||||
out.println("Send To Daemon:");
|
||||
out.printf(" " + (sendToDaemon != null ? sendToDaemon : "*not set*") + "%n");
|
||||
out.println("Graph:");
|
||||
graph.printSettings(out);
|
||||
out.println("TokenRange:");
|
||||
tokenRange.printSettings(out);
|
||||
|
||||
if (command.type == Command.USER)
|
||||
{
|
||||
out.println();
|
||||
out.println("******************** Profile ********************");
|
||||
((SettingsCommandUser) command).profile.printSettings(out, this);
|
||||
}
|
||||
out.println();
|
||||
|
||||
}
|
||||
|
||||
public synchronized void disconnect()
|
||||
{
|
||||
if (client == null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue