lordcheng10 commented on PR #3457:
URL: https://github.com/apache/bookkeeper/pull/3457#issuecomment-1242936588

   > > 1. sh bin/bookkeeper shell replicasMigration -bookieIds bookie1,bookie2 
-ledgerIds ALL -readOnly true
   > 
   > @Shoothzj
   > 
   > The data migration steps are as follows:
   > 
   > 1. Submit the ledger copy to be offline to zookeeper through the 
ReplicasMigrationCommand command. The directory organization on zookeeper is as 
follows:
   > 
   > > `ledgers/replicasMigration/ledgerId1`
   > 
   > And record the bookie node where the ledger1 wants to migrate data on the 
zookeeper directory, for example:
   > 
   > > `set ledgers/replicasMigration/ledgerId1 bookie1,bookie3`
   > 
   > 2. Start the corresponding data replication service 
ReplicasMigrationWorker in AutoRecoveryMain. The ReplicasMigrationWorker 
service first obtains a ledger copy migration task, then finds the fragments 
stored by the ledger on the corresponding bookie node, and finally replicates 
these fragments through the replicateLedgerFragment method.
   > 3. When a ledger copy migration task is completed, the corresponding 
ledger directory on zookeeper will be deleted, for example:
   > 
   > > `delete ledgers/replicasMigration/ledgerId1`
   
   If we want to migrate all ledger data on some bookies, we need to set these 
bookies to read only first, otherwise during the migration process, new data 
may be written to these bookies


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to