Class SwiftMigrationService


  • public class SwiftMigrationService
    extends java.lang.Object
    Handles multiple inconsistencies in large object handling in previous Swift V2 & V3 implementations. - Very large objects (> 36 GB) segments naming might cause invalid digests : "{objectName}/1", "{objectName}/2"..., "{objectName}/10" should be renaming to "{objectName}/00000001", "{objectName}/00000002"..., "{objectName}/00000010" in order to ensure lexical sorting consistency - Large objects (> 4 GB) manifest does not have the appropriate X-Object-Manifest header. Such manifest will be considered an empty object. - Eliminated large object (> 4 GB) still have segments not deleted. This migration service ensures : - Orphan object segments without a parent manifest are deleted - Object segments are properly left-padded with '0's (copy new segment from old segment, check digests & delete old segment) - Manifest object is properly written (size, digest and appropriate X-Object-Manifest/X-Object-Meta-Digest/X-Object-Meta-Digest-Type headers)
    • Constructor Detail

      • SwiftMigrationService

        public SwiftMigrationService​(java.util.function.Supplier<org.openstack4j.api.OSClient> osClient)
    • Method Detail

      • tryStartMigration

        public boolean tryStartMigration​(SwiftMigrationMode swiftMigrationMode)
      • isMigrationInProgress

        public boolean isMigrationInProgress()
      • hasMigrationSucceeded

        public boolean hasMigrationSucceeded()