Search in sources :

Example 11 with ReceivedDeletedBlockInfo

use of org.apache.hadoop.hdfs.server.protocol.ReceivedDeletedBlockInfo in project hadoop by apache.

the class TestIncrementalBlockReports method injectBlockReceived.

/**
   * Inject a fake 'received' block into the BPServiceActor state.
   */
private void injectBlockReceived() {
    ReceivedDeletedBlockInfo rdbi = new ReceivedDeletedBlockInfo(getDummyBlock(), BlockStatus.RECEIVED_BLOCK, null);
    DatanodeStorage s = singletonDn.getFSDataset().getStorage(storageUuid);
    actor.getIbrManager().notifyNamenodeBlock(rdbi, s, false);
}
Also used : DatanodeStorage(org.apache.hadoop.hdfs.server.protocol.DatanodeStorage) ReceivedDeletedBlockInfo(org.apache.hadoop.hdfs.server.protocol.ReceivedDeletedBlockInfo)

Aggregations

ReceivedDeletedBlockInfo (org.apache.hadoop.hdfs.server.protocol.ReceivedDeletedBlockInfo)11 DatanodeStorage (org.apache.hadoop.hdfs.server.protocol.DatanodeStorage)7 StorageReceivedDeletedBlocks (org.apache.hadoop.hdfs.server.protocol.StorageReceivedDeletedBlocks)7 DatanodeRegistration (org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration)4 Configuration (org.apache.hadoop.conf.Configuration)3 HdfsConfiguration (org.apache.hadoop.hdfs.HdfsConfiguration)3 Block (org.apache.hadoop.hdfs.protocol.Block)3 Test (org.junit.Test)3 ServiceException (com.google.protobuf.ServiceException)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 Path (org.apache.hadoop.fs.Path)2 MiniDFSCluster (org.apache.hadoop.hdfs.MiniDFSCluster)2 LocatedBlock (org.apache.hadoop.hdfs.protocol.LocatedBlock)2 StorageReceivedDeletedBlocksProto (org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.StorageReceivedDeletedBlocksProto)2 DataNode (org.apache.hadoop.hdfs.server.datanode.DataNode)2 BlockReportContext (org.apache.hadoop.hdfs.server.protocol.BlockReportContext)2 Map (java.util.Map)1 FileSystem (org.apache.hadoop.fs.FileSystem)1 DistributedFileSystem (org.apache.hadoop.hdfs.DistributedFileSystem)1