Repository: cassandra Updated Branches: refs/heads/trunk 03659d7b9 -> df0cd441e
post-fix for: Provide option for cassandra-stress to dump all settings patch by Ben Slater; reviewed by Robert Stupp for CASSANDRA-11914 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/df0cd441 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/df0cd441 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/df0cd441 Branch: refs/heads/trunk Commit: df0cd441e2293977b5a2584e1b80fae6c9853e81 Parents: 03659d7 Author: Ben Slater <[email protected]> Authored: Thu Aug 25 13:02:03 2016 +0200 Committer: Robert Stupp <[email protected]> Committed: Thu Aug 25 13:02:03 2016 +0200 ---------------------------------------------------------------------- .../apache/cassandra/stress/StressProfile.java | 28 ++++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/df0cd441/tools/stress/src/org/apache/cassandra/stress/StressProfile.java ---------------------------------------------------------------------- diff --git a/tools/stress/src/org/apache/cassandra/stress/StressProfile.java b/tools/stress/src/org/apache/cassandra/stress/StressProfile.java index 3a20215..9e2783d 100644 --- a/tools/stress/src/org/apache/cassandra/stress/StressProfile.java +++ b/tools/stress/src/org/apache/cassandra/stress/StressProfile.java @@ -106,14 +106,26 @@ public class StressProfile implements Serializable 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)); + if (columnConfigs != null) + { + out.printf(" Generator Configs:%n"); + columnConfigs.forEach((k, v) -> out.printf(" %s: %s%n", k, v.getConfigAsString())); + } + if(queries != null) + { + out.printf(" Query Definitions:%n"); + queries.forEach((k, v) -> out.printf(" %s: %s%n", k, v.getConfigAsString())); + } + if (tokenRangeQueries != null) + { + out.printf(" Token Range Queries:%n"); + tokenRangeQueries.forEach((k, v) -> out.printf(" %s: %s%n", k, v.getConfigAsString())); + } + if (insert != null) + { + 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();
