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()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
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()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@Override public Boolean canRollBack(String journalId, StorageInfo storage, StorageInfo prevStorage, int targetLayoutVersion) throws IOException { try { CanRollBackResponseProto response = rpcProxy.canRollBack( NULL_CONTROLLER, CanRollBackRequestProto.newBuilder() .setJid(convertJournalId(journalId)) .setStorage(PBHelper.convert(storage)) .setPrevStorage(PBHelper.convert(prevStorage)) .setTargetLayoutVersion(targetLayoutVersion) .build()); return response.getCanRollBack(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public Boolean canRollBack(String journalId, StorageInfo storage, StorageInfo prevStorage, int targetLayoutVersion) throws IOException { try { CanRollBackResponseProto response = rpcProxy.canRollBack( NULL_CONTROLLER, CanRollBackRequestProto.newBuilder() .setJid(convertJournalId(journalId)) .setStorage(PBHelper.convert(storage)) .setPrevStorage(PBHelper.convert(prevStorage)) .setTargetLayoutVersion(targetLayoutVersion) .build()); return response.getCanRollBack(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public Boolean canRollBack(String journalId, String nameServiceId, StorageInfo storage, StorageInfo prevStorage, int targetLayoutVersion) throws IOException { try { CanRollBackRequestProto.Builder req = CanRollBackRequestProto.newBuilder() .setJid(convertJournalId(journalId)) .setStorage(PBHelper.convert(storage)) .setPrevStorage(PBHelper.convert(prevStorage)) .setTargetLayoutVersion(targetLayoutVersion); if (nameServiceId != null) { req.setNameServiceId(nameServiceId); } CanRollBackResponseProto response = rpcProxy.canRollBack( NULL_CONTROLLER, req.build()); return response.getCanRollBack(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
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; }