Class OnDemandContainerReplicationSource
java.lang.Object
org.apache.hadoop.ozone.container.replication.OnDemandContainerReplicationSource
- All Implemented Interfaces:
ContainerReplicationSource
public class OnDemandContainerReplicationSource
extends Object
implements ContainerReplicationSource
A naive implementation of the replication source which creates a tar file
on-demand without pre-create the compressed archives.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyData(long containerId, OutputStream destination, CopyContainerCompression compression) Copy the container data to an output stream.voidprepare(long containerId) Prepare for the replication.
-
Constructor Details
-
OnDemandContainerReplicationSource
-
-
Method Details
-
prepare
public void prepare(long containerId) Description copied from interface:ContainerReplicationSourcePrepare for the replication.- Specified by:
preparein interfaceContainerReplicationSource- Parameters:
containerId- The name of the container the package.
-
copyData
public void copyData(long containerId, OutputStream destination, CopyContainerCompression compression) throws IOException Description copied from interface:ContainerReplicationSourceCopy the container data to an output stream.- Specified by:
copyDatain interfaceContainerReplicationSource- Parameters:
containerId- Container to replicatedestination- The destination stream to copy all the container data.compression- Compression algorithm.- Throws:
IOException
-