This page describes how to change Cassandra data. As Cassandra only runs on the TSN nodes, this page only applies to the TSN nodes.

Uploading files to containers

As both Cassandras run in docker containers, it is necessary to upload any cql files to the container. The containers can’t access files directly from the host filesystem.

For example, to run a cql file:

user@local:~  $ scp cassandra-data-change.cql tsn1:
WARNING: Access to this system is for authorized users only.
cassandra-data-change.cql                100% 4696    18.5KB/s   00:00
user@local:~  $
user@local:~  $ ssh tsn1
WARNING: Access to this system is for authorized users only.
[sentinel@tsn1 ~]$
[sentinel@tsn1 ~]$ ls cassandra-data-change.cql
cassandra-data-change.cql
[sentinel@tsn1 ~]$
[sentinel@tsn1 ~]$ docker exec cassandra cqlsh -f cassandra-data-change.cql
Can't open 'cassandra-data-change.cql': [Errno 2] No such file or directory: 'cassandra-data-change.cql'
[sentinel@tsn1 ~]$
[sentinel@tsn1 ~]$ docker cp cassandra-data-change.cql cassandra:/basedir/
[sentinel@tsn1 ~]$
[sentinel@tsn1 ~]$ docker exec cassandra cqlsh -f cassandra-data-change.cql
[sentinel@tsn1 ~]$
Previous page Next page
Rhino VoLTE TAS VMs Version 4.1