if (isClient) { BlockOpResponseProto.newBuilder() .setStatus(ERROR) .setFirstBadLink(targets[0].getXferAddr()) .build() .writeDelimitedTo(replyOut); replyOut.flush(); .setStatus(mirrorInStatus) .setFirstBadLink(firstBadLink) .build() .writeDelimitedTo(replyOut); replyOut.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" + " failed with unknown error.", e); bld.build().writeDelimitedTo(socketOut); if (fis != null) { FileDescriptor fds[] = new FileDescriptor[fis.length];
if (isClient) { BlockOpResponseProto.newBuilder() .setStatus(ERROR) .setFirstBadLink(targets[0].getXferAddr()) .build() .writeDelimitedTo(replyOut); replyOut.flush(); .setStatus(mirrorInStatus) .setFirstBadLink(firstBadLink) .build() .writeDelimitedTo(replyOut); replyOut.flush();
if (isClient) { BlockOpResponseProto.newBuilder() .setStatus(ERROR) .setFirstBadLink(targets[0].getXferAddr()) .build() .writeDelimitedTo(replyOut); replyOut.flush(); .setStatus(mirrorInStatus) .setFirstBadLink(firstBadLink) .build() .writeDelimitedTo(replyOut); replyOut.flush();
.setStatus(Status.SUCCESS) .setReadOpChecksumInfo(ReadOpChecksumInfoProto.newBuilder() .setChecksum(DataTransferProtoUtil.toProto(DEFAULT_CHECKSUM)) .setChunkOffset(0L)) .build() .writeDelimitedTo(recvOut);
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()); bld.build().writeDelimitedTo(socketOut); if (fis != null) { FileDescriptor fds[] = new FileDescriptor[fis.length];
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()); bld.build().writeDelimitedTo(socketOut); if (fis != null) { FileDescriptor fds[] = new FileDescriptor[fis.length];
.setStatus(SUCCESS) .setChecksumResponse(OpBlockChecksumResponseProto.newBuilder() .setBytesPerCrc(bytesPerCRC) .setCrcPerBlock(crcPerBlock) .setMd5(ByteString.copyFrom(md5.getDigest())) .setCrcType(PBHelper.convert(checksum.getChecksumType()))) .build() .writeDelimitedTo(out); out.flush();
.setStatus(SUCCESS) .setChecksumResponse(OpBlockChecksumResponseProto.newBuilder() .setBytesPerCrc(bytesPerCRC) .setCrcPerBlock(crcPerBlock) .setMd5(ByteString.copyFrom(md5.getDigest())) .setCrcType(PBHelper.convert(checksum.getChecksumType()))) .build() .writeDelimitedTo(out); out.flush();
if (reply) { BlockOpResponseProto.Builder resp = BlockOpResponseProto.newBuilder() .setStatus(ERROR_ACCESS_TOKEN); if (mode == BlockTokenSecretManager.AccessMode.WRITE) { DatanodeRegistration dnR = datanode.getDNRegistrationForBP(blk.getBlockPoolId()); resp.setFirstBadLink(dnR.getXferAddr()); resp.build().writeDelimitedTo(out); out.flush();
if (reply) { BlockOpResponseProto.Builder resp = BlockOpResponseProto.newBuilder() .setStatus(ERROR_ACCESS_TOKEN); if (mode == BlockTokenSecretManager.AccessMode.WRITE) { DatanodeRegistration dnR = datanode.getDNRegistrationForBP(blk.getBlockPoolId()); resp.setFirstBadLink(dnR.getXferAddr()); resp.build().writeDelimitedTo(out); out.flush();
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; }
public final boolean isInitialized() { if (!hasStatus()) { return false; } if (hasChecksumResponse()) { if (!getChecksumResponse().isInitialized()) { return false; } } if (hasReadOpChecksumInfo()) { if (!getReadOpChecksumInfo().isInitialized()) { return false; } } return true; }
public final boolean isInitialized() { if (!hasStatus()) { return false; } if (hasChecksumResponse()) { if (!getChecksumResponse().isInitialized()) { return false; } } if (hasReadOpChecksumInfo()) { if (!getReadOpChecksumInfo().isInitialized()) { return false; } } return true; }
public final boolean isInitialized() { if (!hasStatus()) { return false; } if (hasChecksumResponse()) { if (!getChecksumResponse().isInitialized()) { return false; } } if (hasReadOpChecksumInfo()) { if (!getReadOpChecksumInfo().isInitialized()) { return false; } } return true; }