Search in sources :

Example 1 with BlockTypeProto

use of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockTypeProto in project hadoop by apache.

the class TestPBHelper method testConvertBlockType.

@Test
public void testConvertBlockType() {
    BlockType bContiguous = BlockType.CONTIGUOUS;
    BlockTypeProto bContiguousProto = PBHelperClient.convert(bContiguous);
    BlockType bContiguous2 = PBHelperClient.convert(bContiguousProto);
    assertEquals(bContiguous, bContiguous2);
    BlockType bStriped = BlockType.STRIPED;
    BlockTypeProto bStripedProto = PBHelperClient.convert(bStriped);
    BlockType bStriped2 = PBHelperClient.convert(bStripedProto);
    assertEquals(bStriped, bStriped2);
}
Also used : BlockTypeProto(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockTypeProto) BlockType(org.apache.hadoop.hdfs.protocol.BlockType) Test(org.junit.Test)

Aggregations

BlockType (org.apache.hadoop.hdfs.protocol.BlockType)1 BlockTypeProto (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockTypeProto)1 Test (org.junit.Test)1