@Override public void addDynamicPartitions(long txnId, long writeId, String dbName, String tableName, List<String> partNames, DataOperationType operationType) throws TException { AddDynamicPartitions adp = new AddDynamicPartitions(txnId, writeId, dbName, tableName, partNames); adp.setOperationType(operationType); client.add_dynamic_partitions(adp); }
public Object getFieldValue(_Fields field) { switch (field) { case TXNID: return getTxnid(); case WRITEID: return getWriteid(); case DBNAME: return getDbname(); case TABLENAME: return getTablename(); case PARTITIONNAMES: return getPartitionnames(); case OPERATION_TYPE: return getOperationType(); } throw new IllegalStateException(); }
case TXNID: if (value == null) { unsetTxnid(); } else { setTxnid((Long)value); unsetWriteid(); } else { setWriteid((Long)value); unsetDbname(); } else { setDbname((String)value); unsetTablename(); } else { setTablename((String)value); unsetPartitionnames(); } else { setPartitionnames((List<String>)value); unsetOperationType(); } else { setOperationType((DataOperationType)value);
/** * Performs a deep copy on <i>other</i>. */ public AddDynamicPartitions(AddDynamicPartitions other) { __isset_bitfield = other.__isset_bitfield; this.txnid = other.txnid; this.writeid = other.writeid; if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetPartitionnames()) { List<String> __this__partitionnames = new ArrayList<String>(other.partitionnames); this.partitionnames = __this__partitionnames; } if (other.isSetOperationType()) { this.operationType = other.operationType; } }
/** 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 TXNID: return isSetTxnid(); case WRITEID: return isSetWriteid(); case DBNAME: return isSetDbname(); case TABLENAME: return isSetTablename(); case PARTITIONNAMES: return isSetPartitionnames(); case OPERATION_TYPE: return isSetOperationType(); } throw new IllegalStateException(); }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetTxnid()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString()); } if (!isSetWriteid()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'writeid' is unset! Struct:" + toString()); } if (!isSetDbname()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); } if (!isSetTablename()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); } if (!isSetPartitionnames()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'partitionnames' is unset! Struct:" + toString()); } // check for sub-struct validity }
case TXNID: if (value == null) { unsetTxnid(); } else { setTxnid((Long)value); unsetDbname(); } else { setDbname((String)value); unsetTablename(); } else { setTablename((String)value); unsetPartitionnames(); } else { setPartitionnames((List<String>)value);
public Object getFieldValue(_Fields field) { switch (field) { case TXNID: return Long.valueOf(getTxnid()); case DBNAME: return getDbname(); case TABLENAME: return getTablename(); case PARTITIONNAMES: return getPartitionnames(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public AddDynamicPartitions(AddDynamicPartitions other) { __isset_bitfield = other.__isset_bitfield; this.txnid = other.txnid; if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetPartitionnames()) { List<String> __this__partitionnames = new ArrayList<String>(); for (String other_element : other.partitionnames) { __this__partitionnames.add(other_element); } this.partitionnames = __this__partitionnames; } }
checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB_PART", "p=blah", locks); long writeId = txnMgr.getTableWriteId("default", "TAB_PART"); AddDynamicPartitions adp = new AddDynamicPartitions(txnId, writeId, "default", "TAB_PART", Collections.singletonList("p=blah")); adp.setOperationType(DataOperationType.UPDATE); txnHandler.addDynamicPartitions(adp); txnMgr.commitTxn(); adp.setTxnid(txnId2); writeId = txnMgr2.getTableWriteId("default", "TAB_PART"); adp.setWriteid(writeId); txnHandler.addDynamicPartitions(adp); LockException expectedException = null;
public AddDynamicPartitions deepCopy() { return new AddDynamicPartitions(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof AddDynamicPartitions) return this.equals((AddDynamicPartitions)that); return false; }
/** 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 TXNID: return isSetTxnid(); case DBNAME: return isSetDbname(); case TABLENAME: return isSetTablename(); case PARTITIONNAMES: return isSetPartitionnames(); } throw new IllegalStateException(); }
case TXNID: if (value == null) { unsetTxnid(); } else { setTxnid((Long)value); unsetDbname(); } else { setDbname((String)value); unsetTablename(); } else { setTablename((String)value); unsetPartitionnames(); } else { setPartitionnames((List<String>)value);
public Object getFieldValue(_Fields field) { switch (field) { case TXNID: return Long.valueOf(getTxnid()); case DBNAME: return getDbname(); case TABLENAME: return getTablename(); case PARTITIONNAMES: return getPartitionnames(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public AddDynamicPartitions(AddDynamicPartitions other) { __isset_bitfield = other.__isset_bitfield; this.txnid = other.txnid; if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetTablename()) { this.tablename = other.tablename; } if (other.isSetPartitionnames()) { List<String> __this__partitionnames = new ArrayList<String>(); for (String other_element : other.partitionnames) { __this__partitionnames.add(other_element); } this.partitionnames = __this__partitionnames; } }
lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); if (lastComparison != 0) { return lastComparison; if (isSetTxnid()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetWriteid()).compareTo(other.isSetWriteid()); if (lastComparison != 0) { return lastComparison; if (isSetWriteid()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeid, other.writeid); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); if (lastComparison != 0) { return lastComparison; if (isSetTablename()) {
boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) boolean this_present_tablename = true && this.isSetTablename(); boolean that_present_tablename = true && that.isSetTablename(); if (this_present_tablename || that_present_tablename) { if (!(this_present_tablename && that_present_tablename)) boolean this_present_partitionnames = true && this.isSetPartitionnames(); boolean that_present_partitionnames = true && that.isSetPartitionnames(); if (this_present_partitionnames || that_present_partitionnames) { if (!(this_present_partitionnames && that_present_partitionnames)) boolean this_present_operationType = true && this.isSetOperationType(); boolean that_present_operationType = true && that.isSetOperationType(); if (this_present_operationType || that_present_operationType) { if (!(this_present_operationType && that_present_operationType))
@Deprecated @Override public void addDynamicPartitions(long txnId, long writeId, String dbName, String tableName, List<String> partNames) throws TException { client.add_dynamic_partitions(new AddDynamicPartitions(txnId, writeId, dbName, tableName, partNames)); } @Override
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof AddDynamicPartitions) return this.equals((AddDynamicPartitions)that); return false; }