Search in sources :

Example 1 with BlockECReconstructionInfoProto

use of org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.BlockECReconstructionInfoProto in project hadoop by apache.

the class PBHelper method convert.

public static BlockECReconstructionCommand convert(BlockECReconstructionCommandProto blkECReconstructionCmdProto) {
    Collection<BlockECReconstructionInfo> blkECReconstructionInfos = new ArrayList<>();
    List<BlockECReconstructionInfoProto> blkECRInfoList = blkECReconstructionCmdProto.getBlockECReconstructioninfoList();
    for (BlockECReconstructionInfoProto blkECRInfoProto : blkECRInfoList) {
        blkECReconstructionInfos.add(convertBlockECReconstructionInfo(blkECRInfoProto));
    }
    return new BlockECReconstructionCommand(DatanodeProtocol.DNA_ERASURE_CODING_RECONSTRUCTION, blkECReconstructionInfos);
}
Also used : BlockECReconstructionInfo(org.apache.hadoop.hdfs.server.protocol.BlockECReconstructionCommand.BlockECReconstructionInfo) ArrayList(java.util.ArrayList) BlockECReconstructionInfoProto(org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.BlockECReconstructionInfoProto) BlockECReconstructionCommand(org.apache.hadoop.hdfs.server.protocol.BlockECReconstructionCommand)

Aggregations

ArrayList (java.util.ArrayList)1 BlockECReconstructionInfoProto (org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.BlockECReconstructionInfoProto)1 BlockECReconstructionCommand (org.apache.hadoop.hdfs.server.protocol.BlockECReconstructionCommand)1 BlockECReconstructionInfo (org.apache.hadoop.hdfs.server.protocol.BlockECReconstructionCommand.BlockECReconstructionInfo)1