use of org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BlockOpResponseProto.Builder in project hadoop by apache.
the class TestDataTransferProtocol method sendResponse.
private void sendResponse(Status status, String firstBadLink, String message, DataOutputStream out) throws IOException {
Builder builder = BlockOpResponseProto.newBuilder().setStatus(status);
if (firstBadLink != null) {
builder.setFirstBadLink(firstBadLink);
}
if (message != null) {
builder.setMessage(message);
}
builder.build().writeDelimitedTo(out);
}
Aggregations