hash = (53 * hash) + getTargetLayoutVersion(); if (hasNameServiceId()) { hash = (37 * hash) + NAMESERVICEID_FIELD_NUMBER; hash = (53 * hash) + getNameServiceId().hashCode();
== other.getTargetLayoutVersion()); result = result && (hasNameServiceId() == other.hasNameServiceId()); if (hasNameServiceId()) { result = result && getNameServiceId() .equals(other.getNameServiceId());
public Builder mergeFrom(org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos.CanRollBackRequestProto other) { if (other == org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos.CanRollBackRequestProto.getDefaultInstance()) return this; if (other.hasJid()) { mergeJid(other.getJid()); } if (other.hasStorage()) { mergeStorage(other.getStorage()); } if (other.hasPrevStorage()) { mergePrevStorage(other.getPrevStorage()); } if (other.hasTargetLayoutVersion()) { setTargetLayoutVersion(other.getTargetLayoutVersion()); } if (other.hasNameServiceId()) { bitField0_ |= 0x00000010; nameServiceId_ = other.nameServiceId_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@Override public CanRollBackResponseProto canRollBack(RpcController controller, CanRollBackRequestProto request) throws ServiceException { try { StorageInfo si = PBHelper.convert(request.getStorage(), NodeType.JOURNAL_NODE); Boolean result = impl.canRollBack(convert(request.getJid()), request.hasNameServiceId() ? request.getNameServiceId() : null, si, PBHelper.convert(request.getPrevStorage(), NodeType.JOURNAL_NODE), request.getTargetLayoutVersion()); return CanRollBackResponseProto.newBuilder() .setCanRollBack(result) .build(); } catch (IOException e) { throw new ServiceException(e); } }