/** Receive {@link Op#TRANSFER_BLOCK} */ private void opTransferBlock(DataInputStream in) throws IOException { final OpTransferBlockProto proto = OpTransferBlockProto.parseFrom(vintPrefixed(in)); final DatanodeInfo[] targets = PBHelperClient.convert(proto.getTargetsList()); TraceScope traceScope = continueTraceSpan(proto.getHeader(), proto.getClass().getSimpleName()); try { final ExtendedBlock block = PBHelperClient.convert(proto.getHeader().getBaseHeader().getBlock()); final StorageType[] targetStorageTypes = PBHelperClient.convertStorageTypes(proto.getTargetStorageTypesList(), targets.length); transferBlock(block, PBHelperClient.convert(proto.getHeader().getBaseHeader().getToken()), proto.getHeader().getClientName(), targets, targetStorageTypes, proto.getTargetStorageIdsList().toArray(new String[0]) ); } finally { if (traceScope != null) traceScope.close(); } }
/** Receive OP_READ_BLOCK */ private void opReadBlock() throws IOException { OpReadBlockProto proto = OpReadBlockProto.parseFrom(vintPrefixed(in)); TraceScope traceScope = continueTraceSpan(proto.getHeader(), proto.getClass().getSimpleName()); try { readBlock(PBHelperClient.convert(proto.getHeader().getBaseHeader().getBlock()), PBHelperClient.convert(proto.getHeader().getBaseHeader().getToken()), proto.getHeader().getClientName(), proto.getOffset(), proto.getLen(), proto.getSendChecksums(), (proto.hasCachingStrategy() ? getCachingStrategy(proto.getCachingStrategy()) : CachingStrategy.newDefaultStrategy())); } finally { if (traceScope != null) traceScope.close(); } }
proto.getClass().getSimpleName()); try { writeBlock(PBHelperClient.convert(proto.getHeader().getBaseHeader().getBlock()), PBHelperClient.convertStorageType(proto.getStorageType()), PBHelperClient.convert(proto.getHeader().getBaseHeader().getToken()), proto.getHeader().getClientName(), targets,
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto)) { return super.equals(obj); } org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto other = (org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto) obj; boolean result = true; result = result && (hasBaseHeader() == other.hasBaseHeader()); if (hasBaseHeader()) { result = result && getBaseHeader() .equals(other.getBaseHeader()); } result = result && (hasClientName() == other.hasClientName()); if (hasClientName()) { result = result && getClientName() .equals(other.getClientName()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
/** Receive OP_READ_BLOCK */ private void opReadBlock() throws IOException { OpReadBlockProto proto = OpReadBlockProto.parseFrom(vintPrefixed(in)); TraceScope traceScope = continueTraceSpan(proto.getHeader(), proto.getClass().getSimpleName()); try { readBlock(PBHelper.convert(proto.getHeader().getBaseHeader().getBlock()), PBHelper.convert(proto.getHeader().getBaseHeader().getToken()), proto.getHeader().getClientName(), proto.getOffset(), proto.getLen(), proto.getSendChecksums(), (proto.hasCachingStrategy() ? getCachingStrategy(proto.getCachingStrategy()) : CachingStrategy.newDefaultStrategy())); } finally { if (traceScope != null) traceScope.close(); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasBaseHeader()) { hash = (37 * hash) + BASEHEADER_FIELD_NUMBER; hash = (53 * hash) + getBaseHeader().hashCode(); } if (hasClientName()) { hash = (37 * hash) + CLIENTNAME_FIELD_NUMBER; hash = (53 * hash) + getClientName().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasBaseHeader()) { hash = (37 * hash) + BASEHEADER_FIELD_NUMBER; hash = (53 * hash) + getBaseHeader().hashCode(); } if (hasClientName()) { hash = (37 * hash) + CLIENTNAME_FIELD_NUMBER; hash = (53 * hash) + getClientName().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasBaseHeader()) { memoizedIsInitialized = 0; return false; } if (!hasClientName()) { memoizedIsInitialized = 0; return false; } if (!getBaseHeader().isInitialized()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; }
/** Receive OP_READ_BLOCK */ private void opReadBlock() throws IOException { OpReadBlockProto proto = OpReadBlockProto.parseFrom(vintPrefixed(in)); TraceScope traceScope = continueTraceSpan(proto.getHeader(), proto.getClass().getSimpleName()); try { readBlock(PBHelper.convert(proto.getHeader().getBaseHeader().getBlock()), PBHelper.convert(proto.getHeader().getBaseHeader().getToken()), proto.getHeader().getClientName(), proto.getOffset(), proto.getLen(), proto.getSendChecksums(), (proto.hasCachingStrategy() ? getCachingStrategy(proto.getCachingStrategy()) : CachingStrategy.newDefaultStrategy())); } finally { if (traceScope != null) traceScope.close(); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasBaseHeader()) { hash = (37 * hash) + BASEHEADER_FIELD_NUMBER; hash = (53 * hash) + getBaseHeader().hashCode(); } if (hasClientName()) { hash = (37 * hash) + CLIENTNAME_FIELD_NUMBER; hash = (53 * hash) + getClientName().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasBaseHeader()) { memoizedIsInitialized = 0; return false; } if (!hasClientName()) { memoizedIsInitialized = 0; return false; } if (!getBaseHeader().isInitialized()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; }
/** Receive {@link Op#TRANSFER_BLOCK} */ private void opTransferBlock(DataInputStream in) throws IOException { final OpTransferBlockProto proto = OpTransferBlockProto.parseFrom(vintPrefixed(in)); final DatanodeInfo[] targets = PBHelper.convert(proto.getTargetsList()); TraceScope traceScope = continueTraceSpan(proto.getHeader(), proto.getClass().getSimpleName()); try { transferBlock(PBHelper.convert(proto.getHeader().getBaseHeader().getBlock()), PBHelper.convert(proto.getHeader().getBaseHeader().getToken()), proto.getHeader().getClientName(), targets, PBHelper.convertStorageTypes(proto.getTargetStorageTypesList(), targets.length)); } finally { if (traceScope != null) traceScope.close(); } }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasBaseHeader()) { memoizedIsInitialized = 0; return false; } if (!hasClientName()) { memoizedIsInitialized = 0; return false; } if (!getBaseHeader().isInitialized()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; }
/** Receive {@link Op#TRANSFER_BLOCK} */ private void opTransferBlock(DataInputStream in) throws IOException { final OpTransferBlockProto proto = OpTransferBlockProto.parseFrom(vintPrefixed(in)); final DatanodeInfo[] targets = PBHelper.convert(proto.getTargetsList()); TraceScope traceScope = continueTraceSpan(proto.getHeader(), proto.getClass().getSimpleName()); try { transferBlock(PBHelper.convert(proto.getHeader().getBaseHeader().getBlock()), PBHelper.convert(proto.getHeader().getBaseHeader().getToken()), proto.getHeader().getClientName(), targets, PBHelper.convertStorageTypes(proto.getTargetStorageTypesList(), targets.length)); } finally { if (traceScope != null) traceScope.close(); } }
public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto other) { if (other == org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto.getDefaultInstance()) return this; if (other.hasBaseHeader()) { mergeBaseHeader(other.getBaseHeader()); } if (other.hasClientName()) { bitField0_ |= 0x00000002; clientName_ = other.clientName_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto other) { if (other == org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto.getDefaultInstance()) return this; if (other.hasBaseHeader()) { mergeBaseHeader(other.getBaseHeader()); } if (other.hasClientName()) { bitField0_ |= 0x00000002; clientName_ = other.clientName_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public static TraceScope continueTraceSpan(ClientOperationHeaderProto header, String description) { return continueTraceSpan(header.getBaseHeader(), description); }
public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto other) { if (other == org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ClientOperationHeaderProto.getDefaultInstance()) return this; if (other.hasBaseHeader()) { mergeBaseHeader(other.getBaseHeader()); } if (other.hasClientName()) { bitField0_ |= 0x00000002; clientName_ = other.clientName_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public static TraceScope continueTraceSpan(ClientOperationHeaderProto header, String description) { return continueTraceSpan(header.getBaseHeader(), description); }
private TraceScope continueTraceSpan(ClientOperationHeaderProto header, String description) { return continueTraceSpan(header.getBaseHeader(), description); }