Search in sources :

Example 6 with LocalReplicaInPipeline

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;
}
Also used : LocalReplicaInPipeline(org.apache.hadoop.hdfs.server.datanode.LocalReplicaInPipeline)

Aggregations

LocalReplicaInPipeline (org.apache.hadoop.hdfs.server.datanode.LocalReplicaInPipeline)6 File (java.io.File)5 RandomAccessFile (java.io.RandomAccessFile)5 ReplicaBuilder (org.apache.hadoop.hdfs.server.datanode.ReplicaBuilder)5 LocalReplica (org.apache.hadoop.hdfs.server.datanode.LocalReplica)1 DiskOutOfSpaceException (org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException)1