Skip to content

Commit 81a9877

Browse files
Collect both normal and full schema, making the latter optional as it is not available on Cassandra 1.2
This restores the collector's ability to run on version 1.2 clusters
1 parent c48b91d commit 81a9877

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ds-collector/ds-collector

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,8 @@ collect_info_setup() {
610610
cqlshOpts="$cqlshOpts --ssl"
611611
fi
612612
mkdir -p "${artifactDir}/sstable-statistics/"
613-
echo "DESCRIBE FULL SCHEMA;" > "$artifactDir/execute_schema.cql"
613+
echo "DESCRIBE SCHEMA;" > "$artifactDir/execute_schema.cql"
614+
echo "DESCRIBE FULL SCHEMA;" > "$artifactDir/execute_full_schema.cql"
614615
echo "DESCRIBE CLUSTER;" > "$artifactDir/execute_metadata.cql"
615616

616617
# 'timeout -t SECS' is required on older busybox

ds-collector/rust-commands/collect-info.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,18 @@ const COMMANDS: &[Cmd<'static>] = &[
336336
use_sudo: false,
337337
use_timeout: false,
338338
},
339+
// cqlsh "$(hostname)" $cqlshOpts -e 'DESCRIBE FULL SCHEMA;' > "$artifactDir/schema.cql"
340+
// this overrides schema.cql (but won't work in Cassandra verision 1.2 so is optional)
341+
Cmd {
342+
command: "cqlsh",
343+
args: "{cqlsh_host} {cqlsh_port} {cqlsh_opts} -f {artifact_dir}/execute_full_schema.cql",
344+
file: "schema.cql",
345+
optional: true,
346+
skip_flags: "",
347+
use_stdout: true,
348+
use_sudo: false,
349+
use_timeout: false,
350+
},
339351
// cqlsh "$(hostname)" $cqlshOpts -e 'DESCRIBE CLUSTER;' > "$artifactDir/metadata.cql"
340352
Cmd {
341353
command: "cqlsh",

0 commit comments

Comments
 (0)