Class ReplicaBuilder
java.lang.Object
org.apache.hadoop.hdfs.server.datanode.ReplicaBuilder
This class is to be used as a builder for
ReplicaInfo objects.
The state of the replica is used to determine which object is instantiated.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()from(ReplicaInfo fromReplica) setBlock(org.apache.hadoop.hdfs.protocol.Block block) setBlockId(long blockId) setBytesToReserve(long bytesToReserve) setConf(org.apache.hadoop.conf.Configuration conf) setDirectoryToUse(File dir) setFileRegion(FileRegion fileRegion) setFsVolume(FsVolumeSpi volume) setGenerationStamp(long genStamp) setLastPartialChunkChecksum(byte[] checksum) setLength(long length) setOffset(long offset) setPathHandle(org.apache.hadoop.fs.PathHandle pathHandle) setPathPrefix(org.apache.hadoop.fs.Path prefix) Set the prefix of thePathassociated with the replica.setPathSuffix(String suffix) Set the suffix of thePathassociated with the replica.setRecoveryId(long recoveryId) setRemoteFS(org.apache.hadoop.fs.FileSystem remoteFS) setWriterThread(Thread writer)
-
Constructor Details
-
ReplicaBuilder
-
-
Method Details
-
setState
-
setBlockId
-
setGenerationStamp
-
setLength
-
setFsVolume
-
setDirectoryToUse
-
setBytesToReserve
-
setWriterThread
-
from
-
setRecoveryId
-
setBlock
-
setURI
-
setConf
-
setOffset
-
setFileRegion
-
setRemoteFS
-
setPathSuffix
Set the suffix of thePathassociated with the replica. Intended to be use only forProvidedReplicas.- Parameters:
suffix- the path suffix.- Returns:
- the builder with the path suffix set.
-
setPathPrefix
Set the prefix of thePathassociated with the replica. Intended to be use only forProvidedReplicas.- Parameters:
prefix- the path prefix.- Returns:
- the builder with the path prefix set.
-
setPathHandle
-
setLastPartialChunkChecksum
-
buildLocalReplicaInPipeline
- Throws:
IllegalArgumentException
-
build
- Throws:
IllegalArgumentException
-