Delta newMoveStart ( Storage src , String destUuid , String destPlacement , int destShardsLog2 ) { return Deltas . mapBuilder ( ) . update ( STORAGE . key ( ) , Deltas . mapBuilder ( ) . update ( src . getUuidString ( ) , Deltas . mapBuilder ( ) . put ( Storage . MOVE_TO . key ( ) , destUuid ) . build ( ) ) . put ( destUuid , storageAttributesBuilder ( destPlacement , destShardsLog2 , src . isFacade ( ) ) . put ( StorageState . MIRROR_CREATED . getMarkerAttribute ( ) . key ( ) , now ( ) ) . put ( Storage . GROUP_ID . key ( ) , src . getGroupId ( ) ) . build ( ) ) . build ( ) ) . build ( ) ; }
First step in a move creates the destination storage and sets up mirroring .