Ask Your Question
1

How do you run the migrator with a custom marshaller using a whitelist?

asked 2022-11-29 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-07-13 23:00:00 +0000

qstack gravatar image

To run the migrator with a custom marshaller using a whitelist, follow these steps:

  1. Define the whitelist of entities that should be migrated by creating a file whitelist.txt that contains the fully-qualified class names of the entities to be migrated, one per line.

  2. Implement a custom marshaller that can handle the entities you want to migrate. For example, you can create a class MyMarshaller that implements the Marshaller interface and overrides the marshall and unmarshall methods as necessary.

  3. Create a configuration file for the migrator. The configuration file should specify the source and destination databases, the custom marshaller, and the whitelist. Here's an example configuration file:

sourceDbUrl=jdbc:mysql://localhost:3306/source
sourceDbUser=root
sourceDbPassword=

destDbUrl=jdbc:mysql://localhost:3306/dest
destDbUser=root
destDbPassword=

marshaller=com.example.MyMarshaller

whitelistPath=/path/to/whitelist.txt
  1. Run the migrator with the configuration file:
java -jar migrator.jar /path/to/config.properties

This will migrate the entities specified in the whitelist using your custom marshaller.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-11-29 11:00:00 +0000

Seen: 11 times

Last updated: Jul 13 '21