@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasSeqno()) { hash = (37 * hash) + SEQNO_FIELD_NUMBER; hash = (53 * hash) + hashLong(getSeqno()); } if (getReplyCount() > 0) { hash = (37 * hash) + REPLY_FIELD_NUMBER; hash = (53 * hash) + hashEnumList(getReplyList()); } if (hasDownstreamAckTimeNanos()) { hash = (37 * hash) + DOWNSTREAMACKTIMENANOS_FIELD_NUMBER; hash = (53 * hash) + hashLong(getDownstreamAckTimeNanos()); } if (getFlagCount() > 0) { hash = (37 * hash) + FLAG_FIELD_NUMBER; hash = (53 * hash) + getFlagList().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 (hasSeqno()) { hash = (37 * hash) + SEQNO_FIELD_NUMBER; hash = (53 * hash) + hashLong(getSeqno()); } if (getReplyCount() > 0) { hash = (37 * hash) + REPLY_FIELD_NUMBER; hash = (53 * hash) + hashEnumList(getReplyList()); } if (hasDownstreamAckTimeNanos()) { hash = (37 * hash) + DOWNSTREAMACKTIMENANOS_FIELD_NUMBER; hash = (53 * hash) + hashLong(getDownstreamAckTimeNanos()); } if (getFlagCount() > 0) { hash = (37 * hash) + FLAG_FIELD_NUMBER; hash = (53 * hash) + getFlagList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@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.PipelineAckProto)) { return super.equals(obj); } org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.PipelineAckProto other = (org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.PipelineAckProto) obj; boolean result = true; result = result && (hasSeqno() == other.hasSeqno()); if (hasSeqno()) { result = result && (getSeqno() == other.getSeqno()); } result = result && getReplyList() .equals(other.getReplyList()); result = result && (hasDownstreamAckTimeNanos() == other.hasDownstreamAckTimeNanos()); if (hasDownstreamAckTimeNanos()) { result = result && (getDownstreamAckTimeNanos() == other.getDownstreamAckTimeNanos()); } result = result && getFlagList() .equals(other.getFlagList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@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.PipelineAckProto)) { return super.equals(obj); } org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.PipelineAckProto other = (org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.PipelineAckProto) obj; boolean result = true; result = result && (hasSeqno() == other.hasSeqno()); if (hasSeqno()) { result = result && (getSeqno() == other.getSeqno()); } result = result && getReplyList() .equals(other.getReplyList()); result = result && (hasDownstreamAckTimeNanos() == other.hasDownstreamAckTimeNanos()); if (hasDownstreamAckTimeNanos()) { result = result && (getDownstreamAckTimeNanos() == other.getDownstreamAckTimeNanos()); } result = result && getFlagList() .equals(other.getFlagList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@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.PipelineAckProto)) { return super.equals(obj); } org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.PipelineAckProto other = (org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.PipelineAckProto) obj; boolean result = true; result = result && (hasSeqno() == other.hasSeqno()); if (hasSeqno()) { result = result && (getSeqno() == other.getSeqno()); } result = result && getReplyList() .equals(other.getReplyList()); result = result && (hasDownstreamAckTimeNanos() == other.hasDownstreamAckTimeNanos()); if (hasDownstreamAckTimeNanos()) { result = result && (getDownstreamAckTimeNanos() == other.getDownstreamAckTimeNanos()); } result = result && getFlagList() .equals(other.getFlagList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasSeqno()) { hash = (37 * hash) + SEQNO_FIELD_NUMBER; hash = (53 * hash) + hashLong(getSeqno()); } if (getReplyCount() > 0) { hash = (37 * hash) + REPLY_FIELD_NUMBER; hash = (53 * hash) + hashEnumList(getReplyList()); } if (hasDownstreamAckTimeNanos()) { hash = (37 * hash) + DOWNSTREAMACKTIMENANOS_FIELD_NUMBER; hash = (53 * hash) + hashLong(getDownstreamAckTimeNanos()); } if (getFlagCount() > 0) { hash = (37 * hash) + FLAG_FIELD_NUMBER; hash = (53 * hash) + getFlagList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
/** * Returns the OOB status if this ack contains one. * @return null if it is not an OOB ack. */ public Status getOOBStatus() { // Normal data transfer acks will have a valid sequence number, so // this will return right away in most cases. if (getSeqno() != UNKOWN_SEQNO) { return null; } for (Status s : proto.getReplyList()) { // The following check is valid because protobuf guarantees to // preserve the ordering of enum elements. if (s.getNumber() >= OOB_START && s.getNumber() <= OOB_END) { return s; } } return null; }
/** * Returns the OOB status if this ack contains one. * @return null if it is not an OOB ack. */ public Status getOOBStatus() { // Normal data transfer acks will have a valid sequence number, so // this will return right away in most cases. if (getSeqno() != UNKOWN_SEQNO) { return null; } for (Status s : proto.getReplyList()) { // The following check is valid because protobuf guarantees to // preserve the ordering of enum elements. if (s.getNumber() >= OOB_START && s.getNumber() <= OOB_END) { return s; } } return null; }
/** * Returns the OOB status if this ack contains one. * @return null if it is not an OOB ack. */ public Status getOOBStatus() { // Normal data transfer acks will have a valid sequence number, so // this will return right away in most cases. if (getSeqno() != UNKOWN_SEQNO) { return null; } for (Status s : proto.getReplyList()) { // The following check is valid because protobuf guarantees to // preserve the ordering of enum elements. if (s.getNumber() >= OOB_START && s.getNumber() <= OOB_END) { return s; } } return null; }
/** * Check if this ack contains error status * @return true if all statuses are SUCCESS */ public boolean isSuccess() { for (Status s : proto.getReplyList()) { if (s != Status.SUCCESS) { return false; } } return true; }
/** * Check if this ack contains error status * @return true if all statuses are SUCCESS */ public boolean isSuccess() { for (Status s : proto.getReplyList()) { if (s != Status.SUCCESS) { return false; } } return true; }
/** * Check if this ack contains error status * @return true if all statuses are SUCCESS */ public boolean isSuccess() { for (Status s : proto.getReplyList()) { if (s != Status.SUCCESS) { return false; } } return true; }