use of org.apache.hadoop.hdfs.server.datanode.LocalReplicaInPipeline in project hadoop by apache.
the class FsDatasetImplTestUtils method createReplicaInPipeline.
@Override
public Replica createReplicaInPipeline(FsVolumeSpi volume, ExtendedBlock block) throws IOException {
FsVolumeImpl vol = (FsVolumeImpl) volume;
LocalReplicaInPipeline rip = new LocalReplicaInPipeline(block.getBlockId(), block.getGenerationStamp(), volume, vol.createTmpFile(block.getBlockPoolId(), block.getLocalBlock()).getParentFile(), 0);
dataset.volumeMap.add(block.getBlockPoolId(), rip);
return rip;
}
Aggregations