@Override public void commitMigration(PartitionMigrationEvent event) { if (event.getMigrationEndpoint() == MigrationEndpoint.SOURCE) { int thresholdReplicaIndex = event.getNewReplicaIndex(); if (thresholdReplicaIndex == -1 || thresholdReplicaIndex > 1) { clearPartitionReplica(event.getPartitionId()); } } }
@Override public void rollbackMigration(PartitionMigrationEvent event) { if (event.getMigrationEndpoint() == MigrationEndpoint.DESTINATION) { int thresholdReplicaIndex = event.getCurrentReplicaIndex(); if (thresholdReplicaIndex == -1 || thresholdReplicaIndex > 1) { clearPartitionReplica(event.getPartitionId()); } } }
@Override public void rollbackMigration(PartitionMigrationEvent event) { if (event.getMigrationEndpoint() == MigrationEndpoint.DESTINATION) { int thresholdReplicaIndex = event.getCurrentReplicaIndex(); if (thresholdReplicaIndex == -1 || thresholdReplicaIndex > 1) { clearPartitionReplica(event.getPartitionId()); } } }
@Override public void commitMigration(PartitionMigrationEvent event) { if (event.getMigrationEndpoint() == MigrationEndpoint.SOURCE) { int thresholdReplicaIndex = event.getNewReplicaIndex(); if (thresholdReplicaIndex == -1 || thresholdReplicaIndex > 1) { clearPartitionReplica(event.getPartitionId()); } } }