Fix improper thrift field name
This commit is contained in:
parent
2abbc2984f
commit
9ab08c54a3
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Autogenerated by Thrift Compiler (0.19.0)
|
||||
* Autogenerated by Thrift Compiler (0.20.0)
|
||||
*
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* @generated
|
||||
@ -13,7 +13,7 @@ public class RocksDB {
|
||||
|
||||
public long openTransaction(long timeoutMs) throws org.apache.thrift.TException;
|
||||
|
||||
public boolean closeTransaction(long timeoutMs, boolean commit) throws org.apache.thrift.TException;
|
||||
public boolean closeTransaction(long transactionId, boolean commit) throws org.apache.thrift.TException;
|
||||
|
||||
public void closeFailedUpdate(long updateId) throws org.apache.thrift.TException;
|
||||
|
||||
@ -61,7 +61,7 @@ public class RocksDB {
|
||||
|
||||
public void openTransaction(long timeoutMs, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
|
||||
|
||||
public void closeTransaction(long timeoutMs, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
|
||||
public void closeTransaction(long transactionId, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
|
||||
|
||||
public void closeFailedUpdate(long updateId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
|
||||
|
||||
@ -152,16 +152,16 @@ public class RocksDB {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean closeTransaction(long timeoutMs, boolean commit) throws org.apache.thrift.TException
|
||||
public boolean closeTransaction(long transactionId, boolean commit) throws org.apache.thrift.TException
|
||||
{
|
||||
send_closeTransaction(timeoutMs, commit);
|
||||
send_closeTransaction(transactionId, commit);
|
||||
return recv_closeTransaction();
|
||||
}
|
||||
|
||||
public void send_closeTransaction(long timeoutMs, boolean commit) throws org.apache.thrift.TException
|
||||
public void send_closeTransaction(long transactionId, boolean commit) throws org.apache.thrift.TException
|
||||
{
|
||||
closeTransaction_args args = new closeTransaction_args();
|
||||
args.setTimeoutMs(timeoutMs);
|
||||
args.setTransactionId(transactionId);
|
||||
args.setCommit(commit);
|
||||
sendBase("closeTransaction", args);
|
||||
}
|
||||
@ -719,19 +719,19 @@ public class RocksDB {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeTransaction(long timeoutMs, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
|
||||
public void closeTransaction(long transactionId, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
|
||||
checkReady();
|
||||
closeTransaction_call method_call = new closeTransaction_call(timeoutMs, commit, resultHandler, this, ___protocolFactory, ___transport);
|
||||
closeTransaction_call method_call = new closeTransaction_call(transactionId, commit, resultHandler, this, ___protocolFactory, ___transport);
|
||||
this.___currentMethod = method_call;
|
||||
___manager.call(method_call);
|
||||
}
|
||||
|
||||
public static class closeTransaction_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
|
||||
private long timeoutMs;
|
||||
private long transactionId;
|
||||
private boolean commit;
|
||||
public closeTransaction_call(long timeoutMs, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
||||
public closeTransaction_call(long transactionId, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
||||
super(client, protocolFactory, transport, resultHandler, false);
|
||||
this.timeoutMs = timeoutMs;
|
||||
this.transactionId = transactionId;
|
||||
this.commit = commit;
|
||||
}
|
||||
|
||||
@ -739,7 +739,7 @@ public class RocksDB {
|
||||
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
||||
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeTransaction", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
||||
closeTransaction_args args = new closeTransaction_args();
|
||||
args.setTimeoutMs(timeoutMs);
|
||||
args.setTransactionId(transactionId);
|
||||
args.setCommit(commit);
|
||||
args.write(prot);
|
||||
prot.writeMessageEnd();
|
||||
@ -1673,7 +1673,7 @@ public class RocksDB {
|
||||
@Override
|
||||
public closeTransaction_result getResult(I iface, closeTransaction_args args) throws org.apache.thrift.TException {
|
||||
closeTransaction_result result = new closeTransaction_result();
|
||||
result.success = iface.closeTransaction(args.timeoutMs, args.commit);
|
||||
result.success = iface.closeTransaction(args.transactionId, args.commit);
|
||||
result.setSuccessIsSet(true);
|
||||
return result;
|
||||
}
|
||||
@ -2415,7 +2415,7 @@ public class RocksDB {
|
||||
|
||||
@Override
|
||||
public void start(I iface, closeTransaction_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
|
||||
iface.closeTransaction(args.timeoutMs, args.commit,resultHandler);
|
||||
iface.closeTransaction(args.transactionId, args.commit,resultHandler);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4481,18 +4481,18 @@ public class RocksDB {
|
||||
public static class closeTransaction_args implements org.apache.thrift.TBase<closeTransaction_args, closeTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeTransaction_args> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeTransaction_args");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField TIMEOUT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("timeoutMs", org.apache.thrift.protocol.TType.I64, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField COMMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("commit", org.apache.thrift.protocol.TType.BOOL, (short)2);
|
||||
|
||||
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeTransaction_argsStandardSchemeFactory();
|
||||
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeTransaction_argsTupleSchemeFactory();
|
||||
|
||||
public long timeoutMs; // required
|
||||
public long transactionId; // required
|
||||
public boolean commit; // required
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||
TIMEOUT_MS((short)1, "timeoutMs"),
|
||||
TRANSACTION_ID((short)1, "transactionId"),
|
||||
COMMIT((short)2, "commit");
|
||||
|
||||
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
|
||||
@ -4509,8 +4509,8 @@ public class RocksDB {
|
||||
@org.apache.thrift.annotation.Nullable
|
||||
public static _Fields findByThriftId(int fieldId) {
|
||||
switch(fieldId) {
|
||||
case 1: // TIMEOUT_MS
|
||||
return TIMEOUT_MS;
|
||||
case 1: // TRANSACTION_ID
|
||||
return TRANSACTION_ID;
|
||||
case 2: // COMMIT
|
||||
return COMMIT;
|
||||
default:
|
||||
@ -4556,13 +4556,13 @@ public class RocksDB {
|
||||
}
|
||||
|
||||
// isset id assignments
|
||||
private static final int __TIMEOUTMS_ISSET_ID = 0;
|
||||
private static final int __TRANSACTIONID_ISSET_ID = 0;
|
||||
private static final int __COMMIT_ISSET_ID = 1;
|
||||
private byte __isset_bitfield = 0;
|
||||
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||
tmpMap.put(_Fields.TIMEOUT_MS, new org.apache.thrift.meta_data.FieldMetaData("timeoutMs", org.apache.thrift.TFieldRequirementType.REQUIRED,
|
||||
tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.REQUIRED,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
||||
tmpMap.put(_Fields.COMMIT, new org.apache.thrift.meta_data.FieldMetaData("commit", org.apache.thrift.TFieldRequirementType.REQUIRED,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
||||
@ -4574,12 +4574,12 @@ public class RocksDB {
|
||||
}
|
||||
|
||||
public closeTransaction_args(
|
||||
long timeoutMs,
|
||||
long transactionId,
|
||||
boolean commit)
|
||||
{
|
||||
this();
|
||||
this.timeoutMs = timeoutMs;
|
||||
setTimeoutMsIsSet(true);
|
||||
this.transactionId = transactionId;
|
||||
setTransactionIdIsSet(true);
|
||||
this.commit = commit;
|
||||
setCommitIsSet(true);
|
||||
}
|
||||
@ -4589,7 +4589,7 @@ public class RocksDB {
|
||||
*/
|
||||
public closeTransaction_args(closeTransaction_args other) {
|
||||
__isset_bitfield = other.__isset_bitfield;
|
||||
this.timeoutMs = other.timeoutMs;
|
||||
this.transactionId = other.transactionId;
|
||||
this.commit = other.commit;
|
||||
}
|
||||
|
||||
@ -4600,33 +4600,33 @@ public class RocksDB {
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
setTimeoutMsIsSet(false);
|
||||
this.timeoutMs = 0;
|
||||
setTransactionIdIsSet(false);
|
||||
this.transactionId = 0;
|
||||
setCommitIsSet(false);
|
||||
this.commit = false;
|
||||
}
|
||||
|
||||
public long getTimeoutMs() {
|
||||
return this.timeoutMs;
|
||||
public long getTransactionId() {
|
||||
return this.transactionId;
|
||||
}
|
||||
|
||||
public closeTransaction_args setTimeoutMs(long timeoutMs) {
|
||||
this.timeoutMs = timeoutMs;
|
||||
setTimeoutMsIsSet(true);
|
||||
public closeTransaction_args setTransactionId(long transactionId) {
|
||||
this.transactionId = transactionId;
|
||||
setTransactionIdIsSet(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetTimeoutMs() {
|
||||
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
|
||||
public void unsetTransactionId() {
|
||||
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID);
|
||||
}
|
||||
|
||||
/** Returns true if field timeoutMs is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetTimeoutMs() {
|
||||
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
|
||||
/** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetTransactionId() {
|
||||
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID);
|
||||
}
|
||||
|
||||
public void setTimeoutMsIsSet(boolean value) {
|
||||
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value);
|
||||
public void setTransactionIdIsSet(boolean value) {
|
||||
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID, value);
|
||||
}
|
||||
|
||||
public boolean isCommit() {
|
||||
@ -4655,11 +4655,11 @@ public class RocksDB {
|
||||
@Override
|
||||
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
|
||||
switch (field) {
|
||||
case TIMEOUT_MS:
|
||||
case TRANSACTION_ID:
|
||||
if (value == null) {
|
||||
unsetTimeoutMs();
|
||||
unsetTransactionId();
|
||||
} else {
|
||||
setTimeoutMs((java.lang.Long)value);
|
||||
setTransactionId((java.lang.Long)value);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -4678,8 +4678,8 @@ public class RocksDB {
|
||||
@Override
|
||||
public java.lang.Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
case TIMEOUT_MS:
|
||||
return getTimeoutMs();
|
||||
case TRANSACTION_ID:
|
||||
return getTransactionId();
|
||||
|
||||
case COMMIT:
|
||||
return isCommit();
|
||||
@ -4696,8 +4696,8 @@ public class RocksDB {
|
||||
}
|
||||
|
||||
switch (field) {
|
||||
case TIMEOUT_MS:
|
||||
return isSetTimeoutMs();
|
||||
case TRANSACTION_ID:
|
||||
return isSetTransactionId();
|
||||
case COMMIT:
|
||||
return isSetCommit();
|
||||
}
|
||||
@ -4717,12 +4717,12 @@ public class RocksDB {
|
||||
if (this == that)
|
||||
return true;
|
||||
|
||||
boolean this_present_timeoutMs = true;
|
||||
boolean that_present_timeoutMs = true;
|
||||
if (this_present_timeoutMs || that_present_timeoutMs) {
|
||||
if (!(this_present_timeoutMs && that_present_timeoutMs))
|
||||
boolean this_present_transactionId = true;
|
||||
boolean that_present_transactionId = true;
|
||||
if (this_present_transactionId || that_present_transactionId) {
|
||||
if (!(this_present_transactionId && that_present_transactionId))
|
||||
return false;
|
||||
if (this.timeoutMs != that.timeoutMs)
|
||||
if (this.transactionId != that.transactionId)
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -4742,7 +4742,7 @@ public class RocksDB {
|
||||
public int hashCode() {
|
||||
int hashCode = 1;
|
||||
|
||||
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutMs);
|
||||
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionId);
|
||||
|
||||
hashCode = hashCode * 8191 + ((commit) ? 131071 : 524287);
|
||||
|
||||
@ -4757,12 +4757,12 @@ public class RocksDB {
|
||||
|
||||
int lastComparison = 0;
|
||||
|
||||
lastComparison = java.lang.Boolean.compare(isSetTimeoutMs(), other.isSetTimeoutMs());
|
||||
lastComparison = java.lang.Boolean.compare(isSetTransactionId(), other.isSetTransactionId());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetTimeoutMs()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeoutMs, other.timeoutMs);
|
||||
if (isSetTransactionId()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, other.transactionId);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
@ -4801,8 +4801,8 @@ public class RocksDB {
|
||||
java.lang.StringBuilder sb = new java.lang.StringBuilder("closeTransaction_args(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("timeoutMs:");
|
||||
sb.append(this.timeoutMs);
|
||||
sb.append("transactionId:");
|
||||
sb.append(this.transactionId);
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("commit:");
|
||||
@ -4814,7 +4814,7 @@ public class RocksDB {
|
||||
|
||||
public void validate() throws org.apache.thrift.TException {
|
||||
// check for required fields
|
||||
// alas, we cannot check 'timeoutMs' because it's a primitive and you chose the non-beans generator.
|
||||
// alas, we cannot check 'transactionId' because it's a primitive and you chose the non-beans generator.
|
||||
// alas, we cannot check 'commit' because it's a primitive and you chose the non-beans generator.
|
||||
// check for sub-struct validity
|
||||
}
|
||||
@ -4857,10 +4857,10 @@ public class RocksDB {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // TIMEOUT_MS
|
||||
case 1: // TRANSACTION_ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.timeoutMs = iprot.readI64();
|
||||
struct.setTimeoutMsIsSet(true);
|
||||
struct.transactionId = iprot.readI64();
|
||||
struct.setTransactionIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
@ -4881,8 +4881,8 @@ public class RocksDB {
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
if (!struct.isSetTimeoutMs()) {
|
||||
throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeoutMs' was not found in serialized data! Struct: " + toString());
|
||||
if (!struct.isSetTransactionId()) {
|
||||
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionId' was not found in serialized data! Struct: " + toString());
|
||||
}
|
||||
if (!struct.isSetCommit()) {
|
||||
throw new org.apache.thrift.protocol.TProtocolException("Required field 'commit' was not found in serialized data! Struct: " + toString());
|
||||
@ -4895,8 +4895,8 @@ public class RocksDB {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
oprot.writeFieldBegin(TIMEOUT_MS_FIELD_DESC);
|
||||
oprot.writeI64(struct.timeoutMs);
|
||||
oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
|
||||
oprot.writeI64(struct.transactionId);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(COMMIT_FIELD_DESC);
|
||||
oprot.writeBool(struct.commit);
|
||||
@ -4919,15 +4919,15 @@ public class RocksDB {
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
|
||||
oprot.writeI64(struct.timeoutMs);
|
||||
oprot.writeI64(struct.transactionId);
|
||||
oprot.writeBool(struct.commit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
|
||||
struct.timeoutMs = iprot.readI64();
|
||||
struct.setTimeoutMsIsSet(true);
|
||||
struct.transactionId = iprot.readI64();
|
||||
struct.setTransactionIdIsSet(true);
|
||||
struct.commit = iprot.readBool();
|
||||
struct.setCommitIsSet(true);
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import java.net.InetSocketAddress;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.util.List;
|
||||
import org.apache.thrift.TException;
|
||||
import org.apache.thrift.server.TThreadedSelectorServer;
|
||||
import org.apache.thrift.transport.TNonblockingServerSocket;
|
||||
import org.apache.thrift.transport.TTransportException;
|
||||
@ -131,8 +132,8 @@ public class ThriftServer extends Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean closeTransaction(long timeoutMs, boolean commit) {
|
||||
return client.getSyncApi().closeTransaction(timeoutMs, commit);
|
||||
public boolean closeTransaction(long transactionId, boolean commit) throws TException {
|
||||
return client.getSyncApi().closeTransaction(transactionId, commit);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -42,7 +42,7 @@ service RocksDB {
|
||||
|
||||
i64 openTransaction(1: required i64 timeoutMs),
|
||||
|
||||
bool closeTransaction(1: required i64 timeoutMs, 2: required bool commit),
|
||||
bool closeTransaction(1: required i64 transactionId, 2: required bool commit),
|
||||
|
||||
void closeFailedUpdate(1: required i64 updateId),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user