etc/scripts/rhq48-storage-patch/apache-cassandra-1.2.4-patch-1.jar |binary
etc/scripts/rhq48-storage-patch/disable_compression.cql | 31 ++++++
etc/scripts/rhq48-storage-patch/rhq48-storage-patch.sh | 50 ++++++++++
3 files changed, 81 insertions(+)
New commits:
commit 0b7e56cbe371944587db03a200fd98075d30a95d
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 9 22:11:21 2013 -0400
initial commit for RHQ 4.8 storage node patch to disable all table compression
diff --git a/etc/scripts/rhq48-storage-patch/apache-cassandra-1.2.4-patch-1.jar
b/etc/scripts/rhq48-storage-patch/apache-cassandra-1.2.4-patch-1.jar
new file mode 100644
index 0000000..9bc5e4a
Binary files /dev/null and
b/etc/scripts/rhq48-storage-patch/apache-cassandra-1.2.4-patch-1.jar differ
diff --git a/etc/scripts/rhq48-storage-patch/disable_compression.cql
b/etc/scripts/rhq48-storage-patch/disable_compression.cql
new file mode 100644
index 0000000..eccb962
--- /dev/null
+++ b/etc/scripts/rhq48-storage-patch/disable_compression.cql
@@ -0,0 +1,31 @@
+alter table rhq.raw_metrics with compression = {'sstable_compression':
''};
+alter table rhq.one_hour_metrics with compression = {'sstable_compression':
''};
+alter table rhq.six_hour_metrics with compression = {'sstable_compression':
''};
+alter table rhq.twenty_four_hour_metrics with compression =
{'sstable_compression': ''};
+alter table rhq.metrics_index with compression = {'sstable_compression':
''};
+alter table rhq.schema_version with compression = {'sstable_compression':
''};
+
+alter table system_auth.credentials with compression = {'sstable_compression':
''};
+alter table system_auth.permissions with compression = {'sstable_compression':
''};
+alter table system_auth.users with compression = {'sstable_compression':
''};
+alter table system_auth.users with compression = {'sstable_compression':
''};
+
+alter table system_traces.events with compression = {'sstable_compression':
''};
+alter table system_traces.sessions with compression = {'sstable_compression':
''};
+alter table system_traces.sessions with compression = {'sstable_compression':
''};
+
+alter table system."HintsColumnFamily" with compression =
{'sstable_compression': ''};
+alter table system."IndexInfo" with compression =
{'sstable_compression': ''};
+alter table system."LocationInfo" with compression =
{'sstable_compression': ''};
+alter table system."Migrations" with compression =
{'sstable_compression': ''};
+alter table system."NodeIdInfo" with compression =
{'sstable_compression': ''};
+alter table system."Schema" with compression = {'sstable_compression':
''};
+alter table system.batchlog with compression = {'sstable_compression':
''};
+alter table system.hints with compression = {'sstable_compression': ''};
+alter table system.local with compression = {'sstable_compression': ''};
+alter table system.peer_events with compression = {'sstable_compression':
''};
+alter table system.peers with compression = {'sstable_compression': ''};
+alter table system.range_xfers with compression = {'sstable_compression':
''};
+alter table system.schema_columnfamilies with compression =
{'sstable_compression': ''};
+alter table system.schema_columns with compression = {'sstable_compression':
''};
+alter table system.schema_keyspaces with compression = {'sstable_compression':
''};
diff --git a/etc/scripts/rhq48-storage-patch/rhq48-storage-patch.sh
b/etc/scripts/rhq48-storage-patch/rhq48-storage-patch.sh
new file mode 100755
index 0000000..756ba20
--- /dev/null
+++ b/etc/scripts/rhq48-storage-patch/rhq48-storage-patch.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+if [ "x$1" = "x" ]; then
+ echo "Usage: $0 <rhq-server-dir>"
+ exit 1
+fi
+
+RHQ_SERVER_DIR=$1
+CQL_HOSTNAME=$2
+CQL_PORT=9142
+JMX_PORT=7299
+
+PATCH="apache-cassandra-1.2.4-patch-1.jar"
+
+# swap out the Cassandra jar file with the patched version
+echo "Copying patch file to $RHQ_SERVER_DIR/rhq-storage/lib"
+mv $RHQ_SERVER_DIR/rhq-storage/lib/apache-cassandra-1.2.4.jar $TMPDIR
+cp $PATCH $RHQ_SERVER_DIR/rhq-storage/lib
+
+# restart the storage node
+echo "Starting RHQ Storage node"
+$RHQ_SERVER_DIR/bin/rhqctl start --storage
+
+# run the CQL script
+echo "Running CQL script to disable table compression"
+export CQLSH_HOST=$CQLSH_HOST
+export CQL_PORT=$CQL_PORT
+$RHQ_SERVER_DIR/rhq-storage/bin/cqlsh -u rhqadmin -p rhqadmin -f
./disable_compression.cql
+
+# scrub all keyspaces
+echo "Rebuilding data files for system keyspace"
+$RHQ_SERVER_DIR/rhq-storage/bin/nodetool -u rhqadmin -pw rhqadmin -p $JMX_PORT scrub
system
+
+echo "Rebuilding data files for system_traces keyspace"
+$RHQ_SERVER_DIR/rhq-storage/bin/nodetool -u rhqadmin -pw rhqadmin -p $JMX_PORT scrub
system_traces
+
+echo "Rebuilding data files for system_auth keyspace"
+$RHQ_SERVER_DIR/rhq-storage/bin/nodetool -u rhqadmin -pw rhqadmin -p $JMX_PORT scrub
system_auth
+
+echo "Rebuilding data files for rhq keyspace"
+$RHQ_SERVER_DIR/rhq-storage/bin/nodetool -u rhqadmin -pw rhqadmin -p $JMX_PORT scrub rhq
+
+echo "Shutting down the RHQ Storage node"
+$RHQ_SERVER_DIR/bin/rhqctl stop
+
+echo "Removing patch file"
+rm $RHQ_SERVER_DIR/rhq-storage/lib/$PATCH
+mv $TMPDIR/apache-cassandra-1.2.4.jar $RHQ_SERVER_DIR/rhq-storage/lib
+
+echo "Table compression has been disabled for all keyspaces. You are now ready to
upgrade your RHQ installation."
Show replies by date