private static void writeResponse(Status status, String message, OutputStream out) throws IOException { BlockOpResponseProto.Builder response = BlockOpResponseProto.newBuilder() .setStatus(status); if (message != null) { response.setMessage(message); } response.build().writeDelimitedTo(out); out.flush(); }
&& (Time.monotonicNow() - lastResponseTime > responseInterval)) { BlockOpResponseProto.Builder response = BlockOpResponseProto.newBuilder() .setStatus(Status.IN_PROGRESS); response.build().writeDelimitedTo(replyOut); replyOut.flush();
.setStatus(SUCCESS) .setChecksumResponse(OpBlockChecksumResponseProto.newBuilder() .setBytesPerCrc(bytesPerCRC)
.setStatus(SUCCESS) .setChecksumResponse(OpBlockChecksumResponseProto.newBuilder() .setBytesPerCrc(bytesPerCRC)
if (reply) { BlockOpResponseProto.Builder resp = BlockOpResponseProto.newBuilder() .setStatus(ERROR_ACCESS_TOKEN); if (mode == BlockTokenSecretManager.AccessMode.WRITE) { DatanodeRegistration dnR =
if (reply) { BlockOpResponseProto.Builder resp = BlockOpResponseProto.newBuilder() .setStatus(ERROR_ACCESS_TOKEN); if (mode == BlockTokenSecretManager.AccessMode.WRITE) { DatanodeRegistration dnR =
public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BlockOpResponseProto other) { if (other == org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BlockOpResponseProto.getDefaultInstance()) return this; if (other.hasStatus()) { setStatus(other.getStatus()); } if (other.hasFirstBadLink()) { bitField0_ |= 0x00000002; firstBadLink_ = other.firstBadLink_; onChanged(); } if (other.hasChecksumResponse()) { mergeChecksumResponse(other.getChecksumResponse()); } if (other.hasReadOpChecksumInfo()) { mergeReadOpChecksumInfo(other.getReadOpChecksumInfo()); } if (other.hasMessage()) { bitField0_ |= 0x00000010; message_ = other.message_; onChanged(); } if (other.hasShortCircuitAccessVersion()) { setShortCircuitAccessVersion(other.getShortCircuitAccessVersion()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BlockOpResponseProto other) { if (other == org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BlockOpResponseProto.getDefaultInstance()) return this; if (other.hasStatus()) { setStatus(other.getStatus()); } if (other.hasFirstBadLink()) { bitField0_ |= 0x00000002; firstBadLink_ = other.firstBadLink_; onChanged(); } if (other.hasChecksumResponse()) { mergeChecksumResponse(other.getChecksumResponse()); } if (other.hasReadOpChecksumInfo()) { mergeReadOpChecksumInfo(other.getReadOpChecksumInfo()); } if (other.hasMessage()) { bitField0_ |= 0x00000010; message_ = other.message_; onChanged(); } if (other.hasShortCircuitAccessVersion()) { setShortCircuitAccessVersion(other.getShortCircuitAccessVersion()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BlockOpResponseProto other) { if (other == org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BlockOpResponseProto.getDefaultInstance()) return this; if (other.hasStatus()) { setStatus(other.getStatus()); } if (other.hasFirstBadLink()) { bitField0_ |= 0x00000002; firstBadLink_ = other.firstBadLink_; onChanged(); } if (other.hasChecksumResponse()) { mergeChecksumResponse(other.getChecksumResponse()); } if (other.hasReadOpChecksumInfo()) { mergeReadOpChecksumInfo(other.getReadOpChecksumInfo()); } if (other.hasMessage()) { bitField0_ |= 0x00000010; message_ = other.message_; onChanged(); } if (other.hasShortCircuitAccessVersion()) { setShortCircuitAccessVersion(other.getShortCircuitAccessVersion()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
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); }
private void writeSuccessWithChecksumInfo(BlockSender blockSender, DataOutputStream out) throws IOException { ReadOpChecksumInfoProto ckInfo = ReadOpChecksumInfoProto.newBuilder() .setChecksum(DataTransferProtoUtil.toProto(blockSender.getChecksum())) .setChunkOffset(blockSender.getOffset()) .build(); BlockOpResponseProto response = BlockOpResponseProto.newBuilder() .setStatus(SUCCESS) .setReadOpChecksumInfo(ckInfo) .build(); response.writeDelimitedTo(out); out.flush(); }
private void writeSuccessWithChecksumInfo(BlockSender blockSender, DataOutputStream out) throws IOException { ReadOpChecksumInfoProto ckInfo = ReadOpChecksumInfoProto.newBuilder() .setChecksum(DataTransferProtoUtil.toProto(blockSender.getChecksum())) .setChunkOffset(blockSender.getOffset()) .build(); BlockOpResponseProto response = BlockOpResponseProto.newBuilder() .setStatus(SUCCESS) .setReadOpChecksumInfo(ckInfo) .build(); response.writeDelimitedTo(out); out.flush(); }
private static void writeResponse(Status status, String message, OutputStream out) throws IOException { BlockOpResponseProto.Builder response = BlockOpResponseProto.newBuilder() .setStatus(status); if (message != null) { response.setMessage(message); } response.build().writeDelimitedTo(out); out.flush(); }
private static void writeResponse(Status status, String message, OutputStream out) throws IOException { BlockOpResponseProto.Builder response = BlockOpResponseProto.newBuilder() .setStatus(status); if (message != null) { response.setMessage(message); } response.build().writeDelimitedTo(out); out.flush(); }
bld.setStatus(SUCCESS); bld.setShortCircuitAccessVersion(DataNode.CURRENT_BLOCK_FORMAT_VERSION); } catch (ShortCircuitFdsVersionException e) { bld.setStatus(ERROR_UNSUPPORTED); bld.setShortCircuitAccessVersion(DataNode.CURRENT_BLOCK_FORMAT_VERSION); bld.setMessage(e.getMessage()); } catch (ShortCircuitFdsUnsupportedException e) { bld.setStatus(ERROR_UNSUPPORTED); bld.setMessage(e.getMessage()); } catch (IOException e) { bld.setStatus(ERROR); bld.setMessage(e.getMessage()); LOG.error("Request short-circuit read file descriptor" +
if (reply) { BlockOpResponseProto.Builder resp = BlockOpResponseProto.newBuilder() .setStatus(ERROR_ACCESS_TOKEN); if (mode == BlockTokenIdentifier.AccessMode.WRITE) { DatanodeRegistration dnR =
.setStatus(SUCCESS) .setChecksumResponse(OpBlockChecksumResponseProto.newBuilder() .setBytesPerCrc(maker.getBytesPerCRC())
.setStatus(SUCCESS) .setChecksumResponse(OpBlockChecksumResponseProto.newBuilder() .setBytesPerCrc(maker.getBytesPerCRC())
private void writeSuccessWithChecksumInfo(BlockSender blockSender, DataOutputStream out) throws IOException { ReadOpChecksumInfoProto ckInfo = ReadOpChecksumInfoProto.newBuilder() .setChecksum(DataTransferProtoUtil.toProto(blockSender.getChecksum())) .setChunkOffset(blockSender.getOffset()) .build(); BlockOpResponseProto response = BlockOpResponseProto.newBuilder() .setStatus(SUCCESS) .setReadOpChecksumInfo(ckInfo) .build(); response.writeDelimitedTo(out); out.flush(); }