long r1SeenEpoch = Math.max(r1.getAcceptedInEpoch(), r1.getLastWriterEpoch()); long r2SeenEpoch = Math.max(r2.getAcceptedInEpoch(), r2.getLastWriterEpoch());
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasSegmentState()) { hash = (37 * hash) + SEGMENTSTATE_FIELD_NUMBER; hash = (53 * hash) + getSegmentState().hashCode(); } if (hasAcceptedInEpoch()) { hash = (37 * hash) + ACCEPTEDINEPOCH_FIELD_NUMBER; hash = (53 * hash) + hashLong(getAcceptedInEpoch()); } if (hasLastWriterEpoch()) { hash = (37 * hash) + LASTWRITEREPOCH_FIELD_NUMBER; hash = (53 * hash) + hashLong(getLastWriterEpoch()); } if (hasLastCommittedTxId()) { hash = (37 * hash) + LASTCOMMITTEDTXID_FIELD_NUMBER; hash = (53 * hash) + hashLong(getLastCommittedTxId()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
result = result && (getAcceptedInEpoch() == other.getAcceptedInEpoch());
ch.setEpoch(2); prep = ch.prepareRecovery(1L).get(); assertEquals(1L, prep.getAcceptedInEpoch()); assertEquals(1L, prep.getSegmentState().getEndTxId());
long r1SeenEpoch = Math.max(r1.getAcceptedInEpoch(), r1.getLastWriterEpoch()); long r2SeenEpoch = Math.max(r2.getAcceptedInEpoch(), r2.getLastWriterEpoch());
long r1SeenEpoch = Math.max(r1.getAcceptedInEpoch(), r1.getLastWriterEpoch()); long r2SeenEpoch = Math.max(r2.getAcceptedInEpoch(), r2.getLastWriterEpoch());
result = result && (getAcceptedInEpoch() == other.getAcceptedInEpoch());
result = result && (getAcceptedInEpoch() == other.getAcceptedInEpoch());
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasSegmentState()) { hash = (37 * hash) + SEGMENTSTATE_FIELD_NUMBER; hash = (53 * hash) + getSegmentState().hashCode(); } if (hasAcceptedInEpoch()) { hash = (37 * hash) + ACCEPTEDINEPOCH_FIELD_NUMBER; hash = (53 * hash) + hashLong(getAcceptedInEpoch()); } if (hasLastWriterEpoch()) { hash = (37 * hash) + LASTWRITEREPOCH_FIELD_NUMBER; hash = (53 * hash) + hashLong(getLastWriterEpoch()); } if (hasLastCommittedTxId()) { hash = (37 * hash) + LASTCOMMITTEDTXID_FIELD_NUMBER; hash = (53 * hash) + hashLong(getLastCommittedTxId()); } 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 (hasSegmentState()) { hash = (37 * hash) + SEGMENTSTATE_FIELD_NUMBER; hash = (53 * hash) + getSegmentState().hashCode(); } if (hasAcceptedInEpoch()) { hash = (37 * hash) + ACCEPTEDINEPOCH_FIELD_NUMBER; hash = (53 * hash) + hashLong(getAcceptedInEpoch()); } if (hasLastWriterEpoch()) { hash = (37 * hash) + LASTWRITEREPOCH_FIELD_NUMBER; hash = (53 * hash) + hashLong(getLastWriterEpoch()); } if (hasLastCommittedTxId()) { hash = (37 * hash) + LASTCOMMITTEDTXID_FIELD_NUMBER; hash = (53 * hash) + hashLong(getLastCommittedTxId()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos.PrepareRecoveryResponseProto other) { if (other == org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos.PrepareRecoveryResponseProto.getDefaultInstance()) return this; if (other.hasSegmentState()) { mergeSegmentState(other.getSegmentState()); } if (other.hasAcceptedInEpoch()) { setAcceptedInEpoch(other.getAcceptedInEpoch()); } if (other.hasLastWriterEpoch()) { setLastWriterEpoch(other.getLastWriterEpoch()); } if (other.hasLastCommittedTxId()) { setLastCommittedTxId(other.getLastCommittedTxId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos.PrepareRecoveryResponseProto other) { if (other == org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos.PrepareRecoveryResponseProto.getDefaultInstance()) return this; if (other.hasSegmentState()) { mergeSegmentState(other.getSegmentState()); } if (other.hasAcceptedInEpoch()) { setAcceptedInEpoch(other.getAcceptedInEpoch()); } if (other.hasLastWriterEpoch()) { setLastWriterEpoch(other.getLastWriterEpoch()); } if (other.hasLastCommittedTxId()) { setLastCommittedTxId(other.getLastCommittedTxId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos.PrepareRecoveryResponseProto other) { if (other == org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos.PrepareRecoveryResponseProto.getDefaultInstance()) return this; if (other.hasSegmentState()) { mergeSegmentState(other.getSegmentState()); } if (other.hasAcceptedInEpoch()) { setAcceptedInEpoch(other.getAcceptedInEpoch()); } if (other.hasLastWriterEpoch()) { setLastWriterEpoch(other.getLastWriterEpoch()); } if (other.hasLastCommittedTxId()) { setLastCommittedTxId(other.getLastCommittedTxId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }