Hello,
I'm trying to set up a couple DMAs (v. 10.1.8), which should be connected to dedicated Cassanra cluster (and potentially with Elastic cluster). As I found, it seems not clear as expected.
My idea is to have a separate keyspaces for each DMA installation based on DMAID (let's say : SLDMADB_43201, SLDMADB_43202, SLDMADB_43203). I prefer to set replication strategy and replication factor for each keyspace (I have a production and lab instances of DMA so I can use different replication factors for it).
With standalone installation of DMA+Cassandra I have the "SLDMADB" keyspace (yes, the name contains quotes, it seems a mistake in code that create a keyspace during an installation of DMA).
root@cqlsh> DESC keyspaces;
system_schema system system_distributed sldmadb_ticketing
system_auth "SLDMADB" system_traces
Keyspace "SLDMADB" contains a couple of tables, that belongs to local DMA installation.
First of all, I can't found a script that can create DB structure from scratch. So I tried to use a
Cassandra to Cluster migration manual
So I created a new keyspace SLDMADB_43201at my cluster (node IP 111.11.11.11), created a user DMUser and granted a Superuser role to it. Afterwards, I tried to use the following command to move a database from local DMA installation:
C:\Skyline DataMiner\Tools>SLDataGateway.Tools.CassandraCluster.Migrator.exe --src-host 127.0.0.1 --dest-keyspace SLDMADB_43201 --dest-host 111.11.11.11 --dest-user dmuser--dest-password dmuser
As the result, I got a huge number of keyspaces instead of a single:
dmuser@cqlsh> desc keyspaces;
system_auth
sldmadb_43201_elementdata
sldmadb_43201_objectreftreeelementtopdown
sldmadb_43201_trend_data_medium
sldmadb_43201_correlationmatchinfo
sldmadb_43201_trend_data_short
sldmadb_43201_spectrum_by_time
sldmadb_43201_state_changes
system
sldmadb_43201_dveelementinfo
sldmadb_43201
sldmadb_43201_correlationslidingwindow
sldmadb_43201_objectreftreeelement
sldmadb_43201_objectreftransaction
sldmadb_43201_element_state_changes
system_schema
system_distributed
sldmadb_43201_deployertoken
system_traces
sldmadb_43201_trend_data_long
sldmadb_43201_elementlatch
sldmadb_43201_trend_data_rt
sldmadb_43201_analytics_alarmfocus
sldmadb_43201_maskstate
sldmadb_43201_spectrum_by_id
sldmadb_43201_analytics_arrowwindows_v1
Moreover, the migration has ended with error while trying to create a keyspace with a long name:
2021-07-24T00:22:08.794|INFO |DataGateway.Cassandra.OfflineMigration.Cloning|Keyspace names shouldn't be more than 48 characters long (got "sldmadb_43201_analytics_changepointalarmentries_v2")
So the migration was not successfull.
My questions are:
- How to create a DB structure from scratch in external Cassandra?
- How to install a new DMA with Installer without creation of local DB (neither MySQL, nor Cassandra)? Now the Installer doesn't allow this.
- How to use a single keyspace for all tables during migration?
Hi Anatoly,
Let me go over your questions.
1: There is no need to create the DB structures yourself. When a DMA starts up whe check which tables already exists and create the once that don't. So if you change the <DB> (or in your case the <DBServer>) tag in DB.xml and restart the tables should be created.
2: As far as I know it is indeed not possible yet.
3: This one might be confussing. "Cassandra cluster" is the name for a new feature in the making that will allow all DMA's to connect to one Cassandra cluster, all using shared tables. So the migrater you used isn't meant to move data to another location. (We have created a task for the error you encounterd.)
So you can do the installation and install Cassandra local. Then shutdown your DMA, change the DB.xml file (and maybe unistall the local Cassandra), and after a restart you should have the setup you are looking for.