public Object getFieldValue(_Fields field) { switch (field) { case TBL_VALID_WRITE_IDS: return getTblValidWriteIds(); } throw new IllegalStateException(); }
public GetValidWriteIdsResponse deepCopy() { return new GetValidWriteIdsResponse(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof GetValidWriteIdsResponse) return this.equals((GetValidWriteIdsResponse)that); return false; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case TBL_VALID_WRITE_IDS: if (value == null) { unsetTblValidWriteIds(); } else { setTblValidWriteIds((List<TableValidWriteIds>)value); } break; } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetTblValidWriteIds()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblValidWriteIds' is unset! Struct:" + toString()); } // check for sub-struct validity }
assert rsp != null && rsp.getTblValidWriteIdsSize() == 1; TxnCommonUtils.createValidReaderWriteIdList(rsp.getTblValidWriteIds().get(0));
public boolean equals(GetValidWriteIdsResponse that) { if (that == null) return false; boolean this_present_tblValidWriteIds = true && this.isSetTblValidWriteIds(); boolean that_present_tblValidWriteIds = true && that.isSetTblValidWriteIds(); if (this_present_tblValidWriteIds || that_present_tblValidWriteIds) { if (!(this_present_tblValidWriteIds && that_present_tblValidWriteIds)) return false; if (!this.tblValidWriteIds.equals(that.tblValidWriteIds)) return false; } return true; }
struct.setTblValidWriteIdsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, GetValidWriteIdsResponse struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TList _list663 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.tblValidWriteIds = new ArrayList<TableValidWriteIds>(_list663.size); TableValidWriteIds _elem664; for (int _i665 = 0; _i665 < _list663.size; ++_i665) { _elem664 = new TableValidWriteIds(); _elem664.read(iprot); struct.tblValidWriteIds.add(_elem664); } } struct.setTblValidWriteIdsIsSet(true); } }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TBL_VALID_WRITE_IDS: return isSetTblValidWriteIds(); } throw new IllegalStateException(); }
@Override public ValidWriteIdList getValidWriteIds(String fullTableName) throws TException { GetValidWriteIdsRequest rqst = new GetValidWriteIdsRequest(Collections.singletonList(fullTableName)); GetValidWriteIdsResponse validWriteIds = client.get_valid_write_ids(rqst); return TxnCommonUtils.createValidReaderWriteIdList(validWriteIds.getTblValidWriteIds().get(0)); }
GetValidWriteIdsResponse owr = new GetValidWriteIdsResponse(tblValidWriteIdsList); return owr; } catch (SQLException e) {
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_tblValidWriteIds = true && (isSetTblValidWriteIds()); list.add(present_tblValidWriteIds); if (present_tblValidWriteIds) list.add(tblValidWriteIds); return list.hashCode(); }
@Override public ValidWriteIdList getValidWriteIds(String fullTableName, Long writeId) throws TException { GetValidWriteIdsRequest rqst = new GetValidWriteIdsRequest(Collections.singletonList(fullTableName)); rqst.setWriteId(writeId); GetValidWriteIdsResponse validWriteIds = client.get_valid_write_ids(rqst); return TxnCommonUtils.createValidReaderWriteIdList(validWriteIds.getTblValidWriteIds().get(0)); }
@Override public int compareTo(GetValidWriteIdsResponse other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTblValidWriteIds()).compareTo(other.isSetTblValidWriteIds()); if (lastComparison != 0) { return lastComparison; } if (isSetTblValidWriteIds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblValidWriteIds, other.tblValidWriteIds); if (lastComparison != 0) { return lastComparison; } } return 0; }
private ValidReaderWriteIdList getWriteIds( TableName fullTableName) throws NoSuchTxnException, MetaException { // TODO: acid utils don't support catalogs GetValidWriteIdsRequest req = new GetValidWriteIdsRequest( Lists.newArrayList(fullTableName.getDbTable())); return TxnCommonUtils.createValidReaderWriteIdList( txnHandler.getValidWriteIds(req).getTblValidWriteIds().get(0)); }
/** * Performs a deep copy on <i>other</i>. */ public GetValidWriteIdsResponse(GetValidWriteIdsResponse other) { if (other.isSetTblValidWriteIds()) { List<TableValidWriteIds> __this__tblValidWriteIds = new ArrayList<TableValidWriteIds>(other.tblValidWriteIds.size()); for (TableValidWriteIds other_element : other.tblValidWriteIds) { __this__tblValidWriteIds.add(new TableValidWriteIds(other_element)); } this.tblValidWriteIds = __this__tblValidWriteIds; } }
@Override public List<TableValidWriteIds> getValidWriteIds( List<String> tablesList, String validTxnList) throws TException { GetValidWriteIdsRequest rqst = new GetValidWriteIdsRequest(tablesList); rqst.setValidTxnList(validTxnList); return client.get_valid_write_ids(rqst).getTblValidWriteIds(); }
@Override public ValidWriteIdList getValidWriteIds(String fullTableName) throws TException { GetValidWriteIdsRequest rqst = new GetValidWriteIdsRequest(Collections.singletonList(fullTableName)); GetValidWriteIdsResponse validWriteIds = client.get_valid_write_ids(rqst); return TxnCommonUtils.createValidReaderWriteIdList(validWriteIds.getTblValidWriteIds().get(0)); }