return OpWriteBlockProto.BlockConstructionStage.valueOf(
stage.name());
}
public static ChecksumProto toProto(DataChecksum checksum) {
ChecksumType type = ChecksumType.valueOf(checksum.getChecksumType().name());
if (type == null) {
throw new IllegalArgumentException(
"Can't convert checksum to protobuf: " + checksum);
}