Instructions on how to migrate from WSO2 Business Activity Monitor 2.x to WSO2 DAS are as follows.
...
The analytics data migration tool can be used to migrate the Cassandra column family data of a WSO2 BAM 2.x server to WSO2 Data Analytics Server (DAS) 3.0.0. The <DAS_HOME>/bin/
analytics-migrate.sh
script serves as the analytics migration tool.
...
Before running the <DAS_HOME>/bin/
analytics-migrate.sh
script, the event table(s) that serve as the destination for migrated data should be defined in WSO2 DAS. For more information on event tables, see Analytics event tableFollow the procedure below to create the required event tables by copying the relevant stream definitions from WSO2 BAM.
- Log into the WSO2 BAM Management Console, and go to the Main tab.
- Under Registry, click Browse to open the Browse page.
- Navigate to
<Top_Folder>/system/governance/StreamDefinitions/<relevant_event_stream>/<relevant_stream_version>
as shown in the example below. - Click on the stream version. This will open the Detail View tab for the event stream version you selected.
- Click Display as Text to view the event stream configuration as a JSON array.
- Copy the JSON array to the clipboard.
- Log into the DAS Management Console and go to the Main tab.
- Click Streams to open the Available Event Streams page.
- Click Add Event Streams to open the Define New Event Stream page.
- Click switch to source view.
- Clear the existing text in the source view and paste the JSON array you copied to the clipboard.
- Click Add Event Stream.
- If you want the event stream to persist events, follow the instructions in Persisting Data for Batch Analytics.
Alternatively, you can redefine the complete event stream configuration as described in Understanding Event Streams and Event Tables.
Sample command
Code Block | ||
---|---|---|
| ||
wso2das-3.0.0-SNAPSHOT/bin$ ./analytics-migrate.sh -cassandraUrl localhost -analyticTable <ANALYTICS_TABLE_NAME> -columnFamily <COLUMN_FAMILY-NAME> -port <PORT> -serverUrl <SERVER_URL> -tenantId <TENANT_ID> |
Parameters
...
columnFamily org_wso2_bam_phone_retail_store_kpi -analyticTable org_wso2_bam_phone_retail_store_kpi -batchSize 1000 -tenantId -1234 -username admin -password admin -cassandraPort 9161 -clusterName Test Cluster |
Parameters
The arguments that can be used with the command are described below.
Parameter | Description | Default Value | Example | ||
---|---|---|---|---|---|
| Destination name of the table which will have the migrated data. | None | testTable | ||
| Name of the columnFamily to which analytics data will be migrated. | None | jmx_agent_toolbox | ||
-port | Cassandra server port. | 9042 | 9042 | ||
-serverUrl | Cassandra server URL. | localhost | 192.168.200.130 | ||
| Tenant ID of the considered tenant. | super tenant | -1234 | ||
-serverUrl | The URL of the DAS server URL. | localhost | 10.100.5.73 | ||
-serverPort | DAS server port | 9443 | 9443 The Cassandra CQL port | 9042 | 9042 |
-cassandraUrl | The URL to access the Cassandra server. | localhost | 10.100.5.73 | ||
-cassandraPort | The thrift port for the Cassandra server porr. | 904291609042 | 9160 | ||
-batchSize | Cassandra data is migrated from BAM to DAS in batches. This property specifies the size of a batch of data transferred at a given time in. | 1000 | 1000 | ||
-username | The username to access the Cassandra server. | None | admin | ||
-passwords | The password to access the Cassandra server. | None | admin |
Example
...
language | powershell |
---|
...
-clusterName | The name of the cluster to which the data should be migrated. | None | cluster001 |
Migrating WSO2 BAM toolboxes
Toolboxes concept of WSO2 Business Activity Monitor is replaced in WSO2 DAS by a CAR file based deployment approach. Since you need to map Hive queries to the Apache Spark syntax that is supported by WSO2 DAS, you cannot directly upload WSO2 BAM (2.x versions) toolboxes to WSO2 DAS. Thereby, you need to wrap all the artifacts (stream definitions, event receivers, event stores, event publishers, Spark scripts etc.) in a .car
file and upload it to WSO2 DAS. For instructions on how to create a Carbon application with the CAR extension, see Carbon Application Deployment for DAS. However, you can use the analytics migration tool to migrate the data from Cassandra to the DAS datasource.