From d32635d0b8b339dff799e2439f1003643bbb82b2 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 29 Apr 2025 16:18:10 +0800 Subject: [PATCH 01/25] Added RPC columnEncoder(Rle,Plain) and MetaHead.java --- .../iotdb/session/compress/ColumnEncoder.java | 58 ++++++ .../iotdb/session/compress/ColumnEntry.java | 107 +++++++++++ .../iotdb/session/compress/MetaHead.java | 82 ++++++++ .../session/compress/PlainColumnEncoder.java | 178 ++++++++++++++++++ .../session/compress/RleColumnEncoder.java | 100 ++++++++++ .../iotdb/session/compress/RpcCompressor.java | 46 +++++ .../session/compress/RpcUncompressor.java | 40 ++++ .../compress/Ts2DiffColumnEncoder.java | 43 +++++ .../src/main/thrift/client.thrift | 3 + 9 files changed, 657 insertions(+) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java new file mode 100644 index 0000000000000..1d8a2a57ef67d --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java @@ -0,0 +1,58 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; + +import java.io.IOException; +import java.util.List; + +/** 列式编码器接口,定义了列数据的编码和解码操作 */ +public interface ColumnEncoder { + + /** + * 对一列数据进行编码 + * + * @param data 待编码的数据列 + * @return 编码后的数据 + * @throws IOException 如果编码过程中发生IO错误 + */ + byte[] encode(List data) throws IOException; + + /** + * 对编码后的数据进行解码(未实现) + * + * @param data 待解码的数据 + * @return 解码后的数据列 + * @throws IOException 如果解码过程中发生IO错误 + */ + // List decode(byte[] data) throws IOException; + + /** + * 获取数据类型 + * + * @return 数据类型 + */ + TSDataType getDataType(); + + /** + * 获取编码类型 + * + * @return 编码类型 + */ + TSEncoding getEncodingType(); + + /** + * 获取底层编码器实例 + * + * @return 编码器实例 + */ + Encoder getEncoder(TSDataType type, TSEncoding encodingType); +} + +/** 编码类型不支持异常 */ +class EncodingTypeNotSupportedException extends RuntimeException { + public EncodingTypeNotSupportedException(String message) { + super("Encoding type " + message + " is not supported."); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java new file mode 100644 index 0000000000000..0499a0189f9a1 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java @@ -0,0 +1,107 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; + +import java.io.Serializable; + +public class ColumnEntry implements Serializable { + + // 用于申请内存时指定大小 + private Integer compressedSize; + private Integer unCompressedSize; + private TSDataType dataType; + private TSEncoding encodingType; + private Integer offset; // 偏移量 + private Integer size; // 列条目的总大小 + + public ColumnEntry() { + updateSize(); + } + + public ColumnEntry( + Integer compressedSize, + Integer unCompressedSize, + TSDataType dataType, + TSEncoding encodingType, + Integer offset) { + this.compressedSize = compressedSize; + this.unCompressedSize = unCompressedSize; + this.dataType = dataType; + this.encodingType = encodingType; + this.offset = offset; + updateSize(); + } + + /** + * 更新列条目的总大小 总大小 = compressedSize(4字节) + unCompressedSize(4字节) + dataType(1字节) + encodingType(1字节) + * + offset(4字节) + */ + public void updateSize() { + int totalSize = 0; + + if (compressedSize != null) { + totalSize += 4; + } + + if (unCompressedSize != null) { + totalSize += 4; + } + + if (dataType != null) { + totalSize += 1; + } + + if (encodingType != null) { + totalSize += 1; + } + + if (offset != null) { + totalSize += 4; + } + + this.size = totalSize; + } + + public Integer getCompressedSize() { + return compressedSize; + } + + public Integer getUnCompressedSize() { + return unCompressedSize; + } + + public TSDataType getDataType() { + return dataType; + } + + public TSEncoding getEncodingType() { + return encodingType; + } + + public Integer getOffset() { + return offset; + } + + public Integer getSize() { + return size; + } + + @Override + public String toString() { + return "ColumnEntry{" + + "compressedSize=" + + compressedSize + + ", unCompressedSize=" + + unCompressedSize + + ", dataType=" + + dataType + + ", encodingType=" + + encodingType + + ", offset=" + + offset + + ", size=" + + size + + '}'; + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java new file mode 100644 index 0000000000000..a67612b3556b7 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java @@ -0,0 +1,82 @@ +package org.apache.iotdb.session.compress; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class MetaHead implements Serializable { + + private Integer numberOfColumns; + private Integer size; + private List columnEntries; + + public MetaHead() { + this.columnEntries = new ArrayList<>(); + updateSize(); + } + + // TODO-RPC 大小后续要更新,先初始化一次 + public MetaHead(Integer numberOfColumns, List columnEntries) { + this.numberOfColumns = numberOfColumns; + this.columnEntries = columnEntries; + updateSize(); + } + + public Integer getNumberOfColumns() { + return numberOfColumns; + } + + public Integer getSize() { + return size; + } + + public List getColumnEntries() { + return columnEntries; + } + + /** + * 追加 ColumnEntry + * + * @param entry + */ + public void addColumnEntry(ColumnEntry entry) { + if (columnEntries == null) { + columnEntries = new ArrayList<>(); + } + columnEntries.add(entry); + numberOfColumns = columnEntries.size(); + updateSize(); + } + + /** + * 更新元数据头的大小 MetaHead的总大小 = MetaHead头部大小 + 所有ColumnEntry的大小 MetaHead头部大小 = numberOfColumns(4字节) + + * size(4字节) + */ + private void updateSize() { + // MetaHead头部大小 + int totalSize = 8; // numberOfColumns(4字节) + size(4字节) + + // 累加所有ColumnEntry的大小 + if (columnEntries != null) { + for (ColumnEntry entry : columnEntries) { + if (entry != null && entry.getSize() != null) { + totalSize += entry.getSize(); + } + } + } + + this.size = totalSize; + } + + @Override + public String toString() { + return "MetaHead{" + + "numberOfColumns=" + + numberOfColumns + + ", size=" + + size + + ", columnEntries=" + + columnEntries + + '}'; + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java new file mode 100644 index 0000000000000..35ea82cc3fff5 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java @@ -0,0 +1,178 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.PlainEncoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; + +import java.io.IOException; +import java.util.List; + +public class PlainColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + private static final int DEFAULT_MAX_STRING_LENGTH = 128; + + public PlainColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = new PlainEncoder(dataType, DEFAULT_MAX_STRING_LENGTH); + } + + @Override + public byte[] encode(List data) throws IOException { + if (data == null || data.isEmpty()) { + return new byte[0]; + } + + PublicBAOS outputStream = new PublicBAOS(); + try { + switch (dataType) { + case BOOLEAN: + for (Object value : data) { + if (value != null) { + encoder.encode((Boolean) value, outputStream); + } + } + break; + case INT32: + case DATE: + for (Object value : data) { + if (value != null) { + encoder.encode((Integer) value, outputStream); + } + } + break; + case INT64: + case TIMESTAMP: + for (Object value : data) { + if (value != null) { + encoder.encode((Long) value, outputStream); + } + } + break; + case FLOAT: + for (Object value : data) { + if (value != null) { + encoder.encode((Float) value, outputStream); + } + } + break; + case DOUBLE: + for (Object value : data) { + if (value != null) { + encoder.encode((Double) value, outputStream); + } + } + break; + case TEXT: + case STRING: + case BLOB: + for (Object value : data) { + if (value != null) { + if (value instanceof String) { + encoder.encode(new Binary((byte[]) value), outputStream); + } else if (value instanceof Binary) { + encoder.encode((Binary) value, outputStream); + } else { + throw new IOException( + "Unsupported value type for TEXT/STRING/BLOB: " + value.getClass()); + } + } + } + break; + default: + throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); + } + encoder.flush(outputStream); + return outputStream.toByteArray(); + } finally { + outputStream.close(); + } + } + + // @Override + // public List decode(byte[] data) throws IOException { + // if (data == null || data.length == 0) { + // return new ArrayList<>(); + // } + // + // List result = new ArrayList<>(); + // ByteArrayInputStream inputStream = new ByteArrayInputStream(data); + // try { + // switch (dataType) { + // case BOOLEAN: + // while (inputStream.available() > 0) { + // result.add(inputStream.read() != 0); + // } + // break; + // case INT32: + // case DATE: + // while (inputStream.available() > 0) { + // result.add(ReadWriteForEncodingUtils.readVarInt(inputStream)); + // } + // break; + // case INT64: + // case TIMESTAMP: + // while (inputStream.available() > 0) { + // long value = 0; + // for (int i = 0; i < 8; i++) { + // value = (value << 8) | (inputStream.read() & 0xFF); + // } + // result.add(value); + // } + // break; + // case FLOAT: + // while (inputStream.available() > 0) { + // int bits = 0; + // for (int i = 0; i < 4; i++) { + // bits = (bits << 8) | (inputStream.read() & 0xFF); + // } + // result.add(Float.intBitsToFloat(bits)); + // } + // break; + // case DOUBLE: + // while (inputStream.available() > 0) { + // long bits = 0; + // for (int i = 0; i < 8; i++) { + // bits = (bits << 8) | (inputStream.read() & 0xFF); + // } + // result.add(Double.longBitsToDouble(bits)); + // } + // break; + // case TEXT: + // case STRING: + // case BLOB: + // while (inputStream.available() > 0) { + // int length = ReadWriteForEncodingUtils.readVarInt(inputStream); + // byte[] bytes = new byte[length]; + // inputStream.read(bytes); + // result.add(new Binary(bytes)); + // } + // break; + // default: + // throw new UnsupportedOperationException("PLAIN doesn't support data type: " + + // dataType); + // } + // return result; + // } finally { + // inputStream.close(); + // } + // } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.PLAIN; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return new PlainEncoder(type, DEFAULT_MAX_STRING_LENGTH); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java new file mode 100644 index 0000000000000..db38ed98a8a34 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java @@ -0,0 +1,100 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.PublicBAOS; + +import java.io.IOException; +import java.util.List; + +public class RleColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + + public RleColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = getEncoder(dataType, TSEncoding.RLE); + } + + @Override + public byte[] encode(List data) throws IOException { + if (data == null || data.isEmpty()) { + return new byte[0]; + } + PublicBAOS outputStream = new PublicBAOS(); + try { + switch (dataType) { + case INT32: + case DATE: + case BOOLEAN: + for (Object value : data) { + if (value != null) { + encoder.encode((Integer) value, outputStream); + } + } + break; + case INT64: + case TIMESTAMP: + for (Object value : data) { + if (value != null) { + encoder.encode((long) value, outputStream); + } + } + break; + case FLOAT: + for (Object value : data) { + if (value != null) { + encoder.encode((float) value, outputStream); + } + } + break; + case DOUBLE: + for (Object value : data) { + if (value != null) { + encoder.encode((double) value, outputStream); + } + } + break; + default: + throw new UnsupportedOperationException("RLE doesn't support data type: " + dataType); + } + encoder.flush(outputStream); + return outputStream.toByteArray(); + } finally { + outputStream.close(); + } + } + + // @Override + // public List decode(byte[] data) throws IOException { + // if (data == null || data.length == 0) { + // return new ArrayList<>(); + // } + // + // List result = new ArrayList<>(); + // ByteArrayInputStream inputStream = new ByteArrayInputStream(data); + // try { + // //...... + // } finally { + // inputStream.close(); + // } + // return List.of(); + // } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.RLE; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java new file mode 100644 index 0000000000000..6c54d77556642 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java @@ -0,0 +1,46 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.compress.ICompressor; +import org.apache.tsfile.file.metadata.enums.CompressionType; + +import java.io.IOException; +import java.nio.ByteBuffer; + +// 为后续的压缩器提供一个基础的实现 +public class RpcCompressor { + + public static ICompressor compressor; + + public RpcCompressor(CompressionType name) { + compressor = ICompressor.getCompressor(name); + } + + public byte[] compress(byte[] data) throws IOException { + return compressor.compress(data); + } + + public byte[] compress(byte[] data, int offset, int length) throws IOException { + return compressor.compress(data, offset, length); + } + + public int compress(byte[] data, int offset, int length, byte[] compressed) throws IOException { + return compressor.compress(data, offset, length, compressed); + } + + /** + * 压缩 ByteBuffer, 较长的数据使用这种方式更好 + * + * @return byte length of compressed data. + */ + public int compress(ByteBuffer data, ByteBuffer compressed) throws IOException { + return compressor.compress(data, compressed); + } + + public int getMaxBytesForCompression(int uncompressedDataSize) { + return compressor.getMaxBytesForCompression(uncompressedDataSize); + } + + public CompressionType getType() { + return compressor.getType(); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java new file mode 100644 index 0000000000000..21ddd677bf1db --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java @@ -0,0 +1,40 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.compress.IUnCompressor; +import org.apache.tsfile.file.metadata.enums.CompressionType; + +import java.io.IOException; +import java.nio.ByteBuffer; + +public class RpcUncompressor { + public static IUnCompressor unCompressor; + + public RpcUncompressor(CompressionType name) { + unCompressor = IUnCompressor.getUnCompressor(name); + } + + public int getUncompressedLength(byte[] array, int offset, int length) throws IOException { + return unCompressor.getUncompressedLength(array, offset, length); + } + + public int getUncompressedLength(ByteBuffer buffer) throws IOException { + return unCompressor.getUncompressedLength(buffer); + } + + public byte[] uncompress(byte[] byteArray) throws IOException { + return unCompressor.uncompress(byteArray); + } + + public int uncompress(byte[] byteArray, int offset, int length, byte[] output, int outOffset) + throws IOException { + return unCompressor.uncompress(byteArray, offset, length, output, outOffset); + } + + public int uncompress(ByteBuffer compressed, ByteBuffer uncompressed) throws IOException { + return unCompressor.uncompress(compressed, uncompressed); + } + + public CompressionType getCodecName() { + return unCompressor.getCodecName(); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java new file mode 100644 index 0000000000000..d7a588ba5e938 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java @@ -0,0 +1,43 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; + +import java.io.IOException; +import java.util.List; + +public class Ts2DiffColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + + public Ts2DiffColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = getEncoder(dataType, TSEncoding.RLE); + } + + @Override + public byte[] encode(List data) throws IOException { + return new byte[0]; + } + + // @Override + // public List decode(byte[] data) throws IOException { + // return List.of(); + // } + + @Override + public TSDataType getDataType() { + return null; + } + + @Override + public TSEncoding getEncodingType() { + return null; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return null; + } +} diff --git a/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift b/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift index f658017b60057..ebd37cdfa895d 100644 --- a/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift +++ b/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift @@ -242,6 +242,9 @@ struct TSInsertTabletReq { 8: optional bool isAligned 9: optional bool writeToTable 10: optional list columnCategories + 11: optional bool isCompressed + 12: optional list encodingTypes + 13: optional i32 compressType } struct TSInsertTabletsReq { From ede1a8959719b5552512b63e19e2d86340559723 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Wed, 7 May 2025 22:57:24 +0800 Subject: [PATCH 02/25] Improve RpcEncoder logic. --- .../iotdb/session/AbstractSessionBuilder.java | 26 +++ .../org/apache/iotdb/session/Session.java | 21 ++- .../iotdb/session/TableSessionBuilder.java | 113 +++++++++++- .../iotdb/session/compress/ColumnEncoder.java | 40 +--- .../iotdb/session/compress/ColumnEntry.java | 63 +++++-- .../iotdb/session/compress/MetaHead.java | 47 ++++- .../session/compress/PlainColumnEncoder.java | 128 ++++++------- .../session/compress/RleColumnEncoder.java | 80 ++++++-- .../iotdb/session/compress/RpcCompressor.java | 3 +- .../iotdb/session/compress/RpcEncoder.java | 173 ++++++++++++++++++ .../compress/Ts2DiffColumnEncoder.java | 13 +- 11 files changed, 549 insertions(+), 158 deletions(-) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/AbstractSessionBuilder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/AbstractSessionBuilder.java index d7bf2726425d2..ec828ea2aa507 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/AbstractSessionBuilder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/AbstractSessionBuilder.java @@ -22,8 +22,14 @@ import org.apache.iotdb.isession.SessionConfig; import org.apache.iotdb.isession.util.Version; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.CompressionType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; + import java.time.ZoneId; +import java.util.HashMap; import java.util.List; +import java.util.Map; public abstract class AbstractSessionBuilder { @@ -68,4 +74,24 @@ public abstract class AbstractSessionBuilder { public String sqlDialect = SessionConfig.SQL_DIALECT; public String database; + + public Boolean isCompressed = false; + + public CompressionType compressionType = CompressionType.UNCOMPRESSED; + + public Map columnEncodersMap; + + { + columnEncodersMap = new HashMap<>(); + columnEncodersMap.put(TSDataType.TIMESTAMP, TSEncoding.TS_2DIFF); + columnEncodersMap.put(TSDataType.BOOLEAN, TSEncoding.RLE); + columnEncodersMap.put(TSDataType.INT32, TSEncoding.TS_2DIFF); + columnEncodersMap.put(TSDataType.INT64, TSEncoding.TS_2DIFF); + columnEncodersMap.put(TSDataType.FLOAT, TSEncoding.GORILLA); + columnEncodersMap.put(TSDataType.DOUBLE, TSEncoding.GORILLA); + columnEncodersMap.put(TSDataType.DATE, TSEncoding.TS_2DIFF); + columnEncodersMap.put(TSDataType.STRING, TSEncoding.PLAIN); + columnEncodersMap.put(TSDataType.TEXT, TSEncoding.PLAIN); + columnEncodersMap.put(TSDataType.BLOB, TSEncoding.PLAIN); + } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index 8283f2319a150..0f6bd3d4a0c17 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -56,6 +56,7 @@ import org.apache.iotdb.service.rpc.thrift.TSQueryTemplateResp; import org.apache.iotdb.service.rpc.thrift.TSSetSchemaTemplateReq; import org.apache.iotdb.service.rpc.thrift.TSUnsetSchemaTemplateReq; +import org.apache.iotdb.session.compress.RpcEncoder; import org.apache.iotdb.session.template.MeasurementNode; import org.apache.iotdb.session.template.TemplateQueryType; import org.apache.iotdb.session.util.SessionUtils; @@ -218,6 +219,9 @@ public class Session implements ISession { protected static final String TABLE = "table"; protected static final String TREE = "tree"; + private CompressionType compressionType; + public Map columnEncodersMap; + public Session(String host, int rpcPort) { this( host, @@ -449,6 +453,9 @@ public Session(AbstractSessionBuilder builder) { this.defaultEndPoint = new TEndPoint(builder.host, builder.rpcPort); this.enableQueryRedirection = builder.enableRedirection; } + this.enableRPCCompression = builder.isCompressed; + this.compressionType = builder.compressionType; + this.columnEncodersMap = builder.columnEncodersMap; this.enableRedirection = builder.enableRedirection; this.enableRecordsAutoConvertTablet = builder.enableRecordsAutoConvertTablet; this.username = builder.username; @@ -2976,9 +2983,17 @@ private TSInsertTabletReq genTSInsertTabletReq(Tablet tablet, boolean sorted, bo request.setPrefixPath(tablet.getDeviceId()); request.setIsAligned(isAligned); - request.setTimestamps(SessionUtils.getTimeBuffer(tablet)); - request.setValues(SessionUtils.getValueBuffer(tablet)); - request.setSize(tablet.getRowSize()); + // 新增编码逻辑 + if (this.enableRPCCompression) { + RpcEncoder rpcEncoder = new RpcEncoder(this.columnEncodersMap, this.compressionType); + request.setTimestamps(rpcEncoder.encodeTimestamps(tablet)); + request.setValues(rpcEncoder.encodeValues(tablet)); + request.setSize(tablet.getRowSize()); + } else { + request.setTimestamps(SessionUtils.getTimeBuffer(tablet)); + request.setValues(SessionUtils.getValueBuffer(tablet)); + request.setSize(tablet.getRowSize()); + } return request; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java index fd59846c6e68d..18bfc4d14d57b 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java @@ -23,6 +23,10 @@ import org.apache.iotdb.isession.SessionConfig; import org.apache.iotdb.rpc.IoTDBConnectionException; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.CompressionType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; + import java.time.ZoneId; import java.util.Collections; import java.util.List; @@ -47,10 +51,11 @@ public class TableSessionBuilder extends AbstractSessionBuilder { * * @param nodeUrls a list of node URLs. * @return the current {@link TableSessionBuilder} instance. - * @defaultValue Collection.singletonList("localhost:6667") + * @defaultValue Collection.singletonList(" localhost : 6667 ") */ public TableSessionBuilder nodeUrls(List nodeUrls) { this.nodeUrls = nodeUrls; + return this; } @@ -258,6 +263,112 @@ public TableSessionBuilder connectionTimeoutInMs(int connectionTimeoutInMs) { return this; } + public TableSessionBuilder isCompressed(Boolean isCompressed) { + this.isCompressed = isCompressed; + return this; + } + + /** + * 设置编码类型 + * + * @param compressionType 压缩类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withCompressionType(CompressionType compressionType) { + this.compressionType = compressionType; + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withTimeStampEncoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.TIMESTAMP, tsEncoding); + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withBooleanEncoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.BOOLEAN, tsEncoding); + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withInt32Encoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.INT32, tsEncoding); + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withInt64Encoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.INT64, tsEncoding); + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withFloatEncoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.FLOAT, tsEncoding); + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withDoubleEncoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.DOUBLE, tsEncoding); + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withStringEncoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.STRING, tsEncoding); + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withTextEncoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.TEXT, tsEncoding); + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withBlobEncoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.BLOB, tsEncoding); + return this; + } + + /** + * @param tsEncoding 编码类型 + * @return the current {@link TableSessionBuilder} instance. + */ + public TableSessionBuilder withDateEncoding(TSEncoding tsEncoding) { + this.columnEncodersMap.put(TSDataType.DATE, tsEncoding); + return this; + } + /** * Builds and returns a configured {@link ITableSession} instance. * diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java index 1d8a2a57ef67d..d897decee14ec 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java @@ -4,53 +4,29 @@ import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; -import java.io.IOException; import java.util.List; -/** 列式编码器接口,定义了列数据的编码和解码操作 */ +/** Column encoder interface, which defines the encoding and decoding operations of column data */ public interface ColumnEncoder { /** - * 对一列数据进行编码 + * Encode a column of data * - * @param data 待编码的数据列 - * @return 编码后的数据 - * @throws IOException 如果编码过程中发生IO错误 + * @param data The data column to be encoded + * @return Encoded data */ - byte[] encode(List data) throws IOException; + byte[] encode(List data); - /** - * 对编码后的数据进行解码(未实现) - * - * @param data 待解码的数据 - * @return 解码后的数据列 - * @throws IOException 如果解码过程中发生IO错误 - */ - // List decode(byte[] data) throws IOException; - - /** - * 获取数据类型 - * - * @return 数据类型 - */ TSDataType getDataType(); - /** - * 获取编码类型 - * - * @return 编码类型 - */ TSEncoding getEncodingType(); - /** - * 获取底层编码器实例 - * - * @return 编码器实例 - */ Encoder getEncoder(TSDataType type, TSEncoding encodingType); + + ColumnEntry getColumnEntry(); } -/** 编码类型不支持异常 */ +/** Encoding type not supported exception */ class EncodingTypeNotSupportedException extends RuntimeException { public EncodingTypeNotSupportedException(String message) { super("Encoding type " + message + " is not supported."); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java index 0499a0189f9a1..05bf8cffd5d61 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java @@ -4,15 +4,16 @@ import org.apache.tsfile.file.metadata.enums.TSEncoding; import java.io.Serializable; +import java.nio.ByteBuffer; public class ColumnEntry implements Serializable { - // 用于申请内存时指定大小 + /** Used to specify the size when applying for memory */ private Integer compressedSize; + private Integer unCompressedSize; private TSDataType dataType; private TSEncoding encodingType; - private Integer offset; // 偏移量 private Integer size; // 列条目的总大小 public ColumnEntry() { @@ -29,13 +30,12 @@ public ColumnEntry( this.unCompressedSize = unCompressedSize; this.dataType = dataType; this.encodingType = encodingType; - this.offset = offset; updateSize(); } /** - * 更新列条目的总大小 总大小 = compressedSize(4字节) + unCompressedSize(4字节) + dataType(1字节) + encodingType(1字节) - * + offset(4字节) + * Update the total size of the column entry Total size = compressedSize (4 bytes) + + * unCompressedSize (4 bytes) + dataType (1 byte) + encodingType (1 byte) + offset (4 bytes) */ public void updateSize() { int totalSize = 0; @@ -56,10 +56,6 @@ public void updateSize() { totalSize += 1; } - if (offset != null) { - totalSize += 4; - } - this.size = totalSize; } @@ -79,14 +75,30 @@ public TSEncoding getEncodingType() { return encodingType; } - public Integer getOffset() { - return offset; - } - public Integer getSize() { return size; } + public void setCompressedSize(Integer compressedSize) { + this.compressedSize = compressedSize; + } + + public void setUnCompressedSize(Integer unCompressedSize) { + this.unCompressedSize = unCompressedSize; + } + + public void setDataType(TSDataType dataType) { + this.dataType = dataType; + } + + public void setEncodingType(TSEncoding encodingType) { + this.encodingType = encodingType; + } + + public void setSize(Integer size) { + this.size = size; + } + @Override public String toString() { return "ColumnEntry{" @@ -98,10 +110,31 @@ public String toString() { + dataType + ", encodingType=" + encodingType - + ", offset=" - + offset + ", size=" + size + '}'; } + + public byte[] toBytes() { + ByteBuffer buffer = ByteBuffer.allocate(getSize()); + buffer.putInt(compressedSize != null ? compressedSize : 0); + buffer.putInt(unCompressedSize != null ? unCompressedSize : 0); + buffer.put((byte) (dataType != null ? dataType.ordinal() : 0)); + buffer.put((byte) (encodingType != null ? encodingType.ordinal() : 0)); + return buffer.array(); + } + + public static ColumnEntry fromBytes(ByteBuffer buffer) { + int compressedSize = buffer.getInt(); + int unCompressedSize = buffer.getInt(); + TSDataType dataType = TSDataType.values()[buffer.get()]; + TSEncoding encodingType = TSEncoding.values()[buffer.get()]; + ColumnEntry entry = new ColumnEntry(); + entry.setCompressedSize(compressedSize); + entry.setUnCompressedSize(unCompressedSize); + entry.setDataType(dataType); + entry.setEncodingType(encodingType); + entry.updateSize(); + return entry; + } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java index a67612b3556b7..935071b456ccf 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java @@ -1,6 +1,7 @@ package org.apache.iotdb.session.compress; import java.io.Serializable; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; @@ -35,7 +36,7 @@ public List getColumnEntries() { } /** - * 追加 ColumnEntry + * Append ColumnEntry * * @param entry */ @@ -49,14 +50,14 @@ public void addColumnEntry(ColumnEntry entry) { } /** - * 更新元数据头的大小 MetaHead的总大小 = MetaHead头部大小 + 所有ColumnEntry的大小 MetaHead头部大小 = numberOfColumns(4字节) + - * size(4字节) + * Update the size of the metadata header. The total size of MetaHead = MetaHead header size + the + * size of all ColumnEntry. MetaHead header size = numberOfColumns (4 bytes) + size (4 bytes). */ private void updateSize() { - // MetaHead头部大小 + // MetaHead header size int totalSize = 8; // numberOfColumns(4字节) + size(4字节) - // 累加所有ColumnEntry的大小 + // Accumulate the size of all ColumnEntry if (columnEntries != null) { for (ColumnEntry entry : columnEntries) { if (entry != null && entry.getSize() != null) { @@ -68,6 +69,42 @@ private void updateSize() { this.size = totalSize; } + /** Serialize to byte array */ + public byte[] toBytes() { + // 1. Calculate total length + int totalSize = 8; // numberOfColumns(4字节) + size(4字节) + for (ColumnEntry entry : columnEntries) { + totalSize += entry.getSize(); + } + ByteBuffer buffer = ByteBuffer.allocate(totalSize); + + // 2. Write numberOfColumns and size + buffer.putInt(numberOfColumns != null ? numberOfColumns : 0); + buffer.putInt(size != null ? size : 0); + + // 3. Write each ColumnEntry + for (ColumnEntry entry : columnEntries) { + buffer.put(entry.toBytes()); + } + + return buffer.array(); + } + + /** Deserialize from byte array */ + public static MetaHead fromBytes(byte[] bytes) { + ByteBuffer buffer = ByteBuffer.wrap(bytes); + int numberOfColumns = buffer.getInt(); + int size = buffer.getInt(); + List columnEntries = new ArrayList<>(); + for (int i = 0; i < numberOfColumns; i++) { + ColumnEntry entry = ColumnEntry.fromBytes(buffer); + columnEntries.add(entry); + } + MetaHead metaHead = new MetaHead(numberOfColumns, columnEntries); + metaHead.size = size; + return metaHead; + } + @Override public String toString() { return "MetaHead{" diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java index 35ea82cc3fff5..79b0b43911488 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java @@ -13,6 +13,7 @@ public class PlainColumnEncoder implements ColumnEncoder { private final Encoder encoder; private final TSDataType dataType; + private ColumnEntry columnEntry; private static final int DEFAULT_MAX_STRING_LENGTH = 128; public PlainColumnEncoder(TSDataType dataType) { @@ -21,11 +22,46 @@ public PlainColumnEncoder(TSDataType dataType) { } @Override - public byte[] encode(List data) throws IOException { + public byte[] encode(List data) { if (data == null || data.isEmpty()) { return new byte[0]; } + // Calculate the original data size + int originalSize = 0; + for (Object value : data) { + if (value != null) { + switch (dataType) { + case BOOLEAN: + originalSize += 1; // boolean 占用 1 字节 + break; + case INT32: + case DATE: + originalSize += 4; // int32 占用 4 字节 + break; + case INT64: + case TIMESTAMP: + originalSize += 8; // int64 占用 8 字节 + break; + case FLOAT: + originalSize += 4; // float 占用 4 字节 + break; + case DOUBLE: + originalSize += 8; // double 占用 8 字节 + break; + case TEXT: + case STRING: + case BLOB: + if (value instanceof String) { + originalSize += ((String) value).getBytes().length; + } else if (value instanceof Binary) { + originalSize += ((Binary) value).getLength(); + } + break; + } + } + } + PublicBAOS outputStream = new PublicBAOS(); try { switch (dataType) { @@ -75,9 +111,6 @@ public byte[] encode(List data) throws IOException { encoder.encode(new Binary((byte[]) value), outputStream); } else if (value instanceof Binary) { encoder.encode((Binary) value, outputStream); - } else { - throw new IOException( - "Unsupported value type for TEXT/STRING/BLOB: " + value.getClass()); } } } @@ -86,81 +119,23 @@ public byte[] encode(List data) throws IOException { throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); } encoder.flush(outputStream); - return outputStream.toByteArray(); + byte[] encodedData = outputStream.toByteArray(); + + // 创建 ColumnEntry 并设置大小信息 + ColumnEntry entry = new ColumnEntry(); + entry.setCompressedSize(encodedData.length); + entry.setUnCompressedSize(originalSize); + entry.setDataType(dataType); + entry.setEncodingType(TSEncoding.PLAIN); + + return encodedData; + } catch (IOException e) { + throw new RuntimeException(e); } finally { outputStream.close(); } } - // @Override - // public List decode(byte[] data) throws IOException { - // if (data == null || data.length == 0) { - // return new ArrayList<>(); - // } - // - // List result = new ArrayList<>(); - // ByteArrayInputStream inputStream = new ByteArrayInputStream(data); - // try { - // switch (dataType) { - // case BOOLEAN: - // while (inputStream.available() > 0) { - // result.add(inputStream.read() != 0); - // } - // break; - // case INT32: - // case DATE: - // while (inputStream.available() > 0) { - // result.add(ReadWriteForEncodingUtils.readVarInt(inputStream)); - // } - // break; - // case INT64: - // case TIMESTAMP: - // while (inputStream.available() > 0) { - // long value = 0; - // for (int i = 0; i < 8; i++) { - // value = (value << 8) | (inputStream.read() & 0xFF); - // } - // result.add(value); - // } - // break; - // case FLOAT: - // while (inputStream.available() > 0) { - // int bits = 0; - // for (int i = 0; i < 4; i++) { - // bits = (bits << 8) | (inputStream.read() & 0xFF); - // } - // result.add(Float.intBitsToFloat(bits)); - // } - // break; - // case DOUBLE: - // while (inputStream.available() > 0) { - // long bits = 0; - // for (int i = 0; i < 8; i++) { - // bits = (bits << 8) | (inputStream.read() & 0xFF); - // } - // result.add(Double.longBitsToDouble(bits)); - // } - // break; - // case TEXT: - // case STRING: - // case BLOB: - // while (inputStream.available() > 0) { - // int length = ReadWriteForEncodingUtils.readVarInt(inputStream); - // byte[] bytes = new byte[length]; - // inputStream.read(bytes); - // result.add(new Binary(bytes)); - // } - // break; - // default: - // throw new UnsupportedOperationException("PLAIN doesn't support data type: " + - // dataType); - // } - // return result; - // } finally { - // inputStream.close(); - // } - // } - @Override public TSDataType getDataType() { return dataType; @@ -175,4 +150,9 @@ public TSEncoding getEncodingType() { public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { return new PlainEncoder(type, DEFAULT_MAX_STRING_LENGTH); } + + @Override + public ColumnEntry getColumnEntry() { + return columnEntry; + } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java index db38ed98a8a34..21735a3ff199f 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java @@ -4,22 +4,24 @@ import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.PublicBAOS; -import java.io.IOException; import java.util.List; public class RleColumnEncoder implements ColumnEncoder { private final Encoder encoder; private final TSDataType dataType; + private ColumnEntry columnEntry; public RleColumnEncoder(TSDataType dataType) { this.dataType = dataType; this.encoder = getEncoder(dataType, TSEncoding.RLE); + columnEntry = new ColumnEntry(); } @Override - public byte[] encode(List data) throws IOException { + public byte[] encode(List data) { if (data == null || data.isEmpty()) { return new byte[0]; } @@ -61,28 +63,19 @@ public byte[] encode(List data) throws IOException { throw new UnsupportedOperationException("RLE doesn't support data type: " + dataType); } encoder.flush(outputStream); - return outputStream.toByteArray(); + byte[] encodedData = outputStream.toByteArray(); + // 计算 ColumnEntry 的信息 + columnEntry.setUnCompressedSize(getUnCompressedSize(data)); + columnEntry.setCompressedSize(encodedData.length); + columnEntry.setEncodingType(TSEncoding.RLE); + columnEntry.setDataType(dataType); + columnEntry.updateSize(); + return encodedData; } finally { outputStream.close(); } } - // @Override - // public List decode(byte[] data) throws IOException { - // if (data == null || data.length == 0) { - // return new ArrayList<>(); - // } - // - // List result = new ArrayList<>(); - // ByteArrayInputStream inputStream = new ByteArrayInputStream(data); - // try { - // //...... - // } finally { - // inputStream.close(); - // } - // return List.of(); - // } - @Override public TSDataType getDataType() { return dataType; @@ -97,4 +90,53 @@ public TSEncoding getEncodingType() { public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); } + + @Override + public ColumnEntry getColumnEntry() { + return columnEntry; + } + + /** + * The logic in this part is universal and is used to calculate the original data size. You can + * check whether there is such a method elsewhere. + * + * @param data + * @return + */ + public Integer getUnCompressedSize(List data) { + int unCompressedSize = 0; + for (Object value : data) { + if (value != null) { + switch (dataType) { + case BOOLEAN: + unCompressedSize += 1; // boolean 占用 1 字节 + break; + case INT32: + case DATE: + unCompressedSize += 4; // int32 占用 4 字节 + break; + case INT64: + case TIMESTAMP: + unCompressedSize += 8; // int64 占用 8 字节 + break; + case FLOAT: + unCompressedSize += 4; // float 占用 4 字节 + break; + case DOUBLE: + unCompressedSize += 8; // double 占用 8 字节 + break; + case TEXT: + case STRING: + case BLOB: + if (value instanceof String) { + unCompressedSize += ((String) value).getBytes().length; + } else if (value instanceof Binary) { + unCompressedSize += ((Binary) value).getLength(); + } + break; + } + } + } + return unCompressedSize; + } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java index 6c54d77556642..1fcfda4b63958 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java @@ -6,7 +6,6 @@ import java.io.IOException; import java.nio.ByteBuffer; -// 为后续的压缩器提供一个基础的实现 public class RpcCompressor { public static ICompressor compressor; @@ -28,7 +27,7 @@ public int compress(byte[] data, int offset, int length, byte[] compressed) thro } /** - * 压缩 ByteBuffer, 较长的数据使用这种方式更好 + * Compress ByteBuffer, this method is better for longer data * * @return byte length of compressed data. */ diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java new file mode 100644 index 0000000000000..05a69f0d9f9e9 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java @@ -0,0 +1,173 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.CompressionType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.write.record.Tablet; +import org.apache.tsfile.write.schema.IMeasurementSchema; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class RpcEncoder { + private final MetaHead metaHead; + private final Map columnEncodersMap; + private final CompressionType compressionType; + private List encodedData; + + public RpcEncoder( + Map columnEncodersMap, CompressionType compressionType) { + this.columnEncodersMap = columnEncodersMap; + this.compressionType = compressionType; + this.metaHead = new MetaHead(); + this.encodedData = new ArrayList<>(); + } + + /** + * 获取 tablet 中的时间戳列,然后编码放入 encodedData1 中 + * + * @param tablet 数据 + * @throws IOException 如果编码过程中发生IO错误 + */ + public ByteBuffer encodeTimestamps(Tablet tablet) { + TSEncoding encoding = columnEncodersMap.getOrDefault(TSDataType.INT64, TSEncoding.PLAIN); + ColumnEncoder encoder = createEncoder(TSDataType.INT64, encoding); + + // 1.获取时间戳数据 + long[] timestamps = tablet.getTimestamps(); + List timestampsList = new ArrayList<>(); + // 2.转 List + for (int i = 0; i < timestamps.length; i++) { + timestampsList.add(timestamps[i]); + } + // 3.编码 + byte[] encoded = encoder.encode(timestampsList); + ByteBuffer timeBuffer = ByteBuffer.wrap(encoded); + // 4.调整 ByteBuffer 的 limit 为实际写入的数据长度 + timeBuffer.flip(); + return timeBuffer; + } + + /** 获取 tablet 中的值列,然后编码放入 encodedData2 中 TODO 还有很多考虑 */ + public ByteBuffer encodeValues(Tablet tablet) { + // 1. 预估最大空间(假设每列最大为 rowSize * 16 字节) + int metaHeadReserveSize = 128; + int estimatedSize = metaHeadReserveSize + tablet.getRowSize() * 16 * tablet.getSchemas().size(); + ByteBuffer valueBuffer = ByteBuffer.allocate(estimatedSize); + valueBuffer.position(metaHeadReserveSize); + + // 2. 编码每一列 + for (int i = 0; i < tablet.getSchemas().size(); i++) { + IMeasurementSchema schema = tablet.getSchemas().get(i); + byte[] encoded = encodeColumn(schema.getType(), tablet, i); + valueBuffer.put(encoded); + } + + // 3.序列化 + byte[] metaHeadEncoder = getMetaHead().toBytes(); + valueBuffer.put(0, metaHeadEncoder, 0, metaHeadEncoder.length); + // 2. 调整 ByteBuffer 的 limit 为实际写入的数据长度 + valueBuffer.flip(); + // 3. 返回只包含有效数据的 ByteBuffer + return valueBuffer; + } + + public byte[] encodeColumn(TSDataType dataType, Tablet tablet, int columnIndex) { + // 1.获取编码类型 + TSEncoding encoding = columnEncodersMap.getOrDefault(dataType, TSEncoding.PLAIN); + ColumnEncoder encoder = createEncoder(dataType, encoding); + // 2.获取该列的数据并转换为 List + Object columnValues = tablet.getValues()[columnIndex]; + List valueList; + switch (dataType) { + case INT32: + int[] intArray = (int[]) columnValues; + List intList = new ArrayList<>(intArray.length); + for (int v : intArray) intList.add(v); + valueList = intList; + break; + case INT64: + long[] longArray = (long[]) columnValues; + List longList = new ArrayList<>(longArray.length); + for (long v : longArray) longList.add(v); + valueList = longList; + break; + case FLOAT: + float[] floatArray = (float[]) columnValues; + List floatList = new ArrayList<>(floatArray.length); + for (float v : floatArray) floatList.add(v); + valueList = floatList; + break; + case DOUBLE: + double[] doubleArray = (double[]) columnValues; + List doubleList = new ArrayList<>(doubleArray.length); + for (double v : doubleArray) doubleList.add(v); + valueList = doubleList; + break; + case BOOLEAN: + boolean[] boolArray = (boolean[]) columnValues; + List boolList = new ArrayList<>(boolArray.length); + for (boolean v : boolArray) boolList.add(v); + valueList = boolList; + break; + case TEXT: + Object[] textArray = (Object[]) columnValues; + List textList = new ArrayList<>(textArray.length); + for (Object v : textArray) textList.add(v); + valueList = textList; + break; + default: + throw new UnsupportedOperationException("不支持的数据类型: " + dataType); + } + + // 3.编码 + byte[] encoded = encoder.encode(valueList); + // 4.获取 ColumnEntry 内容并添加到 metaHead + metaHead.addColumnEntry(encoder.getColumnEntry()); + // 5.将编码后的数据添加到 encodedData + encodedData.add(encoded); + // 6.返回编码后的数据 + return encoded; + } + + /** + * 根据数据类型和编码类型创建对应的编码器 + * + * @param dataType 数据类型 + * @param encodingType 编码类型 + * @return 列编码器 + */ + private ColumnEncoder createEncoder(TSDataType dataType, TSEncoding encodingType) { + switch (encodingType) { + case PLAIN: + return new PlainColumnEncoder(dataType); + case RLE: + return new RleColumnEncoder(dataType); + case TS_2DIFF: + return new Ts2DiffColumnEncoder(dataType); + default: + throw new EncodingTypeNotSupportedException(encodingType.name()); + } + } + + /** + * 获取编码后的数据 + * + * @return 编码后的数据列表 + */ + public List getEncodedData() { + return encodedData; + } + + /** + * 获取元数据头 + * + * @return 元数据头 + */ + public MetaHead getMetaHead() { + return metaHead; + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java index d7a588ba5e938..d3f0c0cba04a8 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java @@ -4,7 +4,6 @@ import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; -import java.io.IOException; import java.util.List; public class Ts2DiffColumnEncoder implements ColumnEncoder { @@ -17,15 +16,10 @@ public Ts2DiffColumnEncoder(TSDataType dataType) { } @Override - public byte[] encode(List data) throws IOException { + public byte[] encode(List data) { return new byte[0]; } - // @Override - // public List decode(byte[] data) throws IOException { - // return List.of(); - // } - @Override public TSDataType getDataType() { return null; @@ -40,4 +34,9 @@ public TSEncoding getEncodingType() { public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { return null; } + + @Override + public ColumnEntry getColumnEntry() { + return null; + } } From aac22c5dd94e7c69d0b1651c24e54a47783f172b Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Fri, 9 May 2025 15:10:18 +0800 Subject: [PATCH 03/25] decoder --- .../iotdb/session/RleColumnDecoder.java | 90 +++++++++++++++++++ .../iotdb/session/compress/ColumnDecoder.java | 15 ++++ .../session/compress/PlainColumnDecoder.java | 90 +++++++++++++++++++ .../session/compress/PlainColumnEncoder.java | 6 +- .../session/compress/RleColumnEncoder.java | 8 +- .../iotdb/session/compress/RpcDecoder.java | 65 ++++++++++++++ .../iotdb/session/compress/RpcEncoder.java | 13 ++- .../compress/Ts2DiffColumnDecoder.java | 87 ++++++++++++++++++ .../thrift/impl/ClientRPCServiceImpl.java | 1 + 9 files changed, 365 insertions(+), 10 deletions(-) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/RleColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/RleColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/RleColumnDecoder.java new file mode 100644 index 0000000000000..a8c06b1f4180d --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/RleColumnDecoder.java @@ -0,0 +1,90 @@ +package org.apache.iotdb.session; + +import org.apache.iotdb.session.compress.ColumnDecoder; +import org.apache.iotdb.session.compress.ColumnEntry; + +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; + +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.List; + +public class RleColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public RleColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.RLE); + } + + @Override + public List decode(ByteBuffer buffer, ColumnEntry columnEntry) { + int count = columnEntry.getSize(); + switch (dataType) { + case BOOLEAN: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readBoolean(buffer)); + } + return result; + } + case INT32: + case DATE: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readInt(buffer)); + } + return result; + } + case INT64: + case TIMESTAMP: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readLong(buffer)); + } + return result; + } + case FLOAT: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readFloat(buffer)); + } + return result; + } + case DOUBLE: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readDouble(buffer)); + } + return result; + } + case TEXT: + case STRING: + case BLOB: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + Binary binary = decoder.readBinary(buffer); + result.add(binary); + } + return result; + } + default: + throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); + } + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return null; + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java new file mode 100644 index 0000000000000..28d9ea438c2fd --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java @@ -0,0 +1,15 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; + +import java.nio.ByteBuffer; +import java.util.List; + +public interface ColumnDecoder { + + List decode(ByteBuffer buffer, ColumnEntry columnEntry); + + Decoder getDecoder(TSDataType type, TSEncoding encodingType); +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java new file mode 100644 index 0000000000000..33977391055ae --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java @@ -0,0 +1,90 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.encoding.decoder.PlainDecoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; + +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.List; + +// TODO 看看之前的方法能不能和 Plain 放到一起 +// TODO Decoder 封装的很好,感觉 decode方法可以多个解码器公用 +public class PlainColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public PlainColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.PLAIN); + } + + @Override + public List decode(ByteBuffer buffer, ColumnEntry columnEntry) { + int count = columnEntry.getSize(); + switch (dataType) { + case BOOLEAN: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readBoolean(buffer)); + } + return result; + } + case INT32: + case DATE: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readInt(buffer)); + } + return result; + } + case INT64: + case TIMESTAMP: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readLong(buffer)); + } + return result; + } + case FLOAT: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readFloat(buffer)); + } + return result; + } + case DOUBLE: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readDouble(buffer)); + } + return result; + } + case TEXT: + case STRING: + case BLOB: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + Binary binary = decoder.readBinary(buffer); + result.add(binary); + } + return result; + } + default: + throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); + } + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return new PlainDecoder(); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java index 79b0b43911488..2c34b64e341d1 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java @@ -121,7 +121,6 @@ public byte[] encode(List data) { encoder.flush(outputStream); byte[] encodedData = outputStream.toByteArray(); - // 创建 ColumnEntry 并设置大小信息 ColumnEntry entry = new ColumnEntry(); entry.setCompressedSize(encodedData.length); entry.setUnCompressedSize(originalSize); @@ -132,7 +131,10 @@ public byte[] encode(List data) { } catch (IOException e) { throw new RuntimeException(e); } finally { - outputStream.close(); + try { + outputStream.close(); + } catch (IOException e) { + } } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java index 21735a3ff199f..f305f0e445537 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java @@ -7,6 +7,7 @@ import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.PublicBAOS; +import java.io.IOException; import java.util.List; public class RleColumnEncoder implements ColumnEncoder { @@ -71,8 +72,13 @@ public byte[] encode(List data) { columnEntry.setDataType(dataType); columnEntry.updateSize(); return encodedData; + } catch (IOException e) { + throw new RuntimeException(e); } finally { - outputStream.close(); + try { + outputStream.close(); + } catch (IOException e) { + } } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java new file mode 100644 index 0000000000000..c42f844646fb8 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java @@ -0,0 +1,65 @@ +package org.apache.iotdb.session.compress; + +import org.apache.iotdb.session.RleColumnDecoder; + +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; + +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.List; + +public class RpcDecoder { + private MetaHead metaHead = new MetaHead(); + private Integer MetaHeaderLength = 0; + + public void readMetaHead(ByteBuffer buffer) { + this.MetaHeaderLength = buffer.getInt(buffer.limit() - Integer.BYTES); + byte[] metaBytes = new byte[MetaHeaderLength]; + buffer.position(MetaHeaderLength); + buffer.get(metaBytes); + this.metaHead = MetaHead.fromBytes(metaBytes); + } + + public void decodeTimestamps(ByteBuffer buffer) { + List timestampList = (List) decodeColumn(0, buffer); + long[] timestamps = new long[timestampList.size()]; + for (int i = 0; i < timestampList.size(); i++) { + timestamps[i] = timestampList.get(i); + } + } + + public void decodeValues(ByteBuffer buffer) { + readMetaHead(buffer); + int columnNum = metaHead.getColumnEntries().size(); + List> result = new ArrayList<>(); + for (int i = 0; i < columnNum; i++) { + List value = decodeColumn(i, buffer); + result.add((List) value); + } + } + + public List decodeColumn(int columnIndex, ByteBuffer buffer) { + ColumnEntry columnEntry = metaHead.getColumnEntries().get(columnIndex); + TSDataType dataType = columnEntry.getDataType(); + TSEncoding encodingType = columnEntry.getEncodingType(); + + ColumnDecoder columnDecoder = createDecoder(dataType, encodingType); + + List value = columnDecoder.decode(buffer, columnEntry); + return value; + } + + private ColumnDecoder createDecoder(TSDataType dataType, TSEncoding encodingType) { + switch (encodingType) { + case PLAIN: + return new PlainColumnDecoder(dataType); + case RLE: + return new RleColumnDecoder(dataType); + case TS_2DIFF: + return new Ts2DiffColumnDecoder(dataType); + default: + throw new EncodingTypeNotSupportedException(encodingType.name()); + } + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java index 05a69f0d9f9e9..2c78628b6f524 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java @@ -54,10 +54,8 @@ public ByteBuffer encodeTimestamps(Tablet tablet) { /** 获取 tablet 中的值列,然后编码放入 encodedData2 中 TODO 还有很多考虑 */ public ByteBuffer encodeValues(Tablet tablet) { // 1. 预估最大空间(假设每列最大为 rowSize * 16 字节) - int metaHeadReserveSize = 128; - int estimatedSize = metaHeadReserveSize + tablet.getRowSize() * 16 * tablet.getSchemas().size(); + int estimatedSize = tablet.getRowSize() * 16 * tablet.getSchemas().size(); ByteBuffer valueBuffer = ByteBuffer.allocate(estimatedSize); - valueBuffer.position(metaHeadReserveSize); // 2. 编码每一列 for (int i = 0; i < tablet.getSchemas().size(); i++) { @@ -66,12 +64,13 @@ public ByteBuffer encodeValues(Tablet tablet) { valueBuffer.put(encoded); } - // 3.序列化 + // 3. 序列化 byte[] metaHeadEncoder = getMetaHead().toBytes(); - valueBuffer.put(0, metaHeadEncoder, 0, metaHeadEncoder.length); - // 2. 调整 ByteBuffer 的 limit 为实际写入的数据长度 + valueBuffer.put(metaHeadEncoder); + // 4. metaHead 长度 + valueBuffer.putInt(metaHeadEncoder.length); + // 5. 调整 ByteBuffer 的 limit 为实际写入的数据长度 valueBuffer.flip(); - // 3. 返回只包含有效数据的 ByteBuffer return valueBuffer; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java new file mode 100644 index 0000000000000..48341d6cbde65 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java @@ -0,0 +1,87 @@ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; + +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.List; + +public class Ts2DiffColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public Ts2DiffColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.TS_2DIFF); + } + + @Override + public List decode(ByteBuffer buffer, ColumnEntry columnEntry) { + int count = columnEntry.getSize(); + switch (dataType) { + case BOOLEAN: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readBoolean(buffer)); + } + return result; + } + case INT32: + case DATE: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readInt(buffer)); + } + return result; + } + case INT64: + case TIMESTAMP: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readLong(buffer)); + } + return result; + } + case FLOAT: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readFloat(buffer)); + } + return result; + } + case DOUBLE: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + result.add(decoder.readDouble(buffer)); + } + return result; + } + case TEXT: + case STRING: + case BLOB: + { + List result = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + Binary binary = decoder.readBinary(buffer); + result.add(binary); + } + return result; + } + default: + throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); + } + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return null; + } +} diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java index 755814130824d..bc3ac2d198ba5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java @@ -2177,6 +2177,7 @@ public TSStatus insertTablets(TSInsertTabletsReq req) { if (!SESSION_MANAGER.checkLogin(clientSession)) { return getNotLoggedInStatus(); } + // TODO 完成解码 req.setMeasurementsList( PathUtils.checkIsLegalSingleMeasurementListsAndUpdate(req.getMeasurementsList())); From af5879b93d9c2754916f0e7c9678f1d8ac4fd61d Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 13 May 2025 16:46:38 +0800 Subject: [PATCH 04/25] RPC compressed: The column encoding and decoding of the Plain method is performed correctly. --- .../service/rpc/thrift/IClientRPCService.java | 61162 ++++++++++++++++ .../service/rpc/thrift/ServerProperties.java | 1149 + ...reateTimeseriesUsingSchemaTemplateReq.java | 528 + .../service/rpc/thrift/TPipeSubscribeReq.java | 594 + .../rpc/thrift/TPipeSubscribeResp.java | 737 + .../service/rpc/thrift/TPipeTransferReq.java | 584 + .../service/rpc/thrift/TPipeTransferResp.java | 510 + .../rpc/thrift/TSAggregationQueryReq.java | 1478 + .../rpc/thrift/TSAppendSchemaTemplateReq.java | 1175 + .../rpc/thrift/TSBackupConfigurationResp.java | 699 + .../rpc/thrift/TSCancelOperationReq.java | 470 + .../rpc/thrift/TSCloseOperationReq.java | 579 + .../service/rpc/thrift/TSCloseSessionReq.java | 377 + .../service/rpc/thrift/TSConnectionInfo.java | 696 + .../rpc/thrift/TSConnectionInfoResp.java | 436 + .../service/rpc/thrift/TSConnectionType.java | 50 + .../thrift/TSCreateAlignedTimeseriesReq.java | 1645 + .../thrift/TSCreateMultiTimeseriesReq.java | 1745 + .../rpc/thrift/TSCreateSchemaTemplateReq.java | 592 + .../rpc/thrift/TSCreateTimeseriesReq.java | 1345 + .../service/rpc/thrift/TSDeleteDataReq.java | 714 + .../rpc/thrift/TSDropSchemaTemplateReq.java | 478 + .../thrift/TSExecuteBatchStatementReq.java | 528 + .../rpc/thrift/TSExecuteStatementReq.java | 971 + .../rpc/thrift/TSExecuteStatementResp.java | 2441 + .../TSFastLastDataQueryForOneDeviceReq.java | 1322 + .../rpc/thrift/TSFetchMetadataReq.java | 589 + .../rpc/thrift/TSFetchMetadataResp.java | 761 + .../service/rpc/thrift/TSFetchResultsReq.java | 959 + .../rpc/thrift/TSFetchResultsResp.java | 1060 + .../rpc/thrift/TSGetOperationStatusReq.java | 470 + .../service/rpc/thrift/TSGetTimeZoneResp.java | 487 + .../rpc/thrift/TSGroupByQueryIntervalReq.java | 1488 + .../service/rpc/thrift/TSInsertRecordReq.java | 1195 + .../thrift/TSInsertRecordsOfOneDeviceReq.java | 1071 + .../rpc/thrift/TSInsertRecordsReq.java | 1121 + .../rpc/thrift/TSInsertStringRecordReq.java | 1075 + .../TSInsertStringRecordsOfOneDeviceReq.java | 1108 + .../rpc/thrift/TSInsertStringRecordsReq.java | 1158 + .../service/rpc/thrift/TSInsertTabletReq.java | 1815 + .../rpc/thrift/TSInsertTabletsReq.java | 1460 + .../rpc/thrift/TSLastDataQueryReq.java | 1213 + .../service/rpc/thrift/TSOpenSessionReq.java | 872 + .../service/rpc/thrift/TSOpenSessionResp.java | 772 + .../service/rpc/thrift/TSProtocolVersion.java | 47 + .../rpc/thrift/TSPruneSchemaTemplateReq.java | 579 + .../service/rpc/thrift/TSQueryDataSet.java | 696 + .../rpc/thrift/TSQueryNonAlignDataSet.java | 582 + .../rpc/thrift/TSQueryTemplateReq.java | 682 + .../rpc/thrift/TSQueryTemplateResp.java | 842 + .../service/rpc/thrift/TSRawDataQueryReq.java | 1306 + .../rpc/thrift/TSSetSchemaTemplateReq.java | 579 + .../service/rpc/thrift/TSSetTimeZoneReq.java | 478 + .../service/rpc/thrift/TSTracingInfo.java | 1481 + .../rpc/thrift/TSUnsetSchemaTemplateReq.java | 579 + .../service/rpc/thrift/TSyncIdentityInfo.java | 680 + .../rpc/thrift/TSyncTransportMetaInfo.java | 478 + .../iotdb/session/RleColumnDecoder.java | 90 - .../org/apache/iotdb/session/Session.java | 9 +- .../iotdb/session/SessionConnection.java | 7 +- .../iotdb/session/TableSessionBuilder.java | 26 +- .../iotdb/session/compress/ColumnDecoder.java | 21 +- .../iotdb/session/compress/ColumnEncoder.java | 18 + .../iotdb/session/compress/ColumnEntry.java | 41 +- .../iotdb/session/compress/MetaHead.java | 18 + .../session/compress/PlainColumnDecoder.java | 62 +- .../session/compress/PlainColumnEncoder.java | 31 +- .../session/compress/RleColumnDecoder.java | 101 + .../session/compress/RleColumnEncoder.java | 19 +- .../iotdb/session/compress/RpcCompressor.java | 18 + .../iotdb/session/compress/RpcDecoder.java | 74 +- .../iotdb/session/compress/RpcEncoder.java | 114 +- .../session/compress/RpcUncompressor.java | 18 + .../compress/Ts2DiffColumnDecoder.java | 63 +- .../compress/Ts2DiffColumnEncoder.java | 18 + .../iotdb/session/RpcCompressedTest.java | 146 + .../thrift/impl/ClientRPCServiceImpl.java | 2 - .../plan/parser/StatementGenerator.java | 39 +- .../service/rpc/thrift/TSConnectionType.java | 50 + .../service/rpc/thrift/TSProtocolVersion.java | 47 + .../service/rpc/thrift/TSQueryDataSet.java | 696 + .../rpc/thrift/TSQueryNonAlignDataSet.java | 582 + .../service/rpc/thrift/TSTracingInfo.java | 1481 + 83 files changed, 114219 insertions(+), 260 deletions(-) create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/IClientRPCService.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/ServerProperties.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TCreateTimeseriesUsingSchemaTemplateReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSAggregationQueryReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSAppendSchemaTemplateReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSBackupConfigurationResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCancelOperationReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseOperationReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseSessionReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfo.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfoResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateAlignedTimeseriesReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateMultiTimeseriesReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateSchemaTemplateReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateTimeseriesReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSDeleteDataReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSDropSchemaTemplateReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteBatchStatementReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFastLastDataQueryForOneDeviceReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSGetOperationStatusReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSGetTimeZoneResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSGroupByQueryIntervalReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsOfOneDeviceReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsOfOneDeviceReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletsReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSLastDataQueryReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSPruneSchemaTemplateReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateResp.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSRawDataQueryReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSSetSchemaTemplateReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSSetTimeZoneReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSUnsetSchemaTemplateReq.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSyncIdentityInfo.java create mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSyncTransportMetaInfo.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/RleColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnDecoder.java create mode 100644 iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java create mode 100644 iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java create mode 100644 iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java create mode 100644 iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java create mode 100644 iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java create mode 100644 iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/IClientRPCService.java b/gen-java/org/apache/iotdb/service/rpc/thrift/IClientRPCService.java new file mode 100644 index 0000000000000..b47c71f31cc3e --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/IClientRPCService.java @@ -0,0 +1,61162 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +public class IClientRPCService { + + public interface Iface { + + public TSExecuteStatementResp executeQueryStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeUpdateStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeRawDataQueryV2(TSRawDataQueryReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeLastDataQueryV2(TSLastDataQueryReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeAggregationQueryV2(TSAggregationQueryReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req) throws org.apache.thrift.TException; + + public TSFetchResultsResp fetchResultsV2(TSFetchResultsReq req) throws org.apache.thrift.TException; + + public TSOpenSessionResp openSession(TSOpenSessionReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus closeSession(TSCloseSessionReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus executeBatchStatement(TSExecuteBatchStatementReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeQueryStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeUpdateStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException; + + public TSFetchResultsResp fetchResults(TSFetchResultsReq req) throws org.apache.thrift.TException; + + public TSFetchMetadataResp fetchMetadata(TSFetchMetadataReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus cancelOperation(TSCancelOperationReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus closeOperation(TSCloseOperationReq req) throws org.apache.thrift.TException; + + public TSGetTimeZoneResp getTimeZone(long sessionId) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus setTimeZone(TSSetTimeZoneReq req) throws org.apache.thrift.TException; + + public ServerProperties getProperties() throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus setStorageGroup(long sessionId, java.lang.String storageGroup) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus createTimeseries(TSCreateTimeseriesReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus createAlignedTimeseries(TSCreateAlignedTimeseriesReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus createMultiTimeseries(TSCreateMultiTimeseriesReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus deleteTimeseries(long sessionId, java.util.List path) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus deleteStorageGroups(long sessionId, java.util.List storageGroup) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus insertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus insertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus deleteData(TSDeleteDataReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeRawDataQuery(TSRawDataQueryReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeLastDataQuery(TSLastDataQueryReq req) throws org.apache.thrift.TException; + + public TSExecuteStatementResp executeAggregationQuery(TSAggregationQueryReq req) throws org.apache.thrift.TException; + + public long requestStatementId(long sessionId) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus createSchemaTemplate(TSCreateSchemaTemplateReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus appendSchemaTemplate(TSAppendSchemaTemplateReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus pruneSchemaTemplate(TSPruneSchemaTemplateReq req) throws org.apache.thrift.TException; + + public TSQueryTemplateResp querySchemaTemplate(TSQueryTemplateReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp showConfigurationTemplate() throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp showConfiguration(int nodeId) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus setSchemaTemplate(TSSetSchemaTemplateReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus unsetSchemaTemplate(TSUnsetSchemaTemplateReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus dropSchemaTemplate(TSDropSchemaTemplateReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus handshake(TSyncIdentityInfo info) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus sendPipeData(java.nio.ByteBuffer buff) throws org.apache.thrift.TException; + + public org.apache.iotdb.common.rpc.thrift.TSStatus sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff) throws org.apache.thrift.TException; + + public TPipeTransferResp pipeTransfer(TPipeTransferReq req) throws org.apache.thrift.TException; + + public TPipeSubscribeResp pipeSubscribe(TPipeSubscribeReq req) throws org.apache.thrift.TException; + + public TSBackupConfigurationResp getBackupConfiguration() throws org.apache.thrift.TException; + + public TSConnectionInfoResp fetchAllConnectionsInfo() throws org.apache.thrift.TException; + + /** + * For other node's call + */ + public org.apache.iotdb.common.rpc.thrift.TSStatus testConnectionEmptyRPC() throws org.apache.thrift.TException; + + } + + public interface AsyncIface { + + public void executeQueryStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeUpdateStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeRawDataQueryV2(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeLastDataQueryV2(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeAggregationQueryV2(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void fetchResultsV2(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void openSession(TSOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void closeSession(TSCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeBatchStatement(TSExecuteBatchStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeQueryStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeUpdateStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void fetchResults(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void fetchMetadata(TSFetchMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void cancelOperation(TSCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void closeOperation(TSCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getTimeZone(long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void setTimeZone(TSSetTimeZoneReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getProperties(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void setStorageGroup(long sessionId, java.lang.String storageGroup, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createTimeseries(TSCreateTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createAlignedTimeseries(TSCreateAlignedTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createMultiTimeseries(TSCreateMultiTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteTimeseries(long sessionId, java.util.List path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteStorageGroups(long sessionId, java.util.List storageGroup, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void insertRecord(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void insertStringRecord(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void insertTablet(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void insertTablets(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void insertRecords(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void insertStringRecords(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void testInsertTablet(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void testInsertTablets(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void testInsertRecord(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void testInsertStringRecord(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void testInsertRecords(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void testInsertStringRecords(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteData(TSDeleteDataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeRawDataQuery(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeLastDataQuery(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void executeAggregationQuery(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void requestStatementId(long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createSchemaTemplate(TSCreateSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void appendSchemaTemplate(TSAppendSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void pruneSchemaTemplate(TSPruneSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void querySchemaTemplate(TSQueryTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void showConfigurationTemplate(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void showConfiguration(int nodeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void setSchemaTemplate(TSSetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void unsetSchemaTemplate(TSUnsetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void dropSchemaTemplate(TSDropSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void handshake(TSyncIdentityInfo info, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void sendPipeData(java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void pipeTransfer(TPipeTransferReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void pipeSubscribe(TPipeSubscribeReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getBackupConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void fetchAllConnectionsInfo(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void testConnectionEmptyRPC(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + } + + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { + public Factory() {} + @Override + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { + return new Client(prot); + } + @Override + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + return new Client(iprot, oprot); + } + } + + public Client(org.apache.thrift.protocol.TProtocol prot) + { + super(prot, prot); + } + + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); + } + + @Override + public TSExecuteStatementResp executeQueryStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + send_executeQueryStatementV2(req); + return recv_executeQueryStatementV2(); + } + + public void send_executeQueryStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + executeQueryStatementV2_args args = new executeQueryStatementV2_args(); + args.setReq(req); + sendBase("executeQueryStatementV2", args); + } + + public TSExecuteStatementResp recv_executeQueryStatementV2() throws org.apache.thrift.TException + { + executeQueryStatementV2_result result = new executeQueryStatementV2_result(); + receiveBase(result, "executeQueryStatementV2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeQueryStatementV2 failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeUpdateStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + send_executeUpdateStatementV2(req); + return recv_executeUpdateStatementV2(); + } + + public void send_executeUpdateStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + executeUpdateStatementV2_args args = new executeUpdateStatementV2_args(); + args.setReq(req); + sendBase("executeUpdateStatementV2", args); + } + + public TSExecuteStatementResp recv_executeUpdateStatementV2() throws org.apache.thrift.TException + { + executeUpdateStatementV2_result result = new executeUpdateStatementV2_result(); + receiveBase(result, "executeUpdateStatementV2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeUpdateStatementV2 failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + send_executeStatementV2(req); + return recv_executeStatementV2(); + } + + public void send_executeStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + executeStatementV2_args args = new executeStatementV2_args(); + args.setReq(req); + sendBase("executeStatementV2", args); + } + + public TSExecuteStatementResp recv_executeStatementV2() throws org.apache.thrift.TException + { + executeStatementV2_result result = new executeStatementV2_result(); + receiveBase(result, "executeStatementV2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeStatementV2 failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeRawDataQueryV2(TSRawDataQueryReq req) throws org.apache.thrift.TException + { + send_executeRawDataQueryV2(req); + return recv_executeRawDataQueryV2(); + } + + public void send_executeRawDataQueryV2(TSRawDataQueryReq req) throws org.apache.thrift.TException + { + executeRawDataQueryV2_args args = new executeRawDataQueryV2_args(); + args.setReq(req); + sendBase("executeRawDataQueryV2", args); + } + + public TSExecuteStatementResp recv_executeRawDataQueryV2() throws org.apache.thrift.TException + { + executeRawDataQueryV2_result result = new executeRawDataQueryV2_result(); + receiveBase(result, "executeRawDataQueryV2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeRawDataQueryV2 failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeLastDataQueryV2(TSLastDataQueryReq req) throws org.apache.thrift.TException + { + send_executeLastDataQueryV2(req); + return recv_executeLastDataQueryV2(); + } + + public void send_executeLastDataQueryV2(TSLastDataQueryReq req) throws org.apache.thrift.TException + { + executeLastDataQueryV2_args args = new executeLastDataQueryV2_args(); + args.setReq(req); + sendBase("executeLastDataQueryV2", args); + } + + public TSExecuteStatementResp recv_executeLastDataQueryV2() throws org.apache.thrift.TException + { + executeLastDataQueryV2_result result = new executeLastDataQueryV2_result(); + receiveBase(result, "executeLastDataQueryV2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeLastDataQueryV2 failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req) throws org.apache.thrift.TException + { + send_executeFastLastDataQueryForOneDeviceV2(req); + return recv_executeFastLastDataQueryForOneDeviceV2(); + } + + public void send_executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req) throws org.apache.thrift.TException + { + executeFastLastDataQueryForOneDeviceV2_args args = new executeFastLastDataQueryForOneDeviceV2_args(); + args.setReq(req); + sendBase("executeFastLastDataQueryForOneDeviceV2", args); + } + + public TSExecuteStatementResp recv_executeFastLastDataQueryForOneDeviceV2() throws org.apache.thrift.TException + { + executeFastLastDataQueryForOneDeviceV2_result result = new executeFastLastDataQueryForOneDeviceV2_result(); + receiveBase(result, "executeFastLastDataQueryForOneDeviceV2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeFastLastDataQueryForOneDeviceV2 failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeAggregationQueryV2(TSAggregationQueryReq req) throws org.apache.thrift.TException + { + send_executeAggregationQueryV2(req); + return recv_executeAggregationQueryV2(); + } + + public void send_executeAggregationQueryV2(TSAggregationQueryReq req) throws org.apache.thrift.TException + { + executeAggregationQueryV2_args args = new executeAggregationQueryV2_args(); + args.setReq(req); + sendBase("executeAggregationQueryV2", args); + } + + public TSExecuteStatementResp recv_executeAggregationQueryV2() throws org.apache.thrift.TException + { + executeAggregationQueryV2_result result = new executeAggregationQueryV2_result(); + receiveBase(result, "executeAggregationQueryV2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeAggregationQueryV2 failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req) throws org.apache.thrift.TException + { + send_executeGroupByQueryIntervalQuery(req); + return recv_executeGroupByQueryIntervalQuery(); + } + + public void send_executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req) throws org.apache.thrift.TException + { + executeGroupByQueryIntervalQuery_args args = new executeGroupByQueryIntervalQuery_args(); + args.setReq(req); + sendBase("executeGroupByQueryIntervalQuery", args); + } + + public TSExecuteStatementResp recv_executeGroupByQueryIntervalQuery() throws org.apache.thrift.TException + { + executeGroupByQueryIntervalQuery_result result = new executeGroupByQueryIntervalQuery_result(); + receiveBase(result, "executeGroupByQueryIntervalQuery"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeGroupByQueryIntervalQuery failed: unknown result"); + } + + @Override + public TSFetchResultsResp fetchResultsV2(TSFetchResultsReq req) throws org.apache.thrift.TException + { + send_fetchResultsV2(req); + return recv_fetchResultsV2(); + } + + public void send_fetchResultsV2(TSFetchResultsReq req) throws org.apache.thrift.TException + { + fetchResultsV2_args args = new fetchResultsV2_args(); + args.setReq(req); + sendBase("fetchResultsV2", args); + } + + public TSFetchResultsResp recv_fetchResultsV2() throws org.apache.thrift.TException + { + fetchResultsV2_result result = new fetchResultsV2_result(); + receiveBase(result, "fetchResultsV2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchResultsV2 failed: unknown result"); + } + + @Override + public TSOpenSessionResp openSession(TSOpenSessionReq req) throws org.apache.thrift.TException + { + send_openSession(req); + return recv_openSession(); + } + + public void send_openSession(TSOpenSessionReq req) throws org.apache.thrift.TException + { + openSession_args args = new openSession_args(); + args.setReq(req); + sendBase("openSession", args); + } + + public TSOpenSessionResp recv_openSession() throws org.apache.thrift.TException + { + openSession_result result = new openSession_result(); + receiveBase(result, "openSession"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "openSession failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus closeSession(TSCloseSessionReq req) throws org.apache.thrift.TException + { + send_closeSession(req); + return recv_closeSession(); + } + + public void send_closeSession(TSCloseSessionReq req) throws org.apache.thrift.TException + { + closeSession_args args = new closeSession_args(); + args.setReq(req); + sendBase("closeSession", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_closeSession() throws org.apache.thrift.TException + { + closeSession_result result = new closeSession_result(); + receiveBase(result, "closeSession"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closeSession failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + send_executeStatement(req); + return recv_executeStatement(); + } + + public void send_executeStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + executeStatement_args args = new executeStatement_args(); + args.setReq(req); + sendBase("executeStatement", args); + } + + public TSExecuteStatementResp recv_executeStatement() throws org.apache.thrift.TException + { + executeStatement_result result = new executeStatement_result(); + receiveBase(result, "executeStatement"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeStatement failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus executeBatchStatement(TSExecuteBatchStatementReq req) throws org.apache.thrift.TException + { + send_executeBatchStatement(req); + return recv_executeBatchStatement(); + } + + public void send_executeBatchStatement(TSExecuteBatchStatementReq req) throws org.apache.thrift.TException + { + executeBatchStatement_args args = new executeBatchStatement_args(); + args.setReq(req); + sendBase("executeBatchStatement", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_executeBatchStatement() throws org.apache.thrift.TException + { + executeBatchStatement_result result = new executeBatchStatement_result(); + receiveBase(result, "executeBatchStatement"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeBatchStatement failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeQueryStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + send_executeQueryStatement(req); + return recv_executeQueryStatement(); + } + + public void send_executeQueryStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + executeQueryStatement_args args = new executeQueryStatement_args(); + args.setReq(req); + sendBase("executeQueryStatement", args); + } + + public TSExecuteStatementResp recv_executeQueryStatement() throws org.apache.thrift.TException + { + executeQueryStatement_result result = new executeQueryStatement_result(); + receiveBase(result, "executeQueryStatement"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeQueryStatement failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeUpdateStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + send_executeUpdateStatement(req); + return recv_executeUpdateStatement(); + } + + public void send_executeUpdateStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException + { + executeUpdateStatement_args args = new executeUpdateStatement_args(); + args.setReq(req); + sendBase("executeUpdateStatement", args); + } + + public TSExecuteStatementResp recv_executeUpdateStatement() throws org.apache.thrift.TException + { + executeUpdateStatement_result result = new executeUpdateStatement_result(); + receiveBase(result, "executeUpdateStatement"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeUpdateStatement failed: unknown result"); + } + + @Override + public TSFetchResultsResp fetchResults(TSFetchResultsReq req) throws org.apache.thrift.TException + { + send_fetchResults(req); + return recv_fetchResults(); + } + + public void send_fetchResults(TSFetchResultsReq req) throws org.apache.thrift.TException + { + fetchResults_args args = new fetchResults_args(); + args.setReq(req); + sendBase("fetchResults", args); + } + + public TSFetchResultsResp recv_fetchResults() throws org.apache.thrift.TException + { + fetchResults_result result = new fetchResults_result(); + receiveBase(result, "fetchResults"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchResults failed: unknown result"); + } + + @Override + public TSFetchMetadataResp fetchMetadata(TSFetchMetadataReq req) throws org.apache.thrift.TException + { + send_fetchMetadata(req); + return recv_fetchMetadata(); + } + + public void send_fetchMetadata(TSFetchMetadataReq req) throws org.apache.thrift.TException + { + fetchMetadata_args args = new fetchMetadata_args(); + args.setReq(req); + sendBase("fetchMetadata", args); + } + + public TSFetchMetadataResp recv_fetchMetadata() throws org.apache.thrift.TException + { + fetchMetadata_result result = new fetchMetadata_result(); + receiveBase(result, "fetchMetadata"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchMetadata failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus cancelOperation(TSCancelOperationReq req) throws org.apache.thrift.TException + { + send_cancelOperation(req); + return recv_cancelOperation(); + } + + public void send_cancelOperation(TSCancelOperationReq req) throws org.apache.thrift.TException + { + cancelOperation_args args = new cancelOperation_args(); + args.setReq(req); + sendBase("cancelOperation", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_cancelOperation() throws org.apache.thrift.TException + { + cancelOperation_result result = new cancelOperation_result(); + receiveBase(result, "cancelOperation"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelOperation failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus closeOperation(TSCloseOperationReq req) throws org.apache.thrift.TException + { + send_closeOperation(req); + return recv_closeOperation(); + } + + public void send_closeOperation(TSCloseOperationReq req) throws org.apache.thrift.TException + { + closeOperation_args args = new closeOperation_args(); + args.setReq(req); + sendBase("closeOperation", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_closeOperation() throws org.apache.thrift.TException + { + closeOperation_result result = new closeOperation_result(); + receiveBase(result, "closeOperation"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closeOperation failed: unknown result"); + } + + @Override + public TSGetTimeZoneResp getTimeZone(long sessionId) throws org.apache.thrift.TException + { + send_getTimeZone(sessionId); + return recv_getTimeZone(); + } + + public void send_getTimeZone(long sessionId) throws org.apache.thrift.TException + { + getTimeZone_args args = new getTimeZone_args(); + args.setSessionId(sessionId); + sendBase("getTimeZone", args); + } + + public TSGetTimeZoneResp recv_getTimeZone() throws org.apache.thrift.TException + { + getTimeZone_result result = new getTimeZone_result(); + receiveBase(result, "getTimeZone"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTimeZone failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus setTimeZone(TSSetTimeZoneReq req) throws org.apache.thrift.TException + { + send_setTimeZone(req); + return recv_setTimeZone(); + } + + public void send_setTimeZone(TSSetTimeZoneReq req) throws org.apache.thrift.TException + { + setTimeZone_args args = new setTimeZone_args(); + args.setReq(req); + sendBase("setTimeZone", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_setTimeZone() throws org.apache.thrift.TException + { + setTimeZone_result result = new setTimeZone_result(); + receiveBase(result, "setTimeZone"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setTimeZone failed: unknown result"); + } + + @Override + public ServerProperties getProperties() throws org.apache.thrift.TException + { + send_getProperties(); + return recv_getProperties(); + } + + public void send_getProperties() throws org.apache.thrift.TException + { + getProperties_args args = new getProperties_args(); + sendBase("getProperties", args); + } + + public ServerProperties recv_getProperties() throws org.apache.thrift.TException + { + getProperties_result result = new getProperties_result(); + receiveBase(result, "getProperties"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getProperties failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus setStorageGroup(long sessionId, java.lang.String storageGroup) throws org.apache.thrift.TException + { + send_setStorageGroup(sessionId, storageGroup); + return recv_setStorageGroup(); + } + + public void send_setStorageGroup(long sessionId, java.lang.String storageGroup) throws org.apache.thrift.TException + { + setStorageGroup_args args = new setStorageGroup_args(); + args.setSessionId(sessionId); + args.setStorageGroup(storageGroup); + sendBase("setStorageGroup", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_setStorageGroup() throws org.apache.thrift.TException + { + setStorageGroup_result result = new setStorageGroup_result(); + receiveBase(result, "setStorageGroup"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setStorageGroup failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus createTimeseries(TSCreateTimeseriesReq req) throws org.apache.thrift.TException + { + send_createTimeseries(req); + return recv_createTimeseries(); + } + + public void send_createTimeseries(TSCreateTimeseriesReq req) throws org.apache.thrift.TException + { + createTimeseries_args args = new createTimeseries_args(); + args.setReq(req); + sendBase("createTimeseries", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createTimeseries() throws org.apache.thrift.TException + { + createTimeseries_result result = new createTimeseries_result(); + receiveBase(result, "createTimeseries"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createTimeseries failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus createAlignedTimeseries(TSCreateAlignedTimeseriesReq req) throws org.apache.thrift.TException + { + send_createAlignedTimeseries(req); + return recv_createAlignedTimeseries(); + } + + public void send_createAlignedTimeseries(TSCreateAlignedTimeseriesReq req) throws org.apache.thrift.TException + { + createAlignedTimeseries_args args = new createAlignedTimeseries_args(); + args.setReq(req); + sendBase("createAlignedTimeseries", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createAlignedTimeseries() throws org.apache.thrift.TException + { + createAlignedTimeseries_result result = new createAlignedTimeseries_result(); + receiveBase(result, "createAlignedTimeseries"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createAlignedTimeseries failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus createMultiTimeseries(TSCreateMultiTimeseriesReq req) throws org.apache.thrift.TException + { + send_createMultiTimeseries(req); + return recv_createMultiTimeseries(); + } + + public void send_createMultiTimeseries(TSCreateMultiTimeseriesReq req) throws org.apache.thrift.TException + { + createMultiTimeseries_args args = new createMultiTimeseries_args(); + args.setReq(req); + sendBase("createMultiTimeseries", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createMultiTimeseries() throws org.apache.thrift.TException + { + createMultiTimeseries_result result = new createMultiTimeseries_result(); + receiveBase(result, "createMultiTimeseries"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createMultiTimeseries failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus deleteTimeseries(long sessionId, java.util.List path) throws org.apache.thrift.TException + { + send_deleteTimeseries(sessionId, path); + return recv_deleteTimeseries(); + } + + public void send_deleteTimeseries(long sessionId, java.util.List path) throws org.apache.thrift.TException + { + deleteTimeseries_args args = new deleteTimeseries_args(); + args.setSessionId(sessionId); + args.setPath(path); + sendBase("deleteTimeseries", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_deleteTimeseries() throws org.apache.thrift.TException + { + deleteTimeseries_result result = new deleteTimeseries_result(); + receiveBase(result, "deleteTimeseries"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteTimeseries failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus deleteStorageGroups(long sessionId, java.util.List storageGroup) throws org.apache.thrift.TException + { + send_deleteStorageGroups(sessionId, storageGroup); + return recv_deleteStorageGroups(); + } + + public void send_deleteStorageGroups(long sessionId, java.util.List storageGroup) throws org.apache.thrift.TException + { + deleteStorageGroups_args args = new deleteStorageGroups_args(); + args.setSessionId(sessionId); + args.setStorageGroup(storageGroup); + sendBase("deleteStorageGroups", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_deleteStorageGroups() throws org.apache.thrift.TException + { + deleteStorageGroups_result result = new deleteStorageGroups_result(); + receiveBase(result, "deleteStorageGroups"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteStorageGroups failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException + { + send_insertRecord(req); + return recv_insertRecord(); + } + + public void send_insertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException + { + insertRecord_args args = new insertRecord_args(); + args.setReq(req); + sendBase("insertRecord", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertRecord() throws org.apache.thrift.TException + { + insertRecord_result result = new insertRecord_result(); + receiveBase(result, "insertRecord"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertRecord failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException + { + send_insertStringRecord(req); + return recv_insertStringRecord(); + } + + public void send_insertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException + { + insertStringRecord_args args = new insertStringRecord_args(); + args.setReq(req); + sendBase("insertStringRecord", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertStringRecord() throws org.apache.thrift.TException + { + insertStringRecord_result result = new insertStringRecord_result(); + receiveBase(result, "insertStringRecord"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertStringRecord failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus insertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException + { + send_insertTablet(req); + return recv_insertTablet(); + } + + public void send_insertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException + { + insertTablet_args args = new insertTablet_args(); + args.setReq(req); + sendBase("insertTablet", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertTablet() throws org.apache.thrift.TException + { + insertTablet_result result = new insertTablet_result(); + receiveBase(result, "insertTablet"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertTablet failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus insertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException + { + send_insertTablets(req); + return recv_insertTablets(); + } + + public void send_insertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException + { + insertTablets_args args = new insertTablets_args(); + args.setReq(req); + sendBase("insertTablets", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertTablets() throws org.apache.thrift.TException + { + insertTablets_result result = new insertTablets_result(); + receiveBase(result, "insertTablets"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertTablets failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException + { + send_insertRecords(req); + return recv_insertRecords(); + } + + public void send_insertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException + { + insertRecords_args args = new insertRecords_args(); + args.setReq(req); + sendBase("insertRecords", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertRecords() throws org.apache.thrift.TException + { + insertRecords_result result = new insertRecords_result(); + receiveBase(result, "insertRecords"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertRecords failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException + { + send_insertRecordsOfOneDevice(req); + return recv_insertRecordsOfOneDevice(); + } + + public void send_insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException + { + insertRecordsOfOneDevice_args args = new insertRecordsOfOneDevice_args(); + args.setReq(req); + sendBase("insertRecordsOfOneDevice", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertRecordsOfOneDevice() throws org.apache.thrift.TException + { + insertRecordsOfOneDevice_result result = new insertRecordsOfOneDevice_result(); + receiveBase(result, "insertRecordsOfOneDevice"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertRecordsOfOneDevice failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req) throws org.apache.thrift.TException + { + send_insertStringRecordsOfOneDevice(req); + return recv_insertStringRecordsOfOneDevice(); + } + + public void send_insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req) throws org.apache.thrift.TException + { + insertStringRecordsOfOneDevice_args args = new insertStringRecordsOfOneDevice_args(); + args.setReq(req); + sendBase("insertStringRecordsOfOneDevice", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertStringRecordsOfOneDevice() throws org.apache.thrift.TException + { + insertStringRecordsOfOneDevice_result result = new insertStringRecordsOfOneDevice_result(); + receiveBase(result, "insertStringRecordsOfOneDevice"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertStringRecordsOfOneDevice failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException + { + send_insertStringRecords(req); + return recv_insertStringRecords(); + } + + public void send_insertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException + { + insertStringRecords_args args = new insertStringRecords_args(); + args.setReq(req); + sendBase("insertStringRecords", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertStringRecords() throws org.apache.thrift.TException + { + insertStringRecords_result result = new insertStringRecords_result(); + receiveBase(result, "insertStringRecords"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertStringRecords failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException + { + send_testInsertTablet(req); + return recv_testInsertTablet(); + } + + public void send_testInsertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException + { + testInsertTablet_args args = new testInsertTablet_args(); + args.setReq(req); + sendBase("testInsertTablet", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertTablet() throws org.apache.thrift.TException + { + testInsertTablet_result result = new testInsertTablet_result(); + receiveBase(result, "testInsertTablet"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertTablet failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException + { + send_testInsertTablets(req); + return recv_testInsertTablets(); + } + + public void send_testInsertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException + { + testInsertTablets_args args = new testInsertTablets_args(); + args.setReq(req); + sendBase("testInsertTablets", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertTablets() throws org.apache.thrift.TException + { + testInsertTablets_result result = new testInsertTablets_result(); + receiveBase(result, "testInsertTablets"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertTablets failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException + { + send_testInsertRecord(req); + return recv_testInsertRecord(); + } + + public void send_testInsertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException + { + testInsertRecord_args args = new testInsertRecord_args(); + args.setReq(req); + sendBase("testInsertRecord", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertRecord() throws org.apache.thrift.TException + { + testInsertRecord_result result = new testInsertRecord_result(); + receiveBase(result, "testInsertRecord"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertRecord failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException + { + send_testInsertStringRecord(req); + return recv_testInsertStringRecord(); + } + + public void send_testInsertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException + { + testInsertStringRecord_args args = new testInsertStringRecord_args(); + args.setReq(req); + sendBase("testInsertStringRecord", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertStringRecord() throws org.apache.thrift.TException + { + testInsertStringRecord_result result = new testInsertStringRecord_result(); + receiveBase(result, "testInsertStringRecord"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertStringRecord failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException + { + send_testInsertRecords(req); + return recv_testInsertRecords(); + } + + public void send_testInsertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException + { + testInsertRecords_args args = new testInsertRecords_args(); + args.setReq(req); + sendBase("testInsertRecords", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertRecords() throws org.apache.thrift.TException + { + testInsertRecords_result result = new testInsertRecords_result(); + receiveBase(result, "testInsertRecords"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertRecords failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException + { + send_testInsertRecordsOfOneDevice(req); + return recv_testInsertRecordsOfOneDevice(); + } + + public void send_testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException + { + testInsertRecordsOfOneDevice_args args = new testInsertRecordsOfOneDevice_args(); + args.setReq(req); + sendBase("testInsertRecordsOfOneDevice", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertRecordsOfOneDevice() throws org.apache.thrift.TException + { + testInsertRecordsOfOneDevice_result result = new testInsertRecordsOfOneDevice_result(); + receiveBase(result, "testInsertRecordsOfOneDevice"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertRecordsOfOneDevice failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException + { + send_testInsertStringRecords(req); + return recv_testInsertStringRecords(); + } + + public void send_testInsertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException + { + testInsertStringRecords_args args = new testInsertStringRecords_args(); + args.setReq(req); + sendBase("testInsertStringRecords", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertStringRecords() throws org.apache.thrift.TException + { + testInsertStringRecords_result result = new testInsertStringRecords_result(); + receiveBase(result, "testInsertStringRecords"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertStringRecords failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus deleteData(TSDeleteDataReq req) throws org.apache.thrift.TException + { + send_deleteData(req); + return recv_deleteData(); + } + + public void send_deleteData(TSDeleteDataReq req) throws org.apache.thrift.TException + { + deleteData_args args = new deleteData_args(); + args.setReq(req); + sendBase("deleteData", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_deleteData() throws org.apache.thrift.TException + { + deleteData_result result = new deleteData_result(); + receiveBase(result, "deleteData"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteData failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeRawDataQuery(TSRawDataQueryReq req) throws org.apache.thrift.TException + { + send_executeRawDataQuery(req); + return recv_executeRawDataQuery(); + } + + public void send_executeRawDataQuery(TSRawDataQueryReq req) throws org.apache.thrift.TException + { + executeRawDataQuery_args args = new executeRawDataQuery_args(); + args.setReq(req); + sendBase("executeRawDataQuery", args); + } + + public TSExecuteStatementResp recv_executeRawDataQuery() throws org.apache.thrift.TException + { + executeRawDataQuery_result result = new executeRawDataQuery_result(); + receiveBase(result, "executeRawDataQuery"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeRawDataQuery failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeLastDataQuery(TSLastDataQueryReq req) throws org.apache.thrift.TException + { + send_executeLastDataQuery(req); + return recv_executeLastDataQuery(); + } + + public void send_executeLastDataQuery(TSLastDataQueryReq req) throws org.apache.thrift.TException + { + executeLastDataQuery_args args = new executeLastDataQuery_args(); + args.setReq(req); + sendBase("executeLastDataQuery", args); + } + + public TSExecuteStatementResp recv_executeLastDataQuery() throws org.apache.thrift.TException + { + executeLastDataQuery_result result = new executeLastDataQuery_result(); + receiveBase(result, "executeLastDataQuery"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeLastDataQuery failed: unknown result"); + } + + @Override + public TSExecuteStatementResp executeAggregationQuery(TSAggregationQueryReq req) throws org.apache.thrift.TException + { + send_executeAggregationQuery(req); + return recv_executeAggregationQuery(); + } + + public void send_executeAggregationQuery(TSAggregationQueryReq req) throws org.apache.thrift.TException + { + executeAggregationQuery_args args = new executeAggregationQuery_args(); + args.setReq(req); + sendBase("executeAggregationQuery", args); + } + + public TSExecuteStatementResp recv_executeAggregationQuery() throws org.apache.thrift.TException + { + executeAggregationQuery_result result = new executeAggregationQuery_result(); + receiveBase(result, "executeAggregationQuery"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeAggregationQuery failed: unknown result"); + } + + @Override + public long requestStatementId(long sessionId) throws org.apache.thrift.TException + { + send_requestStatementId(sessionId); + return recv_requestStatementId(); + } + + public void send_requestStatementId(long sessionId) throws org.apache.thrift.TException + { + requestStatementId_args args = new requestStatementId_args(); + args.setSessionId(sessionId); + sendBase("requestStatementId", args); + } + + public long recv_requestStatementId() throws org.apache.thrift.TException + { + requestStatementId_result result = new requestStatementId_result(); + receiveBase(result, "requestStatementId"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestStatementId failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus createSchemaTemplate(TSCreateSchemaTemplateReq req) throws org.apache.thrift.TException + { + send_createSchemaTemplate(req); + return recv_createSchemaTemplate(); + } + + public void send_createSchemaTemplate(TSCreateSchemaTemplateReq req) throws org.apache.thrift.TException + { + createSchemaTemplate_args args = new createSchemaTemplate_args(); + args.setReq(req); + sendBase("createSchemaTemplate", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createSchemaTemplate() throws org.apache.thrift.TException + { + createSchemaTemplate_result result = new createSchemaTemplate_result(); + receiveBase(result, "createSchemaTemplate"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSchemaTemplate failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus appendSchemaTemplate(TSAppendSchemaTemplateReq req) throws org.apache.thrift.TException + { + send_appendSchemaTemplate(req); + return recv_appendSchemaTemplate(); + } + + public void send_appendSchemaTemplate(TSAppendSchemaTemplateReq req) throws org.apache.thrift.TException + { + appendSchemaTemplate_args args = new appendSchemaTemplate_args(); + args.setReq(req); + sendBase("appendSchemaTemplate", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_appendSchemaTemplate() throws org.apache.thrift.TException + { + appendSchemaTemplate_result result = new appendSchemaTemplate_result(); + receiveBase(result, "appendSchemaTemplate"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "appendSchemaTemplate failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus pruneSchemaTemplate(TSPruneSchemaTemplateReq req) throws org.apache.thrift.TException + { + send_pruneSchemaTemplate(req); + return recv_pruneSchemaTemplate(); + } + + public void send_pruneSchemaTemplate(TSPruneSchemaTemplateReq req) throws org.apache.thrift.TException + { + pruneSchemaTemplate_args args = new pruneSchemaTemplate_args(); + args.setReq(req); + sendBase("pruneSchemaTemplate", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_pruneSchemaTemplate() throws org.apache.thrift.TException + { + pruneSchemaTemplate_result result = new pruneSchemaTemplate_result(); + receiveBase(result, "pruneSchemaTemplate"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pruneSchemaTemplate failed: unknown result"); + } + + @Override + public TSQueryTemplateResp querySchemaTemplate(TSQueryTemplateReq req) throws org.apache.thrift.TException + { + send_querySchemaTemplate(req); + return recv_querySchemaTemplate(); + } + + public void send_querySchemaTemplate(TSQueryTemplateReq req) throws org.apache.thrift.TException + { + querySchemaTemplate_args args = new querySchemaTemplate_args(); + args.setReq(req); + sendBase("querySchemaTemplate", args); + } + + public TSQueryTemplateResp recv_querySchemaTemplate() throws org.apache.thrift.TException + { + querySchemaTemplate_result result = new querySchemaTemplate_result(); + receiveBase(result, "querySchemaTemplate"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "querySchemaTemplate failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp showConfigurationTemplate() throws org.apache.thrift.TException + { + send_showConfigurationTemplate(); + return recv_showConfigurationTemplate(); + } + + public void send_showConfigurationTemplate() throws org.apache.thrift.TException + { + showConfigurationTemplate_args args = new showConfigurationTemplate_args(); + sendBase("showConfigurationTemplate", args); + } + + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp recv_showConfigurationTemplate() throws org.apache.thrift.TException + { + showConfigurationTemplate_result result = new showConfigurationTemplate_result(); + receiveBase(result, "showConfigurationTemplate"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "showConfigurationTemplate failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp showConfiguration(int nodeId) throws org.apache.thrift.TException + { + send_showConfiguration(nodeId); + return recv_showConfiguration(); + } + + public void send_showConfiguration(int nodeId) throws org.apache.thrift.TException + { + showConfiguration_args args = new showConfiguration_args(); + args.setNodeId(nodeId); + sendBase("showConfiguration", args); + } + + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp recv_showConfiguration() throws org.apache.thrift.TException + { + showConfiguration_result result = new showConfiguration_result(); + receiveBase(result, "showConfiguration"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "showConfiguration failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus setSchemaTemplate(TSSetSchemaTemplateReq req) throws org.apache.thrift.TException + { + send_setSchemaTemplate(req); + return recv_setSchemaTemplate(); + } + + public void send_setSchemaTemplate(TSSetSchemaTemplateReq req) throws org.apache.thrift.TException + { + setSchemaTemplate_args args = new setSchemaTemplate_args(); + args.setReq(req); + sendBase("setSchemaTemplate", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_setSchemaTemplate() throws org.apache.thrift.TException + { + setSchemaTemplate_result result = new setSchemaTemplate_result(); + receiveBase(result, "setSchemaTemplate"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setSchemaTemplate failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus unsetSchemaTemplate(TSUnsetSchemaTemplateReq req) throws org.apache.thrift.TException + { + send_unsetSchemaTemplate(req); + return recv_unsetSchemaTemplate(); + } + + public void send_unsetSchemaTemplate(TSUnsetSchemaTemplateReq req) throws org.apache.thrift.TException + { + unsetSchemaTemplate_args args = new unsetSchemaTemplate_args(); + args.setReq(req); + sendBase("unsetSchemaTemplate", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_unsetSchemaTemplate() throws org.apache.thrift.TException + { + unsetSchemaTemplate_result result = new unsetSchemaTemplate_result(); + receiveBase(result, "unsetSchemaTemplate"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unsetSchemaTemplate failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus dropSchemaTemplate(TSDropSchemaTemplateReq req) throws org.apache.thrift.TException + { + send_dropSchemaTemplate(req); + return recv_dropSchemaTemplate(); + } + + public void send_dropSchemaTemplate(TSDropSchemaTemplateReq req) throws org.apache.thrift.TException + { + dropSchemaTemplate_args args = new dropSchemaTemplate_args(); + args.setReq(req); + sendBase("dropSchemaTemplate", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_dropSchemaTemplate() throws org.apache.thrift.TException + { + dropSchemaTemplate_result result = new dropSchemaTemplate_result(); + receiveBase(result, "dropSchemaTemplate"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "dropSchemaTemplate failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req) throws org.apache.thrift.TException + { + send_createTimeseriesUsingSchemaTemplate(req); + return recv_createTimeseriesUsingSchemaTemplate(); + } + + public void send_createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req) throws org.apache.thrift.TException + { + createTimeseriesUsingSchemaTemplate_args args = new createTimeseriesUsingSchemaTemplate_args(); + args.setReq(req); + sendBase("createTimeseriesUsingSchemaTemplate", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createTimeseriesUsingSchemaTemplate() throws org.apache.thrift.TException + { + createTimeseriesUsingSchemaTemplate_result result = new createTimeseriesUsingSchemaTemplate_result(); + receiveBase(result, "createTimeseriesUsingSchemaTemplate"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createTimeseriesUsingSchemaTemplate failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus handshake(TSyncIdentityInfo info) throws org.apache.thrift.TException + { + send_handshake(info); + return recv_handshake(); + } + + public void send_handshake(TSyncIdentityInfo info) throws org.apache.thrift.TException + { + handshake_args args = new handshake_args(); + args.setInfo(info); + sendBase("handshake", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_handshake() throws org.apache.thrift.TException + { + handshake_result result = new handshake_result(); + receiveBase(result, "handshake"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "handshake failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus sendPipeData(java.nio.ByteBuffer buff) throws org.apache.thrift.TException + { + send_sendPipeData(buff); + return recv_sendPipeData(); + } + + public void send_sendPipeData(java.nio.ByteBuffer buff) throws org.apache.thrift.TException + { + sendPipeData_args args = new sendPipeData_args(); + args.setBuff(buff); + sendBase("sendPipeData", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_sendPipeData() throws org.apache.thrift.TException + { + sendPipeData_result result = new sendPipeData_result(); + receiveBase(result, "sendPipeData"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sendPipeData failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff) throws org.apache.thrift.TException + { + send_sendFile(metaInfo, buff); + return recv_sendFile(); + } + + public void send_sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff) throws org.apache.thrift.TException + { + sendFile_args args = new sendFile_args(); + args.setMetaInfo(metaInfo); + args.setBuff(buff); + sendBase("sendFile", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_sendFile() throws org.apache.thrift.TException + { + sendFile_result result = new sendFile_result(); + receiveBase(result, "sendFile"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sendFile failed: unknown result"); + } + + @Override + public TPipeTransferResp pipeTransfer(TPipeTransferReq req) throws org.apache.thrift.TException + { + send_pipeTransfer(req); + return recv_pipeTransfer(); + } + + public void send_pipeTransfer(TPipeTransferReq req) throws org.apache.thrift.TException + { + pipeTransfer_args args = new pipeTransfer_args(); + args.setReq(req); + sendBase("pipeTransfer", args); + } + + public TPipeTransferResp recv_pipeTransfer() throws org.apache.thrift.TException + { + pipeTransfer_result result = new pipeTransfer_result(); + receiveBase(result, "pipeTransfer"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pipeTransfer failed: unknown result"); + } + + @Override + public TPipeSubscribeResp pipeSubscribe(TPipeSubscribeReq req) throws org.apache.thrift.TException + { + send_pipeSubscribe(req); + return recv_pipeSubscribe(); + } + + public void send_pipeSubscribe(TPipeSubscribeReq req) throws org.apache.thrift.TException + { + pipeSubscribe_args args = new pipeSubscribe_args(); + args.setReq(req); + sendBase("pipeSubscribe", args); + } + + public TPipeSubscribeResp recv_pipeSubscribe() throws org.apache.thrift.TException + { + pipeSubscribe_result result = new pipeSubscribe_result(); + receiveBase(result, "pipeSubscribe"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pipeSubscribe failed: unknown result"); + } + + @Override + public TSBackupConfigurationResp getBackupConfiguration() throws org.apache.thrift.TException + { + send_getBackupConfiguration(); + return recv_getBackupConfiguration(); + } + + public void send_getBackupConfiguration() throws org.apache.thrift.TException + { + getBackupConfiguration_args args = new getBackupConfiguration_args(); + sendBase("getBackupConfiguration", args); + } + + public TSBackupConfigurationResp recv_getBackupConfiguration() throws org.apache.thrift.TException + { + getBackupConfiguration_result result = new getBackupConfiguration_result(); + receiveBase(result, "getBackupConfiguration"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBackupConfiguration failed: unknown result"); + } + + @Override + public TSConnectionInfoResp fetchAllConnectionsInfo() throws org.apache.thrift.TException + { + send_fetchAllConnectionsInfo(); + return recv_fetchAllConnectionsInfo(); + } + + public void send_fetchAllConnectionsInfo() throws org.apache.thrift.TException + { + fetchAllConnectionsInfo_args args = new fetchAllConnectionsInfo_args(); + sendBase("fetchAllConnectionsInfo", args); + } + + public TSConnectionInfoResp recv_fetchAllConnectionsInfo() throws org.apache.thrift.TException + { + fetchAllConnectionsInfo_result result = new fetchAllConnectionsInfo_result(); + receiveBase(result, "fetchAllConnectionsInfo"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchAllConnectionsInfo failed: unknown result"); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus testConnectionEmptyRPC() throws org.apache.thrift.TException + { + send_testConnectionEmptyRPC(); + return recv_testConnectionEmptyRPC(); + } + + public void send_testConnectionEmptyRPC() throws org.apache.thrift.TException + { + testConnectionEmptyRPC_args args = new testConnectionEmptyRPC_args(); + sendBase("testConnectionEmptyRPC", args); + } + + public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testConnectionEmptyRPC() throws org.apache.thrift.TException + { + testConnectionEmptyRPC_result result = new testConnectionEmptyRPC_result(); + receiveBase(result, "testConnectionEmptyRPC"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testConnectionEmptyRPC failed: unknown result"); + } + + } + public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + @Override + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + @Override + public void executeQueryStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeQueryStatementV2_call method_call = new executeQueryStatementV2_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeQueryStatementV2_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSExecuteStatementReq req; + public executeQueryStatementV2_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeQueryStatementV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeQueryStatementV2_args args = new executeQueryStatementV2_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeQueryStatementV2(); + } + } + + @Override + public void executeUpdateStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeUpdateStatementV2_call method_call = new executeUpdateStatementV2_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeUpdateStatementV2_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSExecuteStatementReq req; + public executeUpdateStatementV2_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeUpdateStatementV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeUpdateStatementV2_args args = new executeUpdateStatementV2_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeUpdateStatementV2(); + } + } + + @Override + public void executeStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeStatementV2_call method_call = new executeStatementV2_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeStatementV2_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSExecuteStatementReq req; + public executeStatementV2_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeStatementV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeStatementV2_args args = new executeStatementV2_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeStatementV2(); + } + } + + @Override + public void executeRawDataQueryV2(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeRawDataQueryV2_call method_call = new executeRawDataQueryV2_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeRawDataQueryV2_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSRawDataQueryReq req; + public executeRawDataQueryV2_call(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeRawDataQueryV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeRawDataQueryV2_args args = new executeRawDataQueryV2_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeRawDataQueryV2(); + } + } + + @Override + public void executeLastDataQueryV2(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeLastDataQueryV2_call method_call = new executeLastDataQueryV2_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeLastDataQueryV2_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSLastDataQueryReq req; + public executeLastDataQueryV2_call(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeLastDataQueryV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeLastDataQueryV2_args args = new executeLastDataQueryV2_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeLastDataQueryV2(); + } + } + + @Override + public void executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeFastLastDataQueryForOneDeviceV2_call method_call = new executeFastLastDataQueryForOneDeviceV2_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeFastLastDataQueryForOneDeviceV2_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSFastLastDataQueryForOneDeviceReq req; + public executeFastLastDataQueryForOneDeviceV2_call(TSFastLastDataQueryForOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeFastLastDataQueryForOneDeviceV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeFastLastDataQueryForOneDeviceV2_args args = new executeFastLastDataQueryForOneDeviceV2_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeFastLastDataQueryForOneDeviceV2(); + } + } + + @Override + public void executeAggregationQueryV2(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeAggregationQueryV2_call method_call = new executeAggregationQueryV2_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeAggregationQueryV2_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSAggregationQueryReq req; + public executeAggregationQueryV2_call(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeAggregationQueryV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeAggregationQueryV2_args args = new executeAggregationQueryV2_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeAggregationQueryV2(); + } + } + + @Override + public void executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeGroupByQueryIntervalQuery_call method_call = new executeGroupByQueryIntervalQuery_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeGroupByQueryIntervalQuery_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSGroupByQueryIntervalReq req; + public executeGroupByQueryIntervalQuery_call(TSGroupByQueryIntervalReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeGroupByQueryIntervalQuery", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeGroupByQueryIntervalQuery_args args = new executeGroupByQueryIntervalQuery_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeGroupByQueryIntervalQuery(); + } + } + + @Override + public void fetchResultsV2(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + fetchResultsV2_call method_call = new fetchResultsV2_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class fetchResultsV2_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSFetchResultsReq req; + public fetchResultsV2_call(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchResultsV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + fetchResultsV2_args args = new fetchResultsV2_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSFetchResultsResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_fetchResultsV2(); + } + } + + @Override + public void openSession(TSOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + openSession_call method_call = new openSession_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class openSession_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSOpenSessionReq req; + public openSession_call(TSOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("openSession", org.apache.thrift.protocol.TMessageType.CALL, 0)); + openSession_args args = new openSession_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSOpenSessionResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_openSession(); + } + } + + @Override + public void closeSession(TSCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + closeSession_call method_call = new closeSession_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class closeSession_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSCloseSessionReq req; + public closeSession_call(TSCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeSession", org.apache.thrift.protocol.TMessageType.CALL, 0)); + closeSession_args args = new closeSession_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_closeSession(); + } + } + + @Override + public void executeStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeStatement_call method_call = new executeStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeStatement_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSExecuteStatementReq req; + public executeStatement_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeStatement", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeStatement_args args = new executeStatement_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeStatement(); + } + } + + @Override + public void executeBatchStatement(TSExecuteBatchStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeBatchStatement_call method_call = new executeBatchStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeBatchStatement_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSExecuteBatchStatementReq req; + public executeBatchStatement_call(TSExecuteBatchStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeBatchStatement", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeBatchStatement_args args = new executeBatchStatement_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeBatchStatement(); + } + } + + @Override + public void executeQueryStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeQueryStatement_call method_call = new executeQueryStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeQueryStatement_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSExecuteStatementReq req; + public executeQueryStatement_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeQueryStatement", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeQueryStatement_args args = new executeQueryStatement_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeQueryStatement(); + } + } + + @Override + public void executeUpdateStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeUpdateStatement_call method_call = new executeUpdateStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeUpdateStatement_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSExecuteStatementReq req; + public executeUpdateStatement_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeUpdateStatement", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeUpdateStatement_args args = new executeUpdateStatement_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeUpdateStatement(); + } + } + + @Override + public void fetchResults(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + fetchResults_call method_call = new fetchResults_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class fetchResults_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSFetchResultsReq req; + public fetchResults_call(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchResults", org.apache.thrift.protocol.TMessageType.CALL, 0)); + fetchResults_args args = new fetchResults_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSFetchResultsResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_fetchResults(); + } + } + + @Override + public void fetchMetadata(TSFetchMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + fetchMetadata_call method_call = new fetchMetadata_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class fetchMetadata_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSFetchMetadataReq req; + public fetchMetadata_call(TSFetchMetadataReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); + fetchMetadata_args args = new fetchMetadata_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSFetchMetadataResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_fetchMetadata(); + } + } + + @Override + public void cancelOperation(TSCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + cancelOperation_call method_call = new cancelOperation_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class cancelOperation_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSCancelOperationReq req; + public cancelOperation_call(TSCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelOperation", org.apache.thrift.protocol.TMessageType.CALL, 0)); + cancelOperation_args args = new cancelOperation_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_cancelOperation(); + } + } + + @Override + public void closeOperation(TSCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + closeOperation_call method_call = new closeOperation_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class closeOperation_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSCloseOperationReq req; + public closeOperation_call(TSCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeOperation", org.apache.thrift.protocol.TMessageType.CALL, 0)); + closeOperation_args args = new closeOperation_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_closeOperation(); + } + } + + @Override + public void getTimeZone(long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTimeZone_call method_call = new getTimeZone_call(sessionId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getTimeZone_call extends org.apache.thrift.async.TAsyncMethodCall { + private long sessionId; + public getTimeZone_call(long sessionId, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTimeZone", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTimeZone_args args = new getTimeZone_args(); + args.setSessionId(sessionId); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSGetTimeZoneResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTimeZone(); + } + } + + @Override + public void setTimeZone(TSSetTimeZoneReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + setTimeZone_call method_call = new setTimeZone_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class setTimeZone_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSSetTimeZoneReq req; + public setTimeZone_call(TSSetTimeZoneReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setTimeZone", org.apache.thrift.protocol.TMessageType.CALL, 0)); + setTimeZone_args args = new setTimeZone_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_setTimeZone(); + } + } + + @Override + public void getProperties(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getProperties_call method_call = new getProperties_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getProperties_call extends org.apache.thrift.async.TAsyncMethodCall { + public getProperties_call(org.apache.thrift.async.AsyncMethodCallback 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); + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getProperties", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getProperties_args args = new getProperties_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public ServerProperties getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getProperties(); + } + } + + @Override + public void setStorageGroup(long sessionId, java.lang.String storageGroup, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + setStorageGroup_call method_call = new setStorageGroup_call(sessionId, storageGroup, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class setStorageGroup_call extends org.apache.thrift.async.TAsyncMethodCall { + private long sessionId; + private java.lang.String storageGroup; + public setStorageGroup_call(long sessionId, java.lang.String storageGroup, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; + this.storageGroup = storageGroup; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setStorageGroup", org.apache.thrift.protocol.TMessageType.CALL, 0)); + setStorageGroup_args args = new setStorageGroup_args(); + args.setSessionId(sessionId); + args.setStorageGroup(storageGroup); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_setStorageGroup(); + } + } + + @Override + public void createTimeseries(TSCreateTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createTimeseries_call method_call = new createTimeseries_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class createTimeseries_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSCreateTimeseriesReq req; + public createTimeseries_call(TSCreateTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createTimeseries", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createTimeseries_args args = new createTimeseries_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_createTimeseries(); + } + } + + @Override + public void createAlignedTimeseries(TSCreateAlignedTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createAlignedTimeseries_call method_call = new createAlignedTimeseries_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class createAlignedTimeseries_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSCreateAlignedTimeseriesReq req; + public createAlignedTimeseries_call(TSCreateAlignedTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createAlignedTimeseries", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createAlignedTimeseries_args args = new createAlignedTimeseries_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_createAlignedTimeseries(); + } + } + + @Override + public void createMultiTimeseries(TSCreateMultiTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createMultiTimeseries_call method_call = new createMultiTimeseries_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class createMultiTimeseries_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSCreateMultiTimeseriesReq req; + public createMultiTimeseries_call(TSCreateMultiTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createMultiTimeseries", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createMultiTimeseries_args args = new createMultiTimeseries_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_createMultiTimeseries(); + } + } + + @Override + public void deleteTimeseries(long sessionId, java.util.List path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteTimeseries_call method_call = new deleteTimeseries_call(sessionId, path, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteTimeseries_call extends org.apache.thrift.async.TAsyncMethodCall { + private long sessionId; + private java.util.List path; + public deleteTimeseries_call(long sessionId, java.util.List path, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; + this.path = path; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteTimeseries", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteTimeseries_args args = new deleteTimeseries_args(); + args.setSessionId(sessionId); + args.setPath(path); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deleteTimeseries(); + } + } + + @Override + public void deleteStorageGroups(long sessionId, java.util.List storageGroup, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteStorageGroups_call method_call = new deleteStorageGroups_call(sessionId, storageGroup, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteStorageGroups_call extends org.apache.thrift.async.TAsyncMethodCall { + private long sessionId; + private java.util.List storageGroup; + public deleteStorageGroups_call(long sessionId, java.util.List storageGroup, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; + this.storageGroup = storageGroup; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteStorageGroups", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteStorageGroups_args args = new deleteStorageGroups_args(); + args.setSessionId(sessionId); + args.setStorageGroup(storageGroup); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deleteStorageGroups(); + } + } + + @Override + public void insertRecord(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + insertRecord_call method_call = new insertRecord_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class insertRecord_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertRecordReq req; + public insertRecord_call(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertRecord", org.apache.thrift.protocol.TMessageType.CALL, 0)); + insertRecord_args args = new insertRecord_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_insertRecord(); + } + } + + @Override + public void insertStringRecord(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + insertStringRecord_call method_call = new insertStringRecord_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class insertStringRecord_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertStringRecordReq req; + public insertStringRecord_call(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertStringRecord", org.apache.thrift.protocol.TMessageType.CALL, 0)); + insertStringRecord_args args = new insertStringRecord_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_insertStringRecord(); + } + } + + @Override + public void insertTablet(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + insertTablet_call method_call = new insertTablet_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class insertTablet_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertTabletReq req; + public insertTablet_call(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertTablet", org.apache.thrift.protocol.TMessageType.CALL, 0)); + insertTablet_args args = new insertTablet_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_insertTablet(); + } + } + + @Override + public void insertTablets(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + insertTablets_call method_call = new insertTablets_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class insertTablets_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertTabletsReq req; + public insertTablets_call(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertTablets", org.apache.thrift.protocol.TMessageType.CALL, 0)); + insertTablets_args args = new insertTablets_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_insertTablets(); + } + } + + @Override + public void insertRecords(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + insertRecords_call method_call = new insertRecords_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class insertRecords_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertRecordsReq req; + public insertRecords_call(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertRecords", org.apache.thrift.protocol.TMessageType.CALL, 0)); + insertRecords_args args = new insertRecords_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_insertRecords(); + } + } + + @Override + public void insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + insertRecordsOfOneDevice_call method_call = new insertRecordsOfOneDevice_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class insertRecordsOfOneDevice_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertRecordsOfOneDeviceReq req; + public insertRecordsOfOneDevice_call(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertRecordsOfOneDevice", org.apache.thrift.protocol.TMessageType.CALL, 0)); + insertRecordsOfOneDevice_args args = new insertRecordsOfOneDevice_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_insertRecordsOfOneDevice(); + } + } + + @Override + public void insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + insertStringRecordsOfOneDevice_call method_call = new insertStringRecordsOfOneDevice_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class insertStringRecordsOfOneDevice_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertStringRecordsOfOneDeviceReq req; + public insertStringRecordsOfOneDevice_call(TSInsertStringRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertStringRecordsOfOneDevice", org.apache.thrift.protocol.TMessageType.CALL, 0)); + insertStringRecordsOfOneDevice_args args = new insertStringRecordsOfOneDevice_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_insertStringRecordsOfOneDevice(); + } + } + + @Override + public void insertStringRecords(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + insertStringRecords_call method_call = new insertStringRecords_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class insertStringRecords_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertStringRecordsReq req; + public insertStringRecords_call(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertStringRecords", org.apache.thrift.protocol.TMessageType.CALL, 0)); + insertStringRecords_args args = new insertStringRecords_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_insertStringRecords(); + } + } + + @Override + public void testInsertTablet(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + testInsertTablet_call method_call = new testInsertTablet_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class testInsertTablet_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertTabletReq req; + public testInsertTablet_call(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertTablet", org.apache.thrift.protocol.TMessageType.CALL, 0)); + testInsertTablet_args args = new testInsertTablet_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_testInsertTablet(); + } + } + + @Override + public void testInsertTablets(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + testInsertTablets_call method_call = new testInsertTablets_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class testInsertTablets_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertTabletsReq req; + public testInsertTablets_call(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertTablets", org.apache.thrift.protocol.TMessageType.CALL, 0)); + testInsertTablets_args args = new testInsertTablets_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_testInsertTablets(); + } + } + + @Override + public void testInsertRecord(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + testInsertRecord_call method_call = new testInsertRecord_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class testInsertRecord_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertRecordReq req; + public testInsertRecord_call(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertRecord", org.apache.thrift.protocol.TMessageType.CALL, 0)); + testInsertRecord_args args = new testInsertRecord_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_testInsertRecord(); + } + } + + @Override + public void testInsertStringRecord(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + testInsertStringRecord_call method_call = new testInsertStringRecord_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class testInsertStringRecord_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertStringRecordReq req; + public testInsertStringRecord_call(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertStringRecord", org.apache.thrift.protocol.TMessageType.CALL, 0)); + testInsertStringRecord_args args = new testInsertStringRecord_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_testInsertStringRecord(); + } + } + + @Override + public void testInsertRecords(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + testInsertRecords_call method_call = new testInsertRecords_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class testInsertRecords_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertRecordsReq req; + public testInsertRecords_call(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertRecords", org.apache.thrift.protocol.TMessageType.CALL, 0)); + testInsertRecords_args args = new testInsertRecords_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_testInsertRecords(); + } + } + + @Override + public void testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + testInsertRecordsOfOneDevice_call method_call = new testInsertRecordsOfOneDevice_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class testInsertRecordsOfOneDevice_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertRecordsOfOneDeviceReq req; + public testInsertRecordsOfOneDevice_call(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertRecordsOfOneDevice", org.apache.thrift.protocol.TMessageType.CALL, 0)); + testInsertRecordsOfOneDevice_args args = new testInsertRecordsOfOneDevice_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_testInsertRecordsOfOneDevice(); + } + } + + @Override + public void testInsertStringRecords(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + testInsertStringRecords_call method_call = new testInsertStringRecords_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class testInsertStringRecords_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSInsertStringRecordsReq req; + public testInsertStringRecords_call(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertStringRecords", org.apache.thrift.protocol.TMessageType.CALL, 0)); + testInsertStringRecords_args args = new testInsertStringRecords_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_testInsertStringRecords(); + } + } + + @Override + public void deleteData(TSDeleteDataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteData_call method_call = new deleteData_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteData_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSDeleteDataReq req; + public deleteData_call(TSDeleteDataReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteData", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteData_args args = new deleteData_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deleteData(); + } + } + + @Override + public void executeRawDataQuery(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeRawDataQuery_call method_call = new executeRawDataQuery_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeRawDataQuery_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSRawDataQueryReq req; + public executeRawDataQuery_call(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeRawDataQuery", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeRawDataQuery_args args = new executeRawDataQuery_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeRawDataQuery(); + } + } + + @Override + public void executeLastDataQuery(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeLastDataQuery_call method_call = new executeLastDataQuery_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeLastDataQuery_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSLastDataQueryReq req; + public executeLastDataQuery_call(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeLastDataQuery", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeLastDataQuery_args args = new executeLastDataQuery_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeLastDataQuery(); + } + } + + @Override + public void executeAggregationQuery(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + executeAggregationQuery_call method_call = new executeAggregationQuery_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class executeAggregationQuery_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSAggregationQueryReq req; + public executeAggregationQuery_call(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeAggregationQuery", org.apache.thrift.protocol.TMessageType.CALL, 0)); + executeAggregationQuery_args args = new executeAggregationQuery_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_executeAggregationQuery(); + } + } + + @Override + public void requestStatementId(long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + requestStatementId_call method_call = new requestStatementId_call(sessionId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class requestStatementId_call extends org.apache.thrift.async.TAsyncMethodCall { + private long sessionId; + public requestStatementId_call(long sessionId, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestStatementId", org.apache.thrift.protocol.TMessageType.CALL, 0)); + requestStatementId_args args = new requestStatementId_args(); + args.setSessionId(sessionId); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public java.lang.Long getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_requestStatementId(); + } + } + + @Override + public void createSchemaTemplate(TSCreateSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createSchemaTemplate_call method_call = new createSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class createSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSCreateSchemaTemplateReq req; + public createSchemaTemplate_call(TSCreateSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createSchemaTemplate_args args = new createSchemaTemplate_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_createSchemaTemplate(); + } + } + + @Override + public void appendSchemaTemplate(TSAppendSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + appendSchemaTemplate_call method_call = new appendSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class appendSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSAppendSchemaTemplateReq req; + public appendSchemaTemplate_call(TSAppendSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("appendSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + appendSchemaTemplate_args args = new appendSchemaTemplate_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_appendSchemaTemplate(); + } + } + + @Override + public void pruneSchemaTemplate(TSPruneSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + pruneSchemaTemplate_call method_call = new pruneSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class pruneSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSPruneSchemaTemplateReq req; + public pruneSchemaTemplate_call(TSPruneSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pruneSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + pruneSchemaTemplate_args args = new pruneSchemaTemplate_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_pruneSchemaTemplate(); + } + } + + @Override + public void querySchemaTemplate(TSQueryTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + querySchemaTemplate_call method_call = new querySchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class querySchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSQueryTemplateReq req; + public querySchemaTemplate_call(TSQueryTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("querySchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + querySchemaTemplate_args args = new querySchemaTemplate_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSQueryTemplateResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_querySchemaTemplate(); + } + } + + @Override + public void showConfigurationTemplate(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + showConfigurationTemplate_call method_call = new showConfigurationTemplate_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class showConfigurationTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { + public showConfigurationTemplate_call(org.apache.thrift.async.AsyncMethodCallback 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); + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("showConfigurationTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + showConfigurationTemplate_args args = new showConfigurationTemplate_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_showConfigurationTemplate(); + } + } + + @Override + public void showConfiguration(int nodeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + showConfiguration_call method_call = new showConfiguration_call(nodeId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class showConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall { + private int nodeId; + public showConfiguration_call(int nodeId, org.apache.thrift.async.AsyncMethodCallback 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.nodeId = nodeId; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("showConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0)); + showConfiguration_args args = new showConfiguration_args(); + args.setNodeId(nodeId); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_showConfiguration(); + } + } + + @Override + public void setSchemaTemplate(TSSetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + setSchemaTemplate_call method_call = new setSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class setSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSSetSchemaTemplateReq req; + public setSchemaTemplate_call(TSSetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + setSchemaTemplate_args args = new setSchemaTemplate_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_setSchemaTemplate(); + } + } + + @Override + public void unsetSchemaTemplate(TSUnsetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + unsetSchemaTemplate_call method_call = new unsetSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class unsetSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSUnsetSchemaTemplateReq req; + public unsetSchemaTemplate_call(TSUnsetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unsetSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + unsetSchemaTemplate_args args = new unsetSchemaTemplate_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_unsetSchemaTemplate(); + } + } + + @Override + public void dropSchemaTemplate(TSDropSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + dropSchemaTemplate_call method_call = new dropSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class dropSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSDropSchemaTemplateReq req; + public dropSchemaTemplate_call(TSDropSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("dropSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + dropSchemaTemplate_args args = new dropSchemaTemplate_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_dropSchemaTemplate(); + } + } + + @Override + public void createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createTimeseriesUsingSchemaTemplate_call method_call = new createTimeseriesUsingSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class createTimeseriesUsingSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { + private TCreateTimeseriesUsingSchemaTemplateReq req; + public createTimeseriesUsingSchemaTemplate_call(TCreateTimeseriesUsingSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createTimeseriesUsingSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createTimeseriesUsingSchemaTemplate_args args = new createTimeseriesUsingSchemaTemplate_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_createTimeseriesUsingSchemaTemplate(); + } + } + + @Override + public void handshake(TSyncIdentityInfo info, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + handshake_call method_call = new handshake_call(info, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class handshake_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSyncIdentityInfo info; + public handshake_call(TSyncIdentityInfo info, org.apache.thrift.async.AsyncMethodCallback 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.info = info; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("handshake", org.apache.thrift.protocol.TMessageType.CALL, 0)); + handshake_args args = new handshake_args(); + args.setInfo(info); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_handshake(); + } + } + + @Override + public void sendPipeData(java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + sendPipeData_call method_call = new sendPipeData_call(buff, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class sendPipeData_call extends org.apache.thrift.async.TAsyncMethodCall { + private java.nio.ByteBuffer buff; + public sendPipeData_call(java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback 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.buff = buff; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendPipeData", org.apache.thrift.protocol.TMessageType.CALL, 0)); + sendPipeData_args args = new sendPipeData_args(); + args.setBuff(buff); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_sendPipeData(); + } + } + + @Override + public void sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + sendFile_call method_call = new sendFile_call(metaInfo, buff, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class sendFile_call extends org.apache.thrift.async.TAsyncMethodCall { + private TSyncTransportMetaInfo metaInfo; + private java.nio.ByteBuffer buff; + public sendFile_call(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback 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.metaInfo = metaInfo; + this.buff = buff; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); + sendFile_args args = new sendFile_args(); + args.setMetaInfo(metaInfo); + args.setBuff(buff); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_sendFile(); + } + } + + @Override + public void pipeTransfer(TPipeTransferReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + pipeTransfer_call method_call = new pipeTransfer_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class pipeTransfer_call extends org.apache.thrift.async.TAsyncMethodCall { + private TPipeTransferReq req; + public pipeTransfer_call(TPipeTransferReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pipeTransfer", org.apache.thrift.protocol.TMessageType.CALL, 0)); + pipeTransfer_args args = new pipeTransfer_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TPipeTransferResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_pipeTransfer(); + } + } + + @Override + public void pipeSubscribe(TPipeSubscribeReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + pipeSubscribe_call method_call = new pipeSubscribe_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class pipeSubscribe_call extends org.apache.thrift.async.TAsyncMethodCall { + private TPipeSubscribeReq req; + public pipeSubscribe_call(TPipeSubscribeReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pipeSubscribe", org.apache.thrift.protocol.TMessageType.CALL, 0)); + pipeSubscribe_args args = new pipeSubscribe_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TPipeSubscribeResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_pipeSubscribe(); + } + } + + @Override + public void getBackupConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getBackupConfiguration_call method_call = new getBackupConfiguration_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getBackupConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall { + public getBackupConfiguration_call(org.apache.thrift.async.AsyncMethodCallback 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); + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBackupConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getBackupConfiguration_args args = new getBackupConfiguration_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSBackupConfigurationResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getBackupConfiguration(); + } + } + + @Override + public void fetchAllConnectionsInfo(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + fetchAllConnectionsInfo_call method_call = new fetchAllConnectionsInfo_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class fetchAllConnectionsInfo_call extends org.apache.thrift.async.TAsyncMethodCall { + public fetchAllConnectionsInfo_call(org.apache.thrift.async.AsyncMethodCallback 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); + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchAllConnectionsInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); + fetchAllConnectionsInfo_args args = new fetchAllConnectionsInfo_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public TSConnectionInfoResp getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_fetchAllConnectionsInfo(); + } + } + + @Override + public void testConnectionEmptyRPC(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + testConnectionEmptyRPC_call method_call = new testConnectionEmptyRPC_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class testConnectionEmptyRPC_call extends org.apache.thrift.async.TAsyncMethodCall { + public testConnectionEmptyRPC_call(org.apache.thrift.async.AsyncMethodCallback 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); + } + + @Override + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testConnectionEmptyRPC", org.apache.thrift.protocol.TMessageType.CALL, 0)); + testConnectionEmptyRPC_args args = new testConnectionEmptyRPC_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + @Override + public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_testConnectionEmptyRPC(); + } + } + + } + + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { + private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); + public Processor(I iface) { + super(iface, getProcessMap(new java.util.HashMap>())); + } + + protected Processor(I iface, java.util.Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static java.util.Map> getProcessMap(java.util.Map> processMap) { + processMap.put("executeQueryStatementV2", new executeQueryStatementV2()); + processMap.put("executeUpdateStatementV2", new executeUpdateStatementV2()); + processMap.put("executeStatementV2", new executeStatementV2()); + processMap.put("executeRawDataQueryV2", new executeRawDataQueryV2()); + processMap.put("executeLastDataQueryV2", new executeLastDataQueryV2()); + processMap.put("executeFastLastDataQueryForOneDeviceV2", new executeFastLastDataQueryForOneDeviceV2()); + processMap.put("executeAggregationQueryV2", new executeAggregationQueryV2()); + processMap.put("executeGroupByQueryIntervalQuery", new executeGroupByQueryIntervalQuery()); + processMap.put("fetchResultsV2", new fetchResultsV2()); + processMap.put("openSession", new openSession()); + processMap.put("closeSession", new closeSession()); + processMap.put("executeStatement", new executeStatement()); + processMap.put("executeBatchStatement", new executeBatchStatement()); + processMap.put("executeQueryStatement", new executeQueryStatement()); + processMap.put("executeUpdateStatement", new executeUpdateStatement()); + processMap.put("fetchResults", new fetchResults()); + processMap.put("fetchMetadata", new fetchMetadata()); + processMap.put("cancelOperation", new cancelOperation()); + processMap.put("closeOperation", new closeOperation()); + processMap.put("getTimeZone", new getTimeZone()); + processMap.put("setTimeZone", new setTimeZone()); + processMap.put("getProperties", new getProperties()); + processMap.put("setStorageGroup", new setStorageGroup()); + processMap.put("createTimeseries", new createTimeseries()); + processMap.put("createAlignedTimeseries", new createAlignedTimeseries()); + processMap.put("createMultiTimeseries", new createMultiTimeseries()); + processMap.put("deleteTimeseries", new deleteTimeseries()); + processMap.put("deleteStorageGroups", new deleteStorageGroups()); + processMap.put("insertRecord", new insertRecord()); + processMap.put("insertStringRecord", new insertStringRecord()); + processMap.put("insertTablet", new insertTablet()); + processMap.put("insertTablets", new insertTablets()); + processMap.put("insertRecords", new insertRecords()); + processMap.put("insertRecordsOfOneDevice", new insertRecordsOfOneDevice()); + processMap.put("insertStringRecordsOfOneDevice", new insertStringRecordsOfOneDevice()); + processMap.put("insertStringRecords", new insertStringRecords()); + processMap.put("testInsertTablet", new testInsertTablet()); + processMap.put("testInsertTablets", new testInsertTablets()); + processMap.put("testInsertRecord", new testInsertRecord()); + processMap.put("testInsertStringRecord", new testInsertStringRecord()); + processMap.put("testInsertRecords", new testInsertRecords()); + processMap.put("testInsertRecordsOfOneDevice", new testInsertRecordsOfOneDevice()); + processMap.put("testInsertStringRecords", new testInsertStringRecords()); + processMap.put("deleteData", new deleteData()); + processMap.put("executeRawDataQuery", new executeRawDataQuery()); + processMap.put("executeLastDataQuery", new executeLastDataQuery()); + processMap.put("executeAggregationQuery", new executeAggregationQuery()); + processMap.put("requestStatementId", new requestStatementId()); + processMap.put("createSchemaTemplate", new createSchemaTemplate()); + processMap.put("appendSchemaTemplate", new appendSchemaTemplate()); + processMap.put("pruneSchemaTemplate", new pruneSchemaTemplate()); + processMap.put("querySchemaTemplate", new querySchemaTemplate()); + processMap.put("showConfigurationTemplate", new showConfigurationTemplate()); + processMap.put("showConfiguration", new showConfiguration()); + processMap.put("setSchemaTemplate", new setSchemaTemplate()); + processMap.put("unsetSchemaTemplate", new unsetSchemaTemplate()); + processMap.put("dropSchemaTemplate", new dropSchemaTemplate()); + processMap.put("createTimeseriesUsingSchemaTemplate", new createTimeseriesUsingSchemaTemplate()); + processMap.put("handshake", new handshake()); + processMap.put("sendPipeData", new sendPipeData()); + processMap.put("sendFile", new sendFile()); + processMap.put("pipeTransfer", new pipeTransfer()); + processMap.put("pipeSubscribe", new pipeSubscribe()); + processMap.put("getBackupConfiguration", new getBackupConfiguration()); + processMap.put("fetchAllConnectionsInfo", new fetchAllConnectionsInfo()); + processMap.put("testConnectionEmptyRPC", new testConnectionEmptyRPC()); + return processMap; + } + + public static class executeQueryStatementV2 extends org.apache.thrift.ProcessFunction { + public executeQueryStatementV2() { + super("executeQueryStatementV2"); + } + + @Override + public executeQueryStatementV2_args getEmptyArgsInstance() { + return new executeQueryStatementV2_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeQueryStatementV2_result getResult(I iface, executeQueryStatementV2_args args) throws org.apache.thrift.TException { + executeQueryStatementV2_result result = new executeQueryStatementV2_result(); + result.success = iface.executeQueryStatementV2(args.req); + return result; + } + } + + public static class executeUpdateStatementV2 extends org.apache.thrift.ProcessFunction { + public executeUpdateStatementV2() { + super("executeUpdateStatementV2"); + } + + @Override + public executeUpdateStatementV2_args getEmptyArgsInstance() { + return new executeUpdateStatementV2_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeUpdateStatementV2_result getResult(I iface, executeUpdateStatementV2_args args) throws org.apache.thrift.TException { + executeUpdateStatementV2_result result = new executeUpdateStatementV2_result(); + result.success = iface.executeUpdateStatementV2(args.req); + return result; + } + } + + public static class executeStatementV2 extends org.apache.thrift.ProcessFunction { + public executeStatementV2() { + super("executeStatementV2"); + } + + @Override + public executeStatementV2_args getEmptyArgsInstance() { + return new executeStatementV2_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeStatementV2_result getResult(I iface, executeStatementV2_args args) throws org.apache.thrift.TException { + executeStatementV2_result result = new executeStatementV2_result(); + result.success = iface.executeStatementV2(args.req); + return result; + } + } + + public static class executeRawDataQueryV2 extends org.apache.thrift.ProcessFunction { + public executeRawDataQueryV2() { + super("executeRawDataQueryV2"); + } + + @Override + public executeRawDataQueryV2_args getEmptyArgsInstance() { + return new executeRawDataQueryV2_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeRawDataQueryV2_result getResult(I iface, executeRawDataQueryV2_args args) throws org.apache.thrift.TException { + executeRawDataQueryV2_result result = new executeRawDataQueryV2_result(); + result.success = iface.executeRawDataQueryV2(args.req); + return result; + } + } + + public static class executeLastDataQueryV2 extends org.apache.thrift.ProcessFunction { + public executeLastDataQueryV2() { + super("executeLastDataQueryV2"); + } + + @Override + public executeLastDataQueryV2_args getEmptyArgsInstance() { + return new executeLastDataQueryV2_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeLastDataQueryV2_result getResult(I iface, executeLastDataQueryV2_args args) throws org.apache.thrift.TException { + executeLastDataQueryV2_result result = new executeLastDataQueryV2_result(); + result.success = iface.executeLastDataQueryV2(args.req); + return result; + } + } + + public static class executeFastLastDataQueryForOneDeviceV2 extends org.apache.thrift.ProcessFunction { + public executeFastLastDataQueryForOneDeviceV2() { + super("executeFastLastDataQueryForOneDeviceV2"); + } + + @Override + public executeFastLastDataQueryForOneDeviceV2_args getEmptyArgsInstance() { + return new executeFastLastDataQueryForOneDeviceV2_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeFastLastDataQueryForOneDeviceV2_result getResult(I iface, executeFastLastDataQueryForOneDeviceV2_args args) throws org.apache.thrift.TException { + executeFastLastDataQueryForOneDeviceV2_result result = new executeFastLastDataQueryForOneDeviceV2_result(); + result.success = iface.executeFastLastDataQueryForOneDeviceV2(args.req); + return result; + } + } + + public static class executeAggregationQueryV2 extends org.apache.thrift.ProcessFunction { + public executeAggregationQueryV2() { + super("executeAggregationQueryV2"); + } + + @Override + public executeAggregationQueryV2_args getEmptyArgsInstance() { + return new executeAggregationQueryV2_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeAggregationQueryV2_result getResult(I iface, executeAggregationQueryV2_args args) throws org.apache.thrift.TException { + executeAggregationQueryV2_result result = new executeAggregationQueryV2_result(); + result.success = iface.executeAggregationQueryV2(args.req); + return result; + } + } + + public static class executeGroupByQueryIntervalQuery extends org.apache.thrift.ProcessFunction { + public executeGroupByQueryIntervalQuery() { + super("executeGroupByQueryIntervalQuery"); + } + + @Override + public executeGroupByQueryIntervalQuery_args getEmptyArgsInstance() { + return new executeGroupByQueryIntervalQuery_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeGroupByQueryIntervalQuery_result getResult(I iface, executeGroupByQueryIntervalQuery_args args) throws org.apache.thrift.TException { + executeGroupByQueryIntervalQuery_result result = new executeGroupByQueryIntervalQuery_result(); + result.success = iface.executeGroupByQueryIntervalQuery(args.req); + return result; + } + } + + public static class fetchResultsV2 extends org.apache.thrift.ProcessFunction { + public fetchResultsV2() { + super("fetchResultsV2"); + } + + @Override + public fetchResultsV2_args getEmptyArgsInstance() { + return new fetchResultsV2_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public fetchResultsV2_result getResult(I iface, fetchResultsV2_args args) throws org.apache.thrift.TException { + fetchResultsV2_result result = new fetchResultsV2_result(); + result.success = iface.fetchResultsV2(args.req); + return result; + } + } + + public static class openSession extends org.apache.thrift.ProcessFunction { + public openSession() { + super("openSession"); + } + + @Override + public openSession_args getEmptyArgsInstance() { + return new openSession_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public openSession_result getResult(I iface, openSession_args args) throws org.apache.thrift.TException { + openSession_result result = new openSession_result(); + result.success = iface.openSession(args.req); + return result; + } + } + + public static class closeSession extends org.apache.thrift.ProcessFunction { + public closeSession() { + super("closeSession"); + } + + @Override + public closeSession_args getEmptyArgsInstance() { + return new closeSession_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public closeSession_result getResult(I iface, closeSession_args args) throws org.apache.thrift.TException { + closeSession_result result = new closeSession_result(); + result.success = iface.closeSession(args.req); + return result; + } + } + + public static class executeStatement extends org.apache.thrift.ProcessFunction { + public executeStatement() { + super("executeStatement"); + } + + @Override + public executeStatement_args getEmptyArgsInstance() { + return new executeStatement_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeStatement_result getResult(I iface, executeStatement_args args) throws org.apache.thrift.TException { + executeStatement_result result = new executeStatement_result(); + result.success = iface.executeStatement(args.req); + return result; + } + } + + public static class executeBatchStatement extends org.apache.thrift.ProcessFunction { + public executeBatchStatement() { + super("executeBatchStatement"); + } + + @Override + public executeBatchStatement_args getEmptyArgsInstance() { + return new executeBatchStatement_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeBatchStatement_result getResult(I iface, executeBatchStatement_args args) throws org.apache.thrift.TException { + executeBatchStatement_result result = new executeBatchStatement_result(); + result.success = iface.executeBatchStatement(args.req); + return result; + } + } + + public static class executeQueryStatement extends org.apache.thrift.ProcessFunction { + public executeQueryStatement() { + super("executeQueryStatement"); + } + + @Override + public executeQueryStatement_args getEmptyArgsInstance() { + return new executeQueryStatement_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeQueryStatement_result getResult(I iface, executeQueryStatement_args args) throws org.apache.thrift.TException { + executeQueryStatement_result result = new executeQueryStatement_result(); + result.success = iface.executeQueryStatement(args.req); + return result; + } + } + + public static class executeUpdateStatement extends org.apache.thrift.ProcessFunction { + public executeUpdateStatement() { + super("executeUpdateStatement"); + } + + @Override + public executeUpdateStatement_args getEmptyArgsInstance() { + return new executeUpdateStatement_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeUpdateStatement_result getResult(I iface, executeUpdateStatement_args args) throws org.apache.thrift.TException { + executeUpdateStatement_result result = new executeUpdateStatement_result(); + result.success = iface.executeUpdateStatement(args.req); + return result; + } + } + + public static class fetchResults extends org.apache.thrift.ProcessFunction { + public fetchResults() { + super("fetchResults"); + } + + @Override + public fetchResults_args getEmptyArgsInstance() { + return new fetchResults_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public fetchResults_result getResult(I iface, fetchResults_args args) throws org.apache.thrift.TException { + fetchResults_result result = new fetchResults_result(); + result.success = iface.fetchResults(args.req); + return result; + } + } + + public static class fetchMetadata extends org.apache.thrift.ProcessFunction { + public fetchMetadata() { + super("fetchMetadata"); + } + + @Override + public fetchMetadata_args getEmptyArgsInstance() { + return new fetchMetadata_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public fetchMetadata_result getResult(I iface, fetchMetadata_args args) throws org.apache.thrift.TException { + fetchMetadata_result result = new fetchMetadata_result(); + result.success = iface.fetchMetadata(args.req); + return result; + } + } + + public static class cancelOperation extends org.apache.thrift.ProcessFunction { + public cancelOperation() { + super("cancelOperation"); + } + + @Override + public cancelOperation_args getEmptyArgsInstance() { + return new cancelOperation_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public cancelOperation_result getResult(I iface, cancelOperation_args args) throws org.apache.thrift.TException { + cancelOperation_result result = new cancelOperation_result(); + result.success = iface.cancelOperation(args.req); + return result; + } + } + + public static class closeOperation extends org.apache.thrift.ProcessFunction { + public closeOperation() { + super("closeOperation"); + } + + @Override + public closeOperation_args getEmptyArgsInstance() { + return new closeOperation_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public closeOperation_result getResult(I iface, closeOperation_args args) throws org.apache.thrift.TException { + closeOperation_result result = new closeOperation_result(); + result.success = iface.closeOperation(args.req); + return result; + } + } + + public static class getTimeZone extends org.apache.thrift.ProcessFunction { + public getTimeZone() { + super("getTimeZone"); + } + + @Override + public getTimeZone_args getEmptyArgsInstance() { + return new getTimeZone_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public getTimeZone_result getResult(I iface, getTimeZone_args args) throws org.apache.thrift.TException { + getTimeZone_result result = new getTimeZone_result(); + result.success = iface.getTimeZone(args.sessionId); + return result; + } + } + + public static class setTimeZone extends org.apache.thrift.ProcessFunction { + public setTimeZone() { + super("setTimeZone"); + } + + @Override + public setTimeZone_args getEmptyArgsInstance() { + return new setTimeZone_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public setTimeZone_result getResult(I iface, setTimeZone_args args) throws org.apache.thrift.TException { + setTimeZone_result result = new setTimeZone_result(); + result.success = iface.setTimeZone(args.req); + return result; + } + } + + public static class getProperties extends org.apache.thrift.ProcessFunction { + public getProperties() { + super("getProperties"); + } + + @Override + public getProperties_args getEmptyArgsInstance() { + return new getProperties_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public getProperties_result getResult(I iface, getProperties_args args) throws org.apache.thrift.TException { + getProperties_result result = new getProperties_result(); + result.success = iface.getProperties(); + return result; + } + } + + public static class setStorageGroup extends org.apache.thrift.ProcessFunction { + public setStorageGroup() { + super("setStorageGroup"); + } + + @Override + public setStorageGroup_args getEmptyArgsInstance() { + return new setStorageGroup_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public setStorageGroup_result getResult(I iface, setStorageGroup_args args) throws org.apache.thrift.TException { + setStorageGroup_result result = new setStorageGroup_result(); + result.success = iface.setStorageGroup(args.sessionId, args.storageGroup); + return result; + } + } + + public static class createTimeseries extends org.apache.thrift.ProcessFunction { + public createTimeseries() { + super("createTimeseries"); + } + + @Override + public createTimeseries_args getEmptyArgsInstance() { + return new createTimeseries_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public createTimeseries_result getResult(I iface, createTimeseries_args args) throws org.apache.thrift.TException { + createTimeseries_result result = new createTimeseries_result(); + result.success = iface.createTimeseries(args.req); + return result; + } + } + + public static class createAlignedTimeseries extends org.apache.thrift.ProcessFunction { + public createAlignedTimeseries() { + super("createAlignedTimeseries"); + } + + @Override + public createAlignedTimeseries_args getEmptyArgsInstance() { + return new createAlignedTimeseries_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public createAlignedTimeseries_result getResult(I iface, createAlignedTimeseries_args args) throws org.apache.thrift.TException { + createAlignedTimeseries_result result = new createAlignedTimeseries_result(); + result.success = iface.createAlignedTimeseries(args.req); + return result; + } + } + + public static class createMultiTimeseries extends org.apache.thrift.ProcessFunction { + public createMultiTimeseries() { + super("createMultiTimeseries"); + } + + @Override + public createMultiTimeseries_args getEmptyArgsInstance() { + return new createMultiTimeseries_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public createMultiTimeseries_result getResult(I iface, createMultiTimeseries_args args) throws org.apache.thrift.TException { + createMultiTimeseries_result result = new createMultiTimeseries_result(); + result.success = iface.createMultiTimeseries(args.req); + return result; + } + } + + public static class deleteTimeseries extends org.apache.thrift.ProcessFunction { + public deleteTimeseries() { + super("deleteTimeseries"); + } + + @Override + public deleteTimeseries_args getEmptyArgsInstance() { + return new deleteTimeseries_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public deleteTimeseries_result getResult(I iface, deleteTimeseries_args args) throws org.apache.thrift.TException { + deleteTimeseries_result result = new deleteTimeseries_result(); + result.success = iface.deleteTimeseries(args.sessionId, args.path); + return result; + } + } + + public static class deleteStorageGroups extends org.apache.thrift.ProcessFunction { + public deleteStorageGroups() { + super("deleteStorageGroups"); + } + + @Override + public deleteStorageGroups_args getEmptyArgsInstance() { + return new deleteStorageGroups_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public deleteStorageGroups_result getResult(I iface, deleteStorageGroups_args args) throws org.apache.thrift.TException { + deleteStorageGroups_result result = new deleteStorageGroups_result(); + result.success = iface.deleteStorageGroups(args.sessionId, args.storageGroup); + return result; + } + } + + public static class insertRecord extends org.apache.thrift.ProcessFunction { + public insertRecord() { + super("insertRecord"); + } + + @Override + public insertRecord_args getEmptyArgsInstance() { + return new insertRecord_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public insertRecord_result getResult(I iface, insertRecord_args args) throws org.apache.thrift.TException { + insertRecord_result result = new insertRecord_result(); + result.success = iface.insertRecord(args.req); + return result; + } + } + + public static class insertStringRecord extends org.apache.thrift.ProcessFunction { + public insertStringRecord() { + super("insertStringRecord"); + } + + @Override + public insertStringRecord_args getEmptyArgsInstance() { + return new insertStringRecord_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public insertStringRecord_result getResult(I iface, insertStringRecord_args args) throws org.apache.thrift.TException { + insertStringRecord_result result = new insertStringRecord_result(); + result.success = iface.insertStringRecord(args.req); + return result; + } + } + + public static class insertTablet extends org.apache.thrift.ProcessFunction { + public insertTablet() { + super("insertTablet"); + } + + @Override + public insertTablet_args getEmptyArgsInstance() { + return new insertTablet_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public insertTablet_result getResult(I iface, insertTablet_args args) throws org.apache.thrift.TException { + insertTablet_result result = new insertTablet_result(); + result.success = iface.insertTablet(args.req); + return result; + } + } + + public static class insertTablets extends org.apache.thrift.ProcessFunction { + public insertTablets() { + super("insertTablets"); + } + + @Override + public insertTablets_args getEmptyArgsInstance() { + return new insertTablets_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public insertTablets_result getResult(I iface, insertTablets_args args) throws org.apache.thrift.TException { + insertTablets_result result = new insertTablets_result(); + result.success = iface.insertTablets(args.req); + return result; + } + } + + public static class insertRecords extends org.apache.thrift.ProcessFunction { + public insertRecords() { + super("insertRecords"); + } + + @Override + public insertRecords_args getEmptyArgsInstance() { + return new insertRecords_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public insertRecords_result getResult(I iface, insertRecords_args args) throws org.apache.thrift.TException { + insertRecords_result result = new insertRecords_result(); + result.success = iface.insertRecords(args.req); + return result; + } + } + + public static class insertRecordsOfOneDevice extends org.apache.thrift.ProcessFunction { + public insertRecordsOfOneDevice() { + super("insertRecordsOfOneDevice"); + } + + @Override + public insertRecordsOfOneDevice_args getEmptyArgsInstance() { + return new insertRecordsOfOneDevice_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public insertRecordsOfOneDevice_result getResult(I iface, insertRecordsOfOneDevice_args args) throws org.apache.thrift.TException { + insertRecordsOfOneDevice_result result = new insertRecordsOfOneDevice_result(); + result.success = iface.insertRecordsOfOneDevice(args.req); + return result; + } + } + + public static class insertStringRecordsOfOneDevice extends org.apache.thrift.ProcessFunction { + public insertStringRecordsOfOneDevice() { + super("insertStringRecordsOfOneDevice"); + } + + @Override + public insertStringRecordsOfOneDevice_args getEmptyArgsInstance() { + return new insertStringRecordsOfOneDevice_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public insertStringRecordsOfOneDevice_result getResult(I iface, insertStringRecordsOfOneDevice_args args) throws org.apache.thrift.TException { + insertStringRecordsOfOneDevice_result result = new insertStringRecordsOfOneDevice_result(); + result.success = iface.insertStringRecordsOfOneDevice(args.req); + return result; + } + } + + public static class insertStringRecords extends org.apache.thrift.ProcessFunction { + public insertStringRecords() { + super("insertStringRecords"); + } + + @Override + public insertStringRecords_args getEmptyArgsInstance() { + return new insertStringRecords_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public insertStringRecords_result getResult(I iface, insertStringRecords_args args) throws org.apache.thrift.TException { + insertStringRecords_result result = new insertStringRecords_result(); + result.success = iface.insertStringRecords(args.req); + return result; + } + } + + public static class testInsertTablet extends org.apache.thrift.ProcessFunction { + public testInsertTablet() { + super("testInsertTablet"); + } + + @Override + public testInsertTablet_args getEmptyArgsInstance() { + return new testInsertTablet_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public testInsertTablet_result getResult(I iface, testInsertTablet_args args) throws org.apache.thrift.TException { + testInsertTablet_result result = new testInsertTablet_result(); + result.success = iface.testInsertTablet(args.req); + return result; + } + } + + public static class testInsertTablets extends org.apache.thrift.ProcessFunction { + public testInsertTablets() { + super("testInsertTablets"); + } + + @Override + public testInsertTablets_args getEmptyArgsInstance() { + return new testInsertTablets_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public testInsertTablets_result getResult(I iface, testInsertTablets_args args) throws org.apache.thrift.TException { + testInsertTablets_result result = new testInsertTablets_result(); + result.success = iface.testInsertTablets(args.req); + return result; + } + } + + public static class testInsertRecord extends org.apache.thrift.ProcessFunction { + public testInsertRecord() { + super("testInsertRecord"); + } + + @Override + public testInsertRecord_args getEmptyArgsInstance() { + return new testInsertRecord_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public testInsertRecord_result getResult(I iface, testInsertRecord_args args) throws org.apache.thrift.TException { + testInsertRecord_result result = new testInsertRecord_result(); + result.success = iface.testInsertRecord(args.req); + return result; + } + } + + public static class testInsertStringRecord extends org.apache.thrift.ProcessFunction { + public testInsertStringRecord() { + super("testInsertStringRecord"); + } + + @Override + public testInsertStringRecord_args getEmptyArgsInstance() { + return new testInsertStringRecord_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public testInsertStringRecord_result getResult(I iface, testInsertStringRecord_args args) throws org.apache.thrift.TException { + testInsertStringRecord_result result = new testInsertStringRecord_result(); + result.success = iface.testInsertStringRecord(args.req); + return result; + } + } + + public static class testInsertRecords extends org.apache.thrift.ProcessFunction { + public testInsertRecords() { + super("testInsertRecords"); + } + + @Override + public testInsertRecords_args getEmptyArgsInstance() { + return new testInsertRecords_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public testInsertRecords_result getResult(I iface, testInsertRecords_args args) throws org.apache.thrift.TException { + testInsertRecords_result result = new testInsertRecords_result(); + result.success = iface.testInsertRecords(args.req); + return result; + } + } + + public static class testInsertRecordsOfOneDevice extends org.apache.thrift.ProcessFunction { + public testInsertRecordsOfOneDevice() { + super("testInsertRecordsOfOneDevice"); + } + + @Override + public testInsertRecordsOfOneDevice_args getEmptyArgsInstance() { + return new testInsertRecordsOfOneDevice_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public testInsertRecordsOfOneDevice_result getResult(I iface, testInsertRecordsOfOneDevice_args args) throws org.apache.thrift.TException { + testInsertRecordsOfOneDevice_result result = new testInsertRecordsOfOneDevice_result(); + result.success = iface.testInsertRecordsOfOneDevice(args.req); + return result; + } + } + + public static class testInsertStringRecords extends org.apache.thrift.ProcessFunction { + public testInsertStringRecords() { + super("testInsertStringRecords"); + } + + @Override + public testInsertStringRecords_args getEmptyArgsInstance() { + return new testInsertStringRecords_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public testInsertStringRecords_result getResult(I iface, testInsertStringRecords_args args) throws org.apache.thrift.TException { + testInsertStringRecords_result result = new testInsertStringRecords_result(); + result.success = iface.testInsertStringRecords(args.req); + return result; + } + } + + public static class deleteData extends org.apache.thrift.ProcessFunction { + public deleteData() { + super("deleteData"); + } + + @Override + public deleteData_args getEmptyArgsInstance() { + return new deleteData_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public deleteData_result getResult(I iface, deleteData_args args) throws org.apache.thrift.TException { + deleteData_result result = new deleteData_result(); + result.success = iface.deleteData(args.req); + return result; + } + } + + public static class executeRawDataQuery extends org.apache.thrift.ProcessFunction { + public executeRawDataQuery() { + super("executeRawDataQuery"); + } + + @Override + public executeRawDataQuery_args getEmptyArgsInstance() { + return new executeRawDataQuery_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeRawDataQuery_result getResult(I iface, executeRawDataQuery_args args) throws org.apache.thrift.TException { + executeRawDataQuery_result result = new executeRawDataQuery_result(); + result.success = iface.executeRawDataQuery(args.req); + return result; + } + } + + public static class executeLastDataQuery extends org.apache.thrift.ProcessFunction { + public executeLastDataQuery() { + super("executeLastDataQuery"); + } + + @Override + public executeLastDataQuery_args getEmptyArgsInstance() { + return new executeLastDataQuery_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeLastDataQuery_result getResult(I iface, executeLastDataQuery_args args) throws org.apache.thrift.TException { + executeLastDataQuery_result result = new executeLastDataQuery_result(); + result.success = iface.executeLastDataQuery(args.req); + return result; + } + } + + public static class executeAggregationQuery extends org.apache.thrift.ProcessFunction { + public executeAggregationQuery() { + super("executeAggregationQuery"); + } + + @Override + public executeAggregationQuery_args getEmptyArgsInstance() { + return new executeAggregationQuery_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public executeAggregationQuery_result getResult(I iface, executeAggregationQuery_args args) throws org.apache.thrift.TException { + executeAggregationQuery_result result = new executeAggregationQuery_result(); + result.success = iface.executeAggregationQuery(args.req); + return result; + } + } + + public static class requestStatementId extends org.apache.thrift.ProcessFunction { + public requestStatementId() { + super("requestStatementId"); + } + + @Override + public requestStatementId_args getEmptyArgsInstance() { + return new requestStatementId_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public requestStatementId_result getResult(I iface, requestStatementId_args args) throws org.apache.thrift.TException { + requestStatementId_result result = new requestStatementId_result(); + result.success = iface.requestStatementId(args.sessionId); + result.setSuccessIsSet(true); + return result; + } + } + + public static class createSchemaTemplate extends org.apache.thrift.ProcessFunction { + public createSchemaTemplate() { + super("createSchemaTemplate"); + } + + @Override + public createSchemaTemplate_args getEmptyArgsInstance() { + return new createSchemaTemplate_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public createSchemaTemplate_result getResult(I iface, createSchemaTemplate_args args) throws org.apache.thrift.TException { + createSchemaTemplate_result result = new createSchemaTemplate_result(); + result.success = iface.createSchemaTemplate(args.req); + return result; + } + } + + public static class appendSchemaTemplate extends org.apache.thrift.ProcessFunction { + public appendSchemaTemplate() { + super("appendSchemaTemplate"); + } + + @Override + public appendSchemaTemplate_args getEmptyArgsInstance() { + return new appendSchemaTemplate_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public appendSchemaTemplate_result getResult(I iface, appendSchemaTemplate_args args) throws org.apache.thrift.TException { + appendSchemaTemplate_result result = new appendSchemaTemplate_result(); + result.success = iface.appendSchemaTemplate(args.req); + return result; + } + } + + public static class pruneSchemaTemplate extends org.apache.thrift.ProcessFunction { + public pruneSchemaTemplate() { + super("pruneSchemaTemplate"); + } + + @Override + public pruneSchemaTemplate_args getEmptyArgsInstance() { + return new pruneSchemaTemplate_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public pruneSchemaTemplate_result getResult(I iface, pruneSchemaTemplate_args args) throws org.apache.thrift.TException { + pruneSchemaTemplate_result result = new pruneSchemaTemplate_result(); + result.success = iface.pruneSchemaTemplate(args.req); + return result; + } + } + + public static class querySchemaTemplate extends org.apache.thrift.ProcessFunction { + public querySchemaTemplate() { + super("querySchemaTemplate"); + } + + @Override + public querySchemaTemplate_args getEmptyArgsInstance() { + return new querySchemaTemplate_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public querySchemaTemplate_result getResult(I iface, querySchemaTemplate_args args) throws org.apache.thrift.TException { + querySchemaTemplate_result result = new querySchemaTemplate_result(); + result.success = iface.querySchemaTemplate(args.req); + return result; + } + } + + public static class showConfigurationTemplate extends org.apache.thrift.ProcessFunction { + public showConfigurationTemplate() { + super("showConfigurationTemplate"); + } + + @Override + public showConfigurationTemplate_args getEmptyArgsInstance() { + return new showConfigurationTemplate_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public showConfigurationTemplate_result getResult(I iface, showConfigurationTemplate_args args) throws org.apache.thrift.TException { + showConfigurationTemplate_result result = new showConfigurationTemplate_result(); + result.success = iface.showConfigurationTemplate(); + return result; + } + } + + public static class showConfiguration extends org.apache.thrift.ProcessFunction { + public showConfiguration() { + super("showConfiguration"); + } + + @Override + public showConfiguration_args getEmptyArgsInstance() { + return new showConfiguration_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public showConfiguration_result getResult(I iface, showConfiguration_args args) throws org.apache.thrift.TException { + showConfiguration_result result = new showConfiguration_result(); + result.success = iface.showConfiguration(args.nodeId); + return result; + } + } + + public static class setSchemaTemplate extends org.apache.thrift.ProcessFunction { + public setSchemaTemplate() { + super("setSchemaTemplate"); + } + + @Override + public setSchemaTemplate_args getEmptyArgsInstance() { + return new setSchemaTemplate_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public setSchemaTemplate_result getResult(I iface, setSchemaTemplate_args args) throws org.apache.thrift.TException { + setSchemaTemplate_result result = new setSchemaTemplate_result(); + result.success = iface.setSchemaTemplate(args.req); + return result; + } + } + + public static class unsetSchemaTemplate extends org.apache.thrift.ProcessFunction { + public unsetSchemaTemplate() { + super("unsetSchemaTemplate"); + } + + @Override + public unsetSchemaTemplate_args getEmptyArgsInstance() { + return new unsetSchemaTemplate_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public unsetSchemaTemplate_result getResult(I iface, unsetSchemaTemplate_args args) throws org.apache.thrift.TException { + unsetSchemaTemplate_result result = new unsetSchemaTemplate_result(); + result.success = iface.unsetSchemaTemplate(args.req); + return result; + } + } + + public static class dropSchemaTemplate extends org.apache.thrift.ProcessFunction { + public dropSchemaTemplate() { + super("dropSchemaTemplate"); + } + + @Override + public dropSchemaTemplate_args getEmptyArgsInstance() { + return new dropSchemaTemplate_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public dropSchemaTemplate_result getResult(I iface, dropSchemaTemplate_args args) throws org.apache.thrift.TException { + dropSchemaTemplate_result result = new dropSchemaTemplate_result(); + result.success = iface.dropSchemaTemplate(args.req); + return result; + } + } + + public static class createTimeseriesUsingSchemaTemplate extends org.apache.thrift.ProcessFunction { + public createTimeseriesUsingSchemaTemplate() { + super("createTimeseriesUsingSchemaTemplate"); + } + + @Override + public createTimeseriesUsingSchemaTemplate_args getEmptyArgsInstance() { + return new createTimeseriesUsingSchemaTemplate_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public createTimeseriesUsingSchemaTemplate_result getResult(I iface, createTimeseriesUsingSchemaTemplate_args args) throws org.apache.thrift.TException { + createTimeseriesUsingSchemaTemplate_result result = new createTimeseriesUsingSchemaTemplate_result(); + result.success = iface.createTimeseriesUsingSchemaTemplate(args.req); + return result; + } + } + + public static class handshake extends org.apache.thrift.ProcessFunction { + public handshake() { + super("handshake"); + } + + @Override + public handshake_args getEmptyArgsInstance() { + return new handshake_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public handshake_result getResult(I iface, handshake_args args) throws org.apache.thrift.TException { + handshake_result result = new handshake_result(); + result.success = iface.handshake(args.info); + return result; + } + } + + public static class sendPipeData extends org.apache.thrift.ProcessFunction { + public sendPipeData() { + super("sendPipeData"); + } + + @Override + public sendPipeData_args getEmptyArgsInstance() { + return new sendPipeData_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public sendPipeData_result getResult(I iface, sendPipeData_args args) throws org.apache.thrift.TException { + sendPipeData_result result = new sendPipeData_result(); + result.success = iface.sendPipeData(args.buff); + return result; + } + } + + public static class sendFile extends org.apache.thrift.ProcessFunction { + public sendFile() { + super("sendFile"); + } + + @Override + public sendFile_args getEmptyArgsInstance() { + return new sendFile_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public sendFile_result getResult(I iface, sendFile_args args) throws org.apache.thrift.TException { + sendFile_result result = new sendFile_result(); + result.success = iface.sendFile(args.metaInfo, args.buff); + return result; + } + } + + public static class pipeTransfer extends org.apache.thrift.ProcessFunction { + public pipeTransfer() { + super("pipeTransfer"); + } + + @Override + public pipeTransfer_args getEmptyArgsInstance() { + return new pipeTransfer_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public pipeTransfer_result getResult(I iface, pipeTransfer_args args) throws org.apache.thrift.TException { + pipeTransfer_result result = new pipeTransfer_result(); + result.success = iface.pipeTransfer(args.req); + return result; + } + } + + public static class pipeSubscribe extends org.apache.thrift.ProcessFunction { + public pipeSubscribe() { + super("pipeSubscribe"); + } + + @Override + public pipeSubscribe_args getEmptyArgsInstance() { + return new pipeSubscribe_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public pipeSubscribe_result getResult(I iface, pipeSubscribe_args args) throws org.apache.thrift.TException { + pipeSubscribe_result result = new pipeSubscribe_result(); + result.success = iface.pipeSubscribe(args.req); + return result; + } + } + + public static class getBackupConfiguration extends org.apache.thrift.ProcessFunction { + public getBackupConfiguration() { + super("getBackupConfiguration"); + } + + @Override + public getBackupConfiguration_args getEmptyArgsInstance() { + return new getBackupConfiguration_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public getBackupConfiguration_result getResult(I iface, getBackupConfiguration_args args) throws org.apache.thrift.TException { + getBackupConfiguration_result result = new getBackupConfiguration_result(); + result.success = iface.getBackupConfiguration(); + return result; + } + } + + public static class fetchAllConnectionsInfo extends org.apache.thrift.ProcessFunction { + public fetchAllConnectionsInfo() { + super("fetchAllConnectionsInfo"); + } + + @Override + public fetchAllConnectionsInfo_args getEmptyArgsInstance() { + return new fetchAllConnectionsInfo_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public fetchAllConnectionsInfo_result getResult(I iface, fetchAllConnectionsInfo_args args) throws org.apache.thrift.TException { + fetchAllConnectionsInfo_result result = new fetchAllConnectionsInfo_result(); + result.success = iface.fetchAllConnectionsInfo(); + return result; + } + } + + public static class testConnectionEmptyRPC extends org.apache.thrift.ProcessFunction { + public testConnectionEmptyRPC() { + super("testConnectionEmptyRPC"); + } + + @Override + public testConnectionEmptyRPC_args getEmptyArgsInstance() { + return new testConnectionEmptyRPC_args(); + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override + public testConnectionEmptyRPC_result getResult(I iface, testConnectionEmptyRPC_args args) throws org.apache.thrift.TException { + testConnectionEmptyRPC_result result = new testConnectionEmptyRPC_result(); + result.success = iface.testConnectionEmptyRPC(); + return result; + } + } + + } + + public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { + private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new java.util.HashMap>())); + } + + protected AsyncProcessor(I iface, java.util.Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static java.util.Map> getProcessMap(java.util.Map> processMap) { + processMap.put("executeQueryStatementV2", new executeQueryStatementV2()); + processMap.put("executeUpdateStatementV2", new executeUpdateStatementV2()); + processMap.put("executeStatementV2", new executeStatementV2()); + processMap.put("executeRawDataQueryV2", new executeRawDataQueryV2()); + processMap.put("executeLastDataQueryV2", new executeLastDataQueryV2()); + processMap.put("executeFastLastDataQueryForOneDeviceV2", new executeFastLastDataQueryForOneDeviceV2()); + processMap.put("executeAggregationQueryV2", new executeAggregationQueryV2()); + processMap.put("executeGroupByQueryIntervalQuery", new executeGroupByQueryIntervalQuery()); + processMap.put("fetchResultsV2", new fetchResultsV2()); + processMap.put("openSession", new openSession()); + processMap.put("closeSession", new closeSession()); + processMap.put("executeStatement", new executeStatement()); + processMap.put("executeBatchStatement", new executeBatchStatement()); + processMap.put("executeQueryStatement", new executeQueryStatement()); + processMap.put("executeUpdateStatement", new executeUpdateStatement()); + processMap.put("fetchResults", new fetchResults()); + processMap.put("fetchMetadata", new fetchMetadata()); + processMap.put("cancelOperation", new cancelOperation()); + processMap.put("closeOperation", new closeOperation()); + processMap.put("getTimeZone", new getTimeZone()); + processMap.put("setTimeZone", new setTimeZone()); + processMap.put("getProperties", new getProperties()); + processMap.put("setStorageGroup", new setStorageGroup()); + processMap.put("createTimeseries", new createTimeseries()); + processMap.put("createAlignedTimeseries", new createAlignedTimeseries()); + processMap.put("createMultiTimeseries", new createMultiTimeseries()); + processMap.put("deleteTimeseries", new deleteTimeseries()); + processMap.put("deleteStorageGroups", new deleteStorageGroups()); + processMap.put("insertRecord", new insertRecord()); + processMap.put("insertStringRecord", new insertStringRecord()); + processMap.put("insertTablet", new insertTablet()); + processMap.put("insertTablets", new insertTablets()); + processMap.put("insertRecords", new insertRecords()); + processMap.put("insertRecordsOfOneDevice", new insertRecordsOfOneDevice()); + processMap.put("insertStringRecordsOfOneDevice", new insertStringRecordsOfOneDevice()); + processMap.put("insertStringRecords", new insertStringRecords()); + processMap.put("testInsertTablet", new testInsertTablet()); + processMap.put("testInsertTablets", new testInsertTablets()); + processMap.put("testInsertRecord", new testInsertRecord()); + processMap.put("testInsertStringRecord", new testInsertStringRecord()); + processMap.put("testInsertRecords", new testInsertRecords()); + processMap.put("testInsertRecordsOfOneDevice", new testInsertRecordsOfOneDevice()); + processMap.put("testInsertStringRecords", new testInsertStringRecords()); + processMap.put("deleteData", new deleteData()); + processMap.put("executeRawDataQuery", new executeRawDataQuery()); + processMap.put("executeLastDataQuery", new executeLastDataQuery()); + processMap.put("executeAggregationQuery", new executeAggregationQuery()); + processMap.put("requestStatementId", new requestStatementId()); + processMap.put("createSchemaTemplate", new createSchemaTemplate()); + processMap.put("appendSchemaTemplate", new appendSchemaTemplate()); + processMap.put("pruneSchemaTemplate", new pruneSchemaTemplate()); + processMap.put("querySchemaTemplate", new querySchemaTemplate()); + processMap.put("showConfigurationTemplate", new showConfigurationTemplate()); + processMap.put("showConfiguration", new showConfiguration()); + processMap.put("setSchemaTemplate", new setSchemaTemplate()); + processMap.put("unsetSchemaTemplate", new unsetSchemaTemplate()); + processMap.put("dropSchemaTemplate", new dropSchemaTemplate()); + processMap.put("createTimeseriesUsingSchemaTemplate", new createTimeseriesUsingSchemaTemplate()); + processMap.put("handshake", new handshake()); + processMap.put("sendPipeData", new sendPipeData()); + processMap.put("sendFile", new sendFile()); + processMap.put("pipeTransfer", new pipeTransfer()); + processMap.put("pipeSubscribe", new pipeSubscribe()); + processMap.put("getBackupConfiguration", new getBackupConfiguration()); + processMap.put("fetchAllConnectionsInfo", new fetchAllConnectionsInfo()); + processMap.put("testConnectionEmptyRPC", new testConnectionEmptyRPC()); + return processMap; + } + + public static class executeQueryStatementV2 extends org.apache.thrift.AsyncProcessFunction { + public executeQueryStatementV2() { + super("executeQueryStatementV2"); + } + + @Override + public executeQueryStatementV2_args getEmptyArgsInstance() { + return new executeQueryStatementV2_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeQueryStatementV2_result result = new executeQueryStatementV2_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeQueryStatementV2_result result = new executeQueryStatementV2_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeQueryStatementV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeQueryStatementV2(args.req,resultHandler); + } + } + + public static class executeUpdateStatementV2 extends org.apache.thrift.AsyncProcessFunction { + public executeUpdateStatementV2() { + super("executeUpdateStatementV2"); + } + + @Override + public executeUpdateStatementV2_args getEmptyArgsInstance() { + return new executeUpdateStatementV2_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeUpdateStatementV2_result result = new executeUpdateStatementV2_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeUpdateStatementV2_result result = new executeUpdateStatementV2_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeUpdateStatementV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeUpdateStatementV2(args.req,resultHandler); + } + } + + public static class executeStatementV2 extends org.apache.thrift.AsyncProcessFunction { + public executeStatementV2() { + super("executeStatementV2"); + } + + @Override + public executeStatementV2_args getEmptyArgsInstance() { + return new executeStatementV2_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeStatementV2_result result = new executeStatementV2_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeStatementV2_result result = new executeStatementV2_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeStatementV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeStatementV2(args.req,resultHandler); + } + } + + public static class executeRawDataQueryV2 extends org.apache.thrift.AsyncProcessFunction { + public executeRawDataQueryV2() { + super("executeRawDataQueryV2"); + } + + @Override + public executeRawDataQueryV2_args getEmptyArgsInstance() { + return new executeRawDataQueryV2_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeRawDataQueryV2_result result = new executeRawDataQueryV2_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeRawDataQueryV2_result result = new executeRawDataQueryV2_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeRawDataQueryV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeRawDataQueryV2(args.req,resultHandler); + } + } + + public static class executeLastDataQueryV2 extends org.apache.thrift.AsyncProcessFunction { + public executeLastDataQueryV2() { + super("executeLastDataQueryV2"); + } + + @Override + public executeLastDataQueryV2_args getEmptyArgsInstance() { + return new executeLastDataQueryV2_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeLastDataQueryV2_result result = new executeLastDataQueryV2_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeLastDataQueryV2_result result = new executeLastDataQueryV2_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeLastDataQueryV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeLastDataQueryV2(args.req,resultHandler); + } + } + + public static class executeFastLastDataQueryForOneDeviceV2 extends org.apache.thrift.AsyncProcessFunction { + public executeFastLastDataQueryForOneDeviceV2() { + super("executeFastLastDataQueryForOneDeviceV2"); + } + + @Override + public executeFastLastDataQueryForOneDeviceV2_args getEmptyArgsInstance() { + return new executeFastLastDataQueryForOneDeviceV2_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeFastLastDataQueryForOneDeviceV2_result result = new executeFastLastDataQueryForOneDeviceV2_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeFastLastDataQueryForOneDeviceV2_result result = new executeFastLastDataQueryForOneDeviceV2_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeFastLastDataQueryForOneDeviceV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeFastLastDataQueryForOneDeviceV2(args.req,resultHandler); + } + } + + public static class executeAggregationQueryV2 extends org.apache.thrift.AsyncProcessFunction { + public executeAggregationQueryV2() { + super("executeAggregationQueryV2"); + } + + @Override + public executeAggregationQueryV2_args getEmptyArgsInstance() { + return new executeAggregationQueryV2_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeAggregationQueryV2_result result = new executeAggregationQueryV2_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeAggregationQueryV2_result result = new executeAggregationQueryV2_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeAggregationQueryV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeAggregationQueryV2(args.req,resultHandler); + } + } + + public static class executeGroupByQueryIntervalQuery extends org.apache.thrift.AsyncProcessFunction { + public executeGroupByQueryIntervalQuery() { + super("executeGroupByQueryIntervalQuery"); + } + + @Override + public executeGroupByQueryIntervalQuery_args getEmptyArgsInstance() { + return new executeGroupByQueryIntervalQuery_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeGroupByQueryIntervalQuery_result result = new executeGroupByQueryIntervalQuery_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeGroupByQueryIntervalQuery_result result = new executeGroupByQueryIntervalQuery_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeGroupByQueryIntervalQuery_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeGroupByQueryIntervalQuery(args.req,resultHandler); + } + } + + public static class fetchResultsV2 extends org.apache.thrift.AsyncProcessFunction { + public fetchResultsV2() { + super("fetchResultsV2"); + } + + @Override + public fetchResultsV2_args getEmptyArgsInstance() { + return new fetchResultsV2_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSFetchResultsResp o) { + fetchResultsV2_result result = new fetchResultsV2_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + fetchResultsV2_result result = new fetchResultsV2_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, fetchResultsV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.fetchResultsV2(args.req,resultHandler); + } + } + + public static class openSession extends org.apache.thrift.AsyncProcessFunction { + public openSession() { + super("openSession"); + } + + @Override + public openSession_args getEmptyArgsInstance() { + return new openSession_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSOpenSessionResp o) { + openSession_result result = new openSession_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + openSession_result result = new openSession_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, openSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.openSession(args.req,resultHandler); + } + } + + public static class closeSession extends org.apache.thrift.AsyncProcessFunction { + public closeSession() { + super("closeSession"); + } + + @Override + public closeSession_args getEmptyArgsInstance() { + return new closeSession_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + closeSession_result result = new closeSession_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + closeSession_result result = new closeSession_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, closeSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.closeSession(args.req,resultHandler); + } + } + + public static class executeStatement extends org.apache.thrift.AsyncProcessFunction { + public executeStatement() { + super("executeStatement"); + } + + @Override + public executeStatement_args getEmptyArgsInstance() { + return new executeStatement_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeStatement_result result = new executeStatement_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeStatement_result result = new executeStatement_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeStatement(args.req,resultHandler); + } + } + + public static class executeBatchStatement extends org.apache.thrift.AsyncProcessFunction { + public executeBatchStatement() { + super("executeBatchStatement"); + } + + @Override + public executeBatchStatement_args getEmptyArgsInstance() { + return new executeBatchStatement_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + executeBatchStatement_result result = new executeBatchStatement_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeBatchStatement_result result = new executeBatchStatement_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeBatchStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeBatchStatement(args.req,resultHandler); + } + } + + public static class executeQueryStatement extends org.apache.thrift.AsyncProcessFunction { + public executeQueryStatement() { + super("executeQueryStatement"); + } + + @Override + public executeQueryStatement_args getEmptyArgsInstance() { + return new executeQueryStatement_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeQueryStatement_result result = new executeQueryStatement_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeQueryStatement_result result = new executeQueryStatement_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeQueryStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeQueryStatement(args.req,resultHandler); + } + } + + public static class executeUpdateStatement extends org.apache.thrift.AsyncProcessFunction { + public executeUpdateStatement() { + super("executeUpdateStatement"); + } + + @Override + public executeUpdateStatement_args getEmptyArgsInstance() { + return new executeUpdateStatement_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeUpdateStatement_result result = new executeUpdateStatement_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeUpdateStatement_result result = new executeUpdateStatement_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeUpdateStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeUpdateStatement(args.req,resultHandler); + } + } + + public static class fetchResults extends org.apache.thrift.AsyncProcessFunction { + public fetchResults() { + super("fetchResults"); + } + + @Override + public fetchResults_args getEmptyArgsInstance() { + return new fetchResults_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSFetchResultsResp o) { + fetchResults_result result = new fetchResults_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + fetchResults_result result = new fetchResults_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, fetchResults_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.fetchResults(args.req,resultHandler); + } + } + + public static class fetchMetadata extends org.apache.thrift.AsyncProcessFunction { + public fetchMetadata() { + super("fetchMetadata"); + } + + @Override + public fetchMetadata_args getEmptyArgsInstance() { + return new fetchMetadata_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSFetchMetadataResp o) { + fetchMetadata_result result = new fetchMetadata_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + fetchMetadata_result result = new fetchMetadata_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, fetchMetadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.fetchMetadata(args.req,resultHandler); + } + } + + public static class cancelOperation extends org.apache.thrift.AsyncProcessFunction { + public cancelOperation() { + super("cancelOperation"); + } + + @Override + public cancelOperation_args getEmptyArgsInstance() { + return new cancelOperation_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + cancelOperation_result result = new cancelOperation_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + cancelOperation_result result = new cancelOperation_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, cancelOperation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.cancelOperation(args.req,resultHandler); + } + } + + public static class closeOperation extends org.apache.thrift.AsyncProcessFunction { + public closeOperation() { + super("closeOperation"); + } + + @Override + public closeOperation_args getEmptyArgsInstance() { + return new closeOperation_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + closeOperation_result result = new closeOperation_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + closeOperation_result result = new closeOperation_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, closeOperation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.closeOperation(args.req,resultHandler); + } + } + + public static class getTimeZone extends org.apache.thrift.AsyncProcessFunction { + public getTimeZone() { + super("getTimeZone"); + } + + @Override + public getTimeZone_args getEmptyArgsInstance() { + return new getTimeZone_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSGetTimeZoneResp o) { + getTimeZone_result result = new getTimeZone_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + getTimeZone_result result = new getTimeZone_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, getTimeZone_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.getTimeZone(args.sessionId,resultHandler); + } + } + + public static class setTimeZone extends org.apache.thrift.AsyncProcessFunction { + public setTimeZone() { + super("setTimeZone"); + } + + @Override + public setTimeZone_args getEmptyArgsInstance() { + return new setTimeZone_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + setTimeZone_result result = new setTimeZone_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + setTimeZone_result result = new setTimeZone_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, setTimeZone_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.setTimeZone(args.req,resultHandler); + } + } + + public static class getProperties extends org.apache.thrift.AsyncProcessFunction { + public getProperties() { + super("getProperties"); + } + + @Override + public getProperties_args getEmptyArgsInstance() { + return new getProperties_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(ServerProperties o) { + getProperties_result result = new getProperties_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + getProperties_result result = new getProperties_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, getProperties_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.getProperties(resultHandler); + } + } + + public static class setStorageGroup extends org.apache.thrift.AsyncProcessFunction { + public setStorageGroup() { + super("setStorageGroup"); + } + + @Override + public setStorageGroup_args getEmptyArgsInstance() { + return new setStorageGroup_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + setStorageGroup_result result = new setStorageGroup_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + setStorageGroup_result result = new setStorageGroup_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, setStorageGroup_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.setStorageGroup(args.sessionId, args.storageGroup,resultHandler); + } + } + + public static class createTimeseries extends org.apache.thrift.AsyncProcessFunction { + public createTimeseries() { + super("createTimeseries"); + } + + @Override + public createTimeseries_args getEmptyArgsInstance() { + return new createTimeseries_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + createTimeseries_result result = new createTimeseries_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + createTimeseries_result result = new createTimeseries_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, createTimeseries_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.createTimeseries(args.req,resultHandler); + } + } + + public static class createAlignedTimeseries extends org.apache.thrift.AsyncProcessFunction { + public createAlignedTimeseries() { + super("createAlignedTimeseries"); + } + + @Override + public createAlignedTimeseries_args getEmptyArgsInstance() { + return new createAlignedTimeseries_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + createAlignedTimeseries_result result = new createAlignedTimeseries_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + createAlignedTimeseries_result result = new createAlignedTimeseries_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, createAlignedTimeseries_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.createAlignedTimeseries(args.req,resultHandler); + } + } + + public static class createMultiTimeseries extends org.apache.thrift.AsyncProcessFunction { + public createMultiTimeseries() { + super("createMultiTimeseries"); + } + + @Override + public createMultiTimeseries_args getEmptyArgsInstance() { + return new createMultiTimeseries_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + createMultiTimeseries_result result = new createMultiTimeseries_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + createMultiTimeseries_result result = new createMultiTimeseries_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, createMultiTimeseries_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.createMultiTimeseries(args.req,resultHandler); + } + } + + public static class deleteTimeseries extends org.apache.thrift.AsyncProcessFunction { + public deleteTimeseries() { + super("deleteTimeseries"); + } + + @Override + public deleteTimeseries_args getEmptyArgsInstance() { + return new deleteTimeseries_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + deleteTimeseries_result result = new deleteTimeseries_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + deleteTimeseries_result result = new deleteTimeseries_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, deleteTimeseries_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.deleteTimeseries(args.sessionId, args.path,resultHandler); + } + } + + public static class deleteStorageGroups extends org.apache.thrift.AsyncProcessFunction { + public deleteStorageGroups() { + super("deleteStorageGroups"); + } + + @Override + public deleteStorageGroups_args getEmptyArgsInstance() { + return new deleteStorageGroups_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + deleteStorageGroups_result result = new deleteStorageGroups_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + deleteStorageGroups_result result = new deleteStorageGroups_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, deleteStorageGroups_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.deleteStorageGroups(args.sessionId, args.storageGroup,resultHandler); + } + } + + public static class insertRecord extends org.apache.thrift.AsyncProcessFunction { + public insertRecord() { + super("insertRecord"); + } + + @Override + public insertRecord_args getEmptyArgsInstance() { + return new insertRecord_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + insertRecord_result result = new insertRecord_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + insertRecord_result result = new insertRecord_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, insertRecord_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.insertRecord(args.req,resultHandler); + } + } + + public static class insertStringRecord extends org.apache.thrift.AsyncProcessFunction { + public insertStringRecord() { + super("insertStringRecord"); + } + + @Override + public insertStringRecord_args getEmptyArgsInstance() { + return new insertStringRecord_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + insertStringRecord_result result = new insertStringRecord_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + insertStringRecord_result result = new insertStringRecord_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, insertStringRecord_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.insertStringRecord(args.req,resultHandler); + } + } + + public static class insertTablet extends org.apache.thrift.AsyncProcessFunction { + public insertTablet() { + super("insertTablet"); + } + + @Override + public insertTablet_args getEmptyArgsInstance() { + return new insertTablet_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + insertTablet_result result = new insertTablet_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + insertTablet_result result = new insertTablet_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, insertTablet_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.insertTablet(args.req,resultHandler); + } + } + + public static class insertTablets extends org.apache.thrift.AsyncProcessFunction { + public insertTablets() { + super("insertTablets"); + } + + @Override + public insertTablets_args getEmptyArgsInstance() { + return new insertTablets_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + insertTablets_result result = new insertTablets_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + insertTablets_result result = new insertTablets_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, insertTablets_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.insertTablets(args.req,resultHandler); + } + } + + public static class insertRecords extends org.apache.thrift.AsyncProcessFunction { + public insertRecords() { + super("insertRecords"); + } + + @Override + public insertRecords_args getEmptyArgsInstance() { + return new insertRecords_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + insertRecords_result result = new insertRecords_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + insertRecords_result result = new insertRecords_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, insertRecords_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.insertRecords(args.req,resultHandler); + } + } + + public static class insertRecordsOfOneDevice extends org.apache.thrift.AsyncProcessFunction { + public insertRecordsOfOneDevice() { + super("insertRecordsOfOneDevice"); + } + + @Override + public insertRecordsOfOneDevice_args getEmptyArgsInstance() { + return new insertRecordsOfOneDevice_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + insertRecordsOfOneDevice_result result = new insertRecordsOfOneDevice_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + insertRecordsOfOneDevice_result result = new insertRecordsOfOneDevice_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, insertRecordsOfOneDevice_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.insertRecordsOfOneDevice(args.req,resultHandler); + } + } + + public static class insertStringRecordsOfOneDevice extends org.apache.thrift.AsyncProcessFunction { + public insertStringRecordsOfOneDevice() { + super("insertStringRecordsOfOneDevice"); + } + + @Override + public insertStringRecordsOfOneDevice_args getEmptyArgsInstance() { + return new insertStringRecordsOfOneDevice_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + insertStringRecordsOfOneDevice_result result = new insertStringRecordsOfOneDevice_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + insertStringRecordsOfOneDevice_result result = new insertStringRecordsOfOneDevice_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, insertStringRecordsOfOneDevice_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.insertStringRecordsOfOneDevice(args.req,resultHandler); + } + } + + public static class insertStringRecords extends org.apache.thrift.AsyncProcessFunction { + public insertStringRecords() { + super("insertStringRecords"); + } + + @Override + public insertStringRecords_args getEmptyArgsInstance() { + return new insertStringRecords_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + insertStringRecords_result result = new insertStringRecords_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + insertStringRecords_result result = new insertStringRecords_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, insertStringRecords_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.insertStringRecords(args.req,resultHandler); + } + } + + public static class testInsertTablet extends org.apache.thrift.AsyncProcessFunction { + public testInsertTablet() { + super("testInsertTablet"); + } + + @Override + public testInsertTablet_args getEmptyArgsInstance() { + return new testInsertTablet_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + testInsertTablet_result result = new testInsertTablet_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + testInsertTablet_result result = new testInsertTablet_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, testInsertTablet_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.testInsertTablet(args.req,resultHandler); + } + } + + public static class testInsertTablets extends org.apache.thrift.AsyncProcessFunction { + public testInsertTablets() { + super("testInsertTablets"); + } + + @Override + public testInsertTablets_args getEmptyArgsInstance() { + return new testInsertTablets_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + testInsertTablets_result result = new testInsertTablets_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + testInsertTablets_result result = new testInsertTablets_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, testInsertTablets_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.testInsertTablets(args.req,resultHandler); + } + } + + public static class testInsertRecord extends org.apache.thrift.AsyncProcessFunction { + public testInsertRecord() { + super("testInsertRecord"); + } + + @Override + public testInsertRecord_args getEmptyArgsInstance() { + return new testInsertRecord_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + testInsertRecord_result result = new testInsertRecord_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + testInsertRecord_result result = new testInsertRecord_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, testInsertRecord_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.testInsertRecord(args.req,resultHandler); + } + } + + public static class testInsertStringRecord extends org.apache.thrift.AsyncProcessFunction { + public testInsertStringRecord() { + super("testInsertStringRecord"); + } + + @Override + public testInsertStringRecord_args getEmptyArgsInstance() { + return new testInsertStringRecord_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + testInsertStringRecord_result result = new testInsertStringRecord_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + testInsertStringRecord_result result = new testInsertStringRecord_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, testInsertStringRecord_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.testInsertStringRecord(args.req,resultHandler); + } + } + + public static class testInsertRecords extends org.apache.thrift.AsyncProcessFunction { + public testInsertRecords() { + super("testInsertRecords"); + } + + @Override + public testInsertRecords_args getEmptyArgsInstance() { + return new testInsertRecords_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + testInsertRecords_result result = new testInsertRecords_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + testInsertRecords_result result = new testInsertRecords_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, testInsertRecords_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.testInsertRecords(args.req,resultHandler); + } + } + + public static class testInsertRecordsOfOneDevice extends org.apache.thrift.AsyncProcessFunction { + public testInsertRecordsOfOneDevice() { + super("testInsertRecordsOfOneDevice"); + } + + @Override + public testInsertRecordsOfOneDevice_args getEmptyArgsInstance() { + return new testInsertRecordsOfOneDevice_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + testInsertRecordsOfOneDevice_result result = new testInsertRecordsOfOneDevice_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + testInsertRecordsOfOneDevice_result result = new testInsertRecordsOfOneDevice_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, testInsertRecordsOfOneDevice_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.testInsertRecordsOfOneDevice(args.req,resultHandler); + } + } + + public static class testInsertStringRecords extends org.apache.thrift.AsyncProcessFunction { + public testInsertStringRecords() { + super("testInsertStringRecords"); + } + + @Override + public testInsertStringRecords_args getEmptyArgsInstance() { + return new testInsertStringRecords_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + testInsertStringRecords_result result = new testInsertStringRecords_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + testInsertStringRecords_result result = new testInsertStringRecords_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, testInsertStringRecords_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.testInsertStringRecords(args.req,resultHandler); + } + } + + public static class deleteData extends org.apache.thrift.AsyncProcessFunction { + public deleteData() { + super("deleteData"); + } + + @Override + public deleteData_args getEmptyArgsInstance() { + return new deleteData_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + deleteData_result result = new deleteData_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + deleteData_result result = new deleteData_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, deleteData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.deleteData(args.req,resultHandler); + } + } + + public static class executeRawDataQuery extends org.apache.thrift.AsyncProcessFunction { + public executeRawDataQuery() { + super("executeRawDataQuery"); + } + + @Override + public executeRawDataQuery_args getEmptyArgsInstance() { + return new executeRawDataQuery_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeRawDataQuery_result result = new executeRawDataQuery_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeRawDataQuery_result result = new executeRawDataQuery_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeRawDataQuery_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeRawDataQuery(args.req,resultHandler); + } + } + + public static class executeLastDataQuery extends org.apache.thrift.AsyncProcessFunction { + public executeLastDataQuery() { + super("executeLastDataQuery"); + } + + @Override + public executeLastDataQuery_args getEmptyArgsInstance() { + return new executeLastDataQuery_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeLastDataQuery_result result = new executeLastDataQuery_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeLastDataQuery_result result = new executeLastDataQuery_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeLastDataQuery_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeLastDataQuery(args.req,resultHandler); + } + } + + public static class executeAggregationQuery extends org.apache.thrift.AsyncProcessFunction { + public executeAggregationQuery() { + super("executeAggregationQuery"); + } + + @Override + public executeAggregationQuery_args getEmptyArgsInstance() { + return new executeAggregationQuery_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSExecuteStatementResp o) { + executeAggregationQuery_result result = new executeAggregationQuery_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + executeAggregationQuery_result result = new executeAggregationQuery_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, executeAggregationQuery_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.executeAggregationQuery(args.req,resultHandler); + } + } + + public static class requestStatementId extends org.apache.thrift.AsyncProcessFunction { + public requestStatementId() { + super("requestStatementId"); + } + + @Override + public requestStatementId_args getEmptyArgsInstance() { + return new requestStatementId_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(java.lang.Long o) { + requestStatementId_result result = new requestStatementId_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + requestStatementId_result result = new requestStatementId_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, requestStatementId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.requestStatementId(args.sessionId,resultHandler); + } + } + + public static class createSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { + public createSchemaTemplate() { + super("createSchemaTemplate"); + } + + @Override + public createSchemaTemplate_args getEmptyArgsInstance() { + return new createSchemaTemplate_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + createSchemaTemplate_result result = new createSchemaTemplate_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + createSchemaTemplate_result result = new createSchemaTemplate_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, createSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.createSchemaTemplate(args.req,resultHandler); + } + } + + public static class appendSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { + public appendSchemaTemplate() { + super("appendSchemaTemplate"); + } + + @Override + public appendSchemaTemplate_args getEmptyArgsInstance() { + return new appendSchemaTemplate_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + appendSchemaTemplate_result result = new appendSchemaTemplate_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + appendSchemaTemplate_result result = new appendSchemaTemplate_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, appendSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.appendSchemaTemplate(args.req,resultHandler); + } + } + + public static class pruneSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { + public pruneSchemaTemplate() { + super("pruneSchemaTemplate"); + } + + @Override + public pruneSchemaTemplate_args getEmptyArgsInstance() { + return new pruneSchemaTemplate_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + pruneSchemaTemplate_result result = new pruneSchemaTemplate_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + pruneSchemaTemplate_result result = new pruneSchemaTemplate_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, pruneSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.pruneSchemaTemplate(args.req,resultHandler); + } + } + + public static class querySchemaTemplate extends org.apache.thrift.AsyncProcessFunction { + public querySchemaTemplate() { + super("querySchemaTemplate"); + } + + @Override + public querySchemaTemplate_args getEmptyArgsInstance() { + return new querySchemaTemplate_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSQueryTemplateResp o) { + querySchemaTemplate_result result = new querySchemaTemplate_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + querySchemaTemplate_result result = new querySchemaTemplate_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, querySchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.querySchemaTemplate(args.req,resultHandler); + } + } + + public static class showConfigurationTemplate extends org.apache.thrift.AsyncProcessFunction { + public showConfigurationTemplate() { + super("showConfigurationTemplate"); + } + + @Override + public showConfigurationTemplate_args getEmptyArgsInstance() { + return new showConfigurationTemplate_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp o) { + showConfigurationTemplate_result result = new showConfigurationTemplate_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + showConfigurationTemplate_result result = new showConfigurationTemplate_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, showConfigurationTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.showConfigurationTemplate(resultHandler); + } + } + + public static class showConfiguration extends org.apache.thrift.AsyncProcessFunction { + public showConfiguration() { + super("showConfiguration"); + } + + @Override + public showConfiguration_args getEmptyArgsInstance() { + return new showConfiguration_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp o) { + showConfiguration_result result = new showConfiguration_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + showConfiguration_result result = new showConfiguration_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, showConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.showConfiguration(args.nodeId,resultHandler); + } + } + + public static class setSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { + public setSchemaTemplate() { + super("setSchemaTemplate"); + } + + @Override + public setSchemaTemplate_args getEmptyArgsInstance() { + return new setSchemaTemplate_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + setSchemaTemplate_result result = new setSchemaTemplate_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + setSchemaTemplate_result result = new setSchemaTemplate_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, setSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.setSchemaTemplate(args.req,resultHandler); + } + } + + public static class unsetSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { + public unsetSchemaTemplate() { + super("unsetSchemaTemplate"); + } + + @Override + public unsetSchemaTemplate_args getEmptyArgsInstance() { + return new unsetSchemaTemplate_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + unsetSchemaTemplate_result result = new unsetSchemaTemplate_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + unsetSchemaTemplate_result result = new unsetSchemaTemplate_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, unsetSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.unsetSchemaTemplate(args.req,resultHandler); + } + } + + public static class dropSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { + public dropSchemaTemplate() { + super("dropSchemaTemplate"); + } + + @Override + public dropSchemaTemplate_args getEmptyArgsInstance() { + return new dropSchemaTemplate_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + dropSchemaTemplate_result result = new dropSchemaTemplate_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + dropSchemaTemplate_result result = new dropSchemaTemplate_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, dropSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.dropSchemaTemplate(args.req,resultHandler); + } + } + + public static class createTimeseriesUsingSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { + public createTimeseriesUsingSchemaTemplate() { + super("createTimeseriesUsingSchemaTemplate"); + } + + @Override + public createTimeseriesUsingSchemaTemplate_args getEmptyArgsInstance() { + return new createTimeseriesUsingSchemaTemplate_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + createTimeseriesUsingSchemaTemplate_result result = new createTimeseriesUsingSchemaTemplate_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + createTimeseriesUsingSchemaTemplate_result result = new createTimeseriesUsingSchemaTemplate_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, createTimeseriesUsingSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.createTimeseriesUsingSchemaTemplate(args.req,resultHandler); + } + } + + public static class handshake extends org.apache.thrift.AsyncProcessFunction { + public handshake() { + super("handshake"); + } + + @Override + public handshake_args getEmptyArgsInstance() { + return new handshake_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + handshake_result result = new handshake_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + handshake_result result = new handshake_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, handshake_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.handshake(args.info,resultHandler); + } + } + + public static class sendPipeData extends org.apache.thrift.AsyncProcessFunction { + public sendPipeData() { + super("sendPipeData"); + } + + @Override + public sendPipeData_args getEmptyArgsInstance() { + return new sendPipeData_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + sendPipeData_result result = new sendPipeData_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + sendPipeData_result result = new sendPipeData_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, sendPipeData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.sendPipeData(args.buff,resultHandler); + } + } + + public static class sendFile extends org.apache.thrift.AsyncProcessFunction { + public sendFile() { + super("sendFile"); + } + + @Override + public sendFile_args getEmptyArgsInstance() { + return new sendFile_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + sendFile_result result = new sendFile_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + sendFile_result result = new sendFile_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, sendFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.sendFile(args.metaInfo, args.buff,resultHandler); + } + } + + public static class pipeTransfer extends org.apache.thrift.AsyncProcessFunction { + public pipeTransfer() { + super("pipeTransfer"); + } + + @Override + public pipeTransfer_args getEmptyArgsInstance() { + return new pipeTransfer_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TPipeTransferResp o) { + pipeTransfer_result result = new pipeTransfer_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + pipeTransfer_result result = new pipeTransfer_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, pipeTransfer_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.pipeTransfer(args.req,resultHandler); + } + } + + public static class pipeSubscribe extends org.apache.thrift.AsyncProcessFunction { + public pipeSubscribe() { + super("pipeSubscribe"); + } + + @Override + public pipeSubscribe_args getEmptyArgsInstance() { + return new pipeSubscribe_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TPipeSubscribeResp o) { + pipeSubscribe_result result = new pipeSubscribe_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + pipeSubscribe_result result = new pipeSubscribe_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, pipeSubscribe_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.pipeSubscribe(args.req,resultHandler); + } + } + + public static class getBackupConfiguration extends org.apache.thrift.AsyncProcessFunction { + public getBackupConfiguration() { + super("getBackupConfiguration"); + } + + @Override + public getBackupConfiguration_args getEmptyArgsInstance() { + return new getBackupConfiguration_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSBackupConfigurationResp o) { + getBackupConfiguration_result result = new getBackupConfiguration_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + getBackupConfiguration_result result = new getBackupConfiguration_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, getBackupConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.getBackupConfiguration(resultHandler); + } + } + + public static class fetchAllConnectionsInfo extends org.apache.thrift.AsyncProcessFunction { + public fetchAllConnectionsInfo() { + super("fetchAllConnectionsInfo"); + } + + @Override + public fetchAllConnectionsInfo_args getEmptyArgsInstance() { + return new fetchAllConnectionsInfo_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(TSConnectionInfoResp o) { + fetchAllConnectionsInfo_result result = new fetchAllConnectionsInfo_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + fetchAllConnectionsInfo_result result = new fetchAllConnectionsInfo_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, fetchAllConnectionsInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.fetchAllConnectionsInfo(resultHandler); + } + } + + public static class testConnectionEmptyRPC extends org.apache.thrift.AsyncProcessFunction { + public testConnectionEmptyRPC() { + super("testConnectionEmptyRPC"); + } + + @Override + public testConnectionEmptyRPC_args getEmptyArgsInstance() { + return new testConnectionEmptyRPC_args(); + } + + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override + public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { + testConnectionEmptyRPC_result result = new testConnectionEmptyRPC_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + @Override + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + testConnectionEmptyRPC_result result = new testConnectionEmptyRPC_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + @Override + protected boolean isOneway() { + return false; + } + + @Override + public void start(I iface, testConnectionEmptyRPC_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.testConnectionEmptyRPC(resultHandler); + } + } + + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeQueryStatementV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeQueryStatementV2_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeQueryStatementV2_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeQueryStatementV2_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeQueryStatementV2_args.class, metaDataMap); + } + + public executeQueryStatementV2_args() { + } + + public executeQueryStatementV2_args( + TSExecuteStatementReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeQueryStatementV2_args(executeQueryStatementV2_args other) { + if (other.isSetReq()) { + this.req = new TSExecuteStatementReq(other.req); + } + } + + @Override + public executeQueryStatementV2_args deepCopy() { + return new executeQueryStatementV2_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementReq getReq() { + return this.req; + } + + public executeQueryStatementV2_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSExecuteStatementReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeQueryStatementV2_args) + return this.equals((executeQueryStatementV2_args)that); + return false; + } + + public boolean equals(executeQueryStatementV2_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeQueryStatementV2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeQueryStatementV2_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeQueryStatementV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeQueryStatementV2_argsStandardScheme getScheme() { + return new executeQueryStatementV2_argsStandardScheme(); + } + } + + private static class executeQueryStatementV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeQueryStatementV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeQueryStatementV2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeQueryStatementV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeQueryStatementV2_argsTupleScheme getScheme() { + return new executeQueryStatementV2_argsTupleScheme(); + } + } + + private static class executeQueryStatementV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeQueryStatementV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeQueryStatementV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeQueryStatementV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeQueryStatementV2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeQueryStatementV2_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeQueryStatementV2_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeQueryStatementV2_result.class, metaDataMap); + } + + public executeQueryStatementV2_result() { + } + + public executeQueryStatementV2_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeQueryStatementV2_result(executeQueryStatementV2_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeQueryStatementV2_result deepCopy() { + return new executeQueryStatementV2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeQueryStatementV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeQueryStatementV2_result) + return this.equals((executeQueryStatementV2_result)that); + return false; + } + + public boolean equals(executeQueryStatementV2_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeQueryStatementV2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeQueryStatementV2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeQueryStatementV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeQueryStatementV2_resultStandardScheme getScheme() { + return new executeQueryStatementV2_resultStandardScheme(); + } + } + + private static class executeQueryStatementV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeQueryStatementV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeQueryStatementV2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeQueryStatementV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeQueryStatementV2_resultTupleScheme getScheme() { + return new executeQueryStatementV2_resultTupleScheme(); + } + } + + private static class executeQueryStatementV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeQueryStatementV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeQueryStatementV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeUpdateStatementV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeUpdateStatementV2_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeUpdateStatementV2_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeUpdateStatementV2_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeUpdateStatementV2_args.class, metaDataMap); + } + + public executeUpdateStatementV2_args() { + } + + public executeUpdateStatementV2_args( + TSExecuteStatementReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeUpdateStatementV2_args(executeUpdateStatementV2_args other) { + if (other.isSetReq()) { + this.req = new TSExecuteStatementReq(other.req); + } + } + + @Override + public executeUpdateStatementV2_args deepCopy() { + return new executeUpdateStatementV2_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementReq getReq() { + return this.req; + } + + public executeUpdateStatementV2_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSExecuteStatementReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeUpdateStatementV2_args) + return this.equals((executeUpdateStatementV2_args)that); + return false; + } + + public boolean equals(executeUpdateStatementV2_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeUpdateStatementV2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeUpdateStatementV2_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeUpdateStatementV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeUpdateStatementV2_argsStandardScheme getScheme() { + return new executeUpdateStatementV2_argsStandardScheme(); + } + } + + private static class executeUpdateStatementV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeUpdateStatementV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeUpdateStatementV2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeUpdateStatementV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeUpdateStatementV2_argsTupleScheme getScheme() { + return new executeUpdateStatementV2_argsTupleScheme(); + } + } + + private static class executeUpdateStatementV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatementV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatementV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeUpdateStatementV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeUpdateStatementV2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeUpdateStatementV2_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeUpdateStatementV2_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeUpdateStatementV2_result.class, metaDataMap); + } + + public executeUpdateStatementV2_result() { + } + + public executeUpdateStatementV2_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeUpdateStatementV2_result(executeUpdateStatementV2_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeUpdateStatementV2_result deepCopy() { + return new executeUpdateStatementV2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeUpdateStatementV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeUpdateStatementV2_result) + return this.equals((executeUpdateStatementV2_result)that); + return false; + } + + public boolean equals(executeUpdateStatementV2_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeUpdateStatementV2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeUpdateStatementV2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeUpdateStatementV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeUpdateStatementV2_resultStandardScheme getScheme() { + return new executeUpdateStatementV2_resultStandardScheme(); + } + } + + private static class executeUpdateStatementV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeUpdateStatementV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeUpdateStatementV2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeUpdateStatementV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeUpdateStatementV2_resultTupleScheme getScheme() { + return new executeUpdateStatementV2_resultTupleScheme(); + } + } + + private static class executeUpdateStatementV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatementV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatementV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeStatementV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeStatementV2_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeStatementV2_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeStatementV2_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeStatementV2_args.class, metaDataMap); + } + + public executeStatementV2_args() { + } + + public executeStatementV2_args( + TSExecuteStatementReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeStatementV2_args(executeStatementV2_args other) { + if (other.isSetReq()) { + this.req = new TSExecuteStatementReq(other.req); + } + } + + @Override + public executeStatementV2_args deepCopy() { + return new executeStatementV2_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementReq getReq() { + return this.req; + } + + public executeStatementV2_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSExecuteStatementReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeStatementV2_args) + return this.equals((executeStatementV2_args)that); + return false; + } + + public boolean equals(executeStatementV2_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeStatementV2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeStatementV2_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeStatementV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeStatementV2_argsStandardScheme getScheme() { + return new executeStatementV2_argsStandardScheme(); + } + } + + private static class executeStatementV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeStatementV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeStatementV2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeStatementV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeStatementV2_argsTupleScheme getScheme() { + return new executeStatementV2_argsTupleScheme(); + } + } + + private static class executeStatementV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeStatementV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeStatementV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeStatementV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeStatementV2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeStatementV2_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeStatementV2_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeStatementV2_result.class, metaDataMap); + } + + public executeStatementV2_result() { + } + + public executeStatementV2_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeStatementV2_result(executeStatementV2_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeStatementV2_result deepCopy() { + return new executeStatementV2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeStatementV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeStatementV2_result) + return this.equals((executeStatementV2_result)that); + return false; + } + + public boolean equals(executeStatementV2_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeStatementV2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeStatementV2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeStatementV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeStatementV2_resultStandardScheme getScheme() { + return new executeStatementV2_resultStandardScheme(); + } + } + + private static class executeStatementV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeStatementV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeStatementV2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeStatementV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeStatementV2_resultTupleScheme getScheme() { + return new executeStatementV2_resultTupleScheme(); + } + } + + private static class executeStatementV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeStatementV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeStatementV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeRawDataQueryV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeRawDataQueryV2_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeRawDataQueryV2_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeRawDataQueryV2_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSRawDataQueryReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSRawDataQueryReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeRawDataQueryV2_args.class, metaDataMap); + } + + public executeRawDataQueryV2_args() { + } + + public executeRawDataQueryV2_args( + TSRawDataQueryReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeRawDataQueryV2_args(executeRawDataQueryV2_args other) { + if (other.isSetReq()) { + this.req = new TSRawDataQueryReq(other.req); + } + } + + @Override + public executeRawDataQueryV2_args deepCopy() { + return new executeRawDataQueryV2_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSRawDataQueryReq getReq() { + return this.req; + } + + public executeRawDataQueryV2_args setReq(@org.apache.thrift.annotation.Nullable TSRawDataQueryReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSRawDataQueryReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeRawDataQueryV2_args) + return this.equals((executeRawDataQueryV2_args)that); + return false; + } + + public boolean equals(executeRawDataQueryV2_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeRawDataQueryV2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeRawDataQueryV2_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeRawDataQueryV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeRawDataQueryV2_argsStandardScheme getScheme() { + return new executeRawDataQueryV2_argsStandardScheme(); + } + } + + private static class executeRawDataQueryV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeRawDataQueryV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSRawDataQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeRawDataQueryV2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeRawDataQueryV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeRawDataQueryV2_argsTupleScheme getScheme() { + return new executeRawDataQueryV2_argsTupleScheme(); + } + } + + private static class executeRawDataQueryV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeRawDataQueryV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeRawDataQueryV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSRawDataQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeRawDataQueryV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeRawDataQueryV2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeRawDataQueryV2_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeRawDataQueryV2_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeRawDataQueryV2_result.class, metaDataMap); + } + + public executeRawDataQueryV2_result() { + } + + public executeRawDataQueryV2_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeRawDataQueryV2_result(executeRawDataQueryV2_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeRawDataQueryV2_result deepCopy() { + return new executeRawDataQueryV2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeRawDataQueryV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeRawDataQueryV2_result) + return this.equals((executeRawDataQueryV2_result)that); + return false; + } + + public boolean equals(executeRawDataQueryV2_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeRawDataQueryV2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeRawDataQueryV2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeRawDataQueryV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeRawDataQueryV2_resultStandardScheme getScheme() { + return new executeRawDataQueryV2_resultStandardScheme(); + } + } + + private static class executeRawDataQueryV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeRawDataQueryV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeRawDataQueryV2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeRawDataQueryV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeRawDataQueryV2_resultTupleScheme getScheme() { + return new executeRawDataQueryV2_resultTupleScheme(); + } + } + + private static class executeRawDataQueryV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeRawDataQueryV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeRawDataQueryV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeLastDataQueryV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeLastDataQueryV2_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeLastDataQueryV2_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeLastDataQueryV2_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSLastDataQueryReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSLastDataQueryReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeLastDataQueryV2_args.class, metaDataMap); + } + + public executeLastDataQueryV2_args() { + } + + public executeLastDataQueryV2_args( + TSLastDataQueryReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeLastDataQueryV2_args(executeLastDataQueryV2_args other) { + if (other.isSetReq()) { + this.req = new TSLastDataQueryReq(other.req); + } + } + + @Override + public executeLastDataQueryV2_args deepCopy() { + return new executeLastDataQueryV2_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSLastDataQueryReq getReq() { + return this.req; + } + + public executeLastDataQueryV2_args setReq(@org.apache.thrift.annotation.Nullable TSLastDataQueryReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSLastDataQueryReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeLastDataQueryV2_args) + return this.equals((executeLastDataQueryV2_args)that); + return false; + } + + public boolean equals(executeLastDataQueryV2_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeLastDataQueryV2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeLastDataQueryV2_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeLastDataQueryV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeLastDataQueryV2_argsStandardScheme getScheme() { + return new executeLastDataQueryV2_argsStandardScheme(); + } + } + + private static class executeLastDataQueryV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeLastDataQueryV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSLastDataQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeLastDataQueryV2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeLastDataQueryV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeLastDataQueryV2_argsTupleScheme getScheme() { + return new executeLastDataQueryV2_argsTupleScheme(); + } + } + + private static class executeLastDataQueryV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeLastDataQueryV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeLastDataQueryV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSLastDataQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeLastDataQueryV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeLastDataQueryV2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeLastDataQueryV2_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeLastDataQueryV2_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeLastDataQueryV2_result.class, metaDataMap); + } + + public executeLastDataQueryV2_result() { + } + + public executeLastDataQueryV2_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeLastDataQueryV2_result(executeLastDataQueryV2_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeLastDataQueryV2_result deepCopy() { + return new executeLastDataQueryV2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeLastDataQueryV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeLastDataQueryV2_result) + return this.equals((executeLastDataQueryV2_result)that); + return false; + } + + public boolean equals(executeLastDataQueryV2_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeLastDataQueryV2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeLastDataQueryV2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeLastDataQueryV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeLastDataQueryV2_resultStandardScheme getScheme() { + return new executeLastDataQueryV2_resultStandardScheme(); + } + } + + private static class executeLastDataQueryV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeLastDataQueryV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeLastDataQueryV2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeLastDataQueryV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeLastDataQueryV2_resultTupleScheme getScheme() { + return new executeLastDataQueryV2_resultTupleScheme(); + } + } + + private static class executeLastDataQueryV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeLastDataQueryV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeLastDataQueryV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeFastLastDataQueryForOneDeviceV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeFastLastDataQueryForOneDeviceV2_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeFastLastDataQueryForOneDeviceV2_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeFastLastDataQueryForOneDeviceV2_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSFastLastDataQueryForOneDeviceReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFastLastDataQueryForOneDeviceReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeFastLastDataQueryForOneDeviceV2_args.class, metaDataMap); + } + + public executeFastLastDataQueryForOneDeviceV2_args() { + } + + public executeFastLastDataQueryForOneDeviceV2_args( + TSFastLastDataQueryForOneDeviceReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeFastLastDataQueryForOneDeviceV2_args(executeFastLastDataQueryForOneDeviceV2_args other) { + if (other.isSetReq()) { + this.req = new TSFastLastDataQueryForOneDeviceReq(other.req); + } + } + + @Override + public executeFastLastDataQueryForOneDeviceV2_args deepCopy() { + return new executeFastLastDataQueryForOneDeviceV2_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSFastLastDataQueryForOneDeviceReq getReq() { + return this.req; + } + + public executeFastLastDataQueryForOneDeviceV2_args setReq(@org.apache.thrift.annotation.Nullable TSFastLastDataQueryForOneDeviceReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSFastLastDataQueryForOneDeviceReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeFastLastDataQueryForOneDeviceV2_args) + return this.equals((executeFastLastDataQueryForOneDeviceV2_args)that); + return false; + } + + public boolean equals(executeFastLastDataQueryForOneDeviceV2_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeFastLastDataQueryForOneDeviceV2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeFastLastDataQueryForOneDeviceV2_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeFastLastDataQueryForOneDeviceV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeFastLastDataQueryForOneDeviceV2_argsStandardScheme getScheme() { + return new executeFastLastDataQueryForOneDeviceV2_argsStandardScheme(); + } + } + + private static class executeFastLastDataQueryForOneDeviceV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeFastLastDataQueryForOneDeviceV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSFastLastDataQueryForOneDeviceReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeFastLastDataQueryForOneDeviceV2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeFastLastDataQueryForOneDeviceV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeFastLastDataQueryForOneDeviceV2_argsTupleScheme getScheme() { + return new executeFastLastDataQueryForOneDeviceV2_argsTupleScheme(); + } + } + + private static class executeFastLastDataQueryForOneDeviceV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeFastLastDataQueryForOneDeviceV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeFastLastDataQueryForOneDeviceV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSFastLastDataQueryForOneDeviceReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeFastLastDataQueryForOneDeviceV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeFastLastDataQueryForOneDeviceV2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeFastLastDataQueryForOneDeviceV2_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeFastLastDataQueryForOneDeviceV2_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeFastLastDataQueryForOneDeviceV2_result.class, metaDataMap); + } + + public executeFastLastDataQueryForOneDeviceV2_result() { + } + + public executeFastLastDataQueryForOneDeviceV2_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeFastLastDataQueryForOneDeviceV2_result(executeFastLastDataQueryForOneDeviceV2_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeFastLastDataQueryForOneDeviceV2_result deepCopy() { + return new executeFastLastDataQueryForOneDeviceV2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeFastLastDataQueryForOneDeviceV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeFastLastDataQueryForOneDeviceV2_result) + return this.equals((executeFastLastDataQueryForOneDeviceV2_result)that); + return false; + } + + public boolean equals(executeFastLastDataQueryForOneDeviceV2_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeFastLastDataQueryForOneDeviceV2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeFastLastDataQueryForOneDeviceV2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeFastLastDataQueryForOneDeviceV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeFastLastDataQueryForOneDeviceV2_resultStandardScheme getScheme() { + return new executeFastLastDataQueryForOneDeviceV2_resultStandardScheme(); + } + } + + private static class executeFastLastDataQueryForOneDeviceV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeFastLastDataQueryForOneDeviceV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeFastLastDataQueryForOneDeviceV2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeFastLastDataQueryForOneDeviceV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeFastLastDataQueryForOneDeviceV2_resultTupleScheme getScheme() { + return new executeFastLastDataQueryForOneDeviceV2_resultTupleScheme(); + } + } + + private static class executeFastLastDataQueryForOneDeviceV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeFastLastDataQueryForOneDeviceV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeFastLastDataQueryForOneDeviceV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeAggregationQueryV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeAggregationQueryV2_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeAggregationQueryV2_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeAggregationQueryV2_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSAggregationQueryReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSAggregationQueryReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeAggregationQueryV2_args.class, metaDataMap); + } + + public executeAggregationQueryV2_args() { + } + + public executeAggregationQueryV2_args( + TSAggregationQueryReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeAggregationQueryV2_args(executeAggregationQueryV2_args other) { + if (other.isSetReq()) { + this.req = new TSAggregationQueryReq(other.req); + } + } + + @Override + public executeAggregationQueryV2_args deepCopy() { + return new executeAggregationQueryV2_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSAggregationQueryReq getReq() { + return this.req; + } + + public executeAggregationQueryV2_args setReq(@org.apache.thrift.annotation.Nullable TSAggregationQueryReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSAggregationQueryReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeAggregationQueryV2_args) + return this.equals((executeAggregationQueryV2_args)that); + return false; + } + + public boolean equals(executeAggregationQueryV2_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeAggregationQueryV2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeAggregationQueryV2_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeAggregationQueryV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeAggregationQueryV2_argsStandardScheme getScheme() { + return new executeAggregationQueryV2_argsStandardScheme(); + } + } + + private static class executeAggregationQueryV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeAggregationQueryV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSAggregationQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeAggregationQueryV2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeAggregationQueryV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeAggregationQueryV2_argsTupleScheme getScheme() { + return new executeAggregationQueryV2_argsTupleScheme(); + } + } + + private static class executeAggregationQueryV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeAggregationQueryV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeAggregationQueryV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSAggregationQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeAggregationQueryV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeAggregationQueryV2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeAggregationQueryV2_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeAggregationQueryV2_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeAggregationQueryV2_result.class, metaDataMap); + } + + public executeAggregationQueryV2_result() { + } + + public executeAggregationQueryV2_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeAggregationQueryV2_result(executeAggregationQueryV2_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeAggregationQueryV2_result deepCopy() { + return new executeAggregationQueryV2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeAggregationQueryV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeAggregationQueryV2_result) + return this.equals((executeAggregationQueryV2_result)that); + return false; + } + + public boolean equals(executeAggregationQueryV2_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeAggregationQueryV2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeAggregationQueryV2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeAggregationQueryV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeAggregationQueryV2_resultStandardScheme getScheme() { + return new executeAggregationQueryV2_resultStandardScheme(); + } + } + + private static class executeAggregationQueryV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeAggregationQueryV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeAggregationQueryV2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeAggregationQueryV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeAggregationQueryV2_resultTupleScheme getScheme() { + return new executeAggregationQueryV2_resultTupleScheme(); + } + } + + private static class executeAggregationQueryV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeAggregationQueryV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeAggregationQueryV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeGroupByQueryIntervalQuery_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeGroupByQueryIntervalQuery_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeGroupByQueryIntervalQuery_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeGroupByQueryIntervalQuery_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSGroupByQueryIntervalReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSGroupByQueryIntervalReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeGroupByQueryIntervalQuery_args.class, metaDataMap); + } + + public executeGroupByQueryIntervalQuery_args() { + } + + public executeGroupByQueryIntervalQuery_args( + TSGroupByQueryIntervalReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeGroupByQueryIntervalQuery_args(executeGroupByQueryIntervalQuery_args other) { + if (other.isSetReq()) { + this.req = new TSGroupByQueryIntervalReq(other.req); + } + } + + @Override + public executeGroupByQueryIntervalQuery_args deepCopy() { + return new executeGroupByQueryIntervalQuery_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSGroupByQueryIntervalReq getReq() { + return this.req; + } + + public executeGroupByQueryIntervalQuery_args setReq(@org.apache.thrift.annotation.Nullable TSGroupByQueryIntervalReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSGroupByQueryIntervalReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeGroupByQueryIntervalQuery_args) + return this.equals((executeGroupByQueryIntervalQuery_args)that); + return false; + } + + public boolean equals(executeGroupByQueryIntervalQuery_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeGroupByQueryIntervalQuery_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeGroupByQueryIntervalQuery_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeGroupByQueryIntervalQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeGroupByQueryIntervalQuery_argsStandardScheme getScheme() { + return new executeGroupByQueryIntervalQuery_argsStandardScheme(); + } + } + + private static class executeGroupByQueryIntervalQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeGroupByQueryIntervalQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSGroupByQueryIntervalReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeGroupByQueryIntervalQuery_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeGroupByQueryIntervalQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeGroupByQueryIntervalQuery_argsTupleScheme getScheme() { + return new executeGroupByQueryIntervalQuery_argsTupleScheme(); + } + } + + private static class executeGroupByQueryIntervalQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeGroupByQueryIntervalQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeGroupByQueryIntervalQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSGroupByQueryIntervalReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeGroupByQueryIntervalQuery_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeGroupByQueryIntervalQuery_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeGroupByQueryIntervalQuery_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeGroupByQueryIntervalQuery_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeGroupByQueryIntervalQuery_result.class, metaDataMap); + } + + public executeGroupByQueryIntervalQuery_result() { + } + + public executeGroupByQueryIntervalQuery_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeGroupByQueryIntervalQuery_result(executeGroupByQueryIntervalQuery_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeGroupByQueryIntervalQuery_result deepCopy() { + return new executeGroupByQueryIntervalQuery_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeGroupByQueryIntervalQuery_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeGroupByQueryIntervalQuery_result) + return this.equals((executeGroupByQueryIntervalQuery_result)that); + return false; + } + + public boolean equals(executeGroupByQueryIntervalQuery_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeGroupByQueryIntervalQuery_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeGroupByQueryIntervalQuery_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeGroupByQueryIntervalQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeGroupByQueryIntervalQuery_resultStandardScheme getScheme() { + return new executeGroupByQueryIntervalQuery_resultStandardScheme(); + } + } + + private static class executeGroupByQueryIntervalQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeGroupByQueryIntervalQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeGroupByQueryIntervalQuery_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeGroupByQueryIntervalQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeGroupByQueryIntervalQuery_resultTupleScheme getScheme() { + return new executeGroupByQueryIntervalQuery_resultTupleScheme(); + } + } + + private static class executeGroupByQueryIntervalQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeGroupByQueryIntervalQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeGroupByQueryIntervalQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class fetchResultsV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchResultsV2_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchResultsV2_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchResultsV2_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSFetchResultsReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchResultsReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchResultsV2_args.class, metaDataMap); + } + + public fetchResultsV2_args() { + } + + public fetchResultsV2_args( + TSFetchResultsReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public fetchResultsV2_args(fetchResultsV2_args other) { + if (other.isSetReq()) { + this.req = new TSFetchResultsReq(other.req); + } + } + + @Override + public fetchResultsV2_args deepCopy() { + return new fetchResultsV2_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSFetchResultsReq getReq() { + return this.req; + } + + public fetchResultsV2_args setReq(@org.apache.thrift.annotation.Nullable TSFetchResultsReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSFetchResultsReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof fetchResultsV2_args) + return this.equals((fetchResultsV2_args)that); + return false; + } + + public boolean equals(fetchResultsV2_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(fetchResultsV2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchResultsV2_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class fetchResultsV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchResultsV2_argsStandardScheme getScheme() { + return new fetchResultsV2_argsStandardScheme(); + } + } + + private static class fetchResultsV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchResultsV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSFetchResultsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchResultsV2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchResultsV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchResultsV2_argsTupleScheme getScheme() { + return new fetchResultsV2_argsTupleScheme(); + } + } + + private static class fetchResultsV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchResultsV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchResultsV2_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSFetchResultsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class fetchResultsV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchResultsV2_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchResultsV2_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchResultsV2_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSFetchResultsResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchResultsResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchResultsV2_result.class, metaDataMap); + } + + public fetchResultsV2_result() { + } + + public fetchResultsV2_result( + TSFetchResultsResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public fetchResultsV2_result(fetchResultsV2_result other) { + if (other.isSetSuccess()) { + this.success = new TSFetchResultsResp(other.success); + } + } + + @Override + public fetchResultsV2_result deepCopy() { + return new fetchResultsV2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSFetchResultsResp getSuccess() { + return this.success; + } + + public fetchResultsV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSFetchResultsResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSFetchResultsResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof fetchResultsV2_result) + return this.equals((fetchResultsV2_result)that); + return false; + } + + public boolean equals(fetchResultsV2_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(fetchResultsV2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchResultsV2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class fetchResultsV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchResultsV2_resultStandardScheme getScheme() { + return new fetchResultsV2_resultStandardScheme(); + } + } + + private static class fetchResultsV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchResultsV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSFetchResultsResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchResultsV2_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchResultsV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchResultsV2_resultTupleScheme getScheme() { + return new fetchResultsV2_resultTupleScheme(); + } + } + + private static class fetchResultsV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchResultsV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchResultsV2_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSFetchResultsResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class openSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openSession_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openSession_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openSession_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSOpenSessionReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSOpenSessionReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openSession_args.class, metaDataMap); + } + + public openSession_args() { + } + + public openSession_args( + TSOpenSessionReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public openSession_args(openSession_args other) { + if (other.isSetReq()) { + this.req = new TSOpenSessionReq(other.req); + } + } + + @Override + public openSession_args deepCopy() { + return new openSession_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSOpenSessionReq getReq() { + return this.req; + } + + public openSession_args setReq(@org.apache.thrift.annotation.Nullable TSOpenSessionReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSOpenSessionReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof openSession_args) + return this.equals((openSession_args)that); + return false; + } + + public boolean equals(openSession_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(openSession_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("openSession_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class openSession_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public openSession_argsStandardScheme getScheme() { + return new openSession_argsStandardScheme(); + } + } + + private static class openSession_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, openSession_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSOpenSessionReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, openSession_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class openSession_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public openSession_argsTupleScheme getScheme() { + return new openSession_argsTupleScheme(); + } + } + + private static class openSession_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, openSession_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, openSession_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSOpenSessionReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class openSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openSession_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openSession_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openSession_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSOpenSessionResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSOpenSessionResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openSession_result.class, metaDataMap); + } + + public openSession_result() { + } + + public openSession_result( + TSOpenSessionResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public openSession_result(openSession_result other) { + if (other.isSetSuccess()) { + this.success = new TSOpenSessionResp(other.success); + } + } + + @Override + public openSession_result deepCopy() { + return new openSession_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSOpenSessionResp getSuccess() { + return this.success; + } + + public openSession_result setSuccess(@org.apache.thrift.annotation.Nullable TSOpenSessionResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSOpenSessionResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof openSession_result) + return this.equals((openSession_result)that); + return false; + } + + public boolean equals(openSession_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(openSession_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("openSession_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class openSession_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public openSession_resultStandardScheme getScheme() { + return new openSession_resultStandardScheme(); + } + } + + private static class openSession_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, openSession_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSOpenSessionResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, openSession_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class openSession_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public openSession_resultTupleScheme getScheme() { + return new openSession_resultTupleScheme(); + } + } + + private static class openSession_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, openSession_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, openSession_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSOpenSessionResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class closeSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeSession_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeSession_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeSession_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSCloseSessionReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCloseSessionReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap); + } + + public closeSession_args() { + } + + public closeSession_args( + TSCloseSessionReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public closeSession_args(closeSession_args other) { + if (other.isSetReq()) { + this.req = new TSCloseSessionReq(other.req); + } + } + + @Override + public closeSession_args deepCopy() { + return new closeSession_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSCloseSessionReq getReq() { + return this.req; + } + + public closeSession_args setReq(@org.apache.thrift.annotation.Nullable TSCloseSessionReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSCloseSessionReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof closeSession_args) + return this.equals((closeSession_args)that); + return false; + } + + public boolean equals(closeSession_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(closeSession_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("closeSession_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class closeSession_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public closeSession_argsStandardScheme getScheme() { + return new closeSession_argsStandardScheme(); + } + } + + private static class closeSession_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, closeSession_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSCloseSessionReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, closeSession_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class closeSession_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public closeSession_argsTupleScheme getScheme() { + return new closeSession_argsTupleScheme(); + } + } + + private static class closeSession_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, closeSession_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, closeSession_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSCloseSessionReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class closeSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeSession_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeSession_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeSession_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap); + } + + public closeSession_result() { + } + + public closeSession_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public closeSession_result(closeSession_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public closeSession_result deepCopy() { + return new closeSession_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public closeSession_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof closeSession_result) + return this.equals((closeSession_result)that); + return false; + } + + public boolean equals(closeSession_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(closeSession_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("closeSession_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class closeSession_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public closeSession_resultStandardScheme getScheme() { + return new closeSession_resultStandardScheme(); + } + } + + private static class closeSession_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, closeSession_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, closeSession_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class closeSession_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public closeSession_resultTupleScheme getScheme() { + return new closeSession_resultTupleScheme(); + } + } + + private static class closeSession_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, closeSession_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, closeSession_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeStatement_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeStatement_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeStatement_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeStatement_args.class, metaDataMap); + } + + public executeStatement_args() { + } + + public executeStatement_args( + TSExecuteStatementReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeStatement_args(executeStatement_args other) { + if (other.isSetReq()) { + this.req = new TSExecuteStatementReq(other.req); + } + } + + @Override + public executeStatement_args deepCopy() { + return new executeStatement_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementReq getReq() { + return this.req; + } + + public executeStatement_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSExecuteStatementReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeStatement_args) + return this.equals((executeStatement_args)that); + return false; + } + + public boolean equals(executeStatement_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeStatement_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeStatement_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeStatement_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeStatement_argsStandardScheme getScheme() { + return new executeStatement_argsStandardScheme(); + } + } + + private static class executeStatement_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeStatement_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeStatement_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeStatement_argsTupleScheme getScheme() { + return new executeStatement_argsTupleScheme(); + } + } + + private static class executeStatement_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeStatement_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeStatement_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeStatement_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeStatement_result.class, metaDataMap); + } + + public executeStatement_result() { + } + + public executeStatement_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeStatement_result(executeStatement_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeStatement_result deepCopy() { + return new executeStatement_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeStatement_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeStatement_result) + return this.equals((executeStatement_result)that); + return false; + } + + public boolean equals(executeStatement_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeStatement_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeStatement_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeStatement_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeStatement_resultStandardScheme getScheme() { + return new executeStatement_resultStandardScheme(); + } + } + + private static class executeStatement_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeStatement_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeStatement_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeStatement_resultTupleScheme getScheme() { + return new executeStatement_resultTupleScheme(); + } + } + + private static class executeStatement_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeBatchStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeBatchStatement_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeBatchStatement_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeBatchStatement_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteBatchStatementReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteBatchStatementReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeBatchStatement_args.class, metaDataMap); + } + + public executeBatchStatement_args() { + } + + public executeBatchStatement_args( + TSExecuteBatchStatementReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeBatchStatement_args(executeBatchStatement_args other) { + if (other.isSetReq()) { + this.req = new TSExecuteBatchStatementReq(other.req); + } + } + + @Override + public executeBatchStatement_args deepCopy() { + return new executeBatchStatement_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteBatchStatementReq getReq() { + return this.req; + } + + public executeBatchStatement_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteBatchStatementReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSExecuteBatchStatementReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeBatchStatement_args) + return this.equals((executeBatchStatement_args)that); + return false; + } + + public boolean equals(executeBatchStatement_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeBatchStatement_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeBatchStatement_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeBatchStatement_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeBatchStatement_argsStandardScheme getScheme() { + return new executeBatchStatement_argsStandardScheme(); + } + } + + private static class executeBatchStatement_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeBatchStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSExecuteBatchStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeBatchStatement_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeBatchStatement_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeBatchStatement_argsTupleScheme getScheme() { + return new executeBatchStatement_argsTupleScheme(); + } + } + + private static class executeBatchStatement_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeBatchStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeBatchStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSExecuteBatchStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeBatchStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeBatchStatement_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeBatchStatement_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeBatchStatement_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeBatchStatement_result.class, metaDataMap); + } + + public executeBatchStatement_result() { + } + + public executeBatchStatement_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeBatchStatement_result(executeBatchStatement_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public executeBatchStatement_result deepCopy() { + return new executeBatchStatement_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public executeBatchStatement_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeBatchStatement_result) + return this.equals((executeBatchStatement_result)that); + return false; + } + + public boolean equals(executeBatchStatement_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeBatchStatement_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeBatchStatement_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeBatchStatement_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeBatchStatement_resultStandardScheme getScheme() { + return new executeBatchStatement_resultStandardScheme(); + } + } + + private static class executeBatchStatement_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeBatchStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeBatchStatement_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeBatchStatement_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeBatchStatement_resultTupleScheme getScheme() { + return new executeBatchStatement_resultTupleScheme(); + } + } + + private static class executeBatchStatement_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeBatchStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeBatchStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeQueryStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeQueryStatement_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeQueryStatement_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeQueryStatement_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeQueryStatement_args.class, metaDataMap); + } + + public executeQueryStatement_args() { + } + + public executeQueryStatement_args( + TSExecuteStatementReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeQueryStatement_args(executeQueryStatement_args other) { + if (other.isSetReq()) { + this.req = new TSExecuteStatementReq(other.req); + } + } + + @Override + public executeQueryStatement_args deepCopy() { + return new executeQueryStatement_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementReq getReq() { + return this.req; + } + + public executeQueryStatement_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSExecuteStatementReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeQueryStatement_args) + return this.equals((executeQueryStatement_args)that); + return false; + } + + public boolean equals(executeQueryStatement_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeQueryStatement_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeQueryStatement_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeQueryStatement_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeQueryStatement_argsStandardScheme getScheme() { + return new executeQueryStatement_argsStandardScheme(); + } + } + + private static class executeQueryStatement_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeQueryStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeQueryStatement_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeQueryStatement_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeQueryStatement_argsTupleScheme getScheme() { + return new executeQueryStatement_argsTupleScheme(); + } + } + + private static class executeQueryStatement_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeQueryStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeQueryStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeQueryStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeQueryStatement_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeQueryStatement_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeQueryStatement_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeQueryStatement_result.class, metaDataMap); + } + + public executeQueryStatement_result() { + } + + public executeQueryStatement_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeQueryStatement_result(executeQueryStatement_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeQueryStatement_result deepCopy() { + return new executeQueryStatement_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeQueryStatement_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeQueryStatement_result) + return this.equals((executeQueryStatement_result)that); + return false; + } + + public boolean equals(executeQueryStatement_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeQueryStatement_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeQueryStatement_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeQueryStatement_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeQueryStatement_resultStandardScheme getScheme() { + return new executeQueryStatement_resultStandardScheme(); + } + } + + private static class executeQueryStatement_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeQueryStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeQueryStatement_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeQueryStatement_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeQueryStatement_resultTupleScheme getScheme() { + return new executeQueryStatement_resultTupleScheme(); + } + } + + private static class executeQueryStatement_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeQueryStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeQueryStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeUpdateStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeUpdateStatement_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeUpdateStatement_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeUpdateStatement_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeUpdateStatement_args.class, metaDataMap); + } + + public executeUpdateStatement_args() { + } + + public executeUpdateStatement_args( + TSExecuteStatementReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeUpdateStatement_args(executeUpdateStatement_args other) { + if (other.isSetReq()) { + this.req = new TSExecuteStatementReq(other.req); + } + } + + @Override + public executeUpdateStatement_args deepCopy() { + return new executeUpdateStatement_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementReq getReq() { + return this.req; + } + + public executeUpdateStatement_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSExecuteStatementReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeUpdateStatement_args) + return this.equals((executeUpdateStatement_args)that); + return false; + } + + public boolean equals(executeUpdateStatement_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeUpdateStatement_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeUpdateStatement_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeUpdateStatement_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeUpdateStatement_argsStandardScheme getScheme() { + return new executeUpdateStatement_argsStandardScheme(); + } + } + + private static class executeUpdateStatement_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeUpdateStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeUpdateStatement_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeUpdateStatement_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeUpdateStatement_argsTupleScheme getScheme() { + return new executeUpdateStatement_argsTupleScheme(); + } + } + + private static class executeUpdateStatement_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSExecuteStatementReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeUpdateStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeUpdateStatement_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeUpdateStatement_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeUpdateStatement_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeUpdateStatement_result.class, metaDataMap); + } + + public executeUpdateStatement_result() { + } + + public executeUpdateStatement_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeUpdateStatement_result(executeUpdateStatement_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeUpdateStatement_result deepCopy() { + return new executeUpdateStatement_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeUpdateStatement_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeUpdateStatement_result) + return this.equals((executeUpdateStatement_result)that); + return false; + } + + public boolean equals(executeUpdateStatement_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeUpdateStatement_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeUpdateStatement_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeUpdateStatement_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeUpdateStatement_resultStandardScheme getScheme() { + return new executeUpdateStatement_resultStandardScheme(); + } + } + + private static class executeUpdateStatement_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeUpdateStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeUpdateStatement_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeUpdateStatement_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeUpdateStatement_resultTupleScheme getScheme() { + return new executeUpdateStatement_resultTupleScheme(); + } + } + + private static class executeUpdateStatement_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class fetchResults_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchResults_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchResults_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchResults_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSFetchResultsReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchResultsReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchResults_args.class, metaDataMap); + } + + public fetchResults_args() { + } + + public fetchResults_args( + TSFetchResultsReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public fetchResults_args(fetchResults_args other) { + if (other.isSetReq()) { + this.req = new TSFetchResultsReq(other.req); + } + } + + @Override + public fetchResults_args deepCopy() { + return new fetchResults_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSFetchResultsReq getReq() { + return this.req; + } + + public fetchResults_args setReq(@org.apache.thrift.annotation.Nullable TSFetchResultsReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSFetchResultsReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof fetchResults_args) + return this.equals((fetchResults_args)that); + return false; + } + + public boolean equals(fetchResults_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(fetchResults_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchResults_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class fetchResults_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchResults_argsStandardScheme getScheme() { + return new fetchResults_argsStandardScheme(); + } + } + + private static class fetchResults_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchResults_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSFetchResultsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchResults_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchResults_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchResults_argsTupleScheme getScheme() { + return new fetchResults_argsTupleScheme(); + } + } + + private static class fetchResults_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchResults_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchResults_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSFetchResultsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class fetchResults_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchResults_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchResults_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchResults_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSFetchResultsResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchResultsResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchResults_result.class, metaDataMap); + } + + public fetchResults_result() { + } + + public fetchResults_result( + TSFetchResultsResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public fetchResults_result(fetchResults_result other) { + if (other.isSetSuccess()) { + this.success = new TSFetchResultsResp(other.success); + } + } + + @Override + public fetchResults_result deepCopy() { + return new fetchResults_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSFetchResultsResp getSuccess() { + return this.success; + } + + public fetchResults_result setSuccess(@org.apache.thrift.annotation.Nullable TSFetchResultsResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSFetchResultsResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof fetchResults_result) + return this.equals((fetchResults_result)that); + return false; + } + + public boolean equals(fetchResults_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(fetchResults_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchResults_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class fetchResults_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchResults_resultStandardScheme getScheme() { + return new fetchResults_resultStandardScheme(); + } + } + + private static class fetchResults_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchResults_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSFetchResultsResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchResults_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchResults_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchResults_resultTupleScheme getScheme() { + return new fetchResults_resultTupleScheme(); + } + } + + private static class fetchResults_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchResults_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchResults_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSFetchResultsResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class fetchMetadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchMetadata_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchMetadata_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchMetadata_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSFetchMetadataReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchMetadataReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchMetadata_args.class, metaDataMap); + } + + public fetchMetadata_args() { + } + + public fetchMetadata_args( + TSFetchMetadataReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public fetchMetadata_args(fetchMetadata_args other) { + if (other.isSetReq()) { + this.req = new TSFetchMetadataReq(other.req); + } + } + + @Override + public fetchMetadata_args deepCopy() { + return new fetchMetadata_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSFetchMetadataReq getReq() { + return this.req; + } + + public fetchMetadata_args setReq(@org.apache.thrift.annotation.Nullable TSFetchMetadataReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSFetchMetadataReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof fetchMetadata_args) + return this.equals((fetchMetadata_args)that); + return false; + } + + public boolean equals(fetchMetadata_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(fetchMetadata_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchMetadata_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class fetchMetadata_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchMetadata_argsStandardScheme getScheme() { + return new fetchMetadata_argsStandardScheme(); + } + } + + private static class fetchMetadata_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchMetadata_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSFetchMetadataReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchMetadata_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchMetadata_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchMetadata_argsTupleScheme getScheme() { + return new fetchMetadata_argsTupleScheme(); + } + } + + private static class fetchMetadata_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchMetadata_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchMetadata_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSFetchMetadataReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class fetchMetadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchMetadata_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchMetadata_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchMetadata_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSFetchMetadataResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchMetadataResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchMetadata_result.class, metaDataMap); + } + + public fetchMetadata_result() { + } + + public fetchMetadata_result( + TSFetchMetadataResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public fetchMetadata_result(fetchMetadata_result other) { + if (other.isSetSuccess()) { + this.success = new TSFetchMetadataResp(other.success); + } + } + + @Override + public fetchMetadata_result deepCopy() { + return new fetchMetadata_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSFetchMetadataResp getSuccess() { + return this.success; + } + + public fetchMetadata_result setSuccess(@org.apache.thrift.annotation.Nullable TSFetchMetadataResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSFetchMetadataResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof fetchMetadata_result) + return this.equals((fetchMetadata_result)that); + return false; + } + + public boolean equals(fetchMetadata_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(fetchMetadata_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchMetadata_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class fetchMetadata_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchMetadata_resultStandardScheme getScheme() { + return new fetchMetadata_resultStandardScheme(); + } + } + + private static class fetchMetadata_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchMetadata_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSFetchMetadataResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchMetadata_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchMetadata_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchMetadata_resultTupleScheme getScheme() { + return new fetchMetadata_resultTupleScheme(); + } + } + + private static class fetchMetadata_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchMetadata_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchMetadata_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSFetchMetadataResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class cancelOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelOperation_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelOperation_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelOperation_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSCancelOperationReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCancelOperationReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelOperation_args.class, metaDataMap); + } + + public cancelOperation_args() { + } + + public cancelOperation_args( + TSCancelOperationReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public cancelOperation_args(cancelOperation_args other) { + if (other.isSetReq()) { + this.req = new TSCancelOperationReq(other.req); + } + } + + @Override + public cancelOperation_args deepCopy() { + return new cancelOperation_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSCancelOperationReq getReq() { + return this.req; + } + + public cancelOperation_args setReq(@org.apache.thrift.annotation.Nullable TSCancelOperationReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSCancelOperationReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof cancelOperation_args) + return this.equals((cancelOperation_args)that); + return false; + } + + public boolean equals(cancelOperation_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(cancelOperation_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelOperation_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class cancelOperation_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public cancelOperation_argsStandardScheme getScheme() { + return new cancelOperation_argsStandardScheme(); + } + } + + private static class cancelOperation_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, cancelOperation_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSCancelOperationReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, cancelOperation_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancelOperation_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public cancelOperation_argsTupleScheme getScheme() { + return new cancelOperation_argsTupleScheme(); + } + } + + private static class cancelOperation_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancelOperation_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancelOperation_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSCancelOperationReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class cancelOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelOperation_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelOperation_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelOperation_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelOperation_result.class, metaDataMap); + } + + public cancelOperation_result() { + } + + public cancelOperation_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public cancelOperation_result(cancelOperation_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public cancelOperation_result deepCopy() { + return new cancelOperation_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public cancelOperation_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof cancelOperation_result) + return this.equals((cancelOperation_result)that); + return false; + } + + public boolean equals(cancelOperation_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(cancelOperation_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelOperation_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class cancelOperation_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public cancelOperation_resultStandardScheme getScheme() { + return new cancelOperation_resultStandardScheme(); + } + } + + private static class cancelOperation_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, cancelOperation_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, cancelOperation_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancelOperation_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public cancelOperation_resultTupleScheme getScheme() { + return new cancelOperation_resultTupleScheme(); + } + } + + private static class cancelOperation_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancelOperation_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancelOperation_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class closeOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeOperation_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeOperation_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeOperation_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSCloseOperationReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCloseOperationReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeOperation_args.class, metaDataMap); + } + + public closeOperation_args() { + } + + public closeOperation_args( + TSCloseOperationReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public closeOperation_args(closeOperation_args other) { + if (other.isSetReq()) { + this.req = new TSCloseOperationReq(other.req); + } + } + + @Override + public closeOperation_args deepCopy() { + return new closeOperation_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSCloseOperationReq getReq() { + return this.req; + } + + public closeOperation_args setReq(@org.apache.thrift.annotation.Nullable TSCloseOperationReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSCloseOperationReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof closeOperation_args) + return this.equals((closeOperation_args)that); + return false; + } + + public boolean equals(closeOperation_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(closeOperation_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("closeOperation_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class closeOperation_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public closeOperation_argsStandardScheme getScheme() { + return new closeOperation_argsStandardScheme(); + } + } + + private static class closeOperation_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, closeOperation_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSCloseOperationReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, closeOperation_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class closeOperation_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public closeOperation_argsTupleScheme getScheme() { + return new closeOperation_argsTupleScheme(); + } + } + + private static class closeOperation_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, closeOperation_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, closeOperation_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSCloseOperationReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class closeOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeOperation_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeOperation_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeOperation_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeOperation_result.class, metaDataMap); + } + + public closeOperation_result() { + } + + public closeOperation_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public closeOperation_result(closeOperation_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public closeOperation_result deepCopy() { + return new closeOperation_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public closeOperation_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof closeOperation_result) + return this.equals((closeOperation_result)that); + return false; + } + + public boolean equals(closeOperation_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(closeOperation_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("closeOperation_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class closeOperation_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public closeOperation_resultStandardScheme getScheme() { + return new closeOperation_resultStandardScheme(); + } + } + + private static class closeOperation_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, closeOperation_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, closeOperation_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class closeOperation_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public closeOperation_resultTupleScheme getScheme() { + return new closeOperation_resultTupleScheme(); + } + } + + private static class closeOperation_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, closeOperation_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, closeOperation_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class getTimeZone_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTimeZone_args"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTimeZone_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTimeZone_argsTupleSchemeFactory(); + + public long sessionId; // 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 { + SESSION_ID((short)1, "sessionId"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTimeZone_args.class, metaDataMap); + } + + public getTimeZone_args() { + } + + public getTimeZone_args( + long sessionId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getTimeZone_args(getTimeZone_args other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + } + + @Override + public getTimeZone_args deepCopy() { + return new getTimeZone_args(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public getTimeZone_args setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof getTimeZone_args) + return this.equals((getTimeZone_args)that); + return false; + } + + public boolean equals(getTimeZone_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + return hashCode; + } + + @Override + public int compareTo(getTimeZone_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getTimeZone_args("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class getTimeZone_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getTimeZone_argsStandardScheme getScheme() { + return new getTimeZone_argsStandardScheme(); + } + } + + private static class getTimeZone_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, getTimeZone_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, getTimeZone_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTimeZone_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getTimeZone_argsTupleScheme getScheme() { + return new getTimeZone_argsTupleScheme(); + } + } + + private static class getTimeZone_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTimeZone_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSessionId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSessionId()) { + oprot.writeI64(struct.sessionId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTimeZone_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class getTimeZone_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTimeZone_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTimeZone_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTimeZone_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSGetTimeZoneResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSGetTimeZoneResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTimeZone_result.class, metaDataMap); + } + + public getTimeZone_result() { + } + + public getTimeZone_result( + TSGetTimeZoneResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getTimeZone_result(getTimeZone_result other) { + if (other.isSetSuccess()) { + this.success = new TSGetTimeZoneResp(other.success); + } + } + + @Override + public getTimeZone_result deepCopy() { + return new getTimeZone_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSGetTimeZoneResp getSuccess() { + return this.success; + } + + public getTimeZone_result setSuccess(@org.apache.thrift.annotation.Nullable TSGetTimeZoneResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSGetTimeZoneResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof getTimeZone_result) + return this.equals((getTimeZone_result)that); + return false; + } + + public boolean equals(getTimeZone_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(getTimeZone_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getTimeZone_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class getTimeZone_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getTimeZone_resultStandardScheme getScheme() { + return new getTimeZone_resultStandardScheme(); + } + } + + private static class getTimeZone_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, getTimeZone_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSGetTimeZoneResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, getTimeZone_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTimeZone_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getTimeZone_resultTupleScheme getScheme() { + return new getTimeZone_resultTupleScheme(); + } + } + + private static class getTimeZone_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTimeZone_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTimeZone_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSGetTimeZoneResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class setTimeZone_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setTimeZone_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setTimeZone_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setTimeZone_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSSetTimeZoneReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSSetTimeZoneReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setTimeZone_args.class, metaDataMap); + } + + public setTimeZone_args() { + } + + public setTimeZone_args( + TSSetTimeZoneReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public setTimeZone_args(setTimeZone_args other) { + if (other.isSetReq()) { + this.req = new TSSetTimeZoneReq(other.req); + } + } + + @Override + public setTimeZone_args deepCopy() { + return new setTimeZone_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSSetTimeZoneReq getReq() { + return this.req; + } + + public setTimeZone_args setReq(@org.apache.thrift.annotation.Nullable TSSetTimeZoneReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSSetTimeZoneReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof setTimeZone_args) + return this.equals((setTimeZone_args)that); + return false; + } + + public boolean equals(setTimeZone_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(setTimeZone_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("setTimeZone_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class setTimeZone_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setTimeZone_argsStandardScheme getScheme() { + return new setTimeZone_argsStandardScheme(); + } + } + + private static class setTimeZone_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, setTimeZone_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSSetTimeZoneReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, setTimeZone_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class setTimeZone_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setTimeZone_argsTupleScheme getScheme() { + return new setTimeZone_argsTupleScheme(); + } + } + + private static class setTimeZone_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, setTimeZone_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, setTimeZone_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSSetTimeZoneReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class setTimeZone_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setTimeZone_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setTimeZone_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setTimeZone_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setTimeZone_result.class, metaDataMap); + } + + public setTimeZone_result() { + } + + public setTimeZone_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public setTimeZone_result(setTimeZone_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public setTimeZone_result deepCopy() { + return new setTimeZone_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public setTimeZone_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof setTimeZone_result) + return this.equals((setTimeZone_result)that); + return false; + } + + public boolean equals(setTimeZone_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(setTimeZone_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("setTimeZone_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class setTimeZone_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setTimeZone_resultStandardScheme getScheme() { + return new setTimeZone_resultStandardScheme(); + } + } + + private static class setTimeZone_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, setTimeZone_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, setTimeZone_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class setTimeZone_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setTimeZone_resultTupleScheme getScheme() { + return new setTimeZone_resultTupleScheme(); + } + } + + private static class setTimeZone_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, setTimeZone_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, setTimeZone_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class getProperties_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getProperties_args"); + + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getProperties_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getProperties_argsTupleSchemeFactory(); + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getProperties_args.class, metaDataMap); + } + + public getProperties_args() { + } + + /** + * Performs a deep copy on other. + */ + public getProperties_args(getProperties_args other) { + } + + @Override + public getProperties_args deepCopy() { + return new getProperties_args(this); + } + + @Override + public void clear() { + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof getProperties_args) + return this.equals((getProperties_args)that); + return false; + } + + public boolean equals(getProperties_args that) { + if (that == null) + return false; + if (this == that) + return true; + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + return hashCode; + } + + @Override + public int compareTo(getProperties_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getProperties_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class getProperties_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getProperties_argsStandardScheme getScheme() { + return new getProperties_argsStandardScheme(); + } + } + + private static class getProperties_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, getProperties_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, getProperties_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getProperties_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getProperties_argsTupleScheme getScheme() { + return new getProperties_argsTupleScheme(); + } + } + + private static class getProperties_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getProperties_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getProperties_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class getProperties_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getProperties_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getProperties_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getProperties_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable ServerProperties success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ServerProperties.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getProperties_result.class, metaDataMap); + } + + public getProperties_result() { + } + + public getProperties_result( + ServerProperties success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getProperties_result(getProperties_result other) { + if (other.isSetSuccess()) { + this.success = new ServerProperties(other.success); + } + } + + @Override + public getProperties_result deepCopy() { + return new getProperties_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public ServerProperties getSuccess() { + return this.success; + } + + public getProperties_result setSuccess(@org.apache.thrift.annotation.Nullable ServerProperties success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((ServerProperties)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof getProperties_result) + return this.equals((getProperties_result)that); + return false; + } + + public boolean equals(getProperties_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(getProperties_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getProperties_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class getProperties_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getProperties_resultStandardScheme getScheme() { + return new getProperties_resultStandardScheme(); + } + } + + private static class getProperties_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, getProperties_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new ServerProperties(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, getProperties_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getProperties_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getProperties_resultTupleScheme getScheme() { + return new getProperties_resultTupleScheme(); + } + } + + private static class getProperties_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getProperties_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getProperties_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new ServerProperties(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class setStorageGroup_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setStorageGroup_args"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField STORAGE_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("storageGroup", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setStorageGroup_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setStorageGroup_argsTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String storageGroup; // 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 { + SESSION_ID((short)1, "sessionId"), + STORAGE_GROUP((short)2, "storageGroup"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // STORAGE_GROUP + return STORAGE_GROUP; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STORAGE_GROUP, new org.apache.thrift.meta_data.FieldMetaData("storageGroup", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setStorageGroup_args.class, metaDataMap); + } + + public setStorageGroup_args() { + } + + public setStorageGroup_args( + long sessionId, + java.lang.String storageGroup) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.storageGroup = storageGroup; + } + + /** + * Performs a deep copy on other. + */ + public setStorageGroup_args(setStorageGroup_args other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetStorageGroup()) { + this.storageGroup = other.storageGroup; + } + } + + @Override + public setStorageGroup_args deepCopy() { + return new setStorageGroup_args(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.storageGroup = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public setStorageGroup_args setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getStorageGroup() { + return this.storageGroup; + } + + public setStorageGroup_args setStorageGroup(@org.apache.thrift.annotation.Nullable java.lang.String storageGroup) { + this.storageGroup = storageGroup; + return this; + } + + public void unsetStorageGroup() { + this.storageGroup = null; + } + + /** Returns true if field storageGroup is set (has been assigned a value) and false otherwise */ + public boolean isSetStorageGroup() { + return this.storageGroup != null; + } + + public void setStorageGroupIsSet(boolean value) { + if (!value) { + this.storageGroup = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case STORAGE_GROUP: + if (value == null) { + unsetStorageGroup(); + } else { + setStorageGroup((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case STORAGE_GROUP: + return getStorageGroup(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case STORAGE_GROUP: + return isSetStorageGroup(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof setStorageGroup_args) + return this.equals((setStorageGroup_args)that); + return false; + } + + public boolean equals(setStorageGroup_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_storageGroup = true && this.isSetStorageGroup(); + boolean that_present_storageGroup = true && that.isSetStorageGroup(); + if (this_present_storageGroup || that_present_storageGroup) { + if (!(this_present_storageGroup && that_present_storageGroup)) + return false; + if (!this.storageGroup.equals(that.storageGroup)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetStorageGroup()) ? 131071 : 524287); + if (isSetStorageGroup()) + hashCode = hashCode * 8191 + storageGroup.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(setStorageGroup_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStorageGroup(), other.isSetStorageGroup()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStorageGroup()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storageGroup, other.storageGroup); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("setStorageGroup_args("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("storageGroup:"); + if (this.storageGroup == null) { + sb.append("null"); + } else { + sb.append(this.storageGroup); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class setStorageGroup_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setStorageGroup_argsStandardScheme getScheme() { + return new setStorageGroup_argsStandardScheme(); + } + } + + private static class setStorageGroup_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, setStorageGroup_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STORAGE_GROUP + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.storageGroup = iprot.readString(); + struct.setStorageGroupIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, setStorageGroup_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.storageGroup != null) { + oprot.writeFieldBegin(STORAGE_GROUP_FIELD_DESC); + oprot.writeString(struct.storageGroup); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class setStorageGroup_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setStorageGroup_argsTupleScheme getScheme() { + return new setStorageGroup_argsTupleScheme(); + } + } + + private static class setStorageGroup_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, setStorageGroup_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSessionId()) { + optionals.set(0); + } + if (struct.isSetStorageGroup()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSessionId()) { + oprot.writeI64(struct.sessionId); + } + if (struct.isSetStorageGroup()) { + oprot.writeString(struct.storageGroup); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, setStorageGroup_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } + if (incoming.get(1)) { + struct.storageGroup = iprot.readString(); + struct.setStorageGroupIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class setStorageGroup_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setStorageGroup_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setStorageGroup_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setStorageGroup_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setStorageGroup_result.class, metaDataMap); + } + + public setStorageGroup_result() { + } + + public setStorageGroup_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public setStorageGroup_result(setStorageGroup_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public setStorageGroup_result deepCopy() { + return new setStorageGroup_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public setStorageGroup_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof setStorageGroup_result) + return this.equals((setStorageGroup_result)that); + return false; + } + + public boolean equals(setStorageGroup_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(setStorageGroup_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("setStorageGroup_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class setStorageGroup_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setStorageGroup_resultStandardScheme getScheme() { + return new setStorageGroup_resultStandardScheme(); + } + } + + private static class setStorageGroup_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, setStorageGroup_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, setStorageGroup_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class setStorageGroup_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setStorageGroup_resultTupleScheme getScheme() { + return new setStorageGroup_resultTupleScheme(); + } + } + + private static class setStorageGroup_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, setStorageGroup_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, setStorageGroup_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createTimeseries_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTimeseries_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTimeseries_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTimeseries_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSCreateTimeseriesReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCreateTimeseriesReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTimeseries_args.class, metaDataMap); + } + + public createTimeseries_args() { + } + + public createTimeseries_args( + TSCreateTimeseriesReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public createTimeseries_args(createTimeseries_args other) { + if (other.isSetReq()) { + this.req = new TSCreateTimeseriesReq(other.req); + } + } + + @Override + public createTimeseries_args deepCopy() { + return new createTimeseries_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSCreateTimeseriesReq getReq() { + return this.req; + } + + public createTimeseries_args setReq(@org.apache.thrift.annotation.Nullable TSCreateTimeseriesReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSCreateTimeseriesReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createTimeseries_args) + return this.equals((createTimeseries_args)that); + return false; + } + + public boolean equals(createTimeseries_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createTimeseries_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createTimeseries_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createTimeseries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createTimeseries_argsStandardScheme getScheme() { + return new createTimeseries_argsStandardScheme(); + } + } + + private static class createTimeseries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSCreateTimeseriesReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createTimeseries_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createTimeseries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createTimeseries_argsTupleScheme getScheme() { + return new createTimeseries_argsTupleScheme(); + } + } + + private static class createTimeseries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSCreateTimeseriesReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createTimeseries_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTimeseries_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTimeseries_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTimeseries_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTimeseries_result.class, metaDataMap); + } + + public createTimeseries_result() { + } + + public createTimeseries_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public createTimeseries_result(createTimeseries_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public createTimeseries_result deepCopy() { + return new createTimeseries_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public createTimeseries_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createTimeseries_result) + return this.equals((createTimeseries_result)that); + return false; + } + + public boolean equals(createTimeseries_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createTimeseries_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createTimeseries_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createTimeseries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createTimeseries_resultStandardScheme getScheme() { + return new createTimeseries_resultStandardScheme(); + } + } + + private static class createTimeseries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createTimeseries_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createTimeseries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createTimeseries_resultTupleScheme getScheme() { + return new createTimeseries_resultTupleScheme(); + } + } + + private static class createTimeseries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createAlignedTimeseries_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAlignedTimeseries_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createAlignedTimeseries_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createAlignedTimeseries_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSCreateAlignedTimeseriesReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCreateAlignedTimeseriesReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createAlignedTimeseries_args.class, metaDataMap); + } + + public createAlignedTimeseries_args() { + } + + public createAlignedTimeseries_args( + TSCreateAlignedTimeseriesReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public createAlignedTimeseries_args(createAlignedTimeseries_args other) { + if (other.isSetReq()) { + this.req = new TSCreateAlignedTimeseriesReq(other.req); + } + } + + @Override + public createAlignedTimeseries_args deepCopy() { + return new createAlignedTimeseries_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSCreateAlignedTimeseriesReq getReq() { + return this.req; + } + + public createAlignedTimeseries_args setReq(@org.apache.thrift.annotation.Nullable TSCreateAlignedTimeseriesReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSCreateAlignedTimeseriesReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createAlignedTimeseries_args) + return this.equals((createAlignedTimeseries_args)that); + return false; + } + + public boolean equals(createAlignedTimeseries_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createAlignedTimeseries_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createAlignedTimeseries_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createAlignedTimeseries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createAlignedTimeseries_argsStandardScheme getScheme() { + return new createAlignedTimeseries_argsStandardScheme(); + } + } + + private static class createAlignedTimeseries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createAlignedTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSCreateAlignedTimeseriesReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createAlignedTimeseries_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createAlignedTimeseries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createAlignedTimeseries_argsTupleScheme getScheme() { + return new createAlignedTimeseries_argsTupleScheme(); + } + } + + private static class createAlignedTimeseries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createAlignedTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createAlignedTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSCreateAlignedTimeseriesReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createAlignedTimeseries_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAlignedTimeseries_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createAlignedTimeseries_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createAlignedTimeseries_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createAlignedTimeseries_result.class, metaDataMap); + } + + public createAlignedTimeseries_result() { + } + + public createAlignedTimeseries_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public createAlignedTimeseries_result(createAlignedTimeseries_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public createAlignedTimeseries_result deepCopy() { + return new createAlignedTimeseries_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public createAlignedTimeseries_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createAlignedTimeseries_result) + return this.equals((createAlignedTimeseries_result)that); + return false; + } + + public boolean equals(createAlignedTimeseries_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createAlignedTimeseries_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createAlignedTimeseries_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createAlignedTimeseries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createAlignedTimeseries_resultStandardScheme getScheme() { + return new createAlignedTimeseries_resultStandardScheme(); + } + } + + private static class createAlignedTimeseries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createAlignedTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createAlignedTimeseries_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createAlignedTimeseries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createAlignedTimeseries_resultTupleScheme getScheme() { + return new createAlignedTimeseries_resultTupleScheme(); + } + } + + private static class createAlignedTimeseries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createAlignedTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createAlignedTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createMultiTimeseries_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createMultiTimeseries_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createMultiTimeseries_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createMultiTimeseries_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSCreateMultiTimeseriesReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCreateMultiTimeseriesReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createMultiTimeseries_args.class, metaDataMap); + } + + public createMultiTimeseries_args() { + } + + public createMultiTimeseries_args( + TSCreateMultiTimeseriesReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public createMultiTimeseries_args(createMultiTimeseries_args other) { + if (other.isSetReq()) { + this.req = new TSCreateMultiTimeseriesReq(other.req); + } + } + + @Override + public createMultiTimeseries_args deepCopy() { + return new createMultiTimeseries_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSCreateMultiTimeseriesReq getReq() { + return this.req; + } + + public createMultiTimeseries_args setReq(@org.apache.thrift.annotation.Nullable TSCreateMultiTimeseriesReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSCreateMultiTimeseriesReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createMultiTimeseries_args) + return this.equals((createMultiTimeseries_args)that); + return false; + } + + public boolean equals(createMultiTimeseries_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createMultiTimeseries_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createMultiTimeseries_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createMultiTimeseries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createMultiTimeseries_argsStandardScheme getScheme() { + return new createMultiTimeseries_argsStandardScheme(); + } + } + + private static class createMultiTimeseries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createMultiTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSCreateMultiTimeseriesReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createMultiTimeseries_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createMultiTimeseries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createMultiTimeseries_argsTupleScheme getScheme() { + return new createMultiTimeseries_argsTupleScheme(); + } + } + + private static class createMultiTimeseries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createMultiTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createMultiTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSCreateMultiTimeseriesReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createMultiTimeseries_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createMultiTimeseries_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createMultiTimeseries_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createMultiTimeseries_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createMultiTimeseries_result.class, metaDataMap); + } + + public createMultiTimeseries_result() { + } + + public createMultiTimeseries_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public createMultiTimeseries_result(createMultiTimeseries_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public createMultiTimeseries_result deepCopy() { + return new createMultiTimeseries_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public createMultiTimeseries_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createMultiTimeseries_result) + return this.equals((createMultiTimeseries_result)that); + return false; + } + + public boolean equals(createMultiTimeseries_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createMultiTimeseries_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createMultiTimeseries_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createMultiTimeseries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createMultiTimeseries_resultStandardScheme getScheme() { + return new createMultiTimeseries_resultStandardScheme(); + } + } + + private static class createMultiTimeseries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createMultiTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createMultiTimeseries_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createMultiTimeseries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createMultiTimeseries_resultTupleScheme getScheme() { + return new createMultiTimeseries_resultTupleScheme(); + } + } + + private static class createMultiTimeseries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createMultiTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createMultiTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class deleteTimeseries_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTimeseries_args"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteTimeseries_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteTimeseries_argsTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List path; // 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 { + SESSION_ID((short)1, "sessionId"), + PATH((short)2, "path"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PATH + return PATH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTimeseries_args.class, metaDataMap); + } + + public deleteTimeseries_args() { + } + + public deleteTimeseries_args( + long sessionId, + java.util.List path) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.path = path; + } + + /** + * Performs a deep copy on other. + */ + public deleteTimeseries_args(deleteTimeseries_args other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPath()) { + java.util.List __this__path = new java.util.ArrayList(other.path); + this.path = __this__path; + } + } + + @Override + public deleteTimeseries_args deepCopy() { + return new deleteTimeseries_args(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.path = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public deleteTimeseries_args setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getPathSize() { + return (this.path == null) ? 0 : this.path.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPathIterator() { + return (this.path == null) ? null : this.path.iterator(); + } + + public void addToPath(java.lang.String elem) { + if (this.path == null) { + this.path = new java.util.ArrayList(); + } + this.path.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getPath() { + return this.path; + } + + public deleteTimeseries_args setPath(@org.apache.thrift.annotation.Nullable java.util.List path) { + this.path = path; + return this; + } + + public void unsetPath() { + this.path = null; + } + + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; + } + + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PATH: + if (value == null) { + unsetPath(); + } else { + setPath((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PATH: + return getPath(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PATH: + return isSetPath(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof deleteTimeseries_args) + return this.equals((deleteTimeseries_args)that); + return false; + } + + public boolean equals(deleteTimeseries_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) + return false; + if (!this.path.equals(that.path)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287); + if (isSetPath()) + hashCode = hashCode * 8191 + path.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(deleteTimeseries_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPath(), other.isSetPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteTimeseries_args("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("path:"); + if (this.path == null) { + sb.append("null"); + } else { + sb.append(this.path); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class deleteTimeseries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteTimeseries_argsStandardScheme getScheme() { + return new deleteTimeseries_argsStandardScheme(); + } + } + + private static class deleteTimeseries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list758 = iprot.readListBegin(); + struct.path = new java.util.ArrayList(_list758.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem759; + for (int _i760 = 0; _i760 < _list758.size; ++_i760) + { + _elem759 = iprot.readString(); + struct.path.add(_elem759); + } + iprot.readListEnd(); + } + struct.setPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTimeseries_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.path.size())); + for (java.lang.String _iter761 : struct.path) + { + oprot.writeString(_iter761); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteTimeseries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteTimeseries_argsTupleScheme getScheme() { + return new deleteTimeseries_argsTupleScheme(); + } + } + + private static class deleteTimeseries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSessionId()) { + optionals.set(0); + } + if (struct.isSetPath()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSessionId()) { + oprot.writeI64(struct.sessionId); + } + if (struct.isSetPath()) { + { + oprot.writeI32(struct.path.size()); + for (java.lang.String _iter762 : struct.path) + { + oprot.writeString(_iter762); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteTimeseries_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list763 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.path = new java.util.ArrayList(_list763.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem764; + for (int _i765 = 0; _i765 < _list763.size; ++_i765) + { + _elem764 = iprot.readString(); + struct.path.add(_elem764); + } + } + struct.setPathIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class deleteTimeseries_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTimeseries_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteTimeseries_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteTimeseries_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTimeseries_result.class, metaDataMap); + } + + public deleteTimeseries_result() { + } + + public deleteTimeseries_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deleteTimeseries_result(deleteTimeseries_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public deleteTimeseries_result deepCopy() { + return new deleteTimeseries_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public deleteTimeseries_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof deleteTimeseries_result) + return this.equals((deleteTimeseries_result)that); + return false; + } + + public boolean equals(deleteTimeseries_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(deleteTimeseries_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteTimeseries_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class deleteTimeseries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteTimeseries_resultStandardScheme getScheme() { + return new deleteTimeseries_resultStandardScheme(); + } + } + + private static class deleteTimeseries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTimeseries_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteTimeseries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteTimeseries_resultTupleScheme getScheme() { + return new deleteTimeseries_resultTupleScheme(); + } + } + + private static class deleteTimeseries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteTimeseries_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class deleteStorageGroups_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteStorageGroups_args"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField STORAGE_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("storageGroup", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteStorageGroups_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteStorageGroups_argsTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List storageGroup; // 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 { + SESSION_ID((short)1, "sessionId"), + STORAGE_GROUP((short)2, "storageGroup"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // STORAGE_GROUP + return STORAGE_GROUP; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STORAGE_GROUP, new org.apache.thrift.meta_data.FieldMetaData("storageGroup", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteStorageGroups_args.class, metaDataMap); + } + + public deleteStorageGroups_args() { + } + + public deleteStorageGroups_args( + long sessionId, + java.util.List storageGroup) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.storageGroup = storageGroup; + } + + /** + * Performs a deep copy on other. + */ + public deleteStorageGroups_args(deleteStorageGroups_args other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetStorageGroup()) { + java.util.List __this__storageGroup = new java.util.ArrayList(other.storageGroup); + this.storageGroup = __this__storageGroup; + } + } + + @Override + public deleteStorageGroups_args deepCopy() { + return new deleteStorageGroups_args(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.storageGroup = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public deleteStorageGroups_args setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getStorageGroupSize() { + return (this.storageGroup == null) ? 0 : this.storageGroup.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getStorageGroupIterator() { + return (this.storageGroup == null) ? null : this.storageGroup.iterator(); + } + + public void addToStorageGroup(java.lang.String elem) { + if (this.storageGroup == null) { + this.storageGroup = new java.util.ArrayList(); + } + this.storageGroup.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getStorageGroup() { + return this.storageGroup; + } + + public deleteStorageGroups_args setStorageGroup(@org.apache.thrift.annotation.Nullable java.util.List storageGroup) { + this.storageGroup = storageGroup; + return this; + } + + public void unsetStorageGroup() { + this.storageGroup = null; + } + + /** Returns true if field storageGroup is set (has been assigned a value) and false otherwise */ + public boolean isSetStorageGroup() { + return this.storageGroup != null; + } + + public void setStorageGroupIsSet(boolean value) { + if (!value) { + this.storageGroup = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case STORAGE_GROUP: + if (value == null) { + unsetStorageGroup(); + } else { + setStorageGroup((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case STORAGE_GROUP: + return getStorageGroup(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case STORAGE_GROUP: + return isSetStorageGroup(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof deleteStorageGroups_args) + return this.equals((deleteStorageGroups_args)that); + return false; + } + + public boolean equals(deleteStorageGroups_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_storageGroup = true && this.isSetStorageGroup(); + boolean that_present_storageGroup = true && that.isSetStorageGroup(); + if (this_present_storageGroup || that_present_storageGroup) { + if (!(this_present_storageGroup && that_present_storageGroup)) + return false; + if (!this.storageGroup.equals(that.storageGroup)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetStorageGroup()) ? 131071 : 524287); + if (isSetStorageGroup()) + hashCode = hashCode * 8191 + storageGroup.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(deleteStorageGroups_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStorageGroup(), other.isSetStorageGroup()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStorageGroup()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storageGroup, other.storageGroup); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteStorageGroups_args("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("storageGroup:"); + if (this.storageGroup == null) { + sb.append("null"); + } else { + sb.append(this.storageGroup); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class deleteStorageGroups_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteStorageGroups_argsStandardScheme getScheme() { + return new deleteStorageGroups_argsStandardScheme(); + } + } + + private static class deleteStorageGroups_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteStorageGroups_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STORAGE_GROUP + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list766 = iprot.readListBegin(); + struct.storageGroup = new java.util.ArrayList(_list766.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem767; + for (int _i768 = 0; _i768 < _list766.size; ++_i768) + { + _elem767 = iprot.readString(); + struct.storageGroup.add(_elem767); + } + iprot.readListEnd(); + } + struct.setStorageGroupIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteStorageGroups_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.storageGroup != null) { + oprot.writeFieldBegin(STORAGE_GROUP_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.storageGroup.size())); + for (java.lang.String _iter769 : struct.storageGroup) + { + oprot.writeString(_iter769); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteStorageGroups_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteStorageGroups_argsTupleScheme getScheme() { + return new deleteStorageGroups_argsTupleScheme(); + } + } + + private static class deleteStorageGroups_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteStorageGroups_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSessionId()) { + optionals.set(0); + } + if (struct.isSetStorageGroup()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSessionId()) { + oprot.writeI64(struct.sessionId); + } + if (struct.isSetStorageGroup()) { + { + oprot.writeI32(struct.storageGroup.size()); + for (java.lang.String _iter770 : struct.storageGroup) + { + oprot.writeString(_iter770); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteStorageGroups_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list771 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.storageGroup = new java.util.ArrayList(_list771.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem772; + for (int _i773 = 0; _i773 < _list771.size; ++_i773) + { + _elem772 = iprot.readString(); + struct.storageGroup.add(_elem772); + } + } + struct.setStorageGroupIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class deleteStorageGroups_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteStorageGroups_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteStorageGroups_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteStorageGroups_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteStorageGroups_result.class, metaDataMap); + } + + public deleteStorageGroups_result() { + } + + public deleteStorageGroups_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deleteStorageGroups_result(deleteStorageGroups_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public deleteStorageGroups_result deepCopy() { + return new deleteStorageGroups_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public deleteStorageGroups_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof deleteStorageGroups_result) + return this.equals((deleteStorageGroups_result)that); + return false; + } + + public boolean equals(deleteStorageGroups_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(deleteStorageGroups_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteStorageGroups_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class deleteStorageGroups_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteStorageGroups_resultStandardScheme getScheme() { + return new deleteStorageGroups_resultStandardScheme(); + } + } + + private static class deleteStorageGroups_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteStorageGroups_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteStorageGroups_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteStorageGroups_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteStorageGroups_resultTupleScheme getScheme() { + return new deleteStorageGroups_resultTupleScheme(); + } + } + + private static class deleteStorageGroups_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteStorageGroups_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteStorageGroups_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertRecord_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecord_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecord_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecord_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertRecordReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecord_args.class, metaDataMap); + } + + public insertRecord_args() { + } + + public insertRecord_args( + TSInsertRecordReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public insertRecord_args(insertRecord_args other) { + if (other.isSetReq()) { + this.req = new TSInsertRecordReq(other.req); + } + } + + @Override + public insertRecord_args deepCopy() { + return new insertRecord_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertRecordReq getReq() { + return this.req; + } + + public insertRecord_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertRecordReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertRecord_args) + return this.equals((insertRecord_args)that); + return false; + } + + public boolean equals(insertRecord_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertRecord_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecord_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertRecord_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecord_argsStandardScheme getScheme() { + return new insertRecord_argsStandardScheme(); + } + } + + private static class insertRecord_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertRecordReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecord_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertRecord_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecord_argsTupleScheme getScheme() { + return new insertRecord_argsTupleScheme(); + } + } + + private static class insertRecord_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertRecordReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertRecord_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecord_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecord_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecord_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecord_result.class, metaDataMap); + } + + public insertRecord_result() { + } + + public insertRecord_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public insertRecord_result(insertRecord_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public insertRecord_result deepCopy() { + return new insertRecord_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public insertRecord_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertRecord_result) + return this.equals((insertRecord_result)that); + return false; + } + + public boolean equals(insertRecord_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertRecord_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecord_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertRecord_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecord_resultStandardScheme getScheme() { + return new insertRecord_resultStandardScheme(); + } + } + + private static class insertRecord_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecord_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertRecord_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecord_resultTupleScheme getScheme() { + return new insertRecord_resultTupleScheme(); + } + } + + private static class insertRecord_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertStringRecord_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecord_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecord_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecord_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertStringRecordReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecord_args.class, metaDataMap); + } + + public insertStringRecord_args() { + } + + public insertStringRecord_args( + TSInsertStringRecordReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public insertStringRecord_args(insertStringRecord_args other) { + if (other.isSetReq()) { + this.req = new TSInsertStringRecordReq(other.req); + } + } + + @Override + public insertStringRecord_args deepCopy() { + return new insertStringRecord_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertStringRecordReq getReq() { + return this.req; + } + + public insertStringRecord_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertStringRecordReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertStringRecord_args) + return this.equals((insertStringRecord_args)that); + return false; + } + + public boolean equals(insertStringRecord_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertStringRecord_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecord_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertStringRecord_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecord_argsStandardScheme getScheme() { + return new insertStringRecord_argsStandardScheme(); + } + } + + private static class insertStringRecord_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertStringRecordReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecord_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertStringRecord_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecord_argsTupleScheme getScheme() { + return new insertStringRecord_argsTupleScheme(); + } + } + + private static class insertStringRecord_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertStringRecordReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertStringRecord_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecord_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecord_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecord_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecord_result.class, metaDataMap); + } + + public insertStringRecord_result() { + } + + public insertStringRecord_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public insertStringRecord_result(insertStringRecord_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public insertStringRecord_result deepCopy() { + return new insertStringRecord_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public insertStringRecord_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertStringRecord_result) + return this.equals((insertStringRecord_result)that); + return false; + } + + public boolean equals(insertStringRecord_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertStringRecord_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecord_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertStringRecord_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecord_resultStandardScheme getScheme() { + return new insertStringRecord_resultStandardScheme(); + } + } + + private static class insertStringRecord_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecord_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertStringRecord_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecord_resultTupleScheme getScheme() { + return new insertStringRecord_resultTupleScheme(); + } + } + + private static class insertStringRecord_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertTablet_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertTablet_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertTablet_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertTablet_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertTabletReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertTabletReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTablet_args.class, metaDataMap); + } + + public insertTablet_args() { + } + + public insertTablet_args( + TSInsertTabletReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public insertTablet_args(insertTablet_args other) { + if (other.isSetReq()) { + this.req = new TSInsertTabletReq(other.req); + } + } + + @Override + public insertTablet_args deepCopy() { + return new insertTablet_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertTabletReq getReq() { + return this.req; + } + + public insertTablet_args setReq(@org.apache.thrift.annotation.Nullable TSInsertTabletReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertTabletReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertTablet_args) + return this.equals((insertTablet_args)that); + return false; + } + + public boolean equals(insertTablet_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertTablet_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertTablet_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertTablet_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertTablet_argsStandardScheme getScheme() { + return new insertTablet_argsStandardScheme(); + } + } + + private static class insertTablet_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertTablet_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertTabletReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertTablet_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertTablet_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertTablet_argsTupleScheme getScheme() { + return new insertTablet_argsTupleScheme(); + } + } + + private static class insertTablet_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertTablet_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertTablet_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertTabletReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertTablet_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertTablet_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertTablet_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertTablet_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTablet_result.class, metaDataMap); + } + + public insertTablet_result() { + } + + public insertTablet_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public insertTablet_result(insertTablet_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public insertTablet_result deepCopy() { + return new insertTablet_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public insertTablet_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertTablet_result) + return this.equals((insertTablet_result)that); + return false; + } + + public boolean equals(insertTablet_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertTablet_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertTablet_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertTablet_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertTablet_resultStandardScheme getScheme() { + return new insertTablet_resultStandardScheme(); + } + } + + private static class insertTablet_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertTablet_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertTablet_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertTablet_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertTablet_resultTupleScheme getScheme() { + return new insertTablet_resultTupleScheme(); + } + } + + private static class insertTablet_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertTablet_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertTablet_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertTablets_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertTablets_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertTablets_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertTablets_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertTabletsReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertTabletsReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTablets_args.class, metaDataMap); + } + + public insertTablets_args() { + } + + public insertTablets_args( + TSInsertTabletsReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public insertTablets_args(insertTablets_args other) { + if (other.isSetReq()) { + this.req = new TSInsertTabletsReq(other.req); + } + } + + @Override + public insertTablets_args deepCopy() { + return new insertTablets_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertTabletsReq getReq() { + return this.req; + } + + public insertTablets_args setReq(@org.apache.thrift.annotation.Nullable TSInsertTabletsReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertTabletsReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertTablets_args) + return this.equals((insertTablets_args)that); + return false; + } + + public boolean equals(insertTablets_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertTablets_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertTablets_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertTablets_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertTablets_argsStandardScheme getScheme() { + return new insertTablets_argsStandardScheme(); + } + } + + private static class insertTablets_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertTablets_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertTabletsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertTablets_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertTablets_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertTablets_argsTupleScheme getScheme() { + return new insertTablets_argsTupleScheme(); + } + } + + private static class insertTablets_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertTablets_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertTablets_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertTabletsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertTablets_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertTablets_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertTablets_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertTablets_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTablets_result.class, metaDataMap); + } + + public insertTablets_result() { + } + + public insertTablets_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public insertTablets_result(insertTablets_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public insertTablets_result deepCopy() { + return new insertTablets_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public insertTablets_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertTablets_result) + return this.equals((insertTablets_result)that); + return false; + } + + public boolean equals(insertTablets_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertTablets_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertTablets_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertTablets_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertTablets_resultStandardScheme getScheme() { + return new insertTablets_resultStandardScheme(); + } + } + + private static class insertTablets_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertTablets_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertTablets_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertTablets_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertTablets_resultTupleScheme getScheme() { + return new insertTablets_resultTupleScheme(); + } + } + + private static class insertTablets_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertTablets_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertTablets_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertRecords_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecords_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecords_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecords_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertRecordsReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordsReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecords_args.class, metaDataMap); + } + + public insertRecords_args() { + } + + public insertRecords_args( + TSInsertRecordsReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public insertRecords_args(insertRecords_args other) { + if (other.isSetReq()) { + this.req = new TSInsertRecordsReq(other.req); + } + } + + @Override + public insertRecords_args deepCopy() { + return new insertRecords_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertRecordsReq getReq() { + return this.req; + } + + public insertRecords_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordsReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertRecordsReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertRecords_args) + return this.equals((insertRecords_args)that); + return false; + } + + public boolean equals(insertRecords_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertRecords_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecords_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertRecords_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecords_argsStandardScheme getScheme() { + return new insertRecords_argsStandardScheme(); + } + } + + private static class insertRecords_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertRecordsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecords_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertRecords_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecords_argsTupleScheme getScheme() { + return new insertRecords_argsTupleScheme(); + } + } + + private static class insertRecords_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertRecordsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertRecords_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecords_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecords_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecords_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecords_result.class, metaDataMap); + } + + public insertRecords_result() { + } + + public insertRecords_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public insertRecords_result(insertRecords_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public insertRecords_result deepCopy() { + return new insertRecords_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public insertRecords_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertRecords_result) + return this.equals((insertRecords_result)that); + return false; + } + + public boolean equals(insertRecords_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertRecords_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecords_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertRecords_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecords_resultStandardScheme getScheme() { + return new insertRecords_resultStandardScheme(); + } + } + + private static class insertRecords_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecords_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertRecords_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecords_resultTupleScheme getScheme() { + return new insertRecords_resultTupleScheme(); + } + } + + private static class insertRecords_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertRecordsOfOneDevice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecordsOfOneDevice_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecordsOfOneDevice_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecordsOfOneDevice_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertRecordsOfOneDeviceReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordsOfOneDeviceReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecordsOfOneDevice_args.class, metaDataMap); + } + + public insertRecordsOfOneDevice_args() { + } + + public insertRecordsOfOneDevice_args( + TSInsertRecordsOfOneDeviceReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public insertRecordsOfOneDevice_args(insertRecordsOfOneDevice_args other) { + if (other.isSetReq()) { + this.req = new TSInsertRecordsOfOneDeviceReq(other.req); + } + } + + @Override + public insertRecordsOfOneDevice_args deepCopy() { + return new insertRecordsOfOneDevice_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertRecordsOfOneDeviceReq getReq() { + return this.req; + } + + public insertRecordsOfOneDevice_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordsOfOneDeviceReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertRecordsOfOneDeviceReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertRecordsOfOneDevice_args) + return this.equals((insertRecordsOfOneDevice_args)that); + return false; + } + + public boolean equals(insertRecordsOfOneDevice_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertRecordsOfOneDevice_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecordsOfOneDevice_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertRecordsOfOneDevice_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecordsOfOneDevice_argsStandardScheme getScheme() { + return new insertRecordsOfOneDevice_argsStandardScheme(); + } + } + + private static class insertRecordsOfOneDevice_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertRecordsOfOneDeviceReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertRecordsOfOneDevice_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecordsOfOneDevice_argsTupleScheme getScheme() { + return new insertRecordsOfOneDevice_argsTupleScheme(); + } + } + + private static class insertRecordsOfOneDevice_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertRecordsOfOneDeviceReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertRecordsOfOneDevice_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecordsOfOneDevice_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecordsOfOneDevice_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecordsOfOneDevice_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecordsOfOneDevice_result.class, metaDataMap); + } + + public insertRecordsOfOneDevice_result() { + } + + public insertRecordsOfOneDevice_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public insertRecordsOfOneDevice_result(insertRecordsOfOneDevice_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public insertRecordsOfOneDevice_result deepCopy() { + return new insertRecordsOfOneDevice_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public insertRecordsOfOneDevice_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertRecordsOfOneDevice_result) + return this.equals((insertRecordsOfOneDevice_result)that); + return false; + } + + public boolean equals(insertRecordsOfOneDevice_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertRecordsOfOneDevice_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecordsOfOneDevice_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertRecordsOfOneDevice_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecordsOfOneDevice_resultStandardScheme getScheme() { + return new insertRecordsOfOneDevice_resultStandardScheme(); + } + } + + private static class insertRecordsOfOneDevice_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertRecordsOfOneDevice_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertRecordsOfOneDevice_resultTupleScheme getScheme() { + return new insertRecordsOfOneDevice_resultTupleScheme(); + } + } + + private static class insertRecordsOfOneDevice_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertStringRecordsOfOneDevice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecordsOfOneDevice_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecordsOfOneDevice_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecordsOfOneDevice_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertStringRecordsOfOneDeviceReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordsOfOneDeviceReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecordsOfOneDevice_args.class, metaDataMap); + } + + public insertStringRecordsOfOneDevice_args() { + } + + public insertStringRecordsOfOneDevice_args( + TSInsertStringRecordsOfOneDeviceReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public insertStringRecordsOfOneDevice_args(insertStringRecordsOfOneDevice_args other) { + if (other.isSetReq()) { + this.req = new TSInsertStringRecordsOfOneDeviceReq(other.req); + } + } + + @Override + public insertStringRecordsOfOneDevice_args deepCopy() { + return new insertStringRecordsOfOneDevice_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertStringRecordsOfOneDeviceReq getReq() { + return this.req; + } + + public insertStringRecordsOfOneDevice_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordsOfOneDeviceReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertStringRecordsOfOneDeviceReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertStringRecordsOfOneDevice_args) + return this.equals((insertStringRecordsOfOneDevice_args)that); + return false; + } + + public boolean equals(insertStringRecordsOfOneDevice_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertStringRecordsOfOneDevice_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecordsOfOneDevice_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertStringRecordsOfOneDevice_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecordsOfOneDevice_argsStandardScheme getScheme() { + return new insertStringRecordsOfOneDevice_argsStandardScheme(); + } + } + + private static class insertStringRecordsOfOneDevice_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertStringRecordsOfOneDeviceReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertStringRecordsOfOneDevice_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecordsOfOneDevice_argsTupleScheme getScheme() { + return new insertStringRecordsOfOneDevice_argsTupleScheme(); + } + } + + private static class insertStringRecordsOfOneDevice_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertStringRecordsOfOneDeviceReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertStringRecordsOfOneDevice_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecordsOfOneDevice_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecordsOfOneDevice_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecordsOfOneDevice_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecordsOfOneDevice_result.class, metaDataMap); + } + + public insertStringRecordsOfOneDevice_result() { + } + + public insertStringRecordsOfOneDevice_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public insertStringRecordsOfOneDevice_result(insertStringRecordsOfOneDevice_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public insertStringRecordsOfOneDevice_result deepCopy() { + return new insertStringRecordsOfOneDevice_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public insertStringRecordsOfOneDevice_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertStringRecordsOfOneDevice_result) + return this.equals((insertStringRecordsOfOneDevice_result)that); + return false; + } + + public boolean equals(insertStringRecordsOfOneDevice_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertStringRecordsOfOneDevice_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecordsOfOneDevice_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertStringRecordsOfOneDevice_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecordsOfOneDevice_resultStandardScheme getScheme() { + return new insertStringRecordsOfOneDevice_resultStandardScheme(); + } + } + + private static class insertStringRecordsOfOneDevice_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertStringRecordsOfOneDevice_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecordsOfOneDevice_resultTupleScheme getScheme() { + return new insertStringRecordsOfOneDevice_resultTupleScheme(); + } + } + + private static class insertStringRecordsOfOneDevice_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertStringRecords_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecords_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecords_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecords_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertStringRecordsReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordsReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecords_args.class, metaDataMap); + } + + public insertStringRecords_args() { + } + + public insertStringRecords_args( + TSInsertStringRecordsReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public insertStringRecords_args(insertStringRecords_args other) { + if (other.isSetReq()) { + this.req = new TSInsertStringRecordsReq(other.req); + } + } + + @Override + public insertStringRecords_args deepCopy() { + return new insertStringRecords_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertStringRecordsReq getReq() { + return this.req; + } + + public insertStringRecords_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordsReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertStringRecordsReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertStringRecords_args) + return this.equals((insertStringRecords_args)that); + return false; + } + + public boolean equals(insertStringRecords_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertStringRecords_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecords_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertStringRecords_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecords_argsStandardScheme getScheme() { + return new insertStringRecords_argsStandardScheme(); + } + } + + private static class insertStringRecords_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertStringRecordsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecords_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertStringRecords_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecords_argsTupleScheme getScheme() { + return new insertStringRecords_argsTupleScheme(); + } + } + + private static class insertStringRecords_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertStringRecordsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class insertStringRecords_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecords_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecords_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecords_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecords_result.class, metaDataMap); + } + + public insertStringRecords_result() { + } + + public insertStringRecords_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public insertStringRecords_result(insertStringRecords_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public insertStringRecords_result deepCopy() { + return new insertStringRecords_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public insertStringRecords_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof insertStringRecords_result) + return this.equals((insertStringRecords_result)that); + return false; + } + + public boolean equals(insertStringRecords_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(insertStringRecords_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecords_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class insertStringRecords_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecords_resultStandardScheme getScheme() { + return new insertStringRecords_resultStandardScheme(); + } + } + + private static class insertStringRecords_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecords_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class insertStringRecords_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public insertStringRecords_resultTupleScheme getScheme() { + return new insertStringRecords_resultTupleScheme(); + } + } + + private static class insertStringRecords_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertTablet_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertTablet_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertTablet_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertTablet_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertTabletReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertTabletReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertTablet_args.class, metaDataMap); + } + + public testInsertTablet_args() { + } + + public testInsertTablet_args( + TSInsertTabletReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public testInsertTablet_args(testInsertTablet_args other) { + if (other.isSetReq()) { + this.req = new TSInsertTabletReq(other.req); + } + } + + @Override + public testInsertTablet_args deepCopy() { + return new testInsertTablet_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertTabletReq getReq() { + return this.req; + } + + public testInsertTablet_args setReq(@org.apache.thrift.annotation.Nullable TSInsertTabletReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertTabletReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertTablet_args) + return this.equals((testInsertTablet_args)that); + return false; + } + + public boolean equals(testInsertTablet_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertTablet_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertTablet_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertTablet_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertTablet_argsStandardScheme getScheme() { + return new testInsertTablet_argsStandardScheme(); + } + } + + private static class testInsertTablet_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertTablet_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertTabletReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertTablet_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertTablet_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertTablet_argsTupleScheme getScheme() { + return new testInsertTablet_argsTupleScheme(); + } + } + + private static class testInsertTablet_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertTablet_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertTablet_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertTabletReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertTablet_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertTablet_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertTablet_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertTablet_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertTablet_result.class, metaDataMap); + } + + public testInsertTablet_result() { + } + + public testInsertTablet_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public testInsertTablet_result(testInsertTablet_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public testInsertTablet_result deepCopy() { + return new testInsertTablet_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public testInsertTablet_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertTablet_result) + return this.equals((testInsertTablet_result)that); + return false; + } + + public boolean equals(testInsertTablet_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertTablet_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertTablet_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertTablet_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertTablet_resultStandardScheme getScheme() { + return new testInsertTablet_resultStandardScheme(); + } + } + + private static class testInsertTablet_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertTablet_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertTablet_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertTablet_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertTablet_resultTupleScheme getScheme() { + return new testInsertTablet_resultTupleScheme(); + } + } + + private static class testInsertTablet_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertTablet_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertTablet_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertTablets_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertTablets_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertTablets_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertTablets_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertTabletsReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertTabletsReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertTablets_args.class, metaDataMap); + } + + public testInsertTablets_args() { + } + + public testInsertTablets_args( + TSInsertTabletsReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public testInsertTablets_args(testInsertTablets_args other) { + if (other.isSetReq()) { + this.req = new TSInsertTabletsReq(other.req); + } + } + + @Override + public testInsertTablets_args deepCopy() { + return new testInsertTablets_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertTabletsReq getReq() { + return this.req; + } + + public testInsertTablets_args setReq(@org.apache.thrift.annotation.Nullable TSInsertTabletsReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertTabletsReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertTablets_args) + return this.equals((testInsertTablets_args)that); + return false; + } + + public boolean equals(testInsertTablets_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertTablets_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertTablets_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertTablets_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertTablets_argsStandardScheme getScheme() { + return new testInsertTablets_argsStandardScheme(); + } + } + + private static class testInsertTablets_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertTablets_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertTabletsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertTablets_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertTablets_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertTablets_argsTupleScheme getScheme() { + return new testInsertTablets_argsTupleScheme(); + } + } + + private static class testInsertTablets_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertTablets_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertTablets_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertTabletsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertTablets_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertTablets_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertTablets_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertTablets_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertTablets_result.class, metaDataMap); + } + + public testInsertTablets_result() { + } + + public testInsertTablets_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public testInsertTablets_result(testInsertTablets_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public testInsertTablets_result deepCopy() { + return new testInsertTablets_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public testInsertTablets_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertTablets_result) + return this.equals((testInsertTablets_result)that); + return false; + } + + public boolean equals(testInsertTablets_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertTablets_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertTablets_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertTablets_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertTablets_resultStandardScheme getScheme() { + return new testInsertTablets_resultStandardScheme(); + } + } + + private static class testInsertTablets_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertTablets_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertTablets_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertTablets_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertTablets_resultTupleScheme getScheme() { + return new testInsertTablets_resultTupleScheme(); + } + } + + private static class testInsertTablets_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertTablets_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertTablets_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertRecord_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecord_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecord_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecord_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertRecordReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecord_args.class, metaDataMap); + } + + public testInsertRecord_args() { + } + + public testInsertRecord_args( + TSInsertRecordReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public testInsertRecord_args(testInsertRecord_args other) { + if (other.isSetReq()) { + this.req = new TSInsertRecordReq(other.req); + } + } + + @Override + public testInsertRecord_args deepCopy() { + return new testInsertRecord_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertRecordReq getReq() { + return this.req; + } + + public testInsertRecord_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertRecordReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertRecord_args) + return this.equals((testInsertRecord_args)that); + return false; + } + + public boolean equals(testInsertRecord_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertRecord_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecord_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertRecord_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecord_argsStandardScheme getScheme() { + return new testInsertRecord_argsStandardScheme(); + } + } + + private static class testInsertRecord_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertRecordReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecord_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertRecord_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecord_argsTupleScheme getScheme() { + return new testInsertRecord_argsTupleScheme(); + } + } + + private static class testInsertRecord_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertRecordReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertRecord_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecord_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecord_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecord_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecord_result.class, metaDataMap); + } + + public testInsertRecord_result() { + } + + public testInsertRecord_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public testInsertRecord_result(testInsertRecord_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public testInsertRecord_result deepCopy() { + return new testInsertRecord_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public testInsertRecord_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertRecord_result) + return this.equals((testInsertRecord_result)that); + return false; + } + + public boolean equals(testInsertRecord_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertRecord_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecord_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertRecord_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecord_resultStandardScheme getScheme() { + return new testInsertRecord_resultStandardScheme(); + } + } + + private static class testInsertRecord_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecord_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertRecord_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecord_resultTupleScheme getScheme() { + return new testInsertRecord_resultTupleScheme(); + } + } + + private static class testInsertRecord_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertStringRecord_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertStringRecord_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertStringRecord_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertStringRecord_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertStringRecordReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertStringRecord_args.class, metaDataMap); + } + + public testInsertStringRecord_args() { + } + + public testInsertStringRecord_args( + TSInsertStringRecordReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public testInsertStringRecord_args(testInsertStringRecord_args other) { + if (other.isSetReq()) { + this.req = new TSInsertStringRecordReq(other.req); + } + } + + @Override + public testInsertStringRecord_args deepCopy() { + return new testInsertStringRecord_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertStringRecordReq getReq() { + return this.req; + } + + public testInsertStringRecord_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertStringRecordReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertStringRecord_args) + return this.equals((testInsertStringRecord_args)that); + return false; + } + + public boolean equals(testInsertStringRecord_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertStringRecord_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertStringRecord_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertStringRecord_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertStringRecord_argsStandardScheme getScheme() { + return new testInsertStringRecord_argsStandardScheme(); + } + } + + private static class testInsertStringRecord_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertStringRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertStringRecordReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertStringRecord_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertStringRecord_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertStringRecord_argsTupleScheme getScheme() { + return new testInsertStringRecord_argsTupleScheme(); + } + } + + private static class testInsertStringRecord_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecord_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertStringRecordReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertStringRecord_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertStringRecord_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertStringRecord_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertStringRecord_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertStringRecord_result.class, metaDataMap); + } + + public testInsertStringRecord_result() { + } + + public testInsertStringRecord_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public testInsertStringRecord_result(testInsertStringRecord_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public testInsertStringRecord_result deepCopy() { + return new testInsertStringRecord_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public testInsertStringRecord_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertStringRecord_result) + return this.equals((testInsertStringRecord_result)that); + return false; + } + + public boolean equals(testInsertStringRecord_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertStringRecord_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertStringRecord_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertStringRecord_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertStringRecord_resultStandardScheme getScheme() { + return new testInsertStringRecord_resultStandardScheme(); + } + } + + private static class testInsertStringRecord_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertStringRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertStringRecord_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertStringRecord_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertStringRecord_resultTupleScheme getScheme() { + return new testInsertStringRecord_resultTupleScheme(); + } + } + + private static class testInsertStringRecord_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecord_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertRecords_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecords_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecords_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecords_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertRecordsReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordsReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecords_args.class, metaDataMap); + } + + public testInsertRecords_args() { + } + + public testInsertRecords_args( + TSInsertRecordsReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public testInsertRecords_args(testInsertRecords_args other) { + if (other.isSetReq()) { + this.req = new TSInsertRecordsReq(other.req); + } + } + + @Override + public testInsertRecords_args deepCopy() { + return new testInsertRecords_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertRecordsReq getReq() { + return this.req; + } + + public testInsertRecords_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordsReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertRecordsReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertRecords_args) + return this.equals((testInsertRecords_args)that); + return false; + } + + public boolean equals(testInsertRecords_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertRecords_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecords_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertRecords_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecords_argsStandardScheme getScheme() { + return new testInsertRecords_argsStandardScheme(); + } + } + + private static class testInsertRecords_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertRecordsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecords_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertRecords_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecords_argsTupleScheme getScheme() { + return new testInsertRecords_argsTupleScheme(); + } + } + + private static class testInsertRecords_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertRecordsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertRecords_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecords_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecords_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecords_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecords_result.class, metaDataMap); + } + + public testInsertRecords_result() { + } + + public testInsertRecords_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public testInsertRecords_result(testInsertRecords_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public testInsertRecords_result deepCopy() { + return new testInsertRecords_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public testInsertRecords_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertRecords_result) + return this.equals((testInsertRecords_result)that); + return false; + } + + public boolean equals(testInsertRecords_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertRecords_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecords_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertRecords_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecords_resultStandardScheme getScheme() { + return new testInsertRecords_resultStandardScheme(); + } + } + + private static class testInsertRecords_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecords_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertRecords_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecords_resultTupleScheme getScheme() { + return new testInsertRecords_resultTupleScheme(); + } + } + + private static class testInsertRecords_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertRecordsOfOneDevice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecordsOfOneDevice_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecordsOfOneDevice_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecordsOfOneDevice_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertRecordsOfOneDeviceReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordsOfOneDeviceReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecordsOfOneDevice_args.class, metaDataMap); + } + + public testInsertRecordsOfOneDevice_args() { + } + + public testInsertRecordsOfOneDevice_args( + TSInsertRecordsOfOneDeviceReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public testInsertRecordsOfOneDevice_args(testInsertRecordsOfOneDevice_args other) { + if (other.isSetReq()) { + this.req = new TSInsertRecordsOfOneDeviceReq(other.req); + } + } + + @Override + public testInsertRecordsOfOneDevice_args deepCopy() { + return new testInsertRecordsOfOneDevice_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertRecordsOfOneDeviceReq getReq() { + return this.req; + } + + public testInsertRecordsOfOneDevice_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordsOfOneDeviceReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertRecordsOfOneDeviceReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertRecordsOfOneDevice_args) + return this.equals((testInsertRecordsOfOneDevice_args)that); + return false; + } + + public boolean equals(testInsertRecordsOfOneDevice_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertRecordsOfOneDevice_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecordsOfOneDevice_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertRecordsOfOneDevice_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecordsOfOneDevice_argsStandardScheme getScheme() { + return new testInsertRecordsOfOneDevice_argsStandardScheme(); + } + } + + private static class testInsertRecordsOfOneDevice_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertRecordsOfOneDeviceReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertRecordsOfOneDevice_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecordsOfOneDevice_argsTupleScheme getScheme() { + return new testInsertRecordsOfOneDevice_argsTupleScheme(); + } + } + + private static class testInsertRecordsOfOneDevice_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertRecordsOfOneDeviceReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertRecordsOfOneDevice_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecordsOfOneDevice_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecordsOfOneDevice_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecordsOfOneDevice_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecordsOfOneDevice_result.class, metaDataMap); + } + + public testInsertRecordsOfOneDevice_result() { + } + + public testInsertRecordsOfOneDevice_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public testInsertRecordsOfOneDevice_result(testInsertRecordsOfOneDevice_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public testInsertRecordsOfOneDevice_result deepCopy() { + return new testInsertRecordsOfOneDevice_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public testInsertRecordsOfOneDevice_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertRecordsOfOneDevice_result) + return this.equals((testInsertRecordsOfOneDevice_result)that); + return false; + } + + public boolean equals(testInsertRecordsOfOneDevice_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertRecordsOfOneDevice_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecordsOfOneDevice_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertRecordsOfOneDevice_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecordsOfOneDevice_resultStandardScheme getScheme() { + return new testInsertRecordsOfOneDevice_resultStandardScheme(); + } + } + + private static class testInsertRecordsOfOneDevice_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertRecordsOfOneDevice_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertRecordsOfOneDevice_resultTupleScheme getScheme() { + return new testInsertRecordsOfOneDevice_resultTupleScheme(); + } + } + + private static class testInsertRecordsOfOneDevice_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertStringRecords_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertStringRecords_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertStringRecords_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertStringRecords_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSInsertStringRecordsReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordsReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertStringRecords_args.class, metaDataMap); + } + + public testInsertStringRecords_args() { + } + + public testInsertStringRecords_args( + TSInsertStringRecordsReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public testInsertStringRecords_args(testInsertStringRecords_args other) { + if (other.isSetReq()) { + this.req = new TSInsertStringRecordsReq(other.req); + } + } + + @Override + public testInsertStringRecords_args deepCopy() { + return new testInsertStringRecords_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSInsertStringRecordsReq getReq() { + return this.req; + } + + public testInsertStringRecords_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordsReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSInsertStringRecordsReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertStringRecords_args) + return this.equals((testInsertStringRecords_args)that); + return false; + } + + public boolean equals(testInsertStringRecords_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertStringRecords_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertStringRecords_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertStringRecords_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertStringRecords_argsStandardScheme getScheme() { + return new testInsertStringRecords_argsStandardScheme(); + } + } + + private static class testInsertStringRecords_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertStringRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSInsertStringRecordsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertStringRecords_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertStringRecords_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertStringRecords_argsTupleScheme getScheme() { + return new testInsertStringRecords_argsTupleScheme(); + } + } + + private static class testInsertStringRecords_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecords_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSInsertStringRecordsReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testInsertStringRecords_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertStringRecords_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertStringRecords_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertStringRecords_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertStringRecords_result.class, metaDataMap); + } + + public testInsertStringRecords_result() { + } + + public testInsertStringRecords_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public testInsertStringRecords_result(testInsertStringRecords_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public testInsertStringRecords_result deepCopy() { + return new testInsertStringRecords_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public testInsertStringRecords_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testInsertStringRecords_result) + return this.equals((testInsertStringRecords_result)that); + return false; + } + + public boolean equals(testInsertStringRecords_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testInsertStringRecords_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertStringRecords_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testInsertStringRecords_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertStringRecords_resultStandardScheme getScheme() { + return new testInsertStringRecords_resultStandardScheme(); + } + } + + private static class testInsertStringRecords_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertStringRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertStringRecords_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testInsertStringRecords_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testInsertStringRecords_resultTupleScheme getScheme() { + return new testInsertStringRecords_resultTupleScheme(); + } + } + + private static class testInsertStringRecords_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecords_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class deleteData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteData_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteData_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteData_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSDeleteDataReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSDeleteDataReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteData_args.class, metaDataMap); + } + + public deleteData_args() { + } + + public deleteData_args( + TSDeleteDataReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public deleteData_args(deleteData_args other) { + if (other.isSetReq()) { + this.req = new TSDeleteDataReq(other.req); + } + } + + @Override + public deleteData_args deepCopy() { + return new deleteData_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSDeleteDataReq getReq() { + return this.req; + } + + public deleteData_args setReq(@org.apache.thrift.annotation.Nullable TSDeleteDataReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSDeleteDataReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof deleteData_args) + return this.equals((deleteData_args)that); + return false; + } + + public boolean equals(deleteData_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(deleteData_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteData_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class deleteData_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteData_argsStandardScheme getScheme() { + return new deleteData_argsStandardScheme(); + } + } + + private static class deleteData_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteData_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSDeleteDataReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteData_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteData_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteData_argsTupleScheme getScheme() { + return new deleteData_argsTupleScheme(); + } + } + + private static class deleteData_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteData_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteData_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSDeleteDataReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class deleteData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteData_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteData_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteData_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteData_result.class, metaDataMap); + } + + public deleteData_result() { + } + + public deleteData_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deleteData_result(deleteData_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public deleteData_result deepCopy() { + return new deleteData_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public deleteData_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof deleteData_result) + return this.equals((deleteData_result)that); + return false; + } + + public boolean equals(deleteData_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(deleteData_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteData_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class deleteData_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteData_resultStandardScheme getScheme() { + return new deleteData_resultStandardScheme(); + } + } + + private static class deleteData_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteData_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteData_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteData_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public deleteData_resultTupleScheme getScheme() { + return new deleteData_resultTupleScheme(); + } + } + + private static class deleteData_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteData_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteData_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeRawDataQuery_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeRawDataQuery_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeRawDataQuery_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeRawDataQuery_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSRawDataQueryReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSRawDataQueryReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeRawDataQuery_args.class, metaDataMap); + } + + public executeRawDataQuery_args() { + } + + public executeRawDataQuery_args( + TSRawDataQueryReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeRawDataQuery_args(executeRawDataQuery_args other) { + if (other.isSetReq()) { + this.req = new TSRawDataQueryReq(other.req); + } + } + + @Override + public executeRawDataQuery_args deepCopy() { + return new executeRawDataQuery_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSRawDataQueryReq getReq() { + return this.req; + } + + public executeRawDataQuery_args setReq(@org.apache.thrift.annotation.Nullable TSRawDataQueryReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSRawDataQueryReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeRawDataQuery_args) + return this.equals((executeRawDataQuery_args)that); + return false; + } + + public boolean equals(executeRawDataQuery_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeRawDataQuery_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeRawDataQuery_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeRawDataQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeRawDataQuery_argsStandardScheme getScheme() { + return new executeRawDataQuery_argsStandardScheme(); + } + } + + private static class executeRawDataQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeRawDataQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSRawDataQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeRawDataQuery_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeRawDataQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeRawDataQuery_argsTupleScheme getScheme() { + return new executeRawDataQuery_argsTupleScheme(); + } + } + + private static class executeRawDataQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeRawDataQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeRawDataQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSRawDataQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeRawDataQuery_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeRawDataQuery_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeRawDataQuery_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeRawDataQuery_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeRawDataQuery_result.class, metaDataMap); + } + + public executeRawDataQuery_result() { + } + + public executeRawDataQuery_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeRawDataQuery_result(executeRawDataQuery_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeRawDataQuery_result deepCopy() { + return new executeRawDataQuery_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeRawDataQuery_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeRawDataQuery_result) + return this.equals((executeRawDataQuery_result)that); + return false; + } + + public boolean equals(executeRawDataQuery_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeRawDataQuery_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeRawDataQuery_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeRawDataQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeRawDataQuery_resultStandardScheme getScheme() { + return new executeRawDataQuery_resultStandardScheme(); + } + } + + private static class executeRawDataQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeRawDataQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeRawDataQuery_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeRawDataQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeRawDataQuery_resultTupleScheme getScheme() { + return new executeRawDataQuery_resultTupleScheme(); + } + } + + private static class executeRawDataQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeRawDataQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeRawDataQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeLastDataQuery_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeLastDataQuery_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeLastDataQuery_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeLastDataQuery_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSLastDataQueryReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSLastDataQueryReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeLastDataQuery_args.class, metaDataMap); + } + + public executeLastDataQuery_args() { + } + + public executeLastDataQuery_args( + TSLastDataQueryReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeLastDataQuery_args(executeLastDataQuery_args other) { + if (other.isSetReq()) { + this.req = new TSLastDataQueryReq(other.req); + } + } + + @Override + public executeLastDataQuery_args deepCopy() { + return new executeLastDataQuery_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSLastDataQueryReq getReq() { + return this.req; + } + + public executeLastDataQuery_args setReq(@org.apache.thrift.annotation.Nullable TSLastDataQueryReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSLastDataQueryReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeLastDataQuery_args) + return this.equals((executeLastDataQuery_args)that); + return false; + } + + public boolean equals(executeLastDataQuery_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeLastDataQuery_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeLastDataQuery_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeLastDataQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeLastDataQuery_argsStandardScheme getScheme() { + return new executeLastDataQuery_argsStandardScheme(); + } + } + + private static class executeLastDataQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeLastDataQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSLastDataQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeLastDataQuery_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeLastDataQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeLastDataQuery_argsTupleScheme getScheme() { + return new executeLastDataQuery_argsTupleScheme(); + } + } + + private static class executeLastDataQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeLastDataQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeLastDataQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSLastDataQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeLastDataQuery_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeLastDataQuery_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeLastDataQuery_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeLastDataQuery_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeLastDataQuery_result.class, metaDataMap); + } + + public executeLastDataQuery_result() { + } + + public executeLastDataQuery_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeLastDataQuery_result(executeLastDataQuery_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeLastDataQuery_result deepCopy() { + return new executeLastDataQuery_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeLastDataQuery_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeLastDataQuery_result) + return this.equals((executeLastDataQuery_result)that); + return false; + } + + public boolean equals(executeLastDataQuery_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeLastDataQuery_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeLastDataQuery_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeLastDataQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeLastDataQuery_resultStandardScheme getScheme() { + return new executeLastDataQuery_resultStandardScheme(); + } + } + + private static class executeLastDataQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeLastDataQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeLastDataQuery_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeLastDataQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeLastDataQuery_resultTupleScheme getScheme() { + return new executeLastDataQuery_resultTupleScheme(); + } + } + + private static class executeLastDataQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeLastDataQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeLastDataQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeAggregationQuery_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeAggregationQuery_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeAggregationQuery_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeAggregationQuery_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSAggregationQueryReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSAggregationQueryReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeAggregationQuery_args.class, metaDataMap); + } + + public executeAggregationQuery_args() { + } + + public executeAggregationQuery_args( + TSAggregationQueryReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public executeAggregationQuery_args(executeAggregationQuery_args other) { + if (other.isSetReq()) { + this.req = new TSAggregationQueryReq(other.req); + } + } + + @Override + public executeAggregationQuery_args deepCopy() { + return new executeAggregationQuery_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSAggregationQueryReq getReq() { + return this.req; + } + + public executeAggregationQuery_args setReq(@org.apache.thrift.annotation.Nullable TSAggregationQueryReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSAggregationQueryReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeAggregationQuery_args) + return this.equals((executeAggregationQuery_args)that); + return false; + } + + public boolean equals(executeAggregationQuery_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeAggregationQuery_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeAggregationQuery_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeAggregationQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeAggregationQuery_argsStandardScheme getScheme() { + return new executeAggregationQuery_argsStandardScheme(); + } + } + + private static class executeAggregationQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeAggregationQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSAggregationQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeAggregationQuery_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeAggregationQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeAggregationQuery_argsTupleScheme getScheme() { + return new executeAggregationQuery_argsTupleScheme(); + } + } + + private static class executeAggregationQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeAggregationQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeAggregationQuery_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSAggregationQueryReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class executeAggregationQuery_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeAggregationQuery_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeAggregationQuery_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeAggregationQuery_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeAggregationQuery_result.class, metaDataMap); + } + + public executeAggregationQuery_result() { + } + + public executeAggregationQuery_result( + TSExecuteStatementResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public executeAggregationQuery_result(executeAggregationQuery_result other) { + if (other.isSetSuccess()) { + this.success = new TSExecuteStatementResp(other.success); + } + } + + @Override + public executeAggregationQuery_result deepCopy() { + return new executeAggregationQuery_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSExecuteStatementResp getSuccess() { + return this.success; + } + + public executeAggregationQuery_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSExecuteStatementResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof executeAggregationQuery_result) + return this.equals((executeAggregationQuery_result)that); + return false; + } + + public boolean equals(executeAggregationQuery_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(executeAggregationQuery_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("executeAggregationQuery_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class executeAggregationQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeAggregationQuery_resultStandardScheme getScheme() { + return new executeAggregationQuery_resultStandardScheme(); + } + } + + private static class executeAggregationQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, executeAggregationQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, executeAggregationQuery_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class executeAggregationQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public executeAggregationQuery_resultTupleScheme getScheme() { + return new executeAggregationQuery_resultTupleScheme(); + } + } + + private static class executeAggregationQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, executeAggregationQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, executeAggregationQuery_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSExecuteStatementResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class requestStatementId_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestStatementId_args"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestStatementId_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestStatementId_argsTupleSchemeFactory(); + + public long sessionId; // 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 { + SESSION_ID((short)1, "sessionId"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestStatementId_args.class, metaDataMap); + } + + public requestStatementId_args() { + } + + public requestStatementId_args( + long sessionId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public requestStatementId_args(requestStatementId_args other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + } + + @Override + public requestStatementId_args deepCopy() { + return new requestStatementId_args(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public requestStatementId_args setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof requestStatementId_args) + return this.equals((requestStatementId_args)that); + return false; + } + + public boolean equals(requestStatementId_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + return hashCode; + } + + @Override + public int compareTo(requestStatementId_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("requestStatementId_args("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class requestStatementId_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public requestStatementId_argsStandardScheme getScheme() { + return new requestStatementId_argsStandardScheme(); + } + } + + private static class requestStatementId_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, requestStatementId_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, requestStatementId_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class requestStatementId_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public requestStatementId_argsTupleScheme getScheme() { + return new requestStatementId_argsTupleScheme(); + } + } + + private static class requestStatementId_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, requestStatementId_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSessionId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSessionId()) { + oprot.writeI64(struct.sessionId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, requestStatementId_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class requestStatementId_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestStatementId_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestStatementId_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestStatementId_resultTupleSchemeFactory(); + + public long success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestStatementId_result.class, metaDataMap); + } + + public requestStatementId_result() { + } + + public requestStatementId_result( + long success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public requestStatementId_result(requestStatementId_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + @Override + public requestStatementId_result deepCopy() { + return new requestStatementId_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + } + + public long getSuccess() { + return this.success; + } + + public requestStatementId_result setSuccess(long success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof requestStatementId_result) + return this.equals((requestStatementId_result)that); + return false; + } + + public boolean equals(requestStatementId_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success); + + return hashCode; + } + + @Override + public int compareTo(requestStatementId_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("requestStatementId_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class requestStatementId_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public requestStatementId_resultStandardScheme getScheme() { + return new requestStatementId_resultStandardScheme(); + } + } + + private static class requestStatementId_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, requestStatementId_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, requestStatementId_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class requestStatementId_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public requestStatementId_resultTupleScheme getScheme() { + return new requestStatementId_resultTupleScheme(); + } + } + + private static class requestStatementId_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, requestStatementId_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, requestStatementId_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSchemaTemplate_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createSchemaTemplate_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createSchemaTemplate_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSCreateSchemaTemplateReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCreateSchemaTemplateReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSchemaTemplate_args.class, metaDataMap); + } + + public createSchemaTemplate_args() { + } + + public createSchemaTemplate_args( + TSCreateSchemaTemplateReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public createSchemaTemplate_args(createSchemaTemplate_args other) { + if (other.isSetReq()) { + this.req = new TSCreateSchemaTemplateReq(other.req); + } + } + + @Override + public createSchemaTemplate_args deepCopy() { + return new createSchemaTemplate_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSCreateSchemaTemplateReq getReq() { + return this.req; + } + + public createSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSCreateSchemaTemplateReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSCreateSchemaTemplateReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createSchemaTemplate_args) + return this.equals((createSchemaTemplate_args)that); + return false; + } + + public boolean equals(createSchemaTemplate_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createSchemaTemplate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createSchemaTemplate_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createSchemaTemplate_argsStandardScheme getScheme() { + return new createSchemaTemplate_argsStandardScheme(); + } + } + + private static class createSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSCreateSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createSchemaTemplate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createSchemaTemplate_argsTupleScheme getScheme() { + return new createSchemaTemplate_argsTupleScheme(); + } + } + + private static class createSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSCreateSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSchemaTemplate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createSchemaTemplate_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createSchemaTemplate_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSchemaTemplate_result.class, metaDataMap); + } + + public createSchemaTemplate_result() { + } + + public createSchemaTemplate_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public createSchemaTemplate_result(createSchemaTemplate_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public createSchemaTemplate_result deepCopy() { + return new createSchemaTemplate_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public createSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createSchemaTemplate_result) + return this.equals((createSchemaTemplate_result)that); + return false; + } + + public boolean equals(createSchemaTemplate_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createSchemaTemplate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createSchemaTemplate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createSchemaTemplate_resultStandardScheme getScheme() { + return new createSchemaTemplate_resultStandardScheme(); + } + } + + private static class createSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createSchemaTemplate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createSchemaTemplate_resultTupleScheme getScheme() { + return new createSchemaTemplate_resultTupleScheme(); + } + } + + private static class createSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class appendSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("appendSchemaTemplate_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new appendSchemaTemplate_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new appendSchemaTemplate_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSAppendSchemaTemplateReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSAppendSchemaTemplateReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(appendSchemaTemplate_args.class, metaDataMap); + } + + public appendSchemaTemplate_args() { + } + + public appendSchemaTemplate_args( + TSAppendSchemaTemplateReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public appendSchemaTemplate_args(appendSchemaTemplate_args other) { + if (other.isSetReq()) { + this.req = new TSAppendSchemaTemplateReq(other.req); + } + } + + @Override + public appendSchemaTemplate_args deepCopy() { + return new appendSchemaTemplate_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSAppendSchemaTemplateReq getReq() { + return this.req; + } + + public appendSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSAppendSchemaTemplateReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSAppendSchemaTemplateReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof appendSchemaTemplate_args) + return this.equals((appendSchemaTemplate_args)that); + return false; + } + + public boolean equals(appendSchemaTemplate_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(appendSchemaTemplate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("appendSchemaTemplate_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class appendSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public appendSchemaTemplate_argsStandardScheme getScheme() { + return new appendSchemaTemplate_argsStandardScheme(); + } + } + + private static class appendSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, appendSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSAppendSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, appendSchemaTemplate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class appendSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public appendSchemaTemplate_argsTupleScheme getScheme() { + return new appendSchemaTemplate_argsTupleScheme(); + } + } + + private static class appendSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, appendSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, appendSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSAppendSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class appendSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("appendSchemaTemplate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new appendSchemaTemplate_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new appendSchemaTemplate_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(appendSchemaTemplate_result.class, metaDataMap); + } + + public appendSchemaTemplate_result() { + } + + public appendSchemaTemplate_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public appendSchemaTemplate_result(appendSchemaTemplate_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public appendSchemaTemplate_result deepCopy() { + return new appendSchemaTemplate_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public appendSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof appendSchemaTemplate_result) + return this.equals((appendSchemaTemplate_result)that); + return false; + } + + public boolean equals(appendSchemaTemplate_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(appendSchemaTemplate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("appendSchemaTemplate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class appendSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public appendSchemaTemplate_resultStandardScheme getScheme() { + return new appendSchemaTemplate_resultStandardScheme(); + } + } + + private static class appendSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, appendSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, appendSchemaTemplate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class appendSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public appendSchemaTemplate_resultTupleScheme getScheme() { + return new appendSchemaTemplate_resultTupleScheme(); + } + } + + private static class appendSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, appendSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, appendSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class pruneSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pruneSchemaTemplate_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pruneSchemaTemplate_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pruneSchemaTemplate_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSPruneSchemaTemplateReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSPruneSchemaTemplateReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pruneSchemaTemplate_args.class, metaDataMap); + } + + public pruneSchemaTemplate_args() { + } + + public pruneSchemaTemplate_args( + TSPruneSchemaTemplateReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public pruneSchemaTemplate_args(pruneSchemaTemplate_args other) { + if (other.isSetReq()) { + this.req = new TSPruneSchemaTemplateReq(other.req); + } + } + + @Override + public pruneSchemaTemplate_args deepCopy() { + return new pruneSchemaTemplate_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSPruneSchemaTemplateReq getReq() { + return this.req; + } + + public pruneSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSPruneSchemaTemplateReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSPruneSchemaTemplateReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof pruneSchemaTemplate_args) + return this.equals((pruneSchemaTemplate_args)that); + return false; + } + + public boolean equals(pruneSchemaTemplate_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(pruneSchemaTemplate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("pruneSchemaTemplate_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class pruneSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pruneSchemaTemplate_argsStandardScheme getScheme() { + return new pruneSchemaTemplate_argsStandardScheme(); + } + } + + private static class pruneSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, pruneSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSPruneSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, pruneSchemaTemplate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class pruneSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pruneSchemaTemplate_argsTupleScheme getScheme() { + return new pruneSchemaTemplate_argsTupleScheme(); + } + } + + private static class pruneSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, pruneSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, pruneSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSPruneSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class pruneSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pruneSchemaTemplate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pruneSchemaTemplate_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pruneSchemaTemplate_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pruneSchemaTemplate_result.class, metaDataMap); + } + + public pruneSchemaTemplate_result() { + } + + public pruneSchemaTemplate_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public pruneSchemaTemplate_result(pruneSchemaTemplate_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public pruneSchemaTemplate_result deepCopy() { + return new pruneSchemaTemplate_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public pruneSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof pruneSchemaTemplate_result) + return this.equals((pruneSchemaTemplate_result)that); + return false; + } + + public boolean equals(pruneSchemaTemplate_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(pruneSchemaTemplate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("pruneSchemaTemplate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class pruneSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pruneSchemaTemplate_resultStandardScheme getScheme() { + return new pruneSchemaTemplate_resultStandardScheme(); + } + } + + private static class pruneSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, pruneSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, pruneSchemaTemplate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class pruneSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pruneSchemaTemplate_resultTupleScheme getScheme() { + return new pruneSchemaTemplate_resultTupleScheme(); + } + } + + private static class pruneSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, pruneSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, pruneSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class querySchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("querySchemaTemplate_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new querySchemaTemplate_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new querySchemaTemplate_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSQueryTemplateReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryTemplateReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(querySchemaTemplate_args.class, metaDataMap); + } + + public querySchemaTemplate_args() { + } + + public querySchemaTemplate_args( + TSQueryTemplateReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public querySchemaTemplate_args(querySchemaTemplate_args other) { + if (other.isSetReq()) { + this.req = new TSQueryTemplateReq(other.req); + } + } + + @Override + public querySchemaTemplate_args deepCopy() { + return new querySchemaTemplate_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSQueryTemplateReq getReq() { + return this.req; + } + + public querySchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSQueryTemplateReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSQueryTemplateReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof querySchemaTemplate_args) + return this.equals((querySchemaTemplate_args)that); + return false; + } + + public boolean equals(querySchemaTemplate_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(querySchemaTemplate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("querySchemaTemplate_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class querySchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public querySchemaTemplate_argsStandardScheme getScheme() { + return new querySchemaTemplate_argsStandardScheme(); + } + } + + private static class querySchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, querySchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSQueryTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, querySchemaTemplate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class querySchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public querySchemaTemplate_argsTupleScheme getScheme() { + return new querySchemaTemplate_argsTupleScheme(); + } + } + + private static class querySchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, querySchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, querySchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSQueryTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class querySchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("querySchemaTemplate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new querySchemaTemplate_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new querySchemaTemplate_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSQueryTemplateResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryTemplateResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(querySchemaTemplate_result.class, metaDataMap); + } + + public querySchemaTemplate_result() { + } + + public querySchemaTemplate_result( + TSQueryTemplateResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public querySchemaTemplate_result(querySchemaTemplate_result other) { + if (other.isSetSuccess()) { + this.success = new TSQueryTemplateResp(other.success); + } + } + + @Override + public querySchemaTemplate_result deepCopy() { + return new querySchemaTemplate_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSQueryTemplateResp getSuccess() { + return this.success; + } + + public querySchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable TSQueryTemplateResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSQueryTemplateResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof querySchemaTemplate_result) + return this.equals((querySchemaTemplate_result)that); + return false; + } + + public boolean equals(querySchemaTemplate_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(querySchemaTemplate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("querySchemaTemplate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class querySchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public querySchemaTemplate_resultStandardScheme getScheme() { + return new querySchemaTemplate_resultStandardScheme(); + } + } + + private static class querySchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, querySchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSQueryTemplateResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, querySchemaTemplate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class querySchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public querySchemaTemplate_resultTupleScheme getScheme() { + return new querySchemaTemplate_resultTupleScheme(); + } + } + + private static class querySchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, querySchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, querySchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSQueryTemplateResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class showConfigurationTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showConfigurationTemplate_args"); + + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new showConfigurationTemplate_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new showConfigurationTemplate_argsTupleSchemeFactory(); + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(showConfigurationTemplate_args.class, metaDataMap); + } + + public showConfigurationTemplate_args() { + } + + /** + * Performs a deep copy on other. + */ + public showConfigurationTemplate_args(showConfigurationTemplate_args other) { + } + + @Override + public showConfigurationTemplate_args deepCopy() { + return new showConfigurationTemplate_args(this); + } + + @Override + public void clear() { + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof showConfigurationTemplate_args) + return this.equals((showConfigurationTemplate_args)that); + return false; + } + + public boolean equals(showConfigurationTemplate_args that) { + if (that == null) + return false; + if (this == that) + return true; + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + return hashCode; + } + + @Override + public int compareTo(showConfigurationTemplate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("showConfigurationTemplate_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class showConfigurationTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public showConfigurationTemplate_argsStandardScheme getScheme() { + return new showConfigurationTemplate_argsStandardScheme(); + } + } + + private static class showConfigurationTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, showConfigurationTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, showConfigurationTemplate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class showConfigurationTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public showConfigurationTemplate_argsTupleScheme getScheme() { + return new showConfigurationTemplate_argsTupleScheme(); + } + } + + private static class showConfigurationTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, showConfigurationTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, showConfigurationTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class showConfigurationTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showConfigurationTemplate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new showConfigurationTemplate_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new showConfigurationTemplate_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(showConfigurationTemplate_result.class, metaDataMap); + } + + public showConfigurationTemplate_result() { + } + + public showConfigurationTemplate_result( + org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public showConfigurationTemplate_result(showConfigurationTemplate_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp(other.success); + } + } + + @Override + public showConfigurationTemplate_result deepCopy() { + return new showConfigurationTemplate_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp getSuccess() { + return this.success; + } + + public showConfigurationTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof showConfigurationTemplate_result) + return this.equals((showConfigurationTemplate_result)that); + return false; + } + + public boolean equals(showConfigurationTemplate_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(showConfigurationTemplate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("showConfigurationTemplate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class showConfigurationTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public showConfigurationTemplate_resultStandardScheme getScheme() { + return new showConfigurationTemplate_resultStandardScheme(); + } + } + + private static class showConfigurationTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, showConfigurationTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, showConfigurationTemplate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class showConfigurationTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public showConfigurationTemplate_resultTupleScheme getScheme() { + return new showConfigurationTemplate_resultTupleScheme(); + } + } + + private static class showConfigurationTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, showConfigurationTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, showConfigurationTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class showConfiguration_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showConfiguration_args"); + + private static final org.apache.thrift.protocol.TField NODE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeId", org.apache.thrift.protocol.TType.I32, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new showConfiguration_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new showConfiguration_argsTupleSchemeFactory(); + + public int nodeId; // 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 { + NODE_ID((short)1, "nodeId"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NODE_ID + return NODE_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __NODEID_ISSET_ID = 0; + 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.NODE_ID, new org.apache.thrift.meta_data.FieldMetaData("nodeId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(showConfiguration_args.class, metaDataMap); + } + + public showConfiguration_args() { + } + + public showConfiguration_args( + int nodeId) + { + this(); + this.nodeId = nodeId; + setNodeIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public showConfiguration_args(showConfiguration_args other) { + __isset_bitfield = other.__isset_bitfield; + this.nodeId = other.nodeId; + } + + @Override + public showConfiguration_args deepCopy() { + return new showConfiguration_args(this); + } + + @Override + public void clear() { + setNodeIdIsSet(false); + this.nodeId = 0; + } + + public int getNodeId() { + return this.nodeId; + } + + public showConfiguration_args setNodeId(int nodeId) { + this.nodeId = nodeId; + setNodeIdIsSet(true); + return this; + } + + public void unsetNodeId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NODEID_ISSET_ID); + } + + /** Returns true if field nodeId is set (has been assigned a value) and false otherwise */ + public boolean isSetNodeId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NODEID_ISSET_ID); + } + + public void setNodeIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NODEID_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case NODE_ID: + if (value == null) { + unsetNodeId(); + } else { + setNodeId((java.lang.Integer)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case NODE_ID: + return getNodeId(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case NODE_ID: + return isSetNodeId(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof showConfiguration_args) + return this.equals((showConfiguration_args)that); + return false; + } + + public boolean equals(showConfiguration_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_nodeId = true; + boolean that_present_nodeId = true; + if (this_present_nodeId || that_present_nodeId) { + if (!(this_present_nodeId && that_present_nodeId)) + return false; + if (this.nodeId != that.nodeId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + nodeId; + + return hashCode; + } + + @Override + public int compareTo(showConfiguration_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetNodeId(), other.isSetNodeId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNodeId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeId, other.nodeId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("showConfiguration_args("); + boolean first = true; + + sb.append("nodeId:"); + sb.append(this.nodeId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class showConfiguration_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public showConfiguration_argsStandardScheme getScheme() { + return new showConfiguration_argsStandardScheme(); + } + } + + private static class showConfiguration_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, showConfiguration_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NODE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.nodeId = iprot.readI32(); + struct.setNodeIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, showConfiguration_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(NODE_ID_FIELD_DESC); + oprot.writeI32(struct.nodeId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class showConfiguration_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public showConfiguration_argsTupleScheme getScheme() { + return new showConfiguration_argsTupleScheme(); + } + } + + private static class showConfiguration_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, showConfiguration_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetNodeId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNodeId()) { + oprot.writeI32(struct.nodeId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, showConfiguration_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.nodeId = iprot.readI32(); + struct.setNodeIdIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class showConfiguration_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showConfiguration_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new showConfiguration_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new showConfiguration_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(showConfiguration_result.class, metaDataMap); + } + + public showConfiguration_result() { + } + + public showConfiguration_result( + org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public showConfiguration_result(showConfiguration_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp(other.success); + } + } + + @Override + public showConfiguration_result deepCopy() { + return new showConfiguration_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp getSuccess() { + return this.success; + } + + public showConfiguration_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof showConfiguration_result) + return this.equals((showConfiguration_result)that); + return false; + } + + public boolean equals(showConfiguration_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(showConfiguration_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("showConfiguration_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class showConfiguration_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public showConfiguration_resultStandardScheme getScheme() { + return new showConfiguration_resultStandardScheme(); + } + } + + private static class showConfiguration_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, showConfiguration_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, showConfiguration_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class showConfiguration_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public showConfiguration_resultTupleScheme getScheme() { + return new showConfiguration_resultTupleScheme(); + } + } + + private static class showConfiguration_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, showConfiguration_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, showConfiguration_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class setSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setSchemaTemplate_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setSchemaTemplate_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setSchemaTemplate_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSSetSchemaTemplateReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSSetSchemaTemplateReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setSchemaTemplate_args.class, metaDataMap); + } + + public setSchemaTemplate_args() { + } + + public setSchemaTemplate_args( + TSSetSchemaTemplateReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public setSchemaTemplate_args(setSchemaTemplate_args other) { + if (other.isSetReq()) { + this.req = new TSSetSchemaTemplateReq(other.req); + } + } + + @Override + public setSchemaTemplate_args deepCopy() { + return new setSchemaTemplate_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSSetSchemaTemplateReq getReq() { + return this.req; + } + + public setSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSSetSchemaTemplateReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSSetSchemaTemplateReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof setSchemaTemplate_args) + return this.equals((setSchemaTemplate_args)that); + return false; + } + + public boolean equals(setSchemaTemplate_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(setSchemaTemplate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("setSchemaTemplate_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class setSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setSchemaTemplate_argsStandardScheme getScheme() { + return new setSchemaTemplate_argsStandardScheme(); + } + } + + private static class setSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, setSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSSetSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, setSchemaTemplate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class setSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setSchemaTemplate_argsTupleScheme getScheme() { + return new setSchemaTemplate_argsTupleScheme(); + } + } + + private static class setSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, setSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, setSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSSetSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class setSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setSchemaTemplate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setSchemaTemplate_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setSchemaTemplate_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setSchemaTemplate_result.class, metaDataMap); + } + + public setSchemaTemplate_result() { + } + + public setSchemaTemplate_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public setSchemaTemplate_result(setSchemaTemplate_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public setSchemaTemplate_result deepCopy() { + return new setSchemaTemplate_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public setSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof setSchemaTemplate_result) + return this.equals((setSchemaTemplate_result)that); + return false; + } + + public boolean equals(setSchemaTemplate_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(setSchemaTemplate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("setSchemaTemplate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class setSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setSchemaTemplate_resultStandardScheme getScheme() { + return new setSchemaTemplate_resultStandardScheme(); + } + } + + private static class setSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, setSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, setSchemaTemplate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class setSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public setSchemaTemplate_resultTupleScheme getScheme() { + return new setSchemaTemplate_resultTupleScheme(); + } + } + + private static class setSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, setSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, setSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class unsetSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetSchemaTemplate_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unsetSchemaTemplate_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unsetSchemaTemplate_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSUnsetSchemaTemplateReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSUnsetSchemaTemplateReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetSchemaTemplate_args.class, metaDataMap); + } + + public unsetSchemaTemplate_args() { + } + + public unsetSchemaTemplate_args( + TSUnsetSchemaTemplateReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public unsetSchemaTemplate_args(unsetSchemaTemplate_args other) { + if (other.isSetReq()) { + this.req = new TSUnsetSchemaTemplateReq(other.req); + } + } + + @Override + public unsetSchemaTemplate_args deepCopy() { + return new unsetSchemaTemplate_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSUnsetSchemaTemplateReq getReq() { + return this.req; + } + + public unsetSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSUnsetSchemaTemplateReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSUnsetSchemaTemplateReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof unsetSchemaTemplate_args) + return this.equals((unsetSchemaTemplate_args)that); + return false; + } + + public boolean equals(unsetSchemaTemplate_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(unsetSchemaTemplate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("unsetSchemaTemplate_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class unsetSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public unsetSchemaTemplate_argsStandardScheme getScheme() { + return new unsetSchemaTemplate_argsStandardScheme(); + } + } + + private static class unsetSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, unsetSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSUnsetSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, unsetSchemaTemplate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class unsetSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public unsetSchemaTemplate_argsTupleScheme getScheme() { + return new unsetSchemaTemplate_argsTupleScheme(); + } + } + + private static class unsetSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, unsetSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, unsetSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSUnsetSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class unsetSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetSchemaTemplate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unsetSchemaTemplate_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unsetSchemaTemplate_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetSchemaTemplate_result.class, metaDataMap); + } + + public unsetSchemaTemplate_result() { + } + + public unsetSchemaTemplate_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public unsetSchemaTemplate_result(unsetSchemaTemplate_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public unsetSchemaTemplate_result deepCopy() { + return new unsetSchemaTemplate_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public unsetSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof unsetSchemaTemplate_result) + return this.equals((unsetSchemaTemplate_result)that); + return false; + } + + public boolean equals(unsetSchemaTemplate_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(unsetSchemaTemplate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("unsetSchemaTemplate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class unsetSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public unsetSchemaTemplate_resultStandardScheme getScheme() { + return new unsetSchemaTemplate_resultStandardScheme(); + } + } + + private static class unsetSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, unsetSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, unsetSchemaTemplate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class unsetSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public unsetSchemaTemplate_resultTupleScheme getScheme() { + return new unsetSchemaTemplate_resultTupleScheme(); + } + } + + private static class unsetSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, unsetSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, unsetSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class dropSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("dropSchemaTemplate_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new dropSchemaTemplate_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new dropSchemaTemplate_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSDropSchemaTemplateReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSDropSchemaTemplateReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(dropSchemaTemplate_args.class, metaDataMap); + } + + public dropSchemaTemplate_args() { + } + + public dropSchemaTemplate_args( + TSDropSchemaTemplateReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public dropSchemaTemplate_args(dropSchemaTemplate_args other) { + if (other.isSetReq()) { + this.req = new TSDropSchemaTemplateReq(other.req); + } + } + + @Override + public dropSchemaTemplate_args deepCopy() { + return new dropSchemaTemplate_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TSDropSchemaTemplateReq getReq() { + return this.req; + } + + public dropSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSDropSchemaTemplateReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TSDropSchemaTemplateReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof dropSchemaTemplate_args) + return this.equals((dropSchemaTemplate_args)that); + return false; + } + + public boolean equals(dropSchemaTemplate_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(dropSchemaTemplate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("dropSchemaTemplate_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class dropSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public dropSchemaTemplate_argsStandardScheme getScheme() { + return new dropSchemaTemplate_argsStandardScheme(); + } + } + + private static class dropSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, dropSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TSDropSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, dropSchemaTemplate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class dropSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public dropSchemaTemplate_argsTupleScheme getScheme() { + return new dropSchemaTemplate_argsTupleScheme(); + } + } + + private static class dropSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, dropSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, dropSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TSDropSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class dropSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("dropSchemaTemplate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new dropSchemaTemplate_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new dropSchemaTemplate_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(dropSchemaTemplate_result.class, metaDataMap); + } + + public dropSchemaTemplate_result() { + } + + public dropSchemaTemplate_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public dropSchemaTemplate_result(dropSchemaTemplate_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public dropSchemaTemplate_result deepCopy() { + return new dropSchemaTemplate_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public dropSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof dropSchemaTemplate_result) + return this.equals((dropSchemaTemplate_result)that); + return false; + } + + public boolean equals(dropSchemaTemplate_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(dropSchemaTemplate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("dropSchemaTemplate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class dropSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public dropSchemaTemplate_resultStandardScheme getScheme() { + return new dropSchemaTemplate_resultStandardScheme(); + } + } + + private static class dropSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, dropSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, dropSchemaTemplate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class dropSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public dropSchemaTemplate_resultTupleScheme getScheme() { + return new dropSchemaTemplate_resultTupleScheme(); + } + } + + private static class dropSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, dropSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, dropSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createTimeseriesUsingSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTimeseriesUsingSchemaTemplate_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTimeseriesUsingSchemaTemplate_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTimeseriesUsingSchemaTemplate_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TCreateTimeseriesUsingSchemaTemplateReq req; // 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 { + REQ((short)1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCreateTimeseriesUsingSchemaTemplateReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTimeseriesUsingSchemaTemplate_args.class, metaDataMap); + } + + public createTimeseriesUsingSchemaTemplate_args() { + } + + public createTimeseriesUsingSchemaTemplate_args( + TCreateTimeseriesUsingSchemaTemplateReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public createTimeseriesUsingSchemaTemplate_args(createTimeseriesUsingSchemaTemplate_args other) { + if (other.isSetReq()) { + this.req = new TCreateTimeseriesUsingSchemaTemplateReq(other.req); + } + } + + @Override + public createTimeseriesUsingSchemaTemplate_args deepCopy() { + return new createTimeseriesUsingSchemaTemplate_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TCreateTimeseriesUsingSchemaTemplateReq getReq() { + return this.req; + } + + public createTimeseriesUsingSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TCreateTimeseriesUsingSchemaTemplateReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TCreateTimeseriesUsingSchemaTemplateReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createTimeseriesUsingSchemaTemplate_args) + return this.equals((createTimeseriesUsingSchemaTemplate_args)that); + return false; + } + + public boolean equals(createTimeseriesUsingSchemaTemplate_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createTimeseriesUsingSchemaTemplate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createTimeseriesUsingSchemaTemplate_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createTimeseriesUsingSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createTimeseriesUsingSchemaTemplate_argsStandardScheme getScheme() { + return new createTimeseriesUsingSchemaTemplate_argsStandardScheme(); + } + } + + private static class createTimeseriesUsingSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createTimeseriesUsingSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TCreateTimeseriesUsingSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createTimeseriesUsingSchemaTemplate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createTimeseriesUsingSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createTimeseriesUsingSchemaTemplate_argsTupleScheme getScheme() { + return new createTimeseriesUsingSchemaTemplate_argsTupleScheme(); + } + } + + private static class createTimeseriesUsingSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createTimeseriesUsingSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createTimeseriesUsingSchemaTemplate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TCreateTimeseriesUsingSchemaTemplateReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class createTimeseriesUsingSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTimeseriesUsingSchemaTemplate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTimeseriesUsingSchemaTemplate_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTimeseriesUsingSchemaTemplate_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTimeseriesUsingSchemaTemplate_result.class, metaDataMap); + } + + public createTimeseriesUsingSchemaTemplate_result() { + } + + public createTimeseriesUsingSchemaTemplate_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public createTimeseriesUsingSchemaTemplate_result(createTimeseriesUsingSchemaTemplate_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public createTimeseriesUsingSchemaTemplate_result deepCopy() { + return new createTimeseriesUsingSchemaTemplate_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public createTimeseriesUsingSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof createTimeseriesUsingSchemaTemplate_result) + return this.equals((createTimeseriesUsingSchemaTemplate_result)that); + return false; + } + + public boolean equals(createTimeseriesUsingSchemaTemplate_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(createTimeseriesUsingSchemaTemplate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("createTimeseriesUsingSchemaTemplate_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class createTimeseriesUsingSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createTimeseriesUsingSchemaTemplate_resultStandardScheme getScheme() { + return new createTimeseriesUsingSchemaTemplate_resultStandardScheme(); + } + } + + private static class createTimeseriesUsingSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, createTimeseriesUsingSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, createTimeseriesUsingSchemaTemplate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createTimeseriesUsingSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public createTimeseriesUsingSchemaTemplate_resultTupleScheme getScheme() { + return new createTimeseriesUsingSchemaTemplate_resultTupleScheme(); + } + } + + private static class createTimeseriesUsingSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createTimeseriesUsingSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createTimeseriesUsingSchemaTemplate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class handshake_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("handshake_args"); + + private static final org.apache.thrift.protocol.TField INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("info", org.apache.thrift.protocol.TType.STRUCT, (short)-1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new handshake_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new handshake_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSyncIdentityInfo info; // 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 { + INFO((short)-1, "info"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // INFO + return INFO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.INFO, new org.apache.thrift.meta_data.FieldMetaData("info", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSyncIdentityInfo.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(handshake_args.class, metaDataMap); + } + + public handshake_args() { + } + + public handshake_args( + TSyncIdentityInfo info) + { + this(); + this.info = info; + } + + /** + * Performs a deep copy on other. + */ + public handshake_args(handshake_args other) { + if (other.isSetInfo()) { + this.info = new TSyncIdentityInfo(other.info); + } + } + + @Override + public handshake_args deepCopy() { + return new handshake_args(this); + } + + @Override + public void clear() { + this.info = null; + } + + @org.apache.thrift.annotation.Nullable + public TSyncIdentityInfo getInfo() { + return this.info; + } + + public handshake_args setInfo(@org.apache.thrift.annotation.Nullable TSyncIdentityInfo info) { + this.info = info; + return this; + } + + public void unsetInfo() { + this.info = null; + } + + /** Returns true if field info is set (has been assigned a value) and false otherwise */ + public boolean isSetInfo() { + return this.info != null; + } + + public void setInfoIsSet(boolean value) { + if (!value) { + this.info = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case INFO: + if (value == null) { + unsetInfo(); + } else { + setInfo((TSyncIdentityInfo)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case INFO: + return getInfo(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case INFO: + return isSetInfo(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof handshake_args) + return this.equals((handshake_args)that); + return false; + } + + public boolean equals(handshake_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_info = true && this.isSetInfo(); + boolean that_present_info = true && that.isSetInfo(); + if (this_present_info || that_present_info) { + if (!(this_present_info && that_present_info)) + return false; + if (!this.info.equals(that.info)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetInfo()) ? 131071 : 524287); + if (isSetInfo()) + hashCode = hashCode * 8191 + info.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(handshake_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetInfo(), other.isSetInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.info, other.info); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("handshake_args("); + boolean first = true; + + sb.append("info:"); + if (this.info == null) { + sb.append("null"); + } else { + sb.append(this.info); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (info != null) { + info.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class handshake_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public handshake_argsStandardScheme getScheme() { + return new handshake_argsStandardScheme(); + } + } + + private static class handshake_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, handshake_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case -1: // INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.info = new TSyncIdentityInfo(); + struct.info.read(iprot); + struct.setInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, handshake_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.info != null) { + oprot.writeFieldBegin(INFO_FIELD_DESC); + struct.info.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class handshake_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public handshake_argsTupleScheme getScheme() { + return new handshake_argsTupleScheme(); + } + } + + private static class handshake_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, handshake_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetInfo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetInfo()) { + struct.info.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, handshake_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.info = new TSyncIdentityInfo(); + struct.info.read(iprot); + struct.setInfoIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class handshake_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("handshake_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new handshake_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new handshake_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(handshake_result.class, metaDataMap); + } + + public handshake_result() { + } + + public handshake_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public handshake_result(handshake_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public handshake_result deepCopy() { + return new handshake_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public handshake_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof handshake_result) + return this.equals((handshake_result)that); + return false; + } + + public boolean equals(handshake_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(handshake_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("handshake_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class handshake_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public handshake_resultStandardScheme getScheme() { + return new handshake_resultStandardScheme(); + } + } + + private static class handshake_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, handshake_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, handshake_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class handshake_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public handshake_resultTupleScheme getScheme() { + return new handshake_resultTupleScheme(); + } + } + + private static class handshake_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, handshake_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, handshake_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class sendPipeData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendPipeData_args"); + + private static final org.apache.thrift.protocol.TField BUFF_FIELD_DESC = new org.apache.thrift.protocol.TField("buff", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendPipeData_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendPipeData_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer buff; // 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 { + BUFF((short)1, "buff"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // BUFF + return BUFF; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.BUFF, new org.apache.thrift.meta_data.FieldMetaData("buff", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendPipeData_args.class, metaDataMap); + } + + public sendPipeData_args() { + } + + public sendPipeData_args( + java.nio.ByteBuffer buff) + { + this(); + this.buff = org.apache.thrift.TBaseHelper.copyBinary(buff); + } + + /** + * Performs a deep copy on other. + */ + public sendPipeData_args(sendPipeData_args other) { + if (other.isSetBuff()) { + this.buff = org.apache.thrift.TBaseHelper.copyBinary(other.buff); + } + } + + @Override + public sendPipeData_args deepCopy() { + return new sendPipeData_args(this); + } + + @Override + public void clear() { + this.buff = null; + } + + public byte[] getBuff() { + setBuff(org.apache.thrift.TBaseHelper.rightSize(buff)); + return buff == null ? null : buff.array(); + } + + public java.nio.ByteBuffer bufferForBuff() { + return org.apache.thrift.TBaseHelper.copyBinary(buff); + } + + public sendPipeData_args setBuff(byte[] buff) { + this.buff = buff == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(buff.clone()); + return this; + } + + public sendPipeData_args setBuff(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer buff) { + this.buff = org.apache.thrift.TBaseHelper.copyBinary(buff); + return this; + } + + public void unsetBuff() { + this.buff = null; + } + + /** Returns true if field buff is set (has been assigned a value) and false otherwise */ + public boolean isSetBuff() { + return this.buff != null; + } + + public void setBuffIsSet(boolean value) { + if (!value) { + this.buff = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case BUFF: + if (value == null) { + unsetBuff(); + } else { + if (value instanceof byte[]) { + setBuff((byte[])value); + } else { + setBuff((java.nio.ByteBuffer)value); + } + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case BUFF: + return getBuff(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case BUFF: + return isSetBuff(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof sendPipeData_args) + return this.equals((sendPipeData_args)that); + return false; + } + + public boolean equals(sendPipeData_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_buff = true && this.isSetBuff(); + boolean that_present_buff = true && that.isSetBuff(); + if (this_present_buff || that_present_buff) { + if (!(this_present_buff && that_present_buff)) + return false; + if (!this.buff.equals(that.buff)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetBuff()) ? 131071 : 524287); + if (isSetBuff()) + hashCode = hashCode * 8191 + buff.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(sendPipeData_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetBuff(), other.isSetBuff()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBuff()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buff, other.buff); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("sendPipeData_args("); + boolean first = true; + + sb.append("buff:"); + if (this.buff == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.buff, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class sendPipeData_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public sendPipeData_argsStandardScheme getScheme() { + return new sendPipeData_argsStandardScheme(); + } + } + + private static class sendPipeData_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, sendPipeData_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // BUFF + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.buff = iprot.readBinary(); + struct.setBuffIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, sendPipeData_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.buff != null) { + oprot.writeFieldBegin(BUFF_FIELD_DESC); + oprot.writeBinary(struct.buff); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class sendPipeData_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public sendPipeData_argsTupleScheme getScheme() { + return new sendPipeData_argsTupleScheme(); + } + } + + private static class sendPipeData_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, sendPipeData_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetBuff()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetBuff()) { + oprot.writeBinary(struct.buff); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, sendPipeData_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.buff = iprot.readBinary(); + struct.setBuffIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class sendPipeData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendPipeData_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendPipeData_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendPipeData_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendPipeData_result.class, metaDataMap); + } + + public sendPipeData_result() { + } + + public sendPipeData_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public sendPipeData_result(sendPipeData_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public sendPipeData_result deepCopy() { + return new sendPipeData_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public sendPipeData_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof sendPipeData_result) + return this.equals((sendPipeData_result)that); + return false; + } + + public boolean equals(sendPipeData_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(sendPipeData_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("sendPipeData_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class sendPipeData_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public sendPipeData_resultStandardScheme getScheme() { + return new sendPipeData_resultStandardScheme(); + } + } + + private static class sendPipeData_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, sendPipeData_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, sendPipeData_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class sendPipeData_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public sendPipeData_resultTupleScheme getScheme() { + return new sendPipeData_resultTupleScheme(); + } + } + + private static class sendPipeData_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, sendPipeData_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, sendPipeData_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class sendFile_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendFile_args"); + + private static final org.apache.thrift.protocol.TField META_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("metaInfo", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField BUFF_FIELD_DESC = new org.apache.thrift.protocol.TField("buff", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendFile_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendFile_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSyncTransportMetaInfo metaInfo; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer buff; // 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 { + META_INFO((short)1, "metaInfo"), + BUFF((short)2, "buff"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // META_INFO + return META_INFO; + case 2: // BUFF + return BUFF; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.META_INFO, new org.apache.thrift.meta_data.FieldMetaData("metaInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSyncTransportMetaInfo.class))); + tmpMap.put(_Fields.BUFF, new org.apache.thrift.meta_data.FieldMetaData("buff", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFile_args.class, metaDataMap); + } + + public sendFile_args() { + } + + public sendFile_args( + TSyncTransportMetaInfo metaInfo, + java.nio.ByteBuffer buff) + { + this(); + this.metaInfo = metaInfo; + this.buff = org.apache.thrift.TBaseHelper.copyBinary(buff); + } + + /** + * Performs a deep copy on other. + */ + public sendFile_args(sendFile_args other) { + if (other.isSetMetaInfo()) { + this.metaInfo = new TSyncTransportMetaInfo(other.metaInfo); + } + if (other.isSetBuff()) { + this.buff = org.apache.thrift.TBaseHelper.copyBinary(other.buff); + } + } + + @Override + public sendFile_args deepCopy() { + return new sendFile_args(this); + } + + @Override + public void clear() { + this.metaInfo = null; + this.buff = null; + } + + @org.apache.thrift.annotation.Nullable + public TSyncTransportMetaInfo getMetaInfo() { + return this.metaInfo; + } + + public sendFile_args setMetaInfo(@org.apache.thrift.annotation.Nullable TSyncTransportMetaInfo metaInfo) { + this.metaInfo = metaInfo; + return this; + } + + public void unsetMetaInfo() { + this.metaInfo = null; + } + + /** Returns true if field metaInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetMetaInfo() { + return this.metaInfo != null; + } + + public void setMetaInfoIsSet(boolean value) { + if (!value) { + this.metaInfo = null; + } + } + + public byte[] getBuff() { + setBuff(org.apache.thrift.TBaseHelper.rightSize(buff)); + return buff == null ? null : buff.array(); + } + + public java.nio.ByteBuffer bufferForBuff() { + return org.apache.thrift.TBaseHelper.copyBinary(buff); + } + + public sendFile_args setBuff(byte[] buff) { + this.buff = buff == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(buff.clone()); + return this; + } + + public sendFile_args setBuff(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer buff) { + this.buff = org.apache.thrift.TBaseHelper.copyBinary(buff); + return this; + } + + public void unsetBuff() { + this.buff = null; + } + + /** Returns true if field buff is set (has been assigned a value) and false otherwise */ + public boolean isSetBuff() { + return this.buff != null; + } + + public void setBuffIsSet(boolean value) { + if (!value) { + this.buff = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case META_INFO: + if (value == null) { + unsetMetaInfo(); + } else { + setMetaInfo((TSyncTransportMetaInfo)value); + } + break; + + case BUFF: + if (value == null) { + unsetBuff(); + } else { + if (value instanceof byte[]) { + setBuff((byte[])value); + } else { + setBuff((java.nio.ByteBuffer)value); + } + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case META_INFO: + return getMetaInfo(); + + case BUFF: + return getBuff(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case META_INFO: + return isSetMetaInfo(); + case BUFF: + return isSetBuff(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof sendFile_args) + return this.equals((sendFile_args)that); + return false; + } + + public boolean equals(sendFile_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_metaInfo = true && this.isSetMetaInfo(); + boolean that_present_metaInfo = true && that.isSetMetaInfo(); + if (this_present_metaInfo || that_present_metaInfo) { + if (!(this_present_metaInfo && that_present_metaInfo)) + return false; + if (!this.metaInfo.equals(that.metaInfo)) + return false; + } + + boolean this_present_buff = true && this.isSetBuff(); + boolean that_present_buff = true && that.isSetBuff(); + if (this_present_buff || that_present_buff) { + if (!(this_present_buff && that_present_buff)) + return false; + if (!this.buff.equals(that.buff)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetMetaInfo()) ? 131071 : 524287); + if (isSetMetaInfo()) + hashCode = hashCode * 8191 + metaInfo.hashCode(); + + hashCode = hashCode * 8191 + ((isSetBuff()) ? 131071 : 524287); + if (isSetBuff()) + hashCode = hashCode * 8191 + buff.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(sendFile_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetMetaInfo(), other.isSetMetaInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMetaInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaInfo, other.metaInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetBuff(), other.isSetBuff()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBuff()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buff, other.buff); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("sendFile_args("); + boolean first = true; + + sb.append("metaInfo:"); + if (this.metaInfo == null) { + sb.append("null"); + } else { + sb.append(this.metaInfo); + } + first = false; + if (!first) sb.append(", "); + sb.append("buff:"); + if (this.buff == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.buff, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (metaInfo != null) { + metaInfo.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class sendFile_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public sendFile_argsStandardScheme getScheme() { + return new sendFile_argsStandardScheme(); + } + } + + private static class sendFile_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, sendFile_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // META_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.metaInfo = new TSyncTransportMetaInfo(); + struct.metaInfo.read(iprot); + struct.setMetaInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // BUFF + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.buff = iprot.readBinary(); + struct.setBuffIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, sendFile_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.metaInfo != null) { + oprot.writeFieldBegin(META_INFO_FIELD_DESC); + struct.metaInfo.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.buff != null) { + oprot.writeFieldBegin(BUFF_FIELD_DESC); + oprot.writeBinary(struct.buff); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class sendFile_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public sendFile_argsTupleScheme getScheme() { + return new sendFile_argsTupleScheme(); + } + } + + private static class sendFile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, sendFile_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetMetaInfo()) { + optionals.set(0); + } + if (struct.isSetBuff()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetMetaInfo()) { + struct.metaInfo.write(oprot); + } + if (struct.isSetBuff()) { + oprot.writeBinary(struct.buff); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, sendFile_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.metaInfo = new TSyncTransportMetaInfo(); + struct.metaInfo.read(iprot); + struct.setMetaInfoIsSet(true); + } + if (incoming.get(1)) { + struct.buff = iprot.readBinary(); + struct.setBuffIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class sendFile_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendFile_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendFile_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendFile_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFile_result.class, metaDataMap); + } + + public sendFile_result() { + } + + public sendFile_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public sendFile_result(sendFile_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public sendFile_result deepCopy() { + return new sendFile_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public sendFile_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof sendFile_result) + return this.equals((sendFile_result)that); + return false; + } + + public boolean equals(sendFile_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(sendFile_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("sendFile_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class sendFile_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public sendFile_resultStandardScheme getScheme() { + return new sendFile_resultStandardScheme(); + } + } + + private static class sendFile_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, sendFile_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, sendFile_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class sendFile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public sendFile_resultTupleScheme getScheme() { + return new sendFile_resultTupleScheme(); + } + } + + private static class sendFile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, sendFile_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, sendFile_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class pipeTransfer_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pipeTransfer_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)-1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pipeTransfer_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pipeTransfer_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TPipeTransferReq req; // 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 { + REQ((short)-1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPipeTransferReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pipeTransfer_args.class, metaDataMap); + } + + public pipeTransfer_args() { + } + + public pipeTransfer_args( + TPipeTransferReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public pipeTransfer_args(pipeTransfer_args other) { + if (other.isSetReq()) { + this.req = new TPipeTransferReq(other.req); + } + } + + @Override + public pipeTransfer_args deepCopy() { + return new pipeTransfer_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TPipeTransferReq getReq() { + return this.req; + } + + public pipeTransfer_args setReq(@org.apache.thrift.annotation.Nullable TPipeTransferReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TPipeTransferReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof pipeTransfer_args) + return this.equals((pipeTransfer_args)that); + return false; + } + + public boolean equals(pipeTransfer_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(pipeTransfer_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("pipeTransfer_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class pipeTransfer_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pipeTransfer_argsStandardScheme getScheme() { + return new pipeTransfer_argsStandardScheme(); + } + } + + private static class pipeTransfer_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, pipeTransfer_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case -1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TPipeTransferReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, pipeTransfer_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class pipeTransfer_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pipeTransfer_argsTupleScheme getScheme() { + return new pipeTransfer_argsTupleScheme(); + } + } + + private static class pipeTransfer_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, pipeTransfer_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, pipeTransfer_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TPipeTransferReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class pipeTransfer_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pipeTransfer_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pipeTransfer_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pipeTransfer_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TPipeTransferResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPipeTransferResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pipeTransfer_result.class, metaDataMap); + } + + public pipeTransfer_result() { + } + + public pipeTransfer_result( + TPipeTransferResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public pipeTransfer_result(pipeTransfer_result other) { + if (other.isSetSuccess()) { + this.success = new TPipeTransferResp(other.success); + } + } + + @Override + public pipeTransfer_result deepCopy() { + return new pipeTransfer_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TPipeTransferResp getSuccess() { + return this.success; + } + + public pipeTransfer_result setSuccess(@org.apache.thrift.annotation.Nullable TPipeTransferResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TPipeTransferResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof pipeTransfer_result) + return this.equals((pipeTransfer_result)that); + return false; + } + + public boolean equals(pipeTransfer_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(pipeTransfer_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("pipeTransfer_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class pipeTransfer_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pipeTransfer_resultStandardScheme getScheme() { + return new pipeTransfer_resultStandardScheme(); + } + } + + private static class pipeTransfer_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, pipeTransfer_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TPipeTransferResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, pipeTransfer_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class pipeTransfer_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pipeTransfer_resultTupleScheme getScheme() { + return new pipeTransfer_resultTupleScheme(); + } + } + + private static class pipeTransfer_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, pipeTransfer_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, pipeTransfer_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TPipeTransferResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class pipeSubscribe_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pipeSubscribe_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)-1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pipeSubscribe_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pipeSubscribe_argsTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TPipeSubscribeReq req; // 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 { + REQ((short)-1, "req"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case -1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPipeSubscribeReq.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pipeSubscribe_args.class, metaDataMap); + } + + public pipeSubscribe_args() { + } + + public pipeSubscribe_args( + TPipeSubscribeReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public pipeSubscribe_args(pipeSubscribe_args other) { + if (other.isSetReq()) { + this.req = new TPipeSubscribeReq(other.req); + } + } + + @Override + public pipeSubscribe_args deepCopy() { + return new pipeSubscribe_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + @org.apache.thrift.annotation.Nullable + public TPipeSubscribeReq getReq() { + return this.req; + } + + public pipeSubscribe_args setReq(@org.apache.thrift.annotation.Nullable TPipeSubscribeReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((TPipeSubscribeReq)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof pipeSubscribe_args) + return this.equals((pipeSubscribe_args)that); + return false; + } + + public boolean equals(pipeSubscribe_args that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); + if (isSetReq()) + hashCode = hashCode * 8191 + req.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(pipeSubscribe_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("pipeSubscribe_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class pipeSubscribe_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pipeSubscribe_argsStandardScheme getScheme() { + return new pipeSubscribe_argsStandardScheme(); + } + } + + private static class pipeSubscribe_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, pipeSubscribe_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case -1: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new TPipeSubscribeReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, pipeSubscribe_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class pipeSubscribe_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pipeSubscribe_argsTupleScheme getScheme() { + return new pipeSubscribe_argsTupleScheme(); + } + } + + private static class pipeSubscribe_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, pipeSubscribe_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, pipeSubscribe_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TPipeSubscribeReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class pipeSubscribe_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pipeSubscribe_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pipeSubscribe_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pipeSubscribe_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TPipeSubscribeResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPipeSubscribeResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pipeSubscribe_result.class, metaDataMap); + } + + public pipeSubscribe_result() { + } + + public pipeSubscribe_result( + TPipeSubscribeResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public pipeSubscribe_result(pipeSubscribe_result other) { + if (other.isSetSuccess()) { + this.success = new TPipeSubscribeResp(other.success); + } + } + + @Override + public pipeSubscribe_result deepCopy() { + return new pipeSubscribe_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TPipeSubscribeResp getSuccess() { + return this.success; + } + + public pipeSubscribe_result setSuccess(@org.apache.thrift.annotation.Nullable TPipeSubscribeResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TPipeSubscribeResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof pipeSubscribe_result) + return this.equals((pipeSubscribe_result)that); + return false; + } + + public boolean equals(pipeSubscribe_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(pipeSubscribe_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("pipeSubscribe_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class pipeSubscribe_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pipeSubscribe_resultStandardScheme getScheme() { + return new pipeSubscribe_resultStandardScheme(); + } + } + + private static class pipeSubscribe_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, pipeSubscribe_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TPipeSubscribeResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, pipeSubscribe_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class pipeSubscribe_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public pipeSubscribe_resultTupleScheme getScheme() { + return new pipeSubscribe_resultTupleScheme(); + } + } + + private static class pipeSubscribe_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, pipeSubscribe_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, pipeSubscribe_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TPipeSubscribeResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class getBackupConfiguration_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBackupConfiguration_args"); + + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getBackupConfiguration_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getBackupConfiguration_argsTupleSchemeFactory(); + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBackupConfiguration_args.class, metaDataMap); + } + + public getBackupConfiguration_args() { + } + + /** + * Performs a deep copy on other. + */ + public getBackupConfiguration_args(getBackupConfiguration_args other) { + } + + @Override + public getBackupConfiguration_args deepCopy() { + return new getBackupConfiguration_args(this); + } + + @Override + public void clear() { + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof getBackupConfiguration_args) + return this.equals((getBackupConfiguration_args)that); + return false; + } + + public boolean equals(getBackupConfiguration_args that) { + if (that == null) + return false; + if (this == that) + return true; + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + return hashCode; + } + + @Override + public int compareTo(getBackupConfiguration_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getBackupConfiguration_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class getBackupConfiguration_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getBackupConfiguration_argsStandardScheme getScheme() { + return new getBackupConfiguration_argsStandardScheme(); + } + } + + private static class getBackupConfiguration_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, getBackupConfiguration_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, getBackupConfiguration_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getBackupConfiguration_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getBackupConfiguration_argsTupleScheme getScheme() { + return new getBackupConfiguration_argsTupleScheme(); + } + } + + private static class getBackupConfiguration_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getBackupConfiguration_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getBackupConfiguration_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class getBackupConfiguration_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBackupConfiguration_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getBackupConfiguration_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getBackupConfiguration_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSBackupConfigurationResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSBackupConfigurationResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBackupConfiguration_result.class, metaDataMap); + } + + public getBackupConfiguration_result() { + } + + public getBackupConfiguration_result( + TSBackupConfigurationResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getBackupConfiguration_result(getBackupConfiguration_result other) { + if (other.isSetSuccess()) { + this.success = new TSBackupConfigurationResp(other.success); + } + } + + @Override + public getBackupConfiguration_result deepCopy() { + return new getBackupConfiguration_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSBackupConfigurationResp getSuccess() { + return this.success; + } + + public getBackupConfiguration_result setSuccess(@org.apache.thrift.annotation.Nullable TSBackupConfigurationResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSBackupConfigurationResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof getBackupConfiguration_result) + return this.equals((getBackupConfiguration_result)that); + return false; + } + + public boolean equals(getBackupConfiguration_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(getBackupConfiguration_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getBackupConfiguration_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class getBackupConfiguration_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getBackupConfiguration_resultStandardScheme getScheme() { + return new getBackupConfiguration_resultStandardScheme(); + } + } + + private static class getBackupConfiguration_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, getBackupConfiguration_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSBackupConfigurationResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, getBackupConfiguration_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getBackupConfiguration_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public getBackupConfiguration_resultTupleScheme getScheme() { + return new getBackupConfiguration_resultTupleScheme(); + } + } + + private static class getBackupConfiguration_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getBackupConfiguration_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getBackupConfiguration_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSBackupConfigurationResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class fetchAllConnectionsInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchAllConnectionsInfo_args"); + + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchAllConnectionsInfo_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchAllConnectionsInfo_argsTupleSchemeFactory(); + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchAllConnectionsInfo_args.class, metaDataMap); + } + + public fetchAllConnectionsInfo_args() { + } + + /** + * Performs a deep copy on other. + */ + public fetchAllConnectionsInfo_args(fetchAllConnectionsInfo_args other) { + } + + @Override + public fetchAllConnectionsInfo_args deepCopy() { + return new fetchAllConnectionsInfo_args(this); + } + + @Override + public void clear() { + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof fetchAllConnectionsInfo_args) + return this.equals((fetchAllConnectionsInfo_args)that); + return false; + } + + public boolean equals(fetchAllConnectionsInfo_args that) { + if (that == null) + return false; + if (this == that) + return true; + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + return hashCode; + } + + @Override + public int compareTo(fetchAllConnectionsInfo_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchAllConnectionsInfo_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class fetchAllConnectionsInfo_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchAllConnectionsInfo_argsStandardScheme getScheme() { + return new fetchAllConnectionsInfo_argsStandardScheme(); + } + } + + private static class fetchAllConnectionsInfo_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAllConnectionsInfo_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchAllConnectionsInfo_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchAllConnectionsInfo_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchAllConnectionsInfo_argsTupleScheme getScheme() { + return new fetchAllConnectionsInfo_argsTupleScheme(); + } + } + + private static class fetchAllConnectionsInfo_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchAllConnectionsInfo_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchAllConnectionsInfo_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class fetchAllConnectionsInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchAllConnectionsInfo_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchAllConnectionsInfo_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchAllConnectionsInfo_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable TSConnectionInfoResp success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSConnectionInfoResp.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchAllConnectionsInfo_result.class, metaDataMap); + } + + public fetchAllConnectionsInfo_result() { + } + + public fetchAllConnectionsInfo_result( + TSConnectionInfoResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public fetchAllConnectionsInfo_result(fetchAllConnectionsInfo_result other) { + if (other.isSetSuccess()) { + this.success = new TSConnectionInfoResp(other.success); + } + } + + @Override + public fetchAllConnectionsInfo_result deepCopy() { + return new fetchAllConnectionsInfo_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public TSConnectionInfoResp getSuccess() { + return this.success; + } + + public fetchAllConnectionsInfo_result setSuccess(@org.apache.thrift.annotation.Nullable TSConnectionInfoResp success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TSConnectionInfoResp)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof fetchAllConnectionsInfo_result) + return this.equals((fetchAllConnectionsInfo_result)that); + return false; + } + + public boolean equals(fetchAllConnectionsInfo_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(fetchAllConnectionsInfo_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchAllConnectionsInfo_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class fetchAllConnectionsInfo_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchAllConnectionsInfo_resultStandardScheme getScheme() { + return new fetchAllConnectionsInfo_resultStandardScheme(); + } + } + + private static class fetchAllConnectionsInfo_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAllConnectionsInfo_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TSConnectionInfoResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchAllConnectionsInfo_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchAllConnectionsInfo_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public fetchAllConnectionsInfo_resultTupleScheme getScheme() { + return new fetchAllConnectionsInfo_resultTupleScheme(); + } + } + + private static class fetchAllConnectionsInfo_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchAllConnectionsInfo_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchAllConnectionsInfo_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TSConnectionInfoResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testConnectionEmptyRPC_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testConnectionEmptyRPC_args"); + + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testConnectionEmptyRPC_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testConnectionEmptyRPC_argsTupleSchemeFactory(); + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testConnectionEmptyRPC_args.class, metaDataMap); + } + + public testConnectionEmptyRPC_args() { + } + + /** + * Performs a deep copy on other. + */ + public testConnectionEmptyRPC_args(testConnectionEmptyRPC_args other) { + } + + @Override + public testConnectionEmptyRPC_args deepCopy() { + return new testConnectionEmptyRPC_args(this); + } + + @Override + public void clear() { + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testConnectionEmptyRPC_args) + return this.equals((testConnectionEmptyRPC_args)that); + return false; + } + + public boolean equals(testConnectionEmptyRPC_args that) { + if (that == null) + return false; + if (this == that) + return true; + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + return hashCode; + } + + @Override + public int compareTo(testConnectionEmptyRPC_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testConnectionEmptyRPC_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testConnectionEmptyRPC_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testConnectionEmptyRPC_argsStandardScheme getScheme() { + return new testConnectionEmptyRPC_argsStandardScheme(); + } + } + + private static class testConnectionEmptyRPC_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testConnectionEmptyRPC_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testConnectionEmptyRPC_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testConnectionEmptyRPC_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testConnectionEmptyRPC_argsTupleScheme getScheme() { + return new testConnectionEmptyRPC_argsTupleScheme(); + } + } + + private static class testConnectionEmptyRPC_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testConnectionEmptyRPC_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testConnectionEmptyRPC_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) + public static class testConnectionEmptyRPC_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testConnectionEmptyRPC_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testConnectionEmptyRPC_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testConnectionEmptyRPC_resultTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testConnectionEmptyRPC_result.class, metaDataMap); + } + + public testConnectionEmptyRPC_result() { + } + + public testConnectionEmptyRPC_result( + org.apache.iotdb.common.rpc.thrift.TSStatus success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public testConnectionEmptyRPC_result(testConnectionEmptyRPC_result other) { + if (other.isSetSuccess()) { + this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); + } + } + + @Override + public testConnectionEmptyRPC_result deepCopy() { + return new testConnectionEmptyRPC_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { + return this.success; + } + + public testConnectionEmptyRPC_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof testConnectionEmptyRPC_result) + return this.equals((testConnectionEmptyRPC_result)that); + return false; + } + + public boolean equals(testConnectionEmptyRPC_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(testConnectionEmptyRPC_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("testConnectionEmptyRPC_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class testConnectionEmptyRPC_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testConnectionEmptyRPC_resultStandardScheme getScheme() { + return new testConnectionEmptyRPC_resultStandardScheme(); + } + } + + private static class testConnectionEmptyRPC_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, testConnectionEmptyRPC_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, testConnectionEmptyRPC_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class testConnectionEmptyRPC_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public testConnectionEmptyRPC_resultTupleScheme getScheme() { + return new testConnectionEmptyRPC_resultTupleScheme(); + } + } + + private static class testConnectionEmptyRPC_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, testConnectionEmptyRPC_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, testConnectionEmptyRPC_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + +} diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/ServerProperties.java b/gen-java/org/apache/iotdb/service/rpc/thrift/ServerProperties.java new file mode 100644 index 0000000000000..b0f5b0d118cea --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/ServerProperties.java @@ -0,0 +1,1149 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class ServerProperties implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ServerProperties"); + + private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField SUPPORTED_TIME_AGGREGATION_OPERATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("supportedTimeAggregationOperations", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField TIMESTAMP_PRECISION_FIELD_DESC = new org.apache.thrift.protocol.TField("timestampPrecision", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField MAX_CONCURRENT_CLIENT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("maxConcurrentClientNum", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField THRIFT_MAX_FRAME_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("thriftMaxFrameSize", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField IS_READ_ONLY_FIELD_DESC = new org.apache.thrift.protocol.TField("isReadOnly", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField BUILD_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("buildInfo", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField LOGO_FIELD_DESC = new org.apache.thrift.protocol.TField("logo", org.apache.thrift.protocol.TType.STRING, (short)8); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ServerPropertiesStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ServerPropertiesTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.lang.String version; // required + public @org.apache.thrift.annotation.Nullable java.util.List supportedTimeAggregationOperations; // required + public @org.apache.thrift.annotation.Nullable java.lang.String timestampPrecision; // required + public int maxConcurrentClientNum; // required + public int thriftMaxFrameSize; // optional + public boolean isReadOnly; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String buildInfo; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String logo; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + VERSION((short)1, "version"), + SUPPORTED_TIME_AGGREGATION_OPERATIONS((short)2, "supportedTimeAggregationOperations"), + TIMESTAMP_PRECISION((short)3, "timestampPrecision"), + MAX_CONCURRENT_CLIENT_NUM((short)4, "maxConcurrentClientNum"), + THRIFT_MAX_FRAME_SIZE((short)5, "thriftMaxFrameSize"), + IS_READ_ONLY((short)6, "isReadOnly"), + BUILD_INFO((short)7, "buildInfo"), + LOGO((short)8, "logo"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // VERSION + return VERSION; + case 2: // SUPPORTED_TIME_AGGREGATION_OPERATIONS + return SUPPORTED_TIME_AGGREGATION_OPERATIONS; + case 3: // TIMESTAMP_PRECISION + return TIMESTAMP_PRECISION; + case 4: // MAX_CONCURRENT_CLIENT_NUM + return MAX_CONCURRENT_CLIENT_NUM; + case 5: // THRIFT_MAX_FRAME_SIZE + return THRIFT_MAX_FRAME_SIZE; + case 6: // IS_READ_ONLY + return IS_READ_ONLY; + case 7: // BUILD_INFO + return BUILD_INFO; + case 8: // LOGO + return LOGO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAXCONCURRENTCLIENTNUM_ISSET_ID = 0; + private static final int __THRIFTMAXFRAMESIZE_ISSET_ID = 1; + private static final int __ISREADONLY_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.THRIFT_MAX_FRAME_SIZE,_Fields.IS_READ_ONLY,_Fields.BUILD_INFO,_Fields.LOGO}; + 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.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SUPPORTED_TIME_AGGREGATION_OPERATIONS, new org.apache.thrift.meta_data.FieldMetaData("supportedTimeAggregationOperations", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.TIMESTAMP_PRECISION, new org.apache.thrift.meta_data.FieldMetaData("timestampPrecision", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_CONCURRENT_CLIENT_NUM, new org.apache.thrift.meta_data.FieldMetaData("maxConcurrentClientNum", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.THRIFT_MAX_FRAME_SIZE, new org.apache.thrift.meta_data.FieldMetaData("thriftMaxFrameSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.IS_READ_ONLY, new org.apache.thrift.meta_data.FieldMetaData("isReadOnly", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.BUILD_INFO, new org.apache.thrift.meta_data.FieldMetaData("buildInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LOGO, new org.apache.thrift.meta_data.FieldMetaData("logo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ServerProperties.class, metaDataMap); + } + + public ServerProperties() { + } + + public ServerProperties( + java.lang.String version, + java.util.List supportedTimeAggregationOperations, + java.lang.String timestampPrecision, + int maxConcurrentClientNum) + { + this(); + this.version = version; + this.supportedTimeAggregationOperations = supportedTimeAggregationOperations; + this.timestampPrecision = timestampPrecision; + this.maxConcurrentClientNum = maxConcurrentClientNum; + setMaxConcurrentClientNumIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public ServerProperties(ServerProperties other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetVersion()) { + this.version = other.version; + } + if (other.isSetSupportedTimeAggregationOperations()) { + java.util.List __this__supportedTimeAggregationOperations = new java.util.ArrayList(other.supportedTimeAggregationOperations); + this.supportedTimeAggregationOperations = __this__supportedTimeAggregationOperations; + } + if (other.isSetTimestampPrecision()) { + this.timestampPrecision = other.timestampPrecision; + } + this.maxConcurrentClientNum = other.maxConcurrentClientNum; + this.thriftMaxFrameSize = other.thriftMaxFrameSize; + this.isReadOnly = other.isReadOnly; + if (other.isSetBuildInfo()) { + this.buildInfo = other.buildInfo; + } + if (other.isSetLogo()) { + this.logo = other.logo; + } + } + + @Override + public ServerProperties deepCopy() { + return new ServerProperties(this); + } + + @Override + public void clear() { + this.version = null; + this.supportedTimeAggregationOperations = null; + this.timestampPrecision = null; + setMaxConcurrentClientNumIsSet(false); + this.maxConcurrentClientNum = 0; + setThriftMaxFrameSizeIsSet(false); + this.thriftMaxFrameSize = 0; + setIsReadOnlyIsSet(false); + this.isReadOnly = false; + this.buildInfo = null; + this.logo = null; + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getVersion() { + return this.version; + } + + public ServerProperties setVersion(@org.apache.thrift.annotation.Nullable java.lang.String version) { + this.version = version; + return this; + } + + public void unsetVersion() { + this.version = null; + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return this.version != null; + } + + public void setVersionIsSet(boolean value) { + if (!value) { + this.version = null; + } + } + + public int getSupportedTimeAggregationOperationsSize() { + return (this.supportedTimeAggregationOperations == null) ? 0 : this.supportedTimeAggregationOperations.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getSupportedTimeAggregationOperationsIterator() { + return (this.supportedTimeAggregationOperations == null) ? null : this.supportedTimeAggregationOperations.iterator(); + } + + public void addToSupportedTimeAggregationOperations(java.lang.String elem) { + if (this.supportedTimeAggregationOperations == null) { + this.supportedTimeAggregationOperations = new java.util.ArrayList(); + } + this.supportedTimeAggregationOperations.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getSupportedTimeAggregationOperations() { + return this.supportedTimeAggregationOperations; + } + + public ServerProperties setSupportedTimeAggregationOperations(@org.apache.thrift.annotation.Nullable java.util.List supportedTimeAggregationOperations) { + this.supportedTimeAggregationOperations = supportedTimeAggregationOperations; + return this; + } + + public void unsetSupportedTimeAggregationOperations() { + this.supportedTimeAggregationOperations = null; + } + + /** Returns true if field supportedTimeAggregationOperations is set (has been assigned a value) and false otherwise */ + public boolean isSetSupportedTimeAggregationOperations() { + return this.supportedTimeAggregationOperations != null; + } + + public void setSupportedTimeAggregationOperationsIsSet(boolean value) { + if (!value) { + this.supportedTimeAggregationOperations = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getTimestampPrecision() { + return this.timestampPrecision; + } + + public ServerProperties setTimestampPrecision(@org.apache.thrift.annotation.Nullable java.lang.String timestampPrecision) { + this.timestampPrecision = timestampPrecision; + return this; + } + + public void unsetTimestampPrecision() { + this.timestampPrecision = null; + } + + /** Returns true if field timestampPrecision is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestampPrecision() { + return this.timestampPrecision != null; + } + + public void setTimestampPrecisionIsSet(boolean value) { + if (!value) { + this.timestampPrecision = null; + } + } + + public int getMaxConcurrentClientNum() { + return this.maxConcurrentClientNum; + } + + public ServerProperties setMaxConcurrentClientNum(int maxConcurrentClientNum) { + this.maxConcurrentClientNum = maxConcurrentClientNum; + setMaxConcurrentClientNumIsSet(true); + return this; + } + + public void unsetMaxConcurrentClientNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXCONCURRENTCLIENTNUM_ISSET_ID); + } + + /** Returns true if field maxConcurrentClientNum is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxConcurrentClientNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXCONCURRENTCLIENTNUM_ISSET_ID); + } + + public void setMaxConcurrentClientNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXCONCURRENTCLIENTNUM_ISSET_ID, value); + } + + public int getThriftMaxFrameSize() { + return this.thriftMaxFrameSize; + } + + public ServerProperties setThriftMaxFrameSize(int thriftMaxFrameSize) { + this.thriftMaxFrameSize = thriftMaxFrameSize; + setThriftMaxFrameSizeIsSet(true); + return this; + } + + public void unsetThriftMaxFrameSize() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THRIFTMAXFRAMESIZE_ISSET_ID); + } + + /** Returns true if field thriftMaxFrameSize is set (has been assigned a value) and false otherwise */ + public boolean isSetThriftMaxFrameSize() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THRIFTMAXFRAMESIZE_ISSET_ID); + } + + public void setThriftMaxFrameSizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THRIFTMAXFRAMESIZE_ISSET_ID, value); + } + + public boolean isIsReadOnly() { + return this.isReadOnly; + } + + public ServerProperties setIsReadOnly(boolean isReadOnly) { + this.isReadOnly = isReadOnly; + setIsReadOnlyIsSet(true); + return this; + } + + public void unsetIsReadOnly() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISREADONLY_ISSET_ID); + } + + /** Returns true if field isReadOnly is set (has been assigned a value) and false otherwise */ + public boolean isSetIsReadOnly() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISREADONLY_ISSET_ID); + } + + public void setIsReadOnlyIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISREADONLY_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getBuildInfo() { + return this.buildInfo; + } + + public ServerProperties setBuildInfo(@org.apache.thrift.annotation.Nullable java.lang.String buildInfo) { + this.buildInfo = buildInfo; + return this; + } + + public void unsetBuildInfo() { + this.buildInfo = null; + } + + /** Returns true if field buildInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetBuildInfo() { + return this.buildInfo != null; + } + + public void setBuildInfoIsSet(boolean value) { + if (!value) { + this.buildInfo = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getLogo() { + return this.logo; + } + + public ServerProperties setLogo(@org.apache.thrift.annotation.Nullable java.lang.String logo) { + this.logo = logo; + return this; + } + + public void unsetLogo() { + this.logo = null; + } + + /** Returns true if field logo is set (has been assigned a value) and false otherwise */ + public boolean isSetLogo() { + return this.logo != null; + } + + public void setLogoIsSet(boolean value) { + if (!value) { + this.logo = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((java.lang.String)value); + } + break; + + case SUPPORTED_TIME_AGGREGATION_OPERATIONS: + if (value == null) { + unsetSupportedTimeAggregationOperations(); + } else { + setSupportedTimeAggregationOperations((java.util.List)value); + } + break; + + case TIMESTAMP_PRECISION: + if (value == null) { + unsetTimestampPrecision(); + } else { + setTimestampPrecision((java.lang.String)value); + } + break; + + case MAX_CONCURRENT_CLIENT_NUM: + if (value == null) { + unsetMaxConcurrentClientNum(); + } else { + setMaxConcurrentClientNum((java.lang.Integer)value); + } + break; + + case THRIFT_MAX_FRAME_SIZE: + if (value == null) { + unsetThriftMaxFrameSize(); + } else { + setThriftMaxFrameSize((java.lang.Integer)value); + } + break; + + case IS_READ_ONLY: + if (value == null) { + unsetIsReadOnly(); + } else { + setIsReadOnly((java.lang.Boolean)value); + } + break; + + case BUILD_INFO: + if (value == null) { + unsetBuildInfo(); + } else { + setBuildInfo((java.lang.String)value); + } + break; + + case LOGO: + if (value == null) { + unsetLogo(); + } else { + setLogo((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case VERSION: + return getVersion(); + + case SUPPORTED_TIME_AGGREGATION_OPERATIONS: + return getSupportedTimeAggregationOperations(); + + case TIMESTAMP_PRECISION: + return getTimestampPrecision(); + + case MAX_CONCURRENT_CLIENT_NUM: + return getMaxConcurrentClientNum(); + + case THRIFT_MAX_FRAME_SIZE: + return getThriftMaxFrameSize(); + + case IS_READ_ONLY: + return isIsReadOnly(); + + case BUILD_INFO: + return getBuildInfo(); + + case LOGO: + return getLogo(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case VERSION: + return isSetVersion(); + case SUPPORTED_TIME_AGGREGATION_OPERATIONS: + return isSetSupportedTimeAggregationOperations(); + case TIMESTAMP_PRECISION: + return isSetTimestampPrecision(); + case MAX_CONCURRENT_CLIENT_NUM: + return isSetMaxConcurrentClientNum(); + case THRIFT_MAX_FRAME_SIZE: + return isSetThriftMaxFrameSize(); + case IS_READ_ONLY: + return isSetIsReadOnly(); + case BUILD_INFO: + return isSetBuildInfo(); + case LOGO: + return isSetLogo(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof ServerProperties) + return this.equals((ServerProperties)that); + return false; + } + + public boolean equals(ServerProperties that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_version = true && this.isSetVersion(); + boolean that_present_version = true && that.isSetVersion(); + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (!this.version.equals(that.version)) + return false; + } + + boolean this_present_supportedTimeAggregationOperations = true && this.isSetSupportedTimeAggregationOperations(); + boolean that_present_supportedTimeAggregationOperations = true && that.isSetSupportedTimeAggregationOperations(); + if (this_present_supportedTimeAggregationOperations || that_present_supportedTimeAggregationOperations) { + if (!(this_present_supportedTimeAggregationOperations && that_present_supportedTimeAggregationOperations)) + return false; + if (!this.supportedTimeAggregationOperations.equals(that.supportedTimeAggregationOperations)) + return false; + } + + boolean this_present_timestampPrecision = true && this.isSetTimestampPrecision(); + boolean that_present_timestampPrecision = true && that.isSetTimestampPrecision(); + if (this_present_timestampPrecision || that_present_timestampPrecision) { + if (!(this_present_timestampPrecision && that_present_timestampPrecision)) + return false; + if (!this.timestampPrecision.equals(that.timestampPrecision)) + return false; + } + + boolean this_present_maxConcurrentClientNum = true; + boolean that_present_maxConcurrentClientNum = true; + if (this_present_maxConcurrentClientNum || that_present_maxConcurrentClientNum) { + if (!(this_present_maxConcurrentClientNum && that_present_maxConcurrentClientNum)) + return false; + if (this.maxConcurrentClientNum != that.maxConcurrentClientNum) + return false; + } + + boolean this_present_thriftMaxFrameSize = true && this.isSetThriftMaxFrameSize(); + boolean that_present_thriftMaxFrameSize = true && that.isSetThriftMaxFrameSize(); + if (this_present_thriftMaxFrameSize || that_present_thriftMaxFrameSize) { + if (!(this_present_thriftMaxFrameSize && that_present_thriftMaxFrameSize)) + return false; + if (this.thriftMaxFrameSize != that.thriftMaxFrameSize) + return false; + } + + boolean this_present_isReadOnly = true && this.isSetIsReadOnly(); + boolean that_present_isReadOnly = true && that.isSetIsReadOnly(); + if (this_present_isReadOnly || that_present_isReadOnly) { + if (!(this_present_isReadOnly && that_present_isReadOnly)) + return false; + if (this.isReadOnly != that.isReadOnly) + return false; + } + + boolean this_present_buildInfo = true && this.isSetBuildInfo(); + boolean that_present_buildInfo = true && that.isSetBuildInfo(); + if (this_present_buildInfo || that_present_buildInfo) { + if (!(this_present_buildInfo && that_present_buildInfo)) + return false; + if (!this.buildInfo.equals(that.buildInfo)) + return false; + } + + boolean this_present_logo = true && this.isSetLogo(); + boolean that_present_logo = true && that.isSetLogo(); + if (this_present_logo || that_present_logo) { + if (!(this_present_logo && that_present_logo)) + return false; + if (!this.logo.equals(that.logo)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetVersion()) ? 131071 : 524287); + if (isSetVersion()) + hashCode = hashCode * 8191 + version.hashCode(); + + hashCode = hashCode * 8191 + ((isSetSupportedTimeAggregationOperations()) ? 131071 : 524287); + if (isSetSupportedTimeAggregationOperations()) + hashCode = hashCode * 8191 + supportedTimeAggregationOperations.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTimestampPrecision()) ? 131071 : 524287); + if (isSetTimestampPrecision()) + hashCode = hashCode * 8191 + timestampPrecision.hashCode(); + + hashCode = hashCode * 8191 + maxConcurrentClientNum; + + hashCode = hashCode * 8191 + ((isSetThriftMaxFrameSize()) ? 131071 : 524287); + if (isSetThriftMaxFrameSize()) + hashCode = hashCode * 8191 + thriftMaxFrameSize; + + hashCode = hashCode * 8191 + ((isSetIsReadOnly()) ? 131071 : 524287); + if (isSetIsReadOnly()) + hashCode = hashCode * 8191 + ((isReadOnly) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetBuildInfo()) ? 131071 : 524287); + if (isSetBuildInfo()) + hashCode = hashCode * 8191 + buildInfo.hashCode(); + + hashCode = hashCode * 8191 + ((isSetLogo()) ? 131071 : 524287); + if (isSetLogo()) + hashCode = hashCode * 8191 + logo.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(ServerProperties other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSupportedTimeAggregationOperations(), other.isSetSupportedTimeAggregationOperations()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSupportedTimeAggregationOperations()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supportedTimeAggregationOperations, other.supportedTimeAggregationOperations); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimestampPrecision(), other.isSetTimestampPrecision()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestampPrecision()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestampPrecision, other.timestampPrecision); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMaxConcurrentClientNum(), other.isSetMaxConcurrentClientNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxConcurrentClientNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxConcurrentClientNum, other.maxConcurrentClientNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetThriftMaxFrameSize(), other.isSetThriftMaxFrameSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetThriftMaxFrameSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.thriftMaxFrameSize, other.thriftMaxFrameSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsReadOnly(), other.isSetIsReadOnly()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsReadOnly()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isReadOnly, other.isReadOnly); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetBuildInfo(), other.isSetBuildInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBuildInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buildInfo, other.buildInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetLogo(), other.isSetLogo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLogo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logo, other.logo); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("ServerProperties("); + boolean first = true; + + sb.append("version:"); + if (this.version == null) { + sb.append("null"); + } else { + sb.append(this.version); + } + first = false; + if (!first) sb.append(", "); + sb.append("supportedTimeAggregationOperations:"); + if (this.supportedTimeAggregationOperations == null) { + sb.append("null"); + } else { + sb.append(this.supportedTimeAggregationOperations); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestampPrecision:"); + if (this.timestampPrecision == null) { + sb.append("null"); + } else { + sb.append(this.timestampPrecision); + } + first = false; + if (!first) sb.append(", "); + sb.append("maxConcurrentClientNum:"); + sb.append(this.maxConcurrentClientNum); + first = false; + if (isSetThriftMaxFrameSize()) { + if (!first) sb.append(", "); + sb.append("thriftMaxFrameSize:"); + sb.append(this.thriftMaxFrameSize); + first = false; + } + if (isSetIsReadOnly()) { + if (!first) sb.append(", "); + sb.append("isReadOnly:"); + sb.append(this.isReadOnly); + first = false; + } + if (isSetBuildInfo()) { + if (!first) sb.append(", "); + sb.append("buildInfo:"); + if (this.buildInfo == null) { + sb.append("null"); + } else { + sb.append(this.buildInfo); + } + first = false; + } + if (isSetLogo()) { + if (!first) sb.append(", "); + sb.append("logo:"); + if (this.logo == null) { + sb.append("null"); + } else { + sb.append(this.logo); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (version == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not present! Struct: " + toString()); + } + if (supportedTimeAggregationOperations == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'supportedTimeAggregationOperations' was not present! Struct: " + toString()); + } + if (timestampPrecision == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestampPrecision' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class ServerPropertiesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public ServerPropertiesStandardScheme getScheme() { + return new ServerPropertiesStandardScheme(); + } + } + + private static class ServerPropertiesStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, ServerProperties struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SUPPORTED_TIME_AGGREGATION_OPERATIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list686 = iprot.readListBegin(); + struct.supportedTimeAggregationOperations = new java.util.ArrayList(_list686.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem687; + for (int _i688 = 0; _i688 < _list686.size; ++_i688) + { + _elem687 = iprot.readString(); + struct.supportedTimeAggregationOperations.add(_elem687); + } + iprot.readListEnd(); + } + struct.setSupportedTimeAggregationOperationsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TIMESTAMP_PRECISION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.timestampPrecision = iprot.readString(); + struct.setTimestampPrecisionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_CONCURRENT_CLIENT_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxConcurrentClientNum = iprot.readI32(); + struct.setMaxConcurrentClientNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // THRIFT_MAX_FRAME_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.thriftMaxFrameSize = iprot.readI32(); + struct.setThriftMaxFrameSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IS_READ_ONLY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isReadOnly = iprot.readBool(); + struct.setIsReadOnlyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // BUILD_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.buildInfo = iprot.readString(); + struct.setBuildInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // LOGO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.logo = iprot.readString(); + struct.setLogoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, ServerProperties struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(struct.version); + oprot.writeFieldEnd(); + } + if (struct.supportedTimeAggregationOperations != null) { + oprot.writeFieldBegin(SUPPORTED_TIME_AGGREGATION_OPERATIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.supportedTimeAggregationOperations.size())); + for (java.lang.String _iter689 : struct.supportedTimeAggregationOperations) + { + oprot.writeString(_iter689); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.timestampPrecision != null) { + oprot.writeFieldBegin(TIMESTAMP_PRECISION_FIELD_DESC); + oprot.writeString(struct.timestampPrecision); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_CONCURRENT_CLIENT_NUM_FIELD_DESC); + oprot.writeI32(struct.maxConcurrentClientNum); + oprot.writeFieldEnd(); + if (struct.isSetThriftMaxFrameSize()) { + oprot.writeFieldBegin(THRIFT_MAX_FRAME_SIZE_FIELD_DESC); + oprot.writeI32(struct.thriftMaxFrameSize); + oprot.writeFieldEnd(); + } + if (struct.isSetIsReadOnly()) { + oprot.writeFieldBegin(IS_READ_ONLY_FIELD_DESC); + oprot.writeBool(struct.isReadOnly); + oprot.writeFieldEnd(); + } + if (struct.buildInfo != null) { + if (struct.isSetBuildInfo()) { + oprot.writeFieldBegin(BUILD_INFO_FIELD_DESC); + oprot.writeString(struct.buildInfo); + oprot.writeFieldEnd(); + } + } + if (struct.logo != null) { + if (struct.isSetLogo()) { + oprot.writeFieldBegin(LOGO_FIELD_DESC); + oprot.writeString(struct.logo); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ServerPropertiesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public ServerPropertiesTupleScheme getScheme() { + return new ServerPropertiesTupleScheme(); + } + } + + private static class ServerPropertiesTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ServerProperties struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeString(struct.version); + { + oprot.writeI32(struct.supportedTimeAggregationOperations.size()); + for (java.lang.String _iter690 : struct.supportedTimeAggregationOperations) + { + oprot.writeString(_iter690); + } + } + oprot.writeString(struct.timestampPrecision); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetMaxConcurrentClientNum()) { + optionals.set(0); + } + if (struct.isSetThriftMaxFrameSize()) { + optionals.set(1); + } + if (struct.isSetIsReadOnly()) { + optionals.set(2); + } + if (struct.isSetBuildInfo()) { + optionals.set(3); + } + if (struct.isSetLogo()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetMaxConcurrentClientNum()) { + oprot.writeI32(struct.maxConcurrentClientNum); + } + if (struct.isSetThriftMaxFrameSize()) { + oprot.writeI32(struct.thriftMaxFrameSize); + } + if (struct.isSetIsReadOnly()) { + oprot.writeBool(struct.isReadOnly); + } + if (struct.isSetBuildInfo()) { + oprot.writeString(struct.buildInfo); + } + if (struct.isSetLogo()) { + oprot.writeString(struct.logo); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ServerProperties struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + { + org.apache.thrift.protocol.TList _list691 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.supportedTimeAggregationOperations = new java.util.ArrayList(_list691.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem692; + for (int _i693 = 0; _i693 < _list691.size; ++_i693) + { + _elem692 = iprot.readString(); + struct.supportedTimeAggregationOperations.add(_elem692); + } + } + struct.setSupportedTimeAggregationOperationsIsSet(true); + struct.timestampPrecision = iprot.readString(); + struct.setTimestampPrecisionIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.maxConcurrentClientNum = iprot.readI32(); + struct.setMaxConcurrentClientNumIsSet(true); + } + if (incoming.get(1)) { + struct.thriftMaxFrameSize = iprot.readI32(); + struct.setThriftMaxFrameSizeIsSet(true); + } + if (incoming.get(2)) { + struct.isReadOnly = iprot.readBool(); + struct.setIsReadOnlyIsSet(true); + } + if (incoming.get(3)) { + struct.buildInfo = iprot.readString(); + struct.setBuildInfoIsSet(true); + } + if (incoming.get(4)) { + struct.logo = iprot.readString(); + struct.setLogoIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TCreateTimeseriesUsingSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TCreateTimeseriesUsingSchemaTemplateReq.java new file mode 100644 index 0000000000000..ffbc14a5d2837 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TCreateTimeseriesUsingSchemaTemplateReq.java @@ -0,0 +1,528 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TCreateTimeseriesUsingSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCreateTimeseriesUsingSchemaTemplateReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField DEVICE_PATH_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("devicePathList", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCreateTimeseriesUsingSchemaTemplateReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCreateTimeseriesUsingSchemaTemplateReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List devicePathList; // 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 { + SESSION_ID((short)1, "sessionId"), + DEVICE_PATH_LIST((short)2, "devicePathList"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // DEVICE_PATH_LIST + return DEVICE_PATH_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.DEVICE_PATH_LIST, new org.apache.thrift.meta_data.FieldMetaData("devicePathList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCreateTimeseriesUsingSchemaTemplateReq.class, metaDataMap); + } + + public TCreateTimeseriesUsingSchemaTemplateReq() { + } + + public TCreateTimeseriesUsingSchemaTemplateReq( + long sessionId, + java.util.List devicePathList) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.devicePathList = devicePathList; + } + + /** + * Performs a deep copy on other. + */ + public TCreateTimeseriesUsingSchemaTemplateReq(TCreateTimeseriesUsingSchemaTemplateReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetDevicePathList()) { + java.util.List __this__devicePathList = new java.util.ArrayList(other.devicePathList); + this.devicePathList = __this__devicePathList; + } + } + + @Override + public TCreateTimeseriesUsingSchemaTemplateReq deepCopy() { + return new TCreateTimeseriesUsingSchemaTemplateReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.devicePathList = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TCreateTimeseriesUsingSchemaTemplateReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getDevicePathListSize() { + return (this.devicePathList == null) ? 0 : this.devicePathList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getDevicePathListIterator() { + return (this.devicePathList == null) ? null : this.devicePathList.iterator(); + } + + public void addToDevicePathList(java.lang.String elem) { + if (this.devicePathList == null) { + this.devicePathList = new java.util.ArrayList(); + } + this.devicePathList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getDevicePathList() { + return this.devicePathList; + } + + public TCreateTimeseriesUsingSchemaTemplateReq setDevicePathList(@org.apache.thrift.annotation.Nullable java.util.List devicePathList) { + this.devicePathList = devicePathList; + return this; + } + + public void unsetDevicePathList() { + this.devicePathList = null; + } + + /** Returns true if field devicePathList is set (has been assigned a value) and false otherwise */ + public boolean isSetDevicePathList() { + return this.devicePathList != null; + } + + public void setDevicePathListIsSet(boolean value) { + if (!value) { + this.devicePathList = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case DEVICE_PATH_LIST: + if (value == null) { + unsetDevicePathList(); + } else { + setDevicePathList((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case DEVICE_PATH_LIST: + return getDevicePathList(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case DEVICE_PATH_LIST: + return isSetDevicePathList(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TCreateTimeseriesUsingSchemaTemplateReq) + return this.equals((TCreateTimeseriesUsingSchemaTemplateReq)that); + return false; + } + + public boolean equals(TCreateTimeseriesUsingSchemaTemplateReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_devicePathList = true && this.isSetDevicePathList(); + boolean that_present_devicePathList = true && that.isSetDevicePathList(); + if (this_present_devicePathList || that_present_devicePathList) { + if (!(this_present_devicePathList && that_present_devicePathList)) + return false; + if (!this.devicePathList.equals(that.devicePathList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetDevicePathList()) ? 131071 : 524287); + if (isSetDevicePathList()) + hashCode = hashCode * 8191 + devicePathList.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TCreateTimeseriesUsingSchemaTemplateReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDevicePathList(), other.isSetDevicePathList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDevicePathList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.devicePathList, other.devicePathList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TCreateTimeseriesUsingSchemaTemplateReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("devicePathList:"); + if (this.devicePathList == null) { + sb.append("null"); + } else { + sb.append(this.devicePathList); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (devicePathList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'devicePathList' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TCreateTimeseriesUsingSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TCreateTimeseriesUsingSchemaTemplateReqStandardScheme getScheme() { + return new TCreateTimeseriesUsingSchemaTemplateReqStandardScheme(); + } + } + + private static class TCreateTimeseriesUsingSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TCreateTimeseriesUsingSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DEVICE_PATH_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list734 = iprot.readListBegin(); + struct.devicePathList = new java.util.ArrayList(_list734.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem735; + for (int _i736 = 0; _i736 < _list734.size; ++_i736) + { + _elem735 = iprot.readString(); + struct.devicePathList.add(_elem735); + } + iprot.readListEnd(); + } + struct.setDevicePathListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TCreateTimeseriesUsingSchemaTemplateReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.devicePathList != null) { + oprot.writeFieldBegin(DEVICE_PATH_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.devicePathList.size())); + for (java.lang.String _iter737 : struct.devicePathList) + { + oprot.writeString(_iter737); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TCreateTimeseriesUsingSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TCreateTimeseriesUsingSchemaTemplateReqTupleScheme getScheme() { + return new TCreateTimeseriesUsingSchemaTemplateReqTupleScheme(); + } + } + + private static class TCreateTimeseriesUsingSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TCreateTimeseriesUsingSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + { + oprot.writeI32(struct.devicePathList.size()); + for (java.lang.String _iter738 : struct.devicePathList) + { + oprot.writeString(_iter738); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TCreateTimeseriesUsingSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + { + org.apache.thrift.protocol.TList _list739 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.devicePathList = new java.util.ArrayList(_list739.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem740; + for (int _i741 = 0; _i741 < _list739.size; ++_i741) + { + _elem740 = iprot.readString(); + struct.devicePathList.add(_elem740); + } + } + struct.setDevicePathListIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeReq.java new file mode 100644 index 0000000000000..4ba895ae077c0 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeReq.java @@ -0,0 +1,594 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TPipeSubscribeReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPipeSubscribeReq"); + + private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.BYTE, (short)1); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I16, (short)2); + private static final org.apache.thrift.protocol.TField BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("body", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPipeSubscribeReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPipeSubscribeReqTupleSchemeFactory(); + + public byte version; // required + public short type; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + VERSION((short)1, "version"), + TYPE((short)2, "type"), + BODY((short)3, "body"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // VERSION + return VERSION; + case 2: // TYPE + return TYPE; + case 3: // BODY + return BODY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __VERSION_ISSET_ID = 0; + private static final int __TYPE_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.BODY}; + 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.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPipeSubscribeReq.class, metaDataMap); + } + + public TPipeSubscribeReq() { + } + + public TPipeSubscribeReq( + byte version, + short type) + { + this(); + this.version = version; + setVersionIsSet(true); + this.type = type; + setTypeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TPipeSubscribeReq(TPipeSubscribeReq other) { + __isset_bitfield = other.__isset_bitfield; + this.version = other.version; + this.type = other.type; + if (other.isSetBody()) { + this.body = org.apache.thrift.TBaseHelper.copyBinary(other.body); + } + } + + @Override + public TPipeSubscribeReq deepCopy() { + return new TPipeSubscribeReq(this); + } + + @Override + public void clear() { + setVersionIsSet(false); + this.version = 0; + setTypeIsSet(false); + this.type = 0; + this.body = null; + } + + public byte getVersion() { + return this.version; + } + + public TPipeSubscribeReq setVersion(byte version) { + this.version = version; + setVersionIsSet(true); + return this; + } + + public void unsetVersion() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); + } + + public void setVersionIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); + } + + public short getType() { + return this.type; + } + + public TPipeSubscribeReq setType(short type) { + this.type = type; + setTypeIsSet(true); + return this; + } + + public void unsetType() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + public void setTypeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value); + } + + public byte[] getBody() { + setBody(org.apache.thrift.TBaseHelper.rightSize(body)); + return body == null ? null : body.array(); + } + + public java.nio.ByteBuffer bufferForBody() { + return org.apache.thrift.TBaseHelper.copyBinary(body); + } + + public TPipeSubscribeReq setBody(byte[] body) { + this.body = body == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(body.clone()); + return this; + } + + public TPipeSubscribeReq setBody(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body) { + this.body = org.apache.thrift.TBaseHelper.copyBinary(body); + return this; + } + + public void unsetBody() { + this.body = null; + } + + /** Returns true if field body is set (has been assigned a value) and false otherwise */ + public boolean isSetBody() { + return this.body != null; + } + + public void setBodyIsSet(boolean value) { + if (!value) { + this.body = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((java.lang.Byte)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((java.lang.Short)value); + } + break; + + case BODY: + if (value == null) { + unsetBody(); + } else { + if (value instanceof byte[]) { + setBody((byte[])value); + } else { + setBody((java.nio.ByteBuffer)value); + } + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case VERSION: + return getVersion(); + + case TYPE: + return getType(); + + case BODY: + return getBody(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case VERSION: + return isSetVersion(); + case TYPE: + return isSetType(); + case BODY: + return isSetBody(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TPipeSubscribeReq) + return this.equals((TPipeSubscribeReq)that); + return false; + } + + public boolean equals(TPipeSubscribeReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_version = true; + boolean that_present_version = true; + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (this.version != that.version) + return false; + } + + boolean this_present_type = true; + boolean that_present_type = true; + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (this.type != that.type) + return false; + } + + boolean this_present_body = true && this.isSetBody(); + boolean that_present_body = true && that.isSetBody(); + if (this_present_body || that_present_body) { + if (!(this_present_body && that_present_body)) + return false; + if (!this.body.equals(that.body)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + (int) (version); + + hashCode = hashCode * 8191 + type; + + hashCode = hashCode * 8191 + ((isSetBody()) ? 131071 : 524287); + if (isSetBody()) + hashCode = hashCode * 8191 + body.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TPipeSubscribeReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetBody(), other.isSetBody()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBody()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, other.body); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TPipeSubscribeReq("); + boolean first = true; + + sb.append("version:"); + sb.append(this.version); + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + sb.append(this.type); + first = false; + if (isSetBody()) { + if (!first) sb.append(", "); + sb.append("body:"); + if (this.body == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.body, sb); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'version' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'type' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TPipeSubscribeReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TPipeSubscribeReqStandardScheme getScheme() { + return new TPipeSubscribeReqStandardScheme(); + } + } + + private static class TPipeSubscribeReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TPipeSubscribeReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { + struct.version = iprot.readByte(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.type = iprot.readI16(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // BODY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.body = iprot.readBinary(); + struct.setBodyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetVersion()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TPipeSubscribeReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeByte(struct.version); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI16(struct.type); + oprot.writeFieldEnd(); + if (struct.body != null) { + if (struct.isSetBody()) { + oprot.writeFieldBegin(BODY_FIELD_DESC); + oprot.writeBinary(struct.body); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TPipeSubscribeReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TPipeSubscribeReqTupleScheme getScheme() { + return new TPipeSubscribeReqTupleScheme(); + } + } + + private static class TPipeSubscribeReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TPipeSubscribeReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeByte(struct.version); + oprot.writeI16(struct.type); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetBody()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetBody()) { + oprot.writeBinary(struct.body); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TPipeSubscribeReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.version = iprot.readByte(); + struct.setVersionIsSet(true); + struct.type = iprot.readI16(); + struct.setTypeIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.body = iprot.readBinary(); + struct.setBodyIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeResp.java new file mode 100644 index 0000000000000..6ed812b8e44bd --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeResp.java @@ -0,0 +1,737 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TPipeSubscribeResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPipeSubscribeResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.BYTE, (short)2); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I16, (short)3); + private static final org.apache.thrift.protocol.TField BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("body", org.apache.thrift.protocol.TType.LIST, (short)4); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPipeSubscribeRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPipeSubscribeRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required + public byte version; // required + public short type; // required + public @org.apache.thrift.annotation.Nullable java.util.List body; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATUS((short)1, "status"), + VERSION((short)2, "version"), + TYPE((short)3, "type"), + BODY((short)4, "body"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // VERSION + return VERSION; + case 3: // TYPE + return TYPE; + case 4: // BODY + return BODY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __VERSION_ISSET_ID = 0; + private static final int __TYPE_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.BODY}; + 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPipeSubscribeResp.class, metaDataMap); + } + + public TPipeSubscribeResp() { + } + + public TPipeSubscribeResp( + org.apache.iotdb.common.rpc.thrift.TSStatus status, + byte version, + short type) + { + this(); + this.status = status; + this.version = version; + setVersionIsSet(true); + this.type = type; + setTypeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TPipeSubscribeResp(TPipeSubscribeResp other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetStatus()) { + this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); + } + this.version = other.version; + this.type = other.type; + if (other.isSetBody()) { + java.util.List __this__body = new java.util.ArrayList(other.body); + this.body = __this__body; + } + } + + @Override + public TPipeSubscribeResp deepCopy() { + return new TPipeSubscribeResp(this); + } + + @Override + public void clear() { + this.status = null; + setVersionIsSet(false); + this.version = 0; + setTypeIsSet(false); + this.type = 0; + this.body = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { + return this.status; + } + + public TPipeSubscribeResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { + this.status = status; + return this; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + public byte getVersion() { + return this.version; + } + + public TPipeSubscribeResp setVersion(byte version) { + this.version = version; + setVersionIsSet(true); + return this; + } + + public void unsetVersion() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); + } + + public void setVersionIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); + } + + public short getType() { + return this.type; + } + + public TPipeSubscribeResp setType(short type) { + this.type = type; + setTypeIsSet(true); + return this; + } + + public void unsetType() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + public void setTypeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value); + } + + public int getBodySize() { + return (this.body == null) ? 0 : this.body.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getBodyIterator() { + return (this.body == null) ? null : this.body.iterator(); + } + + public void addToBody(java.nio.ByteBuffer elem) { + if (this.body == null) { + this.body = new java.util.ArrayList(); + } + this.body.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getBody() { + return this.body; + } + + public TPipeSubscribeResp setBody(@org.apache.thrift.annotation.Nullable java.util.List body) { + this.body = body; + return this; + } + + public void unsetBody() { + this.body = null; + } + + /** Returns true if field body is set (has been assigned a value) and false otherwise */ + public boolean isSetBody() { + return this.body != null; + } + + public void setBodyIsSet(boolean value) { + if (!value) { + this.body = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((java.lang.Byte)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((java.lang.Short)value); + } + break; + + case BODY: + if (value == null) { + unsetBody(); + } else { + setBody((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case VERSION: + return getVersion(); + + case TYPE: + return getType(); + + case BODY: + return getBody(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case VERSION: + return isSetVersion(); + case TYPE: + return isSetType(); + case BODY: + return isSetBody(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TPipeSubscribeResp) + return this.equals((TPipeSubscribeResp)that); + return false; + } + + public boolean equals(TPipeSubscribeResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_version = true; + boolean that_present_version = true; + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (this.version != that.version) + return false; + } + + boolean this_present_type = true; + boolean that_present_type = true; + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (this.type != that.type) + return false; + } + + boolean this_present_body = true && this.isSetBody(); + boolean that_present_body = true && that.isSetBody(); + if (this_present_body || that_present_body) { + if (!(this_present_body && that_present_body)) + return false; + if (!this.body.equals(that.body)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + (int) (version); + + hashCode = hashCode * 8191 + type; + + hashCode = hashCode * 8191 + ((isSetBody()) ? 131071 : 524287); + if (isSetBody()) + hashCode = hashCode * 8191 + body.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TPipeSubscribeResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetBody(), other.isSetBody()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBody()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, other.body); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TPipeSubscribeResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (!first) sb.append(", "); + sb.append("version:"); + sb.append(this.version); + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + sb.append(this.type); + first = false; + if (isSetBody()) { + if (!first) sb.append(", "); + sb.append("body:"); + if (this.body == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.body, sb); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); + } + // alas, we cannot check 'version' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'type' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + if (status != null) { + status.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TPipeSubscribeRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TPipeSubscribeRespStandardScheme getScheme() { + return new TPipeSubscribeRespStandardScheme(); + } + } + + private static class TPipeSubscribeRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TPipeSubscribeResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { + struct.version = iprot.readByte(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.type = iprot.readI16(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // BODY + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list742 = iprot.readListBegin(); + struct.body = new java.util.ArrayList(_list742.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem743; + for (int _i744 = 0; _i744 < _list742.size; ++_i744) + { + _elem743 = iprot.readBinary(); + struct.body.add(_elem743); + } + iprot.readListEnd(); + } + struct.setBodyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetVersion()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TPipeSubscribeResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeByte(struct.version); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI16(struct.type); + oprot.writeFieldEnd(); + if (struct.body != null) { + if (struct.isSetBody()) { + oprot.writeFieldBegin(BODY_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.body.size())); + for (java.nio.ByteBuffer _iter745 : struct.body) + { + oprot.writeBinary(_iter745); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TPipeSubscribeRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TPipeSubscribeRespTupleScheme getScheme() { + return new TPipeSubscribeRespTupleScheme(); + } + } + + private static class TPipeSubscribeRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TPipeSubscribeResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status.write(oprot); + oprot.writeByte(struct.version); + oprot.writeI16(struct.type); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetBody()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetBody()) { + { + oprot.writeI32(struct.body.size()); + for (java.nio.ByteBuffer _iter746 : struct.body) + { + oprot.writeBinary(_iter746); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TPipeSubscribeResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + struct.version = iprot.readByte(); + struct.setVersionIsSet(true); + struct.type = iprot.readI16(); + struct.setTypeIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list747 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.body = new java.util.ArrayList(_list747.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem748; + for (int _i749 = 0; _i749 < _list747.size; ++_i749) + { + _elem748 = iprot.readBinary(); + struct.body.add(_elem748); + } + } + struct.setBodyIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferReq.java new file mode 100644 index 0000000000000..e26787ffe66a3 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferReq.java @@ -0,0 +1,584 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TPipeTransferReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPipeTransferReq"); + + private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.BYTE, (short)1); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I16, (short)2); + private static final org.apache.thrift.protocol.TField BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("body", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPipeTransferReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPipeTransferReqTupleSchemeFactory(); + + public byte version; // required + public short type; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body; // 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 { + VERSION((short)1, "version"), + TYPE((short)2, "type"), + BODY((short)3, "body"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // VERSION + return VERSION; + case 2: // TYPE + return TYPE; + case 3: // BODY + return BODY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __VERSION_ISSET_ID = 0; + private static final int __TYPE_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.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPipeTransferReq.class, metaDataMap); + } + + public TPipeTransferReq() { + } + + public TPipeTransferReq( + byte version, + short type, + java.nio.ByteBuffer body) + { + this(); + this.version = version; + setVersionIsSet(true); + this.type = type; + setTypeIsSet(true); + this.body = org.apache.thrift.TBaseHelper.copyBinary(body); + } + + /** + * Performs a deep copy on other. + */ + public TPipeTransferReq(TPipeTransferReq other) { + __isset_bitfield = other.__isset_bitfield; + this.version = other.version; + this.type = other.type; + if (other.isSetBody()) { + this.body = org.apache.thrift.TBaseHelper.copyBinary(other.body); + } + } + + @Override + public TPipeTransferReq deepCopy() { + return new TPipeTransferReq(this); + } + + @Override + public void clear() { + setVersionIsSet(false); + this.version = 0; + setTypeIsSet(false); + this.type = 0; + this.body = null; + } + + public byte getVersion() { + return this.version; + } + + public TPipeTransferReq setVersion(byte version) { + this.version = version; + setVersionIsSet(true); + return this; + } + + public void unsetVersion() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); + } + + public void setVersionIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); + } + + public short getType() { + return this.type; + } + + public TPipeTransferReq setType(short type) { + this.type = type; + setTypeIsSet(true); + return this; + } + + public void unsetType() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID); + } + + public void setTypeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value); + } + + public byte[] getBody() { + setBody(org.apache.thrift.TBaseHelper.rightSize(body)); + return body == null ? null : body.array(); + } + + public java.nio.ByteBuffer bufferForBody() { + return org.apache.thrift.TBaseHelper.copyBinary(body); + } + + public TPipeTransferReq setBody(byte[] body) { + this.body = body == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(body.clone()); + return this; + } + + public TPipeTransferReq setBody(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body) { + this.body = org.apache.thrift.TBaseHelper.copyBinary(body); + return this; + } + + public void unsetBody() { + this.body = null; + } + + /** Returns true if field body is set (has been assigned a value) and false otherwise */ + public boolean isSetBody() { + return this.body != null; + } + + public void setBodyIsSet(boolean value) { + if (!value) { + this.body = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((java.lang.Byte)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((java.lang.Short)value); + } + break; + + case BODY: + if (value == null) { + unsetBody(); + } else { + if (value instanceof byte[]) { + setBody((byte[])value); + } else { + setBody((java.nio.ByteBuffer)value); + } + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case VERSION: + return getVersion(); + + case TYPE: + return getType(); + + case BODY: + return getBody(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case VERSION: + return isSetVersion(); + case TYPE: + return isSetType(); + case BODY: + return isSetBody(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TPipeTransferReq) + return this.equals((TPipeTransferReq)that); + return false; + } + + public boolean equals(TPipeTransferReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_version = true; + boolean that_present_version = true; + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (this.version != that.version) + return false; + } + + boolean this_present_type = true; + boolean that_present_type = true; + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (this.type != that.type) + return false; + } + + boolean this_present_body = true && this.isSetBody(); + boolean that_present_body = true && that.isSetBody(); + if (this_present_body || that_present_body) { + if (!(this_present_body && that_present_body)) + return false; + if (!this.body.equals(that.body)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + (int) (version); + + hashCode = hashCode * 8191 + type; + + hashCode = hashCode * 8191 + ((isSetBody()) ? 131071 : 524287); + if (isSetBody()) + hashCode = hashCode * 8191 + body.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TPipeTransferReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetBody(), other.isSetBody()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBody()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, other.body); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TPipeTransferReq("); + boolean first = true; + + sb.append("version:"); + sb.append(this.version); + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + sb.append(this.type); + first = false; + if (!first) sb.append(", "); + sb.append("body:"); + if (this.body == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.body, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'version' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'type' because it's a primitive and you chose the non-beans generator. + if (body == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'body' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TPipeTransferReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TPipeTransferReqStandardScheme getScheme() { + return new TPipeTransferReqStandardScheme(); + } + } + + private static class TPipeTransferReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TPipeTransferReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { + struct.version = iprot.readByte(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.type = iprot.readI16(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // BODY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.body = iprot.readBinary(); + struct.setBodyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetVersion()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TPipeTransferReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeByte(struct.version); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI16(struct.type); + oprot.writeFieldEnd(); + if (struct.body != null) { + oprot.writeFieldBegin(BODY_FIELD_DESC); + oprot.writeBinary(struct.body); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TPipeTransferReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TPipeTransferReqTupleScheme getScheme() { + return new TPipeTransferReqTupleScheme(); + } + } + + private static class TPipeTransferReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TPipeTransferReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeByte(struct.version); + oprot.writeI16(struct.type); + oprot.writeBinary(struct.body); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TPipeTransferReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.version = iprot.readByte(); + struct.setVersionIsSet(true); + struct.type = iprot.readI16(); + struct.setTypeIsSet(true); + struct.body = iprot.readBinary(); + struct.setBodyIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferResp.java new file mode 100644 index 0000000000000..2ddf1b1d6fc9b --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferResp.java @@ -0,0 +1,510 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TPipeTransferResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPipeTransferResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("body", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPipeTransferRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPipeTransferRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATUS((short)1, "status"), + BODY((short)2, "body"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // BODY + return BODY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.BODY}; + 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPipeTransferResp.class, metaDataMap); + } + + public TPipeTransferResp() { + } + + public TPipeTransferResp( + org.apache.iotdb.common.rpc.thrift.TSStatus status) + { + this(); + this.status = status; + } + + /** + * Performs a deep copy on other. + */ + public TPipeTransferResp(TPipeTransferResp other) { + if (other.isSetStatus()) { + this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); + } + if (other.isSetBody()) { + this.body = org.apache.thrift.TBaseHelper.copyBinary(other.body); + } + } + + @Override + public TPipeTransferResp deepCopy() { + return new TPipeTransferResp(this); + } + + @Override + public void clear() { + this.status = null; + this.body = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { + return this.status; + } + + public TPipeTransferResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { + this.status = status; + return this; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + public byte[] getBody() { + setBody(org.apache.thrift.TBaseHelper.rightSize(body)); + return body == null ? null : body.array(); + } + + public java.nio.ByteBuffer bufferForBody() { + return org.apache.thrift.TBaseHelper.copyBinary(body); + } + + public TPipeTransferResp setBody(byte[] body) { + this.body = body == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(body.clone()); + return this; + } + + public TPipeTransferResp setBody(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body) { + this.body = org.apache.thrift.TBaseHelper.copyBinary(body); + return this; + } + + public void unsetBody() { + this.body = null; + } + + /** Returns true if field body is set (has been assigned a value) and false otherwise */ + public boolean isSetBody() { + return this.body != null; + } + + public void setBodyIsSet(boolean value) { + if (!value) { + this.body = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + case BODY: + if (value == null) { + unsetBody(); + } else { + if (value instanceof byte[]) { + setBody((byte[])value); + } else { + setBody((java.nio.ByteBuffer)value); + } + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case BODY: + return getBody(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case BODY: + return isSetBody(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TPipeTransferResp) + return this.equals((TPipeTransferResp)that); + return false; + } + + public boolean equals(TPipeTransferResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_body = true && this.isSetBody(); + boolean that_present_body = true && that.isSetBody(); + if (this_present_body || that_present_body) { + if (!(this_present_body && that_present_body)) + return false; + if (!this.body.equals(that.body)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + ((isSetBody()) ? 131071 : 524287); + if (isSetBody()) + hashCode = hashCode * 8191 + body.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TPipeTransferResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetBody(), other.isSetBody()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBody()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, other.body); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TPipeTransferResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (isSetBody()) { + if (!first) sb.append(", "); + sb.append("body:"); + if (this.body == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.body, sb); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (status != null) { + status.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class TPipeTransferRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TPipeTransferRespStandardScheme getScheme() { + return new TPipeTransferRespStandardScheme(); + } + } + + private static class TPipeTransferRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TPipeTransferResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // BODY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.body = iprot.readBinary(); + struct.setBodyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TPipeTransferResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.body != null) { + if (struct.isSetBody()) { + oprot.writeFieldBegin(BODY_FIELD_DESC); + oprot.writeBinary(struct.body); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TPipeTransferRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TPipeTransferRespTupleScheme getScheme() { + return new TPipeTransferRespTupleScheme(); + } + } + + private static class TPipeTransferRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TPipeTransferResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status.write(oprot); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetBody()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetBody()) { + oprot.writeBinary(struct.body); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TPipeTransferResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.body = iprot.readBinary(); + struct.setBodyIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSAggregationQueryReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSAggregationQueryReq.java new file mode 100644 index 0000000000000..2b6dabe86619a --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSAggregationQueryReq.java @@ -0,0 +1,1478 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSAggregationQueryReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSAggregationQueryReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField AGGREGATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregations", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("interval", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField SLIDING_STEP_FIELD_DESC = new org.apache.thrift.protocol.TField("slidingStep", org.apache.thrift.protocol.TType.I64, (short)8); + private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)9); + private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)10); + private static final org.apache.thrift.protocol.TField LEGAL_PATH_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("legalPathNodes", org.apache.thrift.protocol.TType.BOOL, (short)11); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSAggregationQueryReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSAggregationQueryReqTupleSchemeFactory(); + + public long sessionId; // required + public long statementId; // required + public @org.apache.thrift.annotation.Nullable java.util.List paths; // required + public @org.apache.thrift.annotation.Nullable java.util.List aggregations; // required + public long startTime; // optional + public long endTime; // optional + public long interval; // optional + public long slidingStep; // optional + public int fetchSize; // optional + public long timeout; // optional + public boolean legalPathNodes; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + STATEMENT_ID((short)2, "statementId"), + PATHS((short)3, "paths"), + AGGREGATIONS((short)4, "aggregations"), + START_TIME((short)5, "startTime"), + END_TIME((short)6, "endTime"), + INTERVAL((short)7, "interval"), + SLIDING_STEP((short)8, "slidingStep"), + FETCH_SIZE((short)9, "fetchSize"), + TIMEOUT((short)10, "timeout"), + LEGAL_PATH_NODES((short)11, "legalPathNodes"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // STATEMENT_ID + return STATEMENT_ID; + case 3: // PATHS + return PATHS; + case 4: // AGGREGATIONS + return AGGREGATIONS; + case 5: // START_TIME + return START_TIME; + case 6: // END_TIME + return END_TIME; + case 7: // INTERVAL + return INTERVAL; + case 8: // SLIDING_STEP + return SLIDING_STEP; + case 9: // FETCH_SIZE + return FETCH_SIZE; + case 10: // TIMEOUT + return TIMEOUT; + case 11: // LEGAL_PATH_NODES + return LEGAL_PATH_NODES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __STATEMENTID_ISSET_ID = 1; + private static final int __STARTTIME_ISSET_ID = 2; + private static final int __ENDTIME_ISSET_ID = 3; + private static final int __INTERVAL_ISSET_ID = 4; + private static final int __SLIDINGSTEP_ISSET_ID = 5; + private static final int __FETCHSIZE_ISSET_ID = 6; + private static final int __TIMEOUT_ISSET_ID = 7; + private static final int __LEGALPATHNODES_ISSET_ID = 8; + private short __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.START_TIME,_Fields.END_TIME,_Fields.INTERVAL,_Fields.SLIDING_STEP,_Fields.FETCH_SIZE,_Fields.TIMEOUT,_Fields.LEGAL_PATH_NODES}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.AGGREGATIONS, new org.apache.thrift.meta_data.FieldMetaData("aggregations", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.iotdb.common.rpc.thrift.TAggregationType.class)))); + tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.INTERVAL, new org.apache.thrift.meta_data.FieldMetaData("interval", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.SLIDING_STEP, new org.apache.thrift.meta_data.FieldMetaData("slidingStep", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LEGAL_PATH_NODES, new org.apache.thrift.meta_data.FieldMetaData("legalPathNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSAggregationQueryReq.class, metaDataMap); + } + + public TSAggregationQueryReq() { + } + + public TSAggregationQueryReq( + long sessionId, + long statementId, + java.util.List paths, + java.util.List aggregations) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.statementId = statementId; + setStatementIdIsSet(true); + this.paths = paths; + this.aggregations = aggregations; + } + + /** + * Performs a deep copy on other. + */ + public TSAggregationQueryReq(TSAggregationQueryReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + this.statementId = other.statementId; + if (other.isSetPaths()) { + java.util.List __this__paths = new java.util.ArrayList(other.paths); + this.paths = __this__paths; + } + if (other.isSetAggregations()) { + java.util.List __this__aggregations = new java.util.ArrayList(other.aggregations.size()); + for (org.apache.iotdb.common.rpc.thrift.TAggregationType other_element : other.aggregations) { + __this__aggregations.add(other_element); + } + this.aggregations = __this__aggregations; + } + this.startTime = other.startTime; + this.endTime = other.endTime; + this.interval = other.interval; + this.slidingStep = other.slidingStep; + this.fetchSize = other.fetchSize; + this.timeout = other.timeout; + this.legalPathNodes = other.legalPathNodes; + } + + @Override + public TSAggregationQueryReq deepCopy() { + return new TSAggregationQueryReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + setStatementIdIsSet(false); + this.statementId = 0; + this.paths = null; + this.aggregations = null; + setStartTimeIsSet(false); + this.startTime = 0; + setEndTimeIsSet(false); + this.endTime = 0; + setIntervalIsSet(false); + this.interval = 0; + setSlidingStepIsSet(false); + this.slidingStep = 0; + setFetchSizeIsSet(false); + this.fetchSize = 0; + setTimeoutIsSet(false); + this.timeout = 0; + setLegalPathNodesIsSet(false); + this.legalPathNodes = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSAggregationQueryReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public long getStatementId() { + return this.statementId; + } + + public TSAggregationQueryReq setStatementId(long statementId) { + this.statementId = statementId; + setStatementIdIsSet(true); + return this; + } + + public void unsetStatementId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ + public boolean isSetStatementId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + public void setStatementIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); + } + + public int getPathsSize() { + return (this.paths == null) ? 0 : this.paths.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPathsIterator() { + return (this.paths == null) ? null : this.paths.iterator(); + } + + public void addToPaths(java.lang.String elem) { + if (this.paths == null) { + this.paths = new java.util.ArrayList(); + } + this.paths.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getPaths() { + return this.paths; + } + + public TSAggregationQueryReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { + this.paths = paths; + return this; + } + + public void unsetPaths() { + this.paths = null; + } + + /** Returns true if field paths is set (has been assigned a value) and false otherwise */ + public boolean isSetPaths() { + return this.paths != null; + } + + public void setPathsIsSet(boolean value) { + if (!value) { + this.paths = null; + } + } + + public int getAggregationsSize() { + return (this.aggregations == null) ? 0 : this.aggregations.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getAggregationsIterator() { + return (this.aggregations == null) ? null : this.aggregations.iterator(); + } + + public void addToAggregations(org.apache.iotdb.common.rpc.thrift.TAggregationType elem) { + if (this.aggregations == null) { + this.aggregations = new java.util.ArrayList(); + } + this.aggregations.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getAggregations() { + return this.aggregations; + } + + public TSAggregationQueryReq setAggregations(@org.apache.thrift.annotation.Nullable java.util.List aggregations) { + this.aggregations = aggregations; + return this; + } + + public void unsetAggregations() { + this.aggregations = null; + } + + /** Returns true if field aggregations is set (has been assigned a value) and false otherwise */ + public boolean isSetAggregations() { + return this.aggregations != null; + } + + public void setAggregationsIsSet(boolean value) { + if (!value) { + this.aggregations = null; + } + } + + public long getStartTime() { + return this.startTime; + } + + public TSAggregationQueryReq setStartTime(long startTime) { + this.startTime = startTime; + setStartTimeIsSet(true); + return this; + } + + public void unsetStartTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ + public boolean isSetStartTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + public void setStartTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); + } + + public long getEndTime() { + return this.endTime; + } + + public TSAggregationQueryReq setEndTime(long endTime) { + this.endTime = endTime; + setEndTimeIsSet(true); + return this; + } + + public void unsetEndTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ + public boolean isSetEndTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + public void setEndTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); + } + + public long getInterval() { + return this.interval; + } + + public TSAggregationQueryReq setInterval(long interval) { + this.interval = interval; + setIntervalIsSet(true); + return this; + } + + public void unsetInterval() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INTERVAL_ISSET_ID); + } + + /** Returns true if field interval is set (has been assigned a value) and false otherwise */ + public boolean isSetInterval() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INTERVAL_ISSET_ID); + } + + public void setIntervalIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INTERVAL_ISSET_ID, value); + } + + public long getSlidingStep() { + return this.slidingStep; + } + + public TSAggregationQueryReq setSlidingStep(long slidingStep) { + this.slidingStep = slidingStep; + setSlidingStepIsSet(true); + return this; + } + + public void unsetSlidingStep() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SLIDINGSTEP_ISSET_ID); + } + + /** Returns true if field slidingStep is set (has been assigned a value) and false otherwise */ + public boolean isSetSlidingStep() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SLIDINGSTEP_ISSET_ID); + } + + public void setSlidingStepIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SLIDINGSTEP_ISSET_ID, value); + } + + public int getFetchSize() { + return this.fetchSize; + } + + public TSAggregationQueryReq setFetchSize(int fetchSize) { + this.fetchSize = fetchSize; + setFetchSizeIsSet(true); + return this; + } + + public void unsetFetchSize() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ + public boolean isSetFetchSize() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + public void setFetchSizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); + } + + public long getTimeout() { + return this.timeout; + } + + public TSAggregationQueryReq setTimeout(long timeout) { + this.timeout = timeout; + setTimeoutIsSet(true); + return this; + } + + public void unsetTimeout() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeout() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + public void setTimeoutIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + } + + public boolean isLegalPathNodes() { + return this.legalPathNodes; + } + + public TSAggregationQueryReq setLegalPathNodes(boolean legalPathNodes) { + this.legalPathNodes = legalPathNodes; + setLegalPathNodesIsSet(true); + return this; + } + + public void unsetLegalPathNodes() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); + } + + /** Returns true if field legalPathNodes is set (has been assigned a value) and false otherwise */ + public boolean isSetLegalPathNodes() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); + } + + public void setLegalPathNodesIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case STATEMENT_ID: + if (value == null) { + unsetStatementId(); + } else { + setStatementId((java.lang.Long)value); + } + break; + + case PATHS: + if (value == null) { + unsetPaths(); + } else { + setPaths((java.util.List)value); + } + break; + + case AGGREGATIONS: + if (value == null) { + unsetAggregations(); + } else { + setAggregations((java.util.List)value); + } + break; + + case START_TIME: + if (value == null) { + unsetStartTime(); + } else { + setStartTime((java.lang.Long)value); + } + break; + + case END_TIME: + if (value == null) { + unsetEndTime(); + } else { + setEndTime((java.lang.Long)value); + } + break; + + case INTERVAL: + if (value == null) { + unsetInterval(); + } else { + setInterval((java.lang.Long)value); + } + break; + + case SLIDING_STEP: + if (value == null) { + unsetSlidingStep(); + } else { + setSlidingStep((java.lang.Long)value); + } + break; + + case FETCH_SIZE: + if (value == null) { + unsetFetchSize(); + } else { + setFetchSize((java.lang.Integer)value); + } + break; + + case TIMEOUT: + if (value == null) { + unsetTimeout(); + } else { + setTimeout((java.lang.Long)value); + } + break; + + case LEGAL_PATH_NODES: + if (value == null) { + unsetLegalPathNodes(); + } else { + setLegalPathNodes((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case STATEMENT_ID: + return getStatementId(); + + case PATHS: + return getPaths(); + + case AGGREGATIONS: + return getAggregations(); + + case START_TIME: + return getStartTime(); + + case END_TIME: + return getEndTime(); + + case INTERVAL: + return getInterval(); + + case SLIDING_STEP: + return getSlidingStep(); + + case FETCH_SIZE: + return getFetchSize(); + + case TIMEOUT: + return getTimeout(); + + case LEGAL_PATH_NODES: + return isLegalPathNodes(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case STATEMENT_ID: + return isSetStatementId(); + case PATHS: + return isSetPaths(); + case AGGREGATIONS: + return isSetAggregations(); + case START_TIME: + return isSetStartTime(); + case END_TIME: + return isSetEndTime(); + case INTERVAL: + return isSetInterval(); + case SLIDING_STEP: + return isSetSlidingStep(); + case FETCH_SIZE: + return isSetFetchSize(); + case TIMEOUT: + return isSetTimeout(); + case LEGAL_PATH_NODES: + return isSetLegalPathNodes(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSAggregationQueryReq) + return this.equals((TSAggregationQueryReq)that); + return false; + } + + public boolean equals(TSAggregationQueryReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_statementId = true; + boolean that_present_statementId = true; + if (this_present_statementId || that_present_statementId) { + if (!(this_present_statementId && that_present_statementId)) + return false; + if (this.statementId != that.statementId) + return false; + } + + boolean this_present_paths = true && this.isSetPaths(); + boolean that_present_paths = true && that.isSetPaths(); + if (this_present_paths || that_present_paths) { + if (!(this_present_paths && that_present_paths)) + return false; + if (!this.paths.equals(that.paths)) + return false; + } + + boolean this_present_aggregations = true && this.isSetAggregations(); + boolean that_present_aggregations = true && that.isSetAggregations(); + if (this_present_aggregations || that_present_aggregations) { + if (!(this_present_aggregations && that_present_aggregations)) + return false; + if (!this.aggregations.equals(that.aggregations)) + return false; + } + + boolean this_present_startTime = true && this.isSetStartTime(); + boolean that_present_startTime = true && that.isSetStartTime(); + if (this_present_startTime || that_present_startTime) { + if (!(this_present_startTime && that_present_startTime)) + return false; + if (this.startTime != that.startTime) + return false; + } + + boolean this_present_endTime = true && this.isSetEndTime(); + boolean that_present_endTime = true && that.isSetEndTime(); + if (this_present_endTime || that_present_endTime) { + if (!(this_present_endTime && that_present_endTime)) + return false; + if (this.endTime != that.endTime) + return false; + } + + boolean this_present_interval = true && this.isSetInterval(); + boolean that_present_interval = true && that.isSetInterval(); + if (this_present_interval || that_present_interval) { + if (!(this_present_interval && that_present_interval)) + return false; + if (this.interval != that.interval) + return false; + } + + boolean this_present_slidingStep = true && this.isSetSlidingStep(); + boolean that_present_slidingStep = true && that.isSetSlidingStep(); + if (this_present_slidingStep || that_present_slidingStep) { + if (!(this_present_slidingStep && that_present_slidingStep)) + return false; + if (this.slidingStep != that.slidingStep) + return false; + } + + boolean this_present_fetchSize = true && this.isSetFetchSize(); + boolean that_present_fetchSize = true && that.isSetFetchSize(); + if (this_present_fetchSize || that_present_fetchSize) { + if (!(this_present_fetchSize && that_present_fetchSize)) + return false; + if (this.fetchSize != that.fetchSize) + return false; + } + + boolean this_present_timeout = true && this.isSetTimeout(); + boolean that_present_timeout = true && that.isSetTimeout(); + if (this_present_timeout || that_present_timeout) { + if (!(this_present_timeout && that_present_timeout)) + return false; + if (this.timeout != that.timeout) + return false; + } + + boolean this_present_legalPathNodes = true && this.isSetLegalPathNodes(); + boolean that_present_legalPathNodes = true && that.isSetLegalPathNodes(); + if (this_present_legalPathNodes || that_present_legalPathNodes) { + if (!(this_present_legalPathNodes && that_present_legalPathNodes)) + return false; + if (this.legalPathNodes != that.legalPathNodes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); + + hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); + if (isSetPaths()) + hashCode = hashCode * 8191 + paths.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAggregations()) ? 131071 : 524287); + if (isSetAggregations()) + hashCode = hashCode * 8191 + aggregations.hashCode(); + + hashCode = hashCode * 8191 + ((isSetStartTime()) ? 131071 : 524287); + if (isSetStartTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime); + + hashCode = hashCode * 8191 + ((isSetEndTime()) ? 131071 : 524287); + if (isSetEndTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime); + + hashCode = hashCode * 8191 + ((isSetInterval()) ? 131071 : 524287); + if (isSetInterval()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(interval); + + hashCode = hashCode * 8191 + ((isSetSlidingStep()) ? 131071 : 524287); + if (isSetSlidingStep()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(slidingStep); + + hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); + if (isSetFetchSize()) + hashCode = hashCode * 8191 + fetchSize; + + hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); + if (isSetTimeout()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); + + hashCode = hashCode * 8191 + ((isSetLegalPathNodes()) ? 131071 : 524287); + if (isSetLegalPathNodes()) + hashCode = hashCode * 8191 + ((legalPathNodes) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSAggregationQueryReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatementId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPaths()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetAggregations(), other.isSetAggregations()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAggregations()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregations, other.aggregations); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetInterval(), other.isSetInterval()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetInterval()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.interval, other.interval); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSlidingStep(), other.isSetSlidingStep()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSlidingStep()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slidingStep, other.slidingStep); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFetchSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetLegalPathNodes(), other.isSetLegalPathNodes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLegalPathNodes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legalPathNodes, other.legalPathNodes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSAggregationQueryReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("statementId:"); + sb.append(this.statementId); + first = false; + if (!first) sb.append(", "); + sb.append("paths:"); + if (this.paths == null) { + sb.append("null"); + } else { + sb.append(this.paths); + } + first = false; + if (!first) sb.append(", "); + sb.append("aggregations:"); + if (this.aggregations == null) { + sb.append("null"); + } else { + sb.append(this.aggregations); + } + first = false; + if (isSetStartTime()) { + if (!first) sb.append(", "); + sb.append("startTime:"); + sb.append(this.startTime); + first = false; + } + if (isSetEndTime()) { + if (!first) sb.append(", "); + sb.append("endTime:"); + sb.append(this.endTime); + first = false; + } + if (isSetInterval()) { + if (!first) sb.append(", "); + sb.append("interval:"); + sb.append(this.interval); + first = false; + } + if (isSetSlidingStep()) { + if (!first) sb.append(", "); + sb.append("slidingStep:"); + sb.append(this.slidingStep); + first = false; + } + if (isSetFetchSize()) { + if (!first) sb.append(", "); + sb.append("fetchSize:"); + sb.append(this.fetchSize); + first = false; + } + if (isSetTimeout()) { + if (!first) sb.append(", "); + sb.append("timeout:"); + sb.append(this.timeout); + first = false; + } + if (isSetLegalPathNodes()) { + if (!first) sb.append(", "); + sb.append("legalPathNodes:"); + sb.append(this.legalPathNodes); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. + if (paths == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); + } + if (aggregations == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'aggregations' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSAggregationQueryReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSAggregationQueryReqStandardScheme getScheme() { + return new TSAggregationQueryReqStandardScheme(); + } + } + + private static class TSAggregationQueryReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSAggregationQueryReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATEMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PATHS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list576 = iprot.readListBegin(); + struct.paths = new java.util.ArrayList(_list576.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem577; + for (int _i578 = 0; _i578 < _list576.size; ++_i578) + { + _elem577 = iprot.readString(); + struct.paths.add(_elem577); + } + iprot.readListEnd(); + } + struct.setPathsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // AGGREGATIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list579 = iprot.readListBegin(); + struct.aggregations = new java.util.ArrayList(_list579.size); + @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType _elem580; + for (int _i581 = 0; _i581 < _list579.size; ++_i581) + { + _elem580 = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32()); + if (_elem580 != null) + { + struct.aggregations.add(_elem580); + } + } + iprot.readListEnd(); + } + struct.setAggregationsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // START_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // END_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // INTERVAL + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.interval = iprot.readI64(); + struct.setIntervalIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // SLIDING_STEP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.slidingStep = iprot.readI64(); + struct.setSlidingStepIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // FETCH_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // LEGAL_PATH_NODES + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.legalPathNodes = iprot.readBool(); + struct.setLegalPathNodesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetStatementId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSAggregationQueryReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); + oprot.writeI64(struct.statementId); + oprot.writeFieldEnd(); + if (struct.paths != null) { + oprot.writeFieldBegin(PATHS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); + for (java.lang.String _iter582 : struct.paths) + { + oprot.writeString(_iter582); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.aggregations != null) { + oprot.writeFieldBegin(AGGREGATIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.aggregations.size())); + for (org.apache.iotdb.common.rpc.thrift.TAggregationType _iter583 : struct.aggregations) + { + oprot.writeI32(_iter583.getValue()); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetStartTime()) { + oprot.writeFieldBegin(START_TIME_FIELD_DESC); + oprot.writeI64(struct.startTime); + oprot.writeFieldEnd(); + } + if (struct.isSetEndTime()) { + oprot.writeFieldBegin(END_TIME_FIELD_DESC); + oprot.writeI64(struct.endTime); + oprot.writeFieldEnd(); + } + if (struct.isSetInterval()) { + oprot.writeFieldBegin(INTERVAL_FIELD_DESC); + oprot.writeI64(struct.interval); + oprot.writeFieldEnd(); + } + if (struct.isSetSlidingStep()) { + oprot.writeFieldBegin(SLIDING_STEP_FIELD_DESC); + oprot.writeI64(struct.slidingStep); + oprot.writeFieldEnd(); + } + if (struct.isSetFetchSize()) { + oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); + oprot.writeI32(struct.fetchSize); + oprot.writeFieldEnd(); + } + if (struct.isSetTimeout()) { + oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); + oprot.writeI64(struct.timeout); + oprot.writeFieldEnd(); + } + if (struct.isSetLegalPathNodes()) { + oprot.writeFieldBegin(LEGAL_PATH_NODES_FIELD_DESC); + oprot.writeBool(struct.legalPathNodes); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSAggregationQueryReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSAggregationQueryReqTupleScheme getScheme() { + return new TSAggregationQueryReqTupleScheme(); + } + } + + private static class TSAggregationQueryReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSAggregationQueryReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeI64(struct.statementId); + { + oprot.writeI32(struct.paths.size()); + for (java.lang.String _iter584 : struct.paths) + { + oprot.writeString(_iter584); + } + } + { + oprot.writeI32(struct.aggregations.size()); + for (org.apache.iotdb.common.rpc.thrift.TAggregationType _iter585 : struct.aggregations) + { + oprot.writeI32(_iter585.getValue()); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetStartTime()) { + optionals.set(0); + } + if (struct.isSetEndTime()) { + optionals.set(1); + } + if (struct.isSetInterval()) { + optionals.set(2); + } + if (struct.isSetSlidingStep()) { + optionals.set(3); + } + if (struct.isSetFetchSize()) { + optionals.set(4); + } + if (struct.isSetTimeout()) { + optionals.set(5); + } + if (struct.isSetLegalPathNodes()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetStartTime()) { + oprot.writeI64(struct.startTime); + } + if (struct.isSetEndTime()) { + oprot.writeI64(struct.endTime); + } + if (struct.isSetInterval()) { + oprot.writeI64(struct.interval); + } + if (struct.isSetSlidingStep()) { + oprot.writeI64(struct.slidingStep); + } + if (struct.isSetFetchSize()) { + oprot.writeI32(struct.fetchSize); + } + if (struct.isSetTimeout()) { + oprot.writeI64(struct.timeout); + } + if (struct.isSetLegalPathNodes()) { + oprot.writeBool(struct.legalPathNodes); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSAggregationQueryReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + { + org.apache.thrift.protocol.TList _list586 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.paths = new java.util.ArrayList(_list586.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem587; + for (int _i588 = 0; _i588 < _list586.size; ++_i588) + { + _elem587 = iprot.readString(); + struct.paths.add(_elem587); + } + } + struct.setPathsIsSet(true); + { + org.apache.thrift.protocol.TList _list589 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.aggregations = new java.util.ArrayList(_list589.size); + @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType _elem590; + for (int _i591 = 0; _i591 < _list589.size; ++_i591) + { + _elem590 = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32()); + if (_elem590 != null) + { + struct.aggregations.add(_elem590); + } + } + } + struct.setAggregationsIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } + if (incoming.get(1)) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } + if (incoming.get(2)) { + struct.interval = iprot.readI64(); + struct.setIntervalIsSet(true); + } + if (incoming.get(3)) { + struct.slidingStep = iprot.readI64(); + struct.setSlidingStepIsSet(true); + } + if (incoming.get(4)) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } + if (incoming.get(5)) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } + if (incoming.get(6)) { + struct.legalPathNodes = iprot.readBool(); + struct.setLegalPathNodesIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSAppendSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSAppendSchemaTemplateReq.java new file mode 100644 index 0000000000000..b66f78e81875a --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSAppendSchemaTemplateReq.java @@ -0,0 +1,1175 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSAppendSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSAppendSchemaTemplateReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField DATA_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTypes", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final org.apache.thrift.protocol.TField ENCODINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("encodings", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField COMPRESSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("compressors", org.apache.thrift.protocol.TType.LIST, (short)7); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSAppendSchemaTemplateReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSAppendSchemaTemplateReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String name; // required + public boolean isAligned; // required + public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required + public @org.apache.thrift.annotation.Nullable java.util.List dataTypes; // required + public @org.apache.thrift.annotation.Nullable java.util.List encodings; // required + public @org.apache.thrift.annotation.Nullable java.util.List compressors; // 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 { + SESSION_ID((short)1, "sessionId"), + NAME((short)2, "name"), + IS_ALIGNED((short)3, "isAligned"), + MEASUREMENTS((short)4, "measurements"), + DATA_TYPES((short)5, "dataTypes"), + ENCODINGS((short)6, "encodings"), + COMPRESSORS((short)7, "compressors"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // NAME + return NAME; + case 3: // IS_ALIGNED + return IS_ALIGNED; + case 4: // MEASUREMENTS + return MEASUREMENTS; + case 5: // DATA_TYPES + return DATA_TYPES; + case 6: // ENCODINGS + return ENCODINGS; + case 7: // COMPRESSORS + return COMPRESSORS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __ISALIGNED_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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.DATA_TYPES, new org.apache.thrift.meta_data.FieldMetaData("dataTypes", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.ENCODINGS, new org.apache.thrift.meta_data.FieldMetaData("encodings", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.COMPRESSORS, new org.apache.thrift.meta_data.FieldMetaData("compressors", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSAppendSchemaTemplateReq.class, metaDataMap); + } + + public TSAppendSchemaTemplateReq() { + } + + public TSAppendSchemaTemplateReq( + long sessionId, + java.lang.String name, + boolean isAligned, + java.util.List measurements, + java.util.List dataTypes, + java.util.List encodings, + java.util.List compressors) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.name = name; + this.isAligned = isAligned; + setIsAlignedIsSet(true); + this.measurements = measurements; + this.dataTypes = dataTypes; + this.encodings = encodings; + this.compressors = compressors; + } + + /** + * Performs a deep copy on other. + */ + public TSAppendSchemaTemplateReq(TSAppendSchemaTemplateReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetName()) { + this.name = other.name; + } + this.isAligned = other.isAligned; + if (other.isSetMeasurements()) { + java.util.List __this__measurements = new java.util.ArrayList(other.measurements); + this.measurements = __this__measurements; + } + if (other.isSetDataTypes()) { + java.util.List __this__dataTypes = new java.util.ArrayList(other.dataTypes); + this.dataTypes = __this__dataTypes; + } + if (other.isSetEncodings()) { + java.util.List __this__encodings = new java.util.ArrayList(other.encodings); + this.encodings = __this__encodings; + } + if (other.isSetCompressors()) { + java.util.List __this__compressors = new java.util.ArrayList(other.compressors); + this.compressors = __this__compressors; + } + } + + @Override + public TSAppendSchemaTemplateReq deepCopy() { + return new TSAppendSchemaTemplateReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.name = null; + setIsAlignedIsSet(false); + this.isAligned = false; + this.measurements = null; + this.dataTypes = null; + this.encodings = null; + this.compressors = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSAppendSchemaTemplateReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getName() { + return this.name; + } + + public TSAppendSchemaTemplateReq setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public boolean isIsAligned() { + return this.isAligned; + } + + public TSAppendSchemaTemplateReq setIsAligned(boolean isAligned) { + this.isAligned = isAligned; + setIsAlignedIsSet(true); + return this; + } + + public void unsetIsAligned() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAligned() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + public void setIsAlignedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); + } + + public int getMeasurementsSize() { + return (this.measurements == null) ? 0 : this.measurements.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getMeasurementsIterator() { + return (this.measurements == null) ? null : this.measurements.iterator(); + } + + public void addToMeasurements(java.lang.String elem) { + if (this.measurements == null) { + this.measurements = new java.util.ArrayList(); + } + this.measurements.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getMeasurements() { + return this.measurements; + } + + public TSAppendSchemaTemplateReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { + this.measurements = measurements; + return this; + } + + public void unsetMeasurements() { + this.measurements = null; + } + + /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurements() { + return this.measurements != null; + } + + public void setMeasurementsIsSet(boolean value) { + if (!value) { + this.measurements = null; + } + } + + public int getDataTypesSize() { + return (this.dataTypes == null) ? 0 : this.dataTypes.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getDataTypesIterator() { + return (this.dataTypes == null) ? null : this.dataTypes.iterator(); + } + + public void addToDataTypes(int elem) { + if (this.dataTypes == null) { + this.dataTypes = new java.util.ArrayList(); + } + this.dataTypes.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getDataTypes() { + return this.dataTypes; + } + + public TSAppendSchemaTemplateReq setDataTypes(@org.apache.thrift.annotation.Nullable java.util.List dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + public void unsetDataTypes() { + this.dataTypes = null; + } + + /** Returns true if field dataTypes is set (has been assigned a value) and false otherwise */ + public boolean isSetDataTypes() { + return this.dataTypes != null; + } + + public void setDataTypesIsSet(boolean value) { + if (!value) { + this.dataTypes = null; + } + } + + public int getEncodingsSize() { + return (this.encodings == null) ? 0 : this.encodings.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getEncodingsIterator() { + return (this.encodings == null) ? null : this.encodings.iterator(); + } + + public void addToEncodings(int elem) { + if (this.encodings == null) { + this.encodings = new java.util.ArrayList(); + } + this.encodings.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getEncodings() { + return this.encodings; + } + + public TSAppendSchemaTemplateReq setEncodings(@org.apache.thrift.annotation.Nullable java.util.List encodings) { + this.encodings = encodings; + return this; + } + + public void unsetEncodings() { + this.encodings = null; + } + + /** Returns true if field encodings is set (has been assigned a value) and false otherwise */ + public boolean isSetEncodings() { + return this.encodings != null; + } + + public void setEncodingsIsSet(boolean value) { + if (!value) { + this.encodings = null; + } + } + + public int getCompressorsSize() { + return (this.compressors == null) ? 0 : this.compressors.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getCompressorsIterator() { + return (this.compressors == null) ? null : this.compressors.iterator(); + } + + public void addToCompressors(int elem) { + if (this.compressors == null) { + this.compressors = new java.util.ArrayList(); + } + this.compressors.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getCompressors() { + return this.compressors; + } + + public TSAppendSchemaTemplateReq setCompressors(@org.apache.thrift.annotation.Nullable java.util.List compressors) { + this.compressors = compressors; + return this; + } + + public void unsetCompressors() { + this.compressors = null; + } + + /** Returns true if field compressors is set (has been assigned a value) and false otherwise */ + public boolean isSetCompressors() { + return this.compressors != null; + } + + public void setCompressorsIsSet(boolean value) { + if (!value) { + this.compressors = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((java.lang.String)value); + } + break; + + case IS_ALIGNED: + if (value == null) { + unsetIsAligned(); + } else { + setIsAligned((java.lang.Boolean)value); + } + break; + + case MEASUREMENTS: + if (value == null) { + unsetMeasurements(); + } else { + setMeasurements((java.util.List)value); + } + break; + + case DATA_TYPES: + if (value == null) { + unsetDataTypes(); + } else { + setDataTypes((java.util.List)value); + } + break; + + case ENCODINGS: + if (value == null) { + unsetEncodings(); + } else { + setEncodings((java.util.List)value); + } + break; + + case COMPRESSORS: + if (value == null) { + unsetCompressors(); + } else { + setCompressors((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case NAME: + return getName(); + + case IS_ALIGNED: + return isIsAligned(); + + case MEASUREMENTS: + return getMeasurements(); + + case DATA_TYPES: + return getDataTypes(); + + case ENCODINGS: + return getEncodings(); + + case COMPRESSORS: + return getCompressors(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case NAME: + return isSetName(); + case IS_ALIGNED: + return isSetIsAligned(); + case MEASUREMENTS: + return isSetMeasurements(); + case DATA_TYPES: + return isSetDataTypes(); + case ENCODINGS: + return isSetEncodings(); + case COMPRESSORS: + return isSetCompressors(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSAppendSchemaTemplateReq) + return this.equals((TSAppendSchemaTemplateReq)that); + return false; + } + + public boolean equals(TSAppendSchemaTemplateReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_isAligned = true; + boolean that_present_isAligned = true; + if (this_present_isAligned || that_present_isAligned) { + if (!(this_present_isAligned && that_present_isAligned)) + return false; + if (this.isAligned != that.isAligned) + return false; + } + + boolean this_present_measurements = true && this.isSetMeasurements(); + boolean that_present_measurements = true && that.isSetMeasurements(); + if (this_present_measurements || that_present_measurements) { + if (!(this_present_measurements && that_present_measurements)) + return false; + if (!this.measurements.equals(that.measurements)) + return false; + } + + boolean this_present_dataTypes = true && this.isSetDataTypes(); + boolean that_present_dataTypes = true && that.isSetDataTypes(); + if (this_present_dataTypes || that_present_dataTypes) { + if (!(this_present_dataTypes && that_present_dataTypes)) + return false; + if (!this.dataTypes.equals(that.dataTypes)) + return false; + } + + boolean this_present_encodings = true && this.isSetEncodings(); + boolean that_present_encodings = true && that.isSetEncodings(); + if (this_present_encodings || that_present_encodings) { + if (!(this_present_encodings && that_present_encodings)) + return false; + if (!this.encodings.equals(that.encodings)) + return false; + } + + boolean this_present_compressors = true && this.isSetCompressors(); + boolean that_present_compressors = true && that.isSetCompressors(); + if (this_present_compressors || that_present_compressors) { + if (!(this_present_compressors && that_present_compressors)) + return false; + if (!this.compressors.equals(that.compressors)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); + if (isSetName()) + hashCode = hashCode * 8191 + name.hashCode(); + + hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); + if (isSetMeasurements()) + hashCode = hashCode * 8191 + measurements.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDataTypes()) ? 131071 : 524287); + if (isSetDataTypes()) + hashCode = hashCode * 8191 + dataTypes.hashCode(); + + hashCode = hashCode * 8191 + ((isSetEncodings()) ? 131071 : 524287); + if (isSetEncodings()) + hashCode = hashCode * 8191 + encodings.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCompressors()) ? 131071 : 524287); + if (isSetCompressors()) + hashCode = hashCode * 8191 + compressors.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSAppendSchemaTemplateReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAligned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurements()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDataTypes(), other.isSetDataTypes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataTypes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTypes, other.dataTypes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEncodings(), other.isSetEncodings()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEncodings()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encodings, other.encodings); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetCompressors(), other.isSetCompressors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressors, other.compressors); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSAppendSchemaTemplateReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("isAligned:"); + sb.append(this.isAligned); + first = false; + if (!first) sb.append(", "); + sb.append("measurements:"); + if (this.measurements == null) { + sb.append("null"); + } else { + sb.append(this.measurements); + } + first = false; + if (!first) sb.append(", "); + sb.append("dataTypes:"); + if (this.dataTypes == null) { + sb.append("null"); + } else { + sb.append(this.dataTypes); + } + first = false; + if (!first) sb.append(", "); + sb.append("encodings:"); + if (this.encodings == null) { + sb.append("null"); + } else { + sb.append(this.encodings); + } + first = false; + if (!first) sb.append(", "); + sb.append("compressors:"); + if (this.compressors == null) { + sb.append("null"); + } else { + sb.append(this.compressors); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } + // alas, we cannot check 'isAligned' because it's a primitive and you chose the non-beans generator. + if (measurements == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); + } + if (dataTypes == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataTypes' was not present! Struct: " + toString()); + } + if (encodings == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'encodings' was not present! Struct: " + toString()); + } + if (compressors == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'compressors' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSAppendSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSAppendSchemaTemplateReqStandardScheme getScheme() { + return new TSAppendSchemaTemplateReqStandardScheme(); + } + } + + private static class TSAppendSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSAppendSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // IS_ALIGNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MEASUREMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list694 = iprot.readListBegin(); + struct.measurements = new java.util.ArrayList(_list694.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem695; + for (int _i696 = 0; _i696 < _list694.size; ++_i696) + { + _elem695 = iprot.readString(); + struct.measurements.add(_elem695); + } + iprot.readListEnd(); + } + struct.setMeasurementsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DATA_TYPES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list697 = iprot.readListBegin(); + struct.dataTypes = new java.util.ArrayList(_list697.size); + int _elem698; + for (int _i699 = 0; _i699 < _list697.size; ++_i699) + { + _elem698 = iprot.readI32(); + struct.dataTypes.add(_elem698); + } + iprot.readListEnd(); + } + struct.setDataTypesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // ENCODINGS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list700 = iprot.readListBegin(); + struct.encodings = new java.util.ArrayList(_list700.size); + int _elem701; + for (int _i702 = 0; _i702 < _list700.size; ++_i702) + { + _elem701 = iprot.readI32(); + struct.encodings.add(_elem701); + } + iprot.readListEnd(); + } + struct.setEncodingsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // COMPRESSORS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list703 = iprot.readListBegin(); + struct.compressors = new java.util.ArrayList(_list703.size); + int _elem704; + for (int _i705 = 0; _i705 < _list703.size; ++_i705) + { + _elem704 = iprot.readI32(); + struct.compressors.add(_elem704); + } + iprot.readListEnd(); + } + struct.setCompressorsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetIsAligned()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'isAligned' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSAppendSchemaTemplateReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); + oprot.writeBool(struct.isAligned); + oprot.writeFieldEnd(); + if (struct.measurements != null) { + oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); + for (java.lang.String _iter706 : struct.measurements) + { + oprot.writeString(_iter706); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.dataTypes != null) { + oprot.writeFieldBegin(DATA_TYPES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dataTypes.size())); + for (int _iter707 : struct.dataTypes) + { + oprot.writeI32(_iter707); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.encodings != null) { + oprot.writeFieldBegin(ENCODINGS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.encodings.size())); + for (int _iter708 : struct.encodings) + { + oprot.writeI32(_iter708); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.compressors != null) { + oprot.writeFieldBegin(COMPRESSORS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.compressors.size())); + for (int _iter709 : struct.compressors) + { + oprot.writeI32(_iter709); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSAppendSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSAppendSchemaTemplateReqTupleScheme getScheme() { + return new TSAppendSchemaTemplateReqTupleScheme(); + } + } + + private static class TSAppendSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSAppendSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.name); + oprot.writeBool(struct.isAligned); + { + oprot.writeI32(struct.measurements.size()); + for (java.lang.String _iter710 : struct.measurements) + { + oprot.writeString(_iter710); + } + } + { + oprot.writeI32(struct.dataTypes.size()); + for (int _iter711 : struct.dataTypes) + { + oprot.writeI32(_iter711); + } + } + { + oprot.writeI32(struct.encodings.size()); + for (int _iter712 : struct.encodings) + { + oprot.writeI32(_iter712); + } + } + { + oprot.writeI32(struct.compressors.size()); + for (int _iter713 : struct.compressors) + { + oprot.writeI32(_iter713); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSAppendSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.name = iprot.readString(); + struct.setNameIsSet(true); + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + { + org.apache.thrift.protocol.TList _list714 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.measurements = new java.util.ArrayList(_list714.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem715; + for (int _i716 = 0; _i716 < _list714.size; ++_i716) + { + _elem715 = iprot.readString(); + struct.measurements.add(_elem715); + } + } + struct.setMeasurementsIsSet(true); + { + org.apache.thrift.protocol.TList _list717 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.dataTypes = new java.util.ArrayList(_list717.size); + int _elem718; + for (int _i719 = 0; _i719 < _list717.size; ++_i719) + { + _elem718 = iprot.readI32(); + struct.dataTypes.add(_elem718); + } + } + struct.setDataTypesIsSet(true); + { + org.apache.thrift.protocol.TList _list720 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.encodings = new java.util.ArrayList(_list720.size); + int _elem721; + for (int _i722 = 0; _i722 < _list720.size; ++_i722) + { + _elem721 = iprot.readI32(); + struct.encodings.add(_elem721); + } + } + struct.setEncodingsIsSet(true); + { + org.apache.thrift.protocol.TList _list723 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.compressors = new java.util.ArrayList(_list723.size); + int _elem724; + for (int _i725 = 0; _i725 < _list723.size; ++_i725) + { + _elem724 = iprot.readI32(); + struct.compressors.add(_elem724); + } + } + struct.setCompressorsIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSBackupConfigurationResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSBackupConfigurationResp.java new file mode 100644 index 0000000000000..f64f2a999b9c0 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSBackupConfigurationResp.java @@ -0,0 +1,699 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSBackupConfigurationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSBackupConfigurationResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField ENABLE_OPERATION_SYNC_FIELD_DESC = new org.apache.thrift.protocol.TField("enableOperationSync", org.apache.thrift.protocol.TType.BOOL, (short)2); + private static final org.apache.thrift.protocol.TField SECONDARY_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("secondaryAddress", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField SECONDARY_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("secondaryPort", org.apache.thrift.protocol.TType.I32, (short)4); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSBackupConfigurationRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSBackupConfigurationRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required + public boolean enableOperationSync; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String secondaryAddress; // optional + public int secondaryPort; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATUS((short)1, "status"), + ENABLE_OPERATION_SYNC((short)2, "enableOperationSync"), + SECONDARY_ADDRESS((short)3, "secondaryAddress"), + SECONDARY_PORT((short)4, "secondaryPort"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // ENABLE_OPERATION_SYNC + return ENABLE_OPERATION_SYNC; + case 3: // SECONDARY_ADDRESS + return SECONDARY_ADDRESS; + case 4: // SECONDARY_PORT + return SECONDARY_PORT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ENABLEOPERATIONSYNC_ISSET_ID = 0; + private static final int __SECONDARYPORT_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.ENABLE_OPERATION_SYNC,_Fields.SECONDARY_ADDRESS,_Fields.SECONDARY_PORT}; + 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + tmpMap.put(_Fields.ENABLE_OPERATION_SYNC, new org.apache.thrift.meta_data.FieldMetaData("enableOperationSync", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.SECONDARY_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("secondaryAddress", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SECONDARY_PORT, new org.apache.thrift.meta_data.FieldMetaData("secondaryPort", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSBackupConfigurationResp.class, metaDataMap); + } + + public TSBackupConfigurationResp() { + } + + public TSBackupConfigurationResp( + org.apache.iotdb.common.rpc.thrift.TSStatus status) + { + this(); + this.status = status; + } + + /** + * Performs a deep copy on other. + */ + public TSBackupConfigurationResp(TSBackupConfigurationResp other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetStatus()) { + this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); + } + this.enableOperationSync = other.enableOperationSync; + if (other.isSetSecondaryAddress()) { + this.secondaryAddress = other.secondaryAddress; + } + this.secondaryPort = other.secondaryPort; + } + + @Override + public TSBackupConfigurationResp deepCopy() { + return new TSBackupConfigurationResp(this); + } + + @Override + public void clear() { + this.status = null; + setEnableOperationSyncIsSet(false); + this.enableOperationSync = false; + this.secondaryAddress = null; + setSecondaryPortIsSet(false); + this.secondaryPort = 0; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { + return this.status; + } + + public TSBackupConfigurationResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { + this.status = status; + return this; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + public boolean isEnableOperationSync() { + return this.enableOperationSync; + } + + public TSBackupConfigurationResp setEnableOperationSync(boolean enableOperationSync) { + this.enableOperationSync = enableOperationSync; + setEnableOperationSyncIsSet(true); + return this; + } + + public void unsetEnableOperationSync() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEOPERATIONSYNC_ISSET_ID); + } + + /** Returns true if field enableOperationSync is set (has been assigned a value) and false otherwise */ + public boolean isSetEnableOperationSync() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEOPERATIONSYNC_ISSET_ID); + } + + public void setEnableOperationSyncIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEOPERATIONSYNC_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getSecondaryAddress() { + return this.secondaryAddress; + } + + public TSBackupConfigurationResp setSecondaryAddress(@org.apache.thrift.annotation.Nullable java.lang.String secondaryAddress) { + this.secondaryAddress = secondaryAddress; + return this; + } + + public void unsetSecondaryAddress() { + this.secondaryAddress = null; + } + + /** Returns true if field secondaryAddress is set (has been assigned a value) and false otherwise */ + public boolean isSetSecondaryAddress() { + return this.secondaryAddress != null; + } + + public void setSecondaryAddressIsSet(boolean value) { + if (!value) { + this.secondaryAddress = null; + } + } + + public int getSecondaryPort() { + return this.secondaryPort; + } + + public TSBackupConfigurationResp setSecondaryPort(int secondaryPort) { + this.secondaryPort = secondaryPort; + setSecondaryPortIsSet(true); + return this; + } + + public void unsetSecondaryPort() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SECONDARYPORT_ISSET_ID); + } + + /** Returns true if field secondaryPort is set (has been assigned a value) and false otherwise */ + public boolean isSetSecondaryPort() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SECONDARYPORT_ISSET_ID); + } + + public void setSecondaryPortIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SECONDARYPORT_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + case ENABLE_OPERATION_SYNC: + if (value == null) { + unsetEnableOperationSync(); + } else { + setEnableOperationSync((java.lang.Boolean)value); + } + break; + + case SECONDARY_ADDRESS: + if (value == null) { + unsetSecondaryAddress(); + } else { + setSecondaryAddress((java.lang.String)value); + } + break; + + case SECONDARY_PORT: + if (value == null) { + unsetSecondaryPort(); + } else { + setSecondaryPort((java.lang.Integer)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case ENABLE_OPERATION_SYNC: + return isEnableOperationSync(); + + case SECONDARY_ADDRESS: + return getSecondaryAddress(); + + case SECONDARY_PORT: + return getSecondaryPort(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case ENABLE_OPERATION_SYNC: + return isSetEnableOperationSync(); + case SECONDARY_ADDRESS: + return isSetSecondaryAddress(); + case SECONDARY_PORT: + return isSetSecondaryPort(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSBackupConfigurationResp) + return this.equals((TSBackupConfigurationResp)that); + return false; + } + + public boolean equals(TSBackupConfigurationResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_enableOperationSync = true && this.isSetEnableOperationSync(); + boolean that_present_enableOperationSync = true && that.isSetEnableOperationSync(); + if (this_present_enableOperationSync || that_present_enableOperationSync) { + if (!(this_present_enableOperationSync && that_present_enableOperationSync)) + return false; + if (this.enableOperationSync != that.enableOperationSync) + return false; + } + + boolean this_present_secondaryAddress = true && this.isSetSecondaryAddress(); + boolean that_present_secondaryAddress = true && that.isSetSecondaryAddress(); + if (this_present_secondaryAddress || that_present_secondaryAddress) { + if (!(this_present_secondaryAddress && that_present_secondaryAddress)) + return false; + if (!this.secondaryAddress.equals(that.secondaryAddress)) + return false; + } + + boolean this_present_secondaryPort = true && this.isSetSecondaryPort(); + boolean that_present_secondaryPort = true && that.isSetSecondaryPort(); + if (this_present_secondaryPort || that_present_secondaryPort) { + if (!(this_present_secondaryPort && that_present_secondaryPort)) + return false; + if (this.secondaryPort != that.secondaryPort) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + ((isSetEnableOperationSync()) ? 131071 : 524287); + if (isSetEnableOperationSync()) + hashCode = hashCode * 8191 + ((enableOperationSync) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetSecondaryAddress()) ? 131071 : 524287); + if (isSetSecondaryAddress()) + hashCode = hashCode * 8191 + secondaryAddress.hashCode(); + + hashCode = hashCode * 8191 + ((isSetSecondaryPort()) ? 131071 : 524287); + if (isSetSecondaryPort()) + hashCode = hashCode * 8191 + secondaryPort; + + return hashCode; + } + + @Override + public int compareTo(TSBackupConfigurationResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEnableOperationSync(), other.isSetEnableOperationSync()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnableOperationSync()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableOperationSync, other.enableOperationSync); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSecondaryAddress(), other.isSetSecondaryAddress()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSecondaryAddress()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secondaryAddress, other.secondaryAddress); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSecondaryPort(), other.isSetSecondaryPort()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSecondaryPort()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secondaryPort, other.secondaryPort); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSBackupConfigurationResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (isSetEnableOperationSync()) { + if (!first) sb.append(", "); + sb.append("enableOperationSync:"); + sb.append(this.enableOperationSync); + first = false; + } + if (isSetSecondaryAddress()) { + if (!first) sb.append(", "); + sb.append("secondaryAddress:"); + if (this.secondaryAddress == null) { + sb.append("null"); + } else { + sb.append(this.secondaryAddress); + } + first = false; + } + if (isSetSecondaryPort()) { + if (!first) sb.append(", "); + sb.append("secondaryPort:"); + sb.append(this.secondaryPort); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (status != null) { + status.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSBackupConfigurationRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSBackupConfigurationRespStandardScheme getScheme() { + return new TSBackupConfigurationRespStandardScheme(); + } + } + + private static class TSBackupConfigurationRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSBackupConfigurationResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ENABLE_OPERATION_SYNC + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.enableOperationSync = iprot.readBool(); + struct.setEnableOperationSyncIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SECONDARY_ADDRESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.secondaryAddress = iprot.readString(); + struct.setSecondaryAddressIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // SECONDARY_PORT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.secondaryPort = iprot.readI32(); + struct.setSecondaryPortIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSBackupConfigurationResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.isSetEnableOperationSync()) { + oprot.writeFieldBegin(ENABLE_OPERATION_SYNC_FIELD_DESC); + oprot.writeBool(struct.enableOperationSync); + oprot.writeFieldEnd(); + } + if (struct.secondaryAddress != null) { + if (struct.isSetSecondaryAddress()) { + oprot.writeFieldBegin(SECONDARY_ADDRESS_FIELD_DESC); + oprot.writeString(struct.secondaryAddress); + oprot.writeFieldEnd(); + } + } + if (struct.isSetSecondaryPort()) { + oprot.writeFieldBegin(SECONDARY_PORT_FIELD_DESC); + oprot.writeI32(struct.secondaryPort); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSBackupConfigurationRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSBackupConfigurationRespTupleScheme getScheme() { + return new TSBackupConfigurationRespTupleScheme(); + } + } + + private static class TSBackupConfigurationRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSBackupConfigurationResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status.write(oprot); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetEnableOperationSync()) { + optionals.set(0); + } + if (struct.isSetSecondaryAddress()) { + optionals.set(1); + } + if (struct.isSetSecondaryPort()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetEnableOperationSync()) { + oprot.writeBool(struct.enableOperationSync); + } + if (struct.isSetSecondaryAddress()) { + oprot.writeString(struct.secondaryAddress); + } + if (struct.isSetSecondaryPort()) { + oprot.writeI32(struct.secondaryPort); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSBackupConfigurationResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.enableOperationSync = iprot.readBool(); + struct.setEnableOperationSyncIsSet(true); + } + if (incoming.get(1)) { + struct.secondaryAddress = iprot.readString(); + struct.setSecondaryAddressIsSet(true); + } + if (incoming.get(2)) { + struct.secondaryPort = iprot.readI32(); + struct.setSecondaryPortIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCancelOperationReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCancelOperationReq.java new file mode 100644 index 0000000000000..a6d7b1c51583e --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCancelOperationReq.java @@ -0,0 +1,470 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSCancelOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCancelOperationReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCancelOperationReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCancelOperationReqTupleSchemeFactory(); + + public long sessionId; // required + public long queryId; // 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 { + SESSION_ID((short)1, "sessionId"), + QUERY_ID((short)2, "queryId"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // QUERY_ID + return QUERY_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __QUERYID_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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCancelOperationReq.class, metaDataMap); + } + + public TSCancelOperationReq() { + } + + public TSCancelOperationReq( + long sessionId, + long queryId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.queryId = queryId; + setQueryIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSCancelOperationReq(TSCancelOperationReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + this.queryId = other.queryId; + } + + @Override + public TSCancelOperationReq deepCopy() { + return new TSCancelOperationReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + setQueryIdIsSet(false); + this.queryId = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSCancelOperationReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public long getQueryId() { + return this.queryId; + } + + public TSCancelOperationReq setQueryId(long queryId) { + this.queryId = queryId; + setQueryIdIsSet(true); + return this; + } + + public void unsetQueryId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + public void setQueryIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case QUERY_ID: + if (value == null) { + unsetQueryId(); + } else { + setQueryId((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case QUERY_ID: + return getQueryId(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case QUERY_ID: + return isSetQueryId(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSCancelOperationReq) + return this.equals((TSCancelOperationReq)that); + return false; + } + + public boolean equals(TSCancelOperationReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_queryId = true; + boolean that_present_queryId = true; + if (this_present_queryId || that_present_queryId) { + if (!(this_present_queryId && that_present_queryId)) + return false; + if (this.queryId != that.queryId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); + + return hashCode; + } + + @Override + public int compareTo(TSCancelOperationReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCancelOperationReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("queryId:"); + sb.append(this.queryId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'queryId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSCancelOperationReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCancelOperationReqStandardScheme getScheme() { + return new TSCancelOperationReqStandardScheme(); + } + } + + private static class TSCancelOperationReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSCancelOperationReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // QUERY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetQueryId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSCancelOperationReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); + oprot.writeI64(struct.queryId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSCancelOperationReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCancelOperationReqTupleScheme getScheme() { + return new TSCancelOperationReqTupleScheme(); + } + } + + private static class TSCancelOperationReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSCancelOperationReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeI64(struct.queryId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSCancelOperationReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseOperationReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseOperationReq.java new file mode 100644 index 0000000000000..b51d2c568e384 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseOperationReq.java @@ -0,0 +1,579 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSCloseOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCloseOperationReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCloseOperationReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCloseOperationReqTupleSchemeFactory(); + + public long sessionId; // required + public long queryId; // optional + public long statementId; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + QUERY_ID((short)2, "queryId"), + STATEMENT_ID((short)3, "statementId"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // QUERY_ID + return QUERY_ID; + case 3: // STATEMENT_ID + return STATEMENT_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __QUERYID_ISSET_ID = 1; + private static final int __STATEMENTID_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.QUERY_ID,_Fields.STATEMENT_ID}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCloseOperationReq.class, metaDataMap); + } + + public TSCloseOperationReq() { + } + + public TSCloseOperationReq( + long sessionId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSCloseOperationReq(TSCloseOperationReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + this.queryId = other.queryId; + this.statementId = other.statementId; + } + + @Override + public TSCloseOperationReq deepCopy() { + return new TSCloseOperationReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + setQueryIdIsSet(false); + this.queryId = 0; + setStatementIdIsSet(false); + this.statementId = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSCloseOperationReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public long getQueryId() { + return this.queryId; + } + + public TSCloseOperationReq setQueryId(long queryId) { + this.queryId = queryId; + setQueryIdIsSet(true); + return this; + } + + public void unsetQueryId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + public void setQueryIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); + } + + public long getStatementId() { + return this.statementId; + } + + public TSCloseOperationReq setStatementId(long statementId) { + this.statementId = statementId; + setStatementIdIsSet(true); + return this; + } + + public void unsetStatementId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ + public boolean isSetStatementId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + public void setStatementIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case QUERY_ID: + if (value == null) { + unsetQueryId(); + } else { + setQueryId((java.lang.Long)value); + } + break; + + case STATEMENT_ID: + if (value == null) { + unsetStatementId(); + } else { + setStatementId((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case QUERY_ID: + return getQueryId(); + + case STATEMENT_ID: + return getStatementId(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case QUERY_ID: + return isSetQueryId(); + case STATEMENT_ID: + return isSetStatementId(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSCloseOperationReq) + return this.equals((TSCloseOperationReq)that); + return false; + } + + public boolean equals(TSCloseOperationReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_queryId = true && this.isSetQueryId(); + boolean that_present_queryId = true && that.isSetQueryId(); + if (this_present_queryId || that_present_queryId) { + if (!(this_present_queryId && that_present_queryId)) + return false; + if (this.queryId != that.queryId) + return false; + } + + boolean this_present_statementId = true && this.isSetStatementId(); + boolean that_present_statementId = true && that.isSetStatementId(); + if (this_present_statementId || that_present_statementId) { + if (!(this_present_statementId && that_present_statementId)) + return false; + if (this.statementId != that.statementId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetQueryId()) ? 131071 : 524287); + if (isSetQueryId()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); + + hashCode = hashCode * 8191 + ((isSetStatementId()) ? 131071 : 524287); + if (isSetStatementId()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); + + return hashCode; + } + + @Override + public int compareTo(TSCloseOperationReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatementId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCloseOperationReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (isSetQueryId()) { + if (!first) sb.append(", "); + sb.append("queryId:"); + sb.append(this.queryId); + first = false; + } + if (isSetStatementId()) { + if (!first) sb.append(", "); + sb.append("statementId:"); + sb.append(this.statementId); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSCloseOperationReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCloseOperationReqStandardScheme getScheme() { + return new TSCloseOperationReqStandardScheme(); + } + } + + private static class TSCloseOperationReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSCloseOperationReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // QUERY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STATEMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSCloseOperationReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.isSetQueryId()) { + oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); + oprot.writeI64(struct.queryId); + oprot.writeFieldEnd(); + } + if (struct.isSetStatementId()) { + oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); + oprot.writeI64(struct.statementId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSCloseOperationReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCloseOperationReqTupleScheme getScheme() { + return new TSCloseOperationReqTupleScheme(); + } + } + + private static class TSCloseOperationReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSCloseOperationReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetQueryId()) { + optionals.set(0); + } + if (struct.isSetStatementId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetQueryId()) { + oprot.writeI64(struct.queryId); + } + if (struct.isSetStatementId()) { + oprot.writeI64(struct.statementId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSCloseOperationReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + } + if (incoming.get(1)) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseSessionReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseSessionReq.java new file mode 100644 index 0000000000000..554db74df35e8 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseSessionReq.java @@ -0,0 +1,377 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSCloseSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCloseSessionReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCloseSessionReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCloseSessionReqTupleSchemeFactory(); + + public long sessionId; // 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 { + SESSION_ID((short)1, "sessionId"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCloseSessionReq.class, metaDataMap); + } + + public TSCloseSessionReq() { + } + + public TSCloseSessionReq( + long sessionId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSCloseSessionReq(TSCloseSessionReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + } + + @Override + public TSCloseSessionReq deepCopy() { + return new TSCloseSessionReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSCloseSessionReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSCloseSessionReq) + return this.equals((TSCloseSessionReq)that); + return false; + } + + public boolean equals(TSCloseSessionReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + return hashCode; + } + + @Override + public int compareTo(TSCloseSessionReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCloseSessionReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSCloseSessionReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCloseSessionReqStandardScheme getScheme() { + return new TSCloseSessionReqStandardScheme(); + } + } + + private static class TSCloseSessionReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSCloseSessionReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSCloseSessionReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSCloseSessionReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCloseSessionReqTupleScheme getScheme() { + return new TSCloseSessionReqTupleScheme(); + } + } + + private static class TSCloseSessionReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSCloseSessionReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSCloseSessionReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfo.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfo.java new file mode 100644 index 0000000000000..c308b6b8311a2 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfo.java @@ -0,0 +1,696 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSConnectionInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSConnectionInfo"); + + private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField LOG_IN_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("logInTime", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField CONNECTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("connectionId", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSConnectionInfoStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSConnectionInfoTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.lang.String userName; // required + public long logInTime; // required + public @org.apache.thrift.annotation.Nullable java.lang.String connectionId; // required + /** + * + * @see TSConnectionType + */ + public @org.apache.thrift.annotation.Nullable TSConnectionType type; // 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 { + USER_NAME((short)1, "userName"), + LOG_IN_TIME((short)2, "logInTime"), + CONNECTION_ID((short)3, "connectionId"), + /** + * + * @see TSConnectionType + */ + TYPE((short)4, "type"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_NAME + return USER_NAME; + case 2: // LOG_IN_TIME + return LOG_IN_TIME; + case 3: // CONNECTION_ID + return CONNECTION_ID; + case 4: // TYPE + return TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOGINTIME_ISSET_ID = 0; + 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.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LOG_IN_TIME, new org.apache.thrift.meta_data.FieldMetaData("logInTime", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.CONNECTION_ID, new org.apache.thrift.meta_data.FieldMetaData("connectionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TSConnectionType.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSConnectionInfo.class, metaDataMap); + } + + public TSConnectionInfo() { + } + + public TSConnectionInfo( + java.lang.String userName, + long logInTime, + java.lang.String connectionId, + TSConnectionType type) + { + this(); + this.userName = userName; + this.logInTime = logInTime; + setLogInTimeIsSet(true); + this.connectionId = connectionId; + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public TSConnectionInfo(TSConnectionInfo other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetUserName()) { + this.userName = other.userName; + } + this.logInTime = other.logInTime; + if (other.isSetConnectionId()) { + this.connectionId = other.connectionId; + } + if (other.isSetType()) { + this.type = other.type; + } + } + + @Override + public TSConnectionInfo deepCopy() { + return new TSConnectionInfo(this); + } + + @Override + public void clear() { + this.userName = null; + setLogInTimeIsSet(false); + this.logInTime = 0; + this.connectionId = null; + this.type = null; + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getUserName() { + return this.userName; + } + + public TSConnectionInfo setUserName(@org.apache.thrift.annotation.Nullable java.lang.String userName) { + this.userName = userName; + return this; + } + + public void unsetUserName() { + this.userName = null; + } + + /** Returns true if field userName is set (has been assigned a value) and false otherwise */ + public boolean isSetUserName() { + return this.userName != null; + } + + public void setUserNameIsSet(boolean value) { + if (!value) { + this.userName = null; + } + } + + public long getLogInTime() { + return this.logInTime; + } + + public TSConnectionInfo setLogInTime(long logInTime) { + this.logInTime = logInTime; + setLogInTimeIsSet(true); + return this; + } + + public void unsetLogInTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LOGINTIME_ISSET_ID); + } + + /** Returns true if field logInTime is set (has been assigned a value) and false otherwise */ + public boolean isSetLogInTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LOGINTIME_ISSET_ID); + } + + public void setLogInTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LOGINTIME_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getConnectionId() { + return this.connectionId; + } + + public TSConnectionInfo setConnectionId(@org.apache.thrift.annotation.Nullable java.lang.String connectionId) { + this.connectionId = connectionId; + return this; + } + + public void unsetConnectionId() { + this.connectionId = null; + } + + /** Returns true if field connectionId is set (has been assigned a value) and false otherwise */ + public boolean isSetConnectionId() { + return this.connectionId != null; + } + + public void setConnectionIdIsSet(boolean value) { + if (!value) { + this.connectionId = null; + } + } + + /** + * + * @see TSConnectionType + */ + @org.apache.thrift.annotation.Nullable + public TSConnectionType getType() { + return this.type; + } + + /** + * + * @see TSConnectionType + */ + public TSConnectionInfo setType(@org.apache.thrift.annotation.Nullable TSConnectionType type) { + this.type = type; + return this; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case USER_NAME: + if (value == null) { + unsetUserName(); + } else { + setUserName((java.lang.String)value); + } + break; + + case LOG_IN_TIME: + if (value == null) { + unsetLogInTime(); + } else { + setLogInTime((java.lang.Long)value); + } + break; + + case CONNECTION_ID: + if (value == null) { + unsetConnectionId(); + } else { + setConnectionId((java.lang.String)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((TSConnectionType)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case USER_NAME: + return getUserName(); + + case LOG_IN_TIME: + return getLogInTime(); + + case CONNECTION_ID: + return getConnectionId(); + + case TYPE: + return getType(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case USER_NAME: + return isSetUserName(); + case LOG_IN_TIME: + return isSetLogInTime(); + case CONNECTION_ID: + return isSetConnectionId(); + case TYPE: + return isSetType(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSConnectionInfo) + return this.equals((TSConnectionInfo)that); + return false; + } + + public boolean equals(TSConnectionInfo that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_userName = true && this.isSetUserName(); + boolean that_present_userName = true && that.isSetUserName(); + if (this_present_userName || that_present_userName) { + if (!(this_present_userName && that_present_userName)) + return false; + if (!this.userName.equals(that.userName)) + return false; + } + + boolean this_present_logInTime = true; + boolean that_present_logInTime = true; + if (this_present_logInTime || that_present_logInTime) { + if (!(this_present_logInTime && that_present_logInTime)) + return false; + if (this.logInTime != that.logInTime) + return false; + } + + boolean this_present_connectionId = true && this.isSetConnectionId(); + boolean that_present_connectionId = true && that.isSetConnectionId(); + if (this_present_connectionId || that_present_connectionId) { + if (!(this_present_connectionId && that_present_connectionId)) + return false; + if (!this.connectionId.equals(that.connectionId)) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetUserName()) ? 131071 : 524287); + if (isSetUserName()) + hashCode = hashCode * 8191 + userName.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(logInTime); + + hashCode = hashCode * 8191 + ((isSetConnectionId()) ? 131071 : 524287); + if (isSetConnectionId()) + hashCode = hashCode * 8191 + connectionId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); + if (isSetType()) + hashCode = hashCode * 8191 + type.getValue(); + + return hashCode; + } + + @Override + public int compareTo(TSConnectionInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetUserName(), other.isSetUserName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetLogInTime(), other.isSetLogInTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLogInTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logInTime, other.logInTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetConnectionId(), other.isSetConnectionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetConnectionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.connectionId, other.connectionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSConnectionInfo("); + boolean first = true; + + sb.append("userName:"); + if (this.userName == null) { + sb.append("null"); + } else { + sb.append(this.userName); + } + first = false; + if (!first) sb.append(", "); + sb.append("logInTime:"); + sb.append(this.logInTime); + first = false; + if (!first) sb.append(", "); + sb.append("connectionId:"); + if (this.connectionId == null) { + sb.append("null"); + } else { + sb.append(this.connectionId); + } + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (userName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString()); + } + // alas, we cannot check 'logInTime' because it's a primitive and you chose the non-beans generator. + if (connectionId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'connectionId' was not present! Struct: " + toString()); + } + if (type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSConnectionInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSConnectionInfoStandardScheme getScheme() { + return new TSConnectionInfoStandardScheme(); + } + } + + private static class TSConnectionInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSConnectionInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userName = iprot.readString(); + struct.setUserNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LOG_IN_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.logInTime = iprot.readI64(); + struct.setLogInTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CONNECTION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.connectionId = iprot.readString(); + struct.setConnectionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.iotdb.service.rpc.thrift.TSConnectionType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetLogInTime()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'logInTime' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSConnectionInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userName != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.userName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(LOG_IN_TIME_FIELD_DESC); + oprot.writeI64(struct.logInTime); + oprot.writeFieldEnd(); + if (struct.connectionId != null) { + oprot.writeFieldBegin(CONNECTION_ID_FIELD_DESC); + oprot.writeString(struct.connectionId); + oprot.writeFieldEnd(); + } + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSConnectionInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSConnectionInfoTupleScheme getScheme() { + return new TSConnectionInfoTupleScheme(); + } + } + + private static class TSConnectionInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSConnectionInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeString(struct.userName); + oprot.writeI64(struct.logInTime); + oprot.writeString(struct.connectionId); + oprot.writeI32(struct.type.getValue()); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSConnectionInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.userName = iprot.readString(); + struct.setUserNameIsSet(true); + struct.logInTime = iprot.readI64(); + struct.setLogInTimeIsSet(true); + struct.connectionId = iprot.readString(); + struct.setConnectionIdIsSet(true); + struct.type = org.apache.iotdb.service.rpc.thrift.TSConnectionType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfoResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfoResp.java new file mode 100644 index 0000000000000..032139da63ba0 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfoResp.java @@ -0,0 +1,436 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSConnectionInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSConnectionInfoResp"); + + private static final org.apache.thrift.protocol.TField CONNECTION_INFO_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("connectionInfoList", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSConnectionInfoRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSConnectionInfoRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.util.List connectionInfoList; // 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 { + CONNECTION_INFO_LIST((short)1, "connectionInfoList"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // CONNECTION_INFO_LIST + return CONNECTION_INFO_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.CONNECTION_INFO_LIST, new org.apache.thrift.meta_data.FieldMetaData("connectionInfoList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSConnectionInfo.class)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSConnectionInfoResp.class, metaDataMap); + } + + public TSConnectionInfoResp() { + } + + public TSConnectionInfoResp( + java.util.List connectionInfoList) + { + this(); + this.connectionInfoList = connectionInfoList; + } + + /** + * Performs a deep copy on other. + */ + public TSConnectionInfoResp(TSConnectionInfoResp other) { + if (other.isSetConnectionInfoList()) { + java.util.List __this__connectionInfoList = new java.util.ArrayList(other.connectionInfoList.size()); + for (TSConnectionInfo other_element : other.connectionInfoList) { + __this__connectionInfoList.add(new TSConnectionInfo(other_element)); + } + this.connectionInfoList = __this__connectionInfoList; + } + } + + @Override + public TSConnectionInfoResp deepCopy() { + return new TSConnectionInfoResp(this); + } + + @Override + public void clear() { + this.connectionInfoList = null; + } + + public int getConnectionInfoListSize() { + return (this.connectionInfoList == null) ? 0 : this.connectionInfoList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getConnectionInfoListIterator() { + return (this.connectionInfoList == null) ? null : this.connectionInfoList.iterator(); + } + + public void addToConnectionInfoList(TSConnectionInfo elem) { + if (this.connectionInfoList == null) { + this.connectionInfoList = new java.util.ArrayList(); + } + this.connectionInfoList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getConnectionInfoList() { + return this.connectionInfoList; + } + + public TSConnectionInfoResp setConnectionInfoList(@org.apache.thrift.annotation.Nullable java.util.List connectionInfoList) { + this.connectionInfoList = connectionInfoList; + return this; + } + + public void unsetConnectionInfoList() { + this.connectionInfoList = null; + } + + /** Returns true if field connectionInfoList is set (has been assigned a value) and false otherwise */ + public boolean isSetConnectionInfoList() { + return this.connectionInfoList != null; + } + + public void setConnectionInfoListIsSet(boolean value) { + if (!value) { + this.connectionInfoList = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case CONNECTION_INFO_LIST: + if (value == null) { + unsetConnectionInfoList(); + } else { + setConnectionInfoList((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case CONNECTION_INFO_LIST: + return getConnectionInfoList(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case CONNECTION_INFO_LIST: + return isSetConnectionInfoList(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSConnectionInfoResp) + return this.equals((TSConnectionInfoResp)that); + return false; + } + + public boolean equals(TSConnectionInfoResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_connectionInfoList = true && this.isSetConnectionInfoList(); + boolean that_present_connectionInfoList = true && that.isSetConnectionInfoList(); + if (this_present_connectionInfoList || that_present_connectionInfoList) { + if (!(this_present_connectionInfoList && that_present_connectionInfoList)) + return false; + if (!this.connectionInfoList.equals(that.connectionInfoList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetConnectionInfoList()) ? 131071 : 524287); + if (isSetConnectionInfoList()) + hashCode = hashCode * 8191 + connectionInfoList.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSConnectionInfoResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetConnectionInfoList(), other.isSetConnectionInfoList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetConnectionInfoList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.connectionInfoList, other.connectionInfoList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSConnectionInfoResp("); + boolean first = true; + + sb.append("connectionInfoList:"); + if (this.connectionInfoList == null) { + sb.append("null"); + } else { + sb.append(this.connectionInfoList); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (connectionInfoList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'connectionInfoList' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class TSConnectionInfoRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSConnectionInfoRespStandardScheme getScheme() { + return new TSConnectionInfoRespStandardScheme(); + } + } + + private static class TSConnectionInfoRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSConnectionInfoResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // CONNECTION_INFO_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list750 = iprot.readListBegin(); + struct.connectionInfoList = new java.util.ArrayList(_list750.size); + @org.apache.thrift.annotation.Nullable TSConnectionInfo _elem751; + for (int _i752 = 0; _i752 < _list750.size; ++_i752) + { + _elem751 = new TSConnectionInfo(); + _elem751.read(iprot); + struct.connectionInfoList.add(_elem751); + } + iprot.readListEnd(); + } + struct.setConnectionInfoListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSConnectionInfoResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.connectionInfoList != null) { + oprot.writeFieldBegin(CONNECTION_INFO_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.connectionInfoList.size())); + for (TSConnectionInfo _iter753 : struct.connectionInfoList) + { + _iter753.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSConnectionInfoRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSConnectionInfoRespTupleScheme getScheme() { + return new TSConnectionInfoRespTupleScheme(); + } + } + + private static class TSConnectionInfoRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSConnectionInfoResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + oprot.writeI32(struct.connectionInfoList.size()); + for (TSConnectionInfo _iter754 : struct.connectionInfoList) + { + _iter754.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSConnectionInfoResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list755 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.connectionInfoList = new java.util.ArrayList(_list755.size); + @org.apache.thrift.annotation.Nullable TSConnectionInfo _elem756; + for (int _i757 = 0; _i757 < _list755.size; ++_i757) + { + _elem756 = new TSConnectionInfo(); + _elem756.read(iprot); + struct.connectionInfoList.add(_elem756); + } + } + struct.setConnectionInfoListIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java new file mode 100644 index 0000000000000..eb4607a26472d --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java @@ -0,0 +1,50 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + + +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public enum TSConnectionType implements org.apache.thrift.TEnum { + THRIFT_BASED(0), + MQTT_BASED(1), + INTERNAL(2), + REST_BASED(3); + + private final int value; + + private TSConnectionType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + @Override + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + @org.apache.thrift.annotation.Nullable + public static TSConnectionType findByValue(int value) { + switch (value) { + case 0: + return THRIFT_BASED; + case 1: + return MQTT_BASED; + case 2: + return INTERNAL; + case 3: + return REST_BASED; + default: + return null; + } + } +} diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateAlignedTimeseriesReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateAlignedTimeseriesReq.java new file mode 100644 index 0000000000000..2e7adff572358 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateAlignedTimeseriesReq.java @@ -0,0 +1,1645 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSCreateAlignedTimeseriesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCreateAlignedTimeseriesReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField DATA_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTypes", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField ENCODINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("encodings", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final org.apache.thrift.protocol.TField COMPRESSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("compressors", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField MEASUREMENT_ALIAS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementAlias", org.apache.thrift.protocol.TType.LIST, (short)7); + private static final org.apache.thrift.protocol.TField TAGS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("tagsList", org.apache.thrift.protocol.TType.LIST, (short)8); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("attributesList", org.apache.thrift.protocol.TType.LIST, (short)9); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCreateAlignedTimeseriesReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCreateAlignedTimeseriesReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required + public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required + public @org.apache.thrift.annotation.Nullable java.util.List dataTypes; // required + public @org.apache.thrift.annotation.Nullable java.util.List encodings; // required + public @org.apache.thrift.annotation.Nullable java.util.List compressors; // required + public @org.apache.thrift.annotation.Nullable java.util.List measurementAlias; // optional + public @org.apache.thrift.annotation.Nullable java.util.List> tagsList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List> attributesList; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATH((short)2, "prefixPath"), + MEASUREMENTS((short)3, "measurements"), + DATA_TYPES((short)4, "dataTypes"), + ENCODINGS((short)5, "encodings"), + COMPRESSORS((short)6, "compressors"), + MEASUREMENT_ALIAS((short)7, "measurementAlias"), + TAGS_LIST((short)8, "tagsList"), + ATTRIBUTES_LIST((short)9, "attributesList"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATH + return PREFIX_PATH; + case 3: // MEASUREMENTS + return MEASUREMENTS; + case 4: // DATA_TYPES + return DATA_TYPES; + case 5: // ENCODINGS + return ENCODINGS; + case 6: // COMPRESSORS + return COMPRESSORS; + case 7: // MEASUREMENT_ALIAS + return MEASUREMENT_ALIAS; + case 8: // TAGS_LIST + return TAGS_LIST; + case 9: // ATTRIBUTES_LIST + return ATTRIBUTES_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.MEASUREMENT_ALIAS,_Fields.TAGS_LIST,_Fields.ATTRIBUTES_LIST}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.DATA_TYPES, new org.apache.thrift.meta_data.FieldMetaData("dataTypes", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.ENCODINGS, new org.apache.thrift.meta_data.FieldMetaData("encodings", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.COMPRESSORS, new org.apache.thrift.meta_data.FieldMetaData("compressors", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.MEASUREMENT_ALIAS, new org.apache.thrift.meta_data.FieldMetaData("measurementAlias", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.TAGS_LIST, new org.apache.thrift.meta_data.FieldMetaData("tagsList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.ATTRIBUTES_LIST, new org.apache.thrift.meta_data.FieldMetaData("attributesList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCreateAlignedTimeseriesReq.class, metaDataMap); + } + + public TSCreateAlignedTimeseriesReq() { + } + + public TSCreateAlignedTimeseriesReq( + long sessionId, + java.lang.String prefixPath, + java.util.List measurements, + java.util.List dataTypes, + java.util.List encodings, + java.util.List compressors) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPath = prefixPath; + this.measurements = measurements; + this.dataTypes = dataTypes; + this.encodings = encodings; + this.compressors = compressors; + } + + /** + * Performs a deep copy on other. + */ + public TSCreateAlignedTimeseriesReq(TSCreateAlignedTimeseriesReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPath()) { + this.prefixPath = other.prefixPath; + } + if (other.isSetMeasurements()) { + java.util.List __this__measurements = new java.util.ArrayList(other.measurements); + this.measurements = __this__measurements; + } + if (other.isSetDataTypes()) { + java.util.List __this__dataTypes = new java.util.ArrayList(other.dataTypes); + this.dataTypes = __this__dataTypes; + } + if (other.isSetEncodings()) { + java.util.List __this__encodings = new java.util.ArrayList(other.encodings); + this.encodings = __this__encodings; + } + if (other.isSetCompressors()) { + java.util.List __this__compressors = new java.util.ArrayList(other.compressors); + this.compressors = __this__compressors; + } + if (other.isSetMeasurementAlias()) { + java.util.List __this__measurementAlias = new java.util.ArrayList(other.measurementAlias); + this.measurementAlias = __this__measurementAlias; + } + if (other.isSetTagsList()) { + java.util.List> __this__tagsList = new java.util.ArrayList>(other.tagsList.size()); + for (java.util.Map other_element : other.tagsList) { + java.util.Map __this__tagsList_copy = new java.util.HashMap(other_element); + __this__tagsList.add(__this__tagsList_copy); + } + this.tagsList = __this__tagsList; + } + if (other.isSetAttributesList()) { + java.util.List> __this__attributesList = new java.util.ArrayList>(other.attributesList.size()); + for (java.util.Map other_element : other.attributesList) { + java.util.Map __this__attributesList_copy = new java.util.HashMap(other_element); + __this__attributesList.add(__this__attributesList_copy); + } + this.attributesList = __this__attributesList; + } + } + + @Override + public TSCreateAlignedTimeseriesReq deepCopy() { + return new TSCreateAlignedTimeseriesReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPath = null; + this.measurements = null; + this.dataTypes = null; + this.encodings = null; + this.compressors = null; + this.measurementAlias = null; + this.tagsList = null; + this.attributesList = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSCreateAlignedTimeseriesReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPrefixPath() { + return this.prefixPath; + } + + public TSCreateAlignedTimeseriesReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { + this.prefixPath = prefixPath; + return this; + } + + public void unsetPrefixPath() { + this.prefixPath = null; + } + + /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPath() { + return this.prefixPath != null; + } + + public void setPrefixPathIsSet(boolean value) { + if (!value) { + this.prefixPath = null; + } + } + + public int getMeasurementsSize() { + return (this.measurements == null) ? 0 : this.measurements.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getMeasurementsIterator() { + return (this.measurements == null) ? null : this.measurements.iterator(); + } + + public void addToMeasurements(java.lang.String elem) { + if (this.measurements == null) { + this.measurements = new java.util.ArrayList(); + } + this.measurements.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getMeasurements() { + return this.measurements; + } + + public TSCreateAlignedTimeseriesReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { + this.measurements = measurements; + return this; + } + + public void unsetMeasurements() { + this.measurements = null; + } + + /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurements() { + return this.measurements != null; + } + + public void setMeasurementsIsSet(boolean value) { + if (!value) { + this.measurements = null; + } + } + + public int getDataTypesSize() { + return (this.dataTypes == null) ? 0 : this.dataTypes.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getDataTypesIterator() { + return (this.dataTypes == null) ? null : this.dataTypes.iterator(); + } + + public void addToDataTypes(int elem) { + if (this.dataTypes == null) { + this.dataTypes = new java.util.ArrayList(); + } + this.dataTypes.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getDataTypes() { + return this.dataTypes; + } + + public TSCreateAlignedTimeseriesReq setDataTypes(@org.apache.thrift.annotation.Nullable java.util.List dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + public void unsetDataTypes() { + this.dataTypes = null; + } + + /** Returns true if field dataTypes is set (has been assigned a value) and false otherwise */ + public boolean isSetDataTypes() { + return this.dataTypes != null; + } + + public void setDataTypesIsSet(boolean value) { + if (!value) { + this.dataTypes = null; + } + } + + public int getEncodingsSize() { + return (this.encodings == null) ? 0 : this.encodings.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getEncodingsIterator() { + return (this.encodings == null) ? null : this.encodings.iterator(); + } + + public void addToEncodings(int elem) { + if (this.encodings == null) { + this.encodings = new java.util.ArrayList(); + } + this.encodings.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getEncodings() { + return this.encodings; + } + + public TSCreateAlignedTimeseriesReq setEncodings(@org.apache.thrift.annotation.Nullable java.util.List encodings) { + this.encodings = encodings; + return this; + } + + public void unsetEncodings() { + this.encodings = null; + } + + /** Returns true if field encodings is set (has been assigned a value) and false otherwise */ + public boolean isSetEncodings() { + return this.encodings != null; + } + + public void setEncodingsIsSet(boolean value) { + if (!value) { + this.encodings = null; + } + } + + public int getCompressorsSize() { + return (this.compressors == null) ? 0 : this.compressors.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getCompressorsIterator() { + return (this.compressors == null) ? null : this.compressors.iterator(); + } + + public void addToCompressors(int elem) { + if (this.compressors == null) { + this.compressors = new java.util.ArrayList(); + } + this.compressors.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getCompressors() { + return this.compressors; + } + + public TSCreateAlignedTimeseriesReq setCompressors(@org.apache.thrift.annotation.Nullable java.util.List compressors) { + this.compressors = compressors; + return this; + } + + public void unsetCompressors() { + this.compressors = null; + } + + /** Returns true if field compressors is set (has been assigned a value) and false otherwise */ + public boolean isSetCompressors() { + return this.compressors != null; + } + + public void setCompressorsIsSet(boolean value) { + if (!value) { + this.compressors = null; + } + } + + public int getMeasurementAliasSize() { + return (this.measurementAlias == null) ? 0 : this.measurementAlias.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getMeasurementAliasIterator() { + return (this.measurementAlias == null) ? null : this.measurementAlias.iterator(); + } + + public void addToMeasurementAlias(java.lang.String elem) { + if (this.measurementAlias == null) { + this.measurementAlias = new java.util.ArrayList(); + } + this.measurementAlias.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getMeasurementAlias() { + return this.measurementAlias; + } + + public TSCreateAlignedTimeseriesReq setMeasurementAlias(@org.apache.thrift.annotation.Nullable java.util.List measurementAlias) { + this.measurementAlias = measurementAlias; + return this; + } + + public void unsetMeasurementAlias() { + this.measurementAlias = null; + } + + /** Returns true if field measurementAlias is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurementAlias() { + return this.measurementAlias != null; + } + + public void setMeasurementAliasIsSet(boolean value) { + if (!value) { + this.measurementAlias = null; + } + } + + public int getTagsListSize() { + return (this.tagsList == null) ? 0 : this.tagsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getTagsListIterator() { + return (this.tagsList == null) ? null : this.tagsList.iterator(); + } + + public void addToTagsList(java.util.Map elem) { + if (this.tagsList == null) { + this.tagsList = new java.util.ArrayList>(); + } + this.tagsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getTagsList() { + return this.tagsList; + } + + public TSCreateAlignedTimeseriesReq setTagsList(@org.apache.thrift.annotation.Nullable java.util.List> tagsList) { + this.tagsList = tagsList; + return this; + } + + public void unsetTagsList() { + this.tagsList = null; + } + + /** Returns true if field tagsList is set (has been assigned a value) and false otherwise */ + public boolean isSetTagsList() { + return this.tagsList != null; + } + + public void setTagsListIsSet(boolean value) { + if (!value) { + this.tagsList = null; + } + } + + public int getAttributesListSize() { + return (this.attributesList == null) ? 0 : this.attributesList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getAttributesListIterator() { + return (this.attributesList == null) ? null : this.attributesList.iterator(); + } + + public void addToAttributesList(java.util.Map elem) { + if (this.attributesList == null) { + this.attributesList = new java.util.ArrayList>(); + } + this.attributesList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getAttributesList() { + return this.attributesList; + } + + public TSCreateAlignedTimeseriesReq setAttributesList(@org.apache.thrift.annotation.Nullable java.util.List> attributesList) { + this.attributesList = attributesList; + return this; + } + + public void unsetAttributesList() { + this.attributesList = null; + } + + /** Returns true if field attributesList is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributesList() { + return this.attributesList != null; + } + + public void setAttributesListIsSet(boolean value) { + if (!value) { + this.attributesList = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATH: + if (value == null) { + unsetPrefixPath(); + } else { + setPrefixPath((java.lang.String)value); + } + break; + + case MEASUREMENTS: + if (value == null) { + unsetMeasurements(); + } else { + setMeasurements((java.util.List)value); + } + break; + + case DATA_TYPES: + if (value == null) { + unsetDataTypes(); + } else { + setDataTypes((java.util.List)value); + } + break; + + case ENCODINGS: + if (value == null) { + unsetEncodings(); + } else { + setEncodings((java.util.List)value); + } + break; + + case COMPRESSORS: + if (value == null) { + unsetCompressors(); + } else { + setCompressors((java.util.List)value); + } + break; + + case MEASUREMENT_ALIAS: + if (value == null) { + unsetMeasurementAlias(); + } else { + setMeasurementAlias((java.util.List)value); + } + break; + + case TAGS_LIST: + if (value == null) { + unsetTagsList(); + } else { + setTagsList((java.util.List>)value); + } + break; + + case ATTRIBUTES_LIST: + if (value == null) { + unsetAttributesList(); + } else { + setAttributesList((java.util.List>)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATH: + return getPrefixPath(); + + case MEASUREMENTS: + return getMeasurements(); + + case DATA_TYPES: + return getDataTypes(); + + case ENCODINGS: + return getEncodings(); + + case COMPRESSORS: + return getCompressors(); + + case MEASUREMENT_ALIAS: + return getMeasurementAlias(); + + case TAGS_LIST: + return getTagsList(); + + case ATTRIBUTES_LIST: + return getAttributesList(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATH: + return isSetPrefixPath(); + case MEASUREMENTS: + return isSetMeasurements(); + case DATA_TYPES: + return isSetDataTypes(); + case ENCODINGS: + return isSetEncodings(); + case COMPRESSORS: + return isSetCompressors(); + case MEASUREMENT_ALIAS: + return isSetMeasurementAlias(); + case TAGS_LIST: + return isSetTagsList(); + case ATTRIBUTES_LIST: + return isSetAttributesList(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSCreateAlignedTimeseriesReq) + return this.equals((TSCreateAlignedTimeseriesReq)that); + return false; + } + + public boolean equals(TSCreateAlignedTimeseriesReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPath = true && this.isSetPrefixPath(); + boolean that_present_prefixPath = true && that.isSetPrefixPath(); + if (this_present_prefixPath || that_present_prefixPath) { + if (!(this_present_prefixPath && that_present_prefixPath)) + return false; + if (!this.prefixPath.equals(that.prefixPath)) + return false; + } + + boolean this_present_measurements = true && this.isSetMeasurements(); + boolean that_present_measurements = true && that.isSetMeasurements(); + if (this_present_measurements || that_present_measurements) { + if (!(this_present_measurements && that_present_measurements)) + return false; + if (!this.measurements.equals(that.measurements)) + return false; + } + + boolean this_present_dataTypes = true && this.isSetDataTypes(); + boolean that_present_dataTypes = true && that.isSetDataTypes(); + if (this_present_dataTypes || that_present_dataTypes) { + if (!(this_present_dataTypes && that_present_dataTypes)) + return false; + if (!this.dataTypes.equals(that.dataTypes)) + return false; + } + + boolean this_present_encodings = true && this.isSetEncodings(); + boolean that_present_encodings = true && that.isSetEncodings(); + if (this_present_encodings || that_present_encodings) { + if (!(this_present_encodings && that_present_encodings)) + return false; + if (!this.encodings.equals(that.encodings)) + return false; + } + + boolean this_present_compressors = true && this.isSetCompressors(); + boolean that_present_compressors = true && that.isSetCompressors(); + if (this_present_compressors || that_present_compressors) { + if (!(this_present_compressors && that_present_compressors)) + return false; + if (!this.compressors.equals(that.compressors)) + return false; + } + + boolean this_present_measurementAlias = true && this.isSetMeasurementAlias(); + boolean that_present_measurementAlias = true && that.isSetMeasurementAlias(); + if (this_present_measurementAlias || that_present_measurementAlias) { + if (!(this_present_measurementAlias && that_present_measurementAlias)) + return false; + if (!this.measurementAlias.equals(that.measurementAlias)) + return false; + } + + boolean this_present_tagsList = true && this.isSetTagsList(); + boolean that_present_tagsList = true && that.isSetTagsList(); + if (this_present_tagsList || that_present_tagsList) { + if (!(this_present_tagsList && that_present_tagsList)) + return false; + if (!this.tagsList.equals(that.tagsList)) + return false; + } + + boolean this_present_attributesList = true && this.isSetAttributesList(); + boolean that_present_attributesList = true && that.isSetAttributesList(); + if (this_present_attributesList || that_present_attributesList) { + if (!(this_present_attributesList && that_present_attributesList)) + return false; + if (!this.attributesList.equals(that.attributesList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); + if (isSetPrefixPath()) + hashCode = hashCode * 8191 + prefixPath.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); + if (isSetMeasurements()) + hashCode = hashCode * 8191 + measurements.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDataTypes()) ? 131071 : 524287); + if (isSetDataTypes()) + hashCode = hashCode * 8191 + dataTypes.hashCode(); + + hashCode = hashCode * 8191 + ((isSetEncodings()) ? 131071 : 524287); + if (isSetEncodings()) + hashCode = hashCode * 8191 + encodings.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCompressors()) ? 131071 : 524287); + if (isSetCompressors()) + hashCode = hashCode * 8191 + compressors.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurementAlias()) ? 131071 : 524287); + if (isSetMeasurementAlias()) + hashCode = hashCode * 8191 + measurementAlias.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTagsList()) ? 131071 : 524287); + if (isSetTagsList()) + hashCode = hashCode * 8191 + tagsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAttributesList()) ? 131071 : 524287); + if (isSetAttributesList()) + hashCode = hashCode * 8191 + attributesList.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSCreateAlignedTimeseriesReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurements()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDataTypes(), other.isSetDataTypes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataTypes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTypes, other.dataTypes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEncodings(), other.isSetEncodings()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEncodings()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encodings, other.encodings); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetCompressors(), other.isSetCompressors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressors, other.compressors); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurementAlias(), other.isSetMeasurementAlias()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurementAlias()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementAlias, other.measurementAlias); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTagsList(), other.isSetTagsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTagsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagsList, other.tagsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetAttributesList(), other.isSetAttributesList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributesList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributesList, other.attributesList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCreateAlignedTimeseriesReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPath:"); + if (this.prefixPath == null) { + sb.append("null"); + } else { + sb.append(this.prefixPath); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurements:"); + if (this.measurements == null) { + sb.append("null"); + } else { + sb.append(this.measurements); + } + first = false; + if (!first) sb.append(", "); + sb.append("dataTypes:"); + if (this.dataTypes == null) { + sb.append("null"); + } else { + sb.append(this.dataTypes); + } + first = false; + if (!first) sb.append(", "); + sb.append("encodings:"); + if (this.encodings == null) { + sb.append("null"); + } else { + sb.append(this.encodings); + } + first = false; + if (!first) sb.append(", "); + sb.append("compressors:"); + if (this.compressors == null) { + sb.append("null"); + } else { + sb.append(this.compressors); + } + first = false; + if (isSetMeasurementAlias()) { + if (!first) sb.append(", "); + sb.append("measurementAlias:"); + if (this.measurementAlias == null) { + sb.append("null"); + } else { + sb.append(this.measurementAlias); + } + first = false; + } + if (isSetTagsList()) { + if (!first) sb.append(", "); + sb.append("tagsList:"); + if (this.tagsList == null) { + sb.append("null"); + } else { + sb.append(this.tagsList); + } + first = false; + } + if (isSetAttributesList()) { + if (!first) sb.append(", "); + sb.append("attributesList:"); + if (this.attributesList == null) { + sb.append("null"); + } else { + sb.append(this.attributesList); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPath == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); + } + if (measurements == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); + } + if (dataTypes == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataTypes' was not present! Struct: " + toString()); + } + if (encodings == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'encodings' was not present! Struct: " + toString()); + } + if (compressors == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'compressors' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSCreateAlignedTimeseriesReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCreateAlignedTimeseriesReqStandardScheme getScheme() { + return new TSCreateAlignedTimeseriesReqStandardScheme(); + } + } + + private static class TSCreateAlignedTimeseriesReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSCreateAlignedTimeseriesReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MEASUREMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list476 = iprot.readListBegin(); + struct.measurements = new java.util.ArrayList(_list476.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem477; + for (int _i478 = 0; _i478 < _list476.size; ++_i478) + { + _elem477 = iprot.readString(); + struct.measurements.add(_elem477); + } + iprot.readListEnd(); + } + struct.setMeasurementsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DATA_TYPES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list479 = iprot.readListBegin(); + struct.dataTypes = new java.util.ArrayList(_list479.size); + int _elem480; + for (int _i481 = 0; _i481 < _list479.size; ++_i481) + { + _elem480 = iprot.readI32(); + struct.dataTypes.add(_elem480); + } + iprot.readListEnd(); + } + struct.setDataTypesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ENCODINGS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list482 = iprot.readListBegin(); + struct.encodings = new java.util.ArrayList(_list482.size); + int _elem483; + for (int _i484 = 0; _i484 < _list482.size; ++_i484) + { + _elem483 = iprot.readI32(); + struct.encodings.add(_elem483); + } + iprot.readListEnd(); + } + struct.setEncodingsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // COMPRESSORS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list485 = iprot.readListBegin(); + struct.compressors = new java.util.ArrayList(_list485.size); + int _elem486; + for (int _i487 = 0; _i487 < _list485.size; ++_i487) + { + _elem486 = iprot.readI32(); + struct.compressors.add(_elem486); + } + iprot.readListEnd(); + } + struct.setCompressorsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // MEASUREMENT_ALIAS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list488 = iprot.readListBegin(); + struct.measurementAlias = new java.util.ArrayList(_list488.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem489; + for (int _i490 = 0; _i490 < _list488.size; ++_i490) + { + _elem489 = iprot.readString(); + struct.measurementAlias.add(_elem489); + } + iprot.readListEnd(); + } + struct.setMeasurementAliasIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // TAGS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list491 = iprot.readListBegin(); + struct.tagsList = new java.util.ArrayList>(_list491.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem492; + for (int _i493 = 0; _i493 < _list491.size; ++_i493) + { + { + org.apache.thrift.protocol.TMap _map494 = iprot.readMapBegin(); + _elem492 = new java.util.HashMap(2*_map494.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key495; + @org.apache.thrift.annotation.Nullable java.lang.String _val496; + for (int _i497 = 0; _i497 < _map494.size; ++_i497) + { + _key495 = iprot.readString(); + _val496 = iprot.readString(); + _elem492.put(_key495, _val496); + } + iprot.readMapEnd(); + } + struct.tagsList.add(_elem492); + } + iprot.readListEnd(); + } + struct.setTagsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // ATTRIBUTES_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list498 = iprot.readListBegin(); + struct.attributesList = new java.util.ArrayList>(_list498.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem499; + for (int _i500 = 0; _i500 < _list498.size; ++_i500) + { + { + org.apache.thrift.protocol.TMap _map501 = iprot.readMapBegin(); + _elem499 = new java.util.HashMap(2*_map501.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key502; + @org.apache.thrift.annotation.Nullable java.lang.String _val503; + for (int _i504 = 0; _i504 < _map501.size; ++_i504) + { + _key502 = iprot.readString(); + _val503 = iprot.readString(); + _elem499.put(_key502, _val503); + } + iprot.readMapEnd(); + } + struct.attributesList.add(_elem499); + } + iprot.readListEnd(); + } + struct.setAttributesListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSCreateAlignedTimeseriesReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPath != null) { + oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); + oprot.writeString(struct.prefixPath); + oprot.writeFieldEnd(); + } + if (struct.measurements != null) { + oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); + for (java.lang.String _iter505 : struct.measurements) + { + oprot.writeString(_iter505); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.dataTypes != null) { + oprot.writeFieldBegin(DATA_TYPES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dataTypes.size())); + for (int _iter506 : struct.dataTypes) + { + oprot.writeI32(_iter506); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.encodings != null) { + oprot.writeFieldBegin(ENCODINGS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.encodings.size())); + for (int _iter507 : struct.encodings) + { + oprot.writeI32(_iter507); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.compressors != null) { + oprot.writeFieldBegin(COMPRESSORS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.compressors.size())); + for (int _iter508 : struct.compressors) + { + oprot.writeI32(_iter508); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.measurementAlias != null) { + if (struct.isSetMeasurementAlias()) { + oprot.writeFieldBegin(MEASUREMENT_ALIAS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurementAlias.size())); + for (java.lang.String _iter509 : struct.measurementAlias) + { + oprot.writeString(_iter509); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.tagsList != null) { + if (struct.isSetTagsList()) { + oprot.writeFieldBegin(TAGS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.tagsList.size())); + for (java.util.Map _iter510 : struct.tagsList) + { + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter510.size())); + for (java.util.Map.Entry _iter511 : _iter510.entrySet()) + { + oprot.writeString(_iter511.getKey()); + oprot.writeString(_iter511.getValue()); + } + oprot.writeMapEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.attributesList != null) { + if (struct.isSetAttributesList()) { + oprot.writeFieldBegin(ATTRIBUTES_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.attributesList.size())); + for (java.util.Map _iter512 : struct.attributesList) + { + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter512.size())); + for (java.util.Map.Entry _iter513 : _iter512.entrySet()) + { + oprot.writeString(_iter513.getKey()); + oprot.writeString(_iter513.getValue()); + } + oprot.writeMapEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSCreateAlignedTimeseriesReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCreateAlignedTimeseriesReqTupleScheme getScheme() { + return new TSCreateAlignedTimeseriesReqTupleScheme(); + } + } + + private static class TSCreateAlignedTimeseriesReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSCreateAlignedTimeseriesReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.prefixPath); + { + oprot.writeI32(struct.measurements.size()); + for (java.lang.String _iter514 : struct.measurements) + { + oprot.writeString(_iter514); + } + } + { + oprot.writeI32(struct.dataTypes.size()); + for (int _iter515 : struct.dataTypes) + { + oprot.writeI32(_iter515); + } + } + { + oprot.writeI32(struct.encodings.size()); + for (int _iter516 : struct.encodings) + { + oprot.writeI32(_iter516); + } + } + { + oprot.writeI32(struct.compressors.size()); + for (int _iter517 : struct.compressors) + { + oprot.writeI32(_iter517); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetMeasurementAlias()) { + optionals.set(0); + } + if (struct.isSetTagsList()) { + optionals.set(1); + } + if (struct.isSetAttributesList()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetMeasurementAlias()) { + { + oprot.writeI32(struct.measurementAlias.size()); + for (java.lang.String _iter518 : struct.measurementAlias) + { + oprot.writeString(_iter518); + } + } + } + if (struct.isSetTagsList()) { + { + oprot.writeI32(struct.tagsList.size()); + for (java.util.Map _iter519 : struct.tagsList) + { + { + oprot.writeI32(_iter519.size()); + for (java.util.Map.Entry _iter520 : _iter519.entrySet()) + { + oprot.writeString(_iter520.getKey()); + oprot.writeString(_iter520.getValue()); + } + } + } + } + } + if (struct.isSetAttributesList()) { + { + oprot.writeI32(struct.attributesList.size()); + for (java.util.Map _iter521 : struct.attributesList) + { + { + oprot.writeI32(_iter521.size()); + for (java.util.Map.Entry _iter522 : _iter521.entrySet()) + { + oprot.writeString(_iter522.getKey()); + oprot.writeString(_iter522.getValue()); + } + } + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSCreateAlignedTimeseriesReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + { + org.apache.thrift.protocol.TList _list523 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.measurements = new java.util.ArrayList(_list523.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem524; + for (int _i525 = 0; _i525 < _list523.size; ++_i525) + { + _elem524 = iprot.readString(); + struct.measurements.add(_elem524); + } + } + struct.setMeasurementsIsSet(true); + { + org.apache.thrift.protocol.TList _list526 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.dataTypes = new java.util.ArrayList(_list526.size); + int _elem527; + for (int _i528 = 0; _i528 < _list526.size; ++_i528) + { + _elem527 = iprot.readI32(); + struct.dataTypes.add(_elem527); + } + } + struct.setDataTypesIsSet(true); + { + org.apache.thrift.protocol.TList _list529 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.encodings = new java.util.ArrayList(_list529.size); + int _elem530; + for (int _i531 = 0; _i531 < _list529.size; ++_i531) + { + _elem530 = iprot.readI32(); + struct.encodings.add(_elem530); + } + } + struct.setEncodingsIsSet(true); + { + org.apache.thrift.protocol.TList _list532 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.compressors = new java.util.ArrayList(_list532.size); + int _elem533; + for (int _i534 = 0; _i534 < _list532.size; ++_i534) + { + _elem533 = iprot.readI32(); + struct.compressors.add(_elem533); + } + } + struct.setCompressorsIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list535 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.measurementAlias = new java.util.ArrayList(_list535.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem536; + for (int _i537 = 0; _i537 < _list535.size; ++_i537) + { + _elem536 = iprot.readString(); + struct.measurementAlias.add(_elem536); + } + } + struct.setMeasurementAliasIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list538 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); + struct.tagsList = new java.util.ArrayList>(_list538.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem539; + for (int _i540 = 0; _i540 < _list538.size; ++_i540) + { + { + org.apache.thrift.protocol.TMap _map541 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + _elem539 = new java.util.HashMap(2*_map541.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key542; + @org.apache.thrift.annotation.Nullable java.lang.String _val543; + for (int _i544 = 0; _i544 < _map541.size; ++_i544) + { + _key542 = iprot.readString(); + _val543 = iprot.readString(); + _elem539.put(_key542, _val543); + } + } + struct.tagsList.add(_elem539); + } + } + struct.setTagsListIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list545 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); + struct.attributesList = new java.util.ArrayList>(_list545.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem546; + for (int _i547 = 0; _i547 < _list545.size; ++_i547) + { + { + org.apache.thrift.protocol.TMap _map548 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + _elem546 = new java.util.HashMap(2*_map548.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key549; + @org.apache.thrift.annotation.Nullable java.lang.String _val550; + for (int _i551 = 0; _i551 < _map548.size; ++_i551) + { + _key549 = iprot.readString(); + _val550 = iprot.readString(); + _elem546.put(_key549, _val550); + } + } + struct.attributesList.add(_elem546); + } + } + struct.setAttributesListIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateMultiTimeseriesReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateMultiTimeseriesReq.java new file mode 100644 index 0000000000000..c902d803b87c4 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateMultiTimeseriesReq.java @@ -0,0 +1,1745 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSCreateMultiTimeseriesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCreateMultiTimeseriesReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField DATA_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTypes", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField ENCODINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("encodings", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField COMPRESSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("compressors", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final org.apache.thrift.protocol.TField PROPS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("propsList", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField TAGS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("tagsList", org.apache.thrift.protocol.TType.LIST, (short)7); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("attributesList", org.apache.thrift.protocol.TType.LIST, (short)8); + private static final org.apache.thrift.protocol.TField MEASUREMENT_ALIAS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementAliasList", org.apache.thrift.protocol.TType.LIST, (short)9); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCreateMultiTimeseriesReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCreateMultiTimeseriesReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List paths; // required + public @org.apache.thrift.annotation.Nullable java.util.List dataTypes; // required + public @org.apache.thrift.annotation.Nullable java.util.List encodings; // required + public @org.apache.thrift.annotation.Nullable java.util.List compressors; // required + public @org.apache.thrift.annotation.Nullable java.util.List> propsList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List> tagsList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List> attributesList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List measurementAliasList; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PATHS((short)2, "paths"), + DATA_TYPES((short)3, "dataTypes"), + ENCODINGS((short)4, "encodings"), + COMPRESSORS((short)5, "compressors"), + PROPS_LIST((short)6, "propsList"), + TAGS_LIST((short)7, "tagsList"), + ATTRIBUTES_LIST((short)8, "attributesList"), + MEASUREMENT_ALIAS_LIST((short)9, "measurementAliasList"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PATHS + return PATHS; + case 3: // DATA_TYPES + return DATA_TYPES; + case 4: // ENCODINGS + return ENCODINGS; + case 5: // COMPRESSORS + return COMPRESSORS; + case 6: // PROPS_LIST + return PROPS_LIST; + case 7: // TAGS_LIST + return TAGS_LIST; + case 8: // ATTRIBUTES_LIST + return ATTRIBUTES_LIST; + case 9: // MEASUREMENT_ALIAS_LIST + return MEASUREMENT_ALIAS_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.PROPS_LIST,_Fields.TAGS_LIST,_Fields.ATTRIBUTES_LIST,_Fields.MEASUREMENT_ALIAS_LIST}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.DATA_TYPES, new org.apache.thrift.meta_data.FieldMetaData("dataTypes", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.ENCODINGS, new org.apache.thrift.meta_data.FieldMetaData("encodings", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.COMPRESSORS, new org.apache.thrift.meta_data.FieldMetaData("compressors", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.PROPS_LIST, new org.apache.thrift.meta_data.FieldMetaData("propsList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.TAGS_LIST, new org.apache.thrift.meta_data.FieldMetaData("tagsList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.ATTRIBUTES_LIST, new org.apache.thrift.meta_data.FieldMetaData("attributesList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.MEASUREMENT_ALIAS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementAliasList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCreateMultiTimeseriesReq.class, metaDataMap); + } + + public TSCreateMultiTimeseriesReq() { + } + + public TSCreateMultiTimeseriesReq( + long sessionId, + java.util.List paths, + java.util.List dataTypes, + java.util.List encodings, + java.util.List compressors) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.paths = paths; + this.dataTypes = dataTypes; + this.encodings = encodings; + this.compressors = compressors; + } + + /** + * Performs a deep copy on other. + */ + public TSCreateMultiTimeseriesReq(TSCreateMultiTimeseriesReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPaths()) { + java.util.List __this__paths = new java.util.ArrayList(other.paths); + this.paths = __this__paths; + } + if (other.isSetDataTypes()) { + java.util.List __this__dataTypes = new java.util.ArrayList(other.dataTypes); + this.dataTypes = __this__dataTypes; + } + if (other.isSetEncodings()) { + java.util.List __this__encodings = new java.util.ArrayList(other.encodings); + this.encodings = __this__encodings; + } + if (other.isSetCompressors()) { + java.util.List __this__compressors = new java.util.ArrayList(other.compressors); + this.compressors = __this__compressors; + } + if (other.isSetPropsList()) { + java.util.List> __this__propsList = new java.util.ArrayList>(other.propsList.size()); + for (java.util.Map other_element : other.propsList) { + java.util.Map __this__propsList_copy = new java.util.HashMap(other_element); + __this__propsList.add(__this__propsList_copy); + } + this.propsList = __this__propsList; + } + if (other.isSetTagsList()) { + java.util.List> __this__tagsList = new java.util.ArrayList>(other.tagsList.size()); + for (java.util.Map other_element : other.tagsList) { + java.util.Map __this__tagsList_copy = new java.util.HashMap(other_element); + __this__tagsList.add(__this__tagsList_copy); + } + this.tagsList = __this__tagsList; + } + if (other.isSetAttributesList()) { + java.util.List> __this__attributesList = new java.util.ArrayList>(other.attributesList.size()); + for (java.util.Map other_element : other.attributesList) { + java.util.Map __this__attributesList_copy = new java.util.HashMap(other_element); + __this__attributesList.add(__this__attributesList_copy); + } + this.attributesList = __this__attributesList; + } + if (other.isSetMeasurementAliasList()) { + java.util.List __this__measurementAliasList = new java.util.ArrayList(other.measurementAliasList); + this.measurementAliasList = __this__measurementAliasList; + } + } + + @Override + public TSCreateMultiTimeseriesReq deepCopy() { + return new TSCreateMultiTimeseriesReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.paths = null; + this.dataTypes = null; + this.encodings = null; + this.compressors = null; + this.propsList = null; + this.tagsList = null; + this.attributesList = null; + this.measurementAliasList = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSCreateMultiTimeseriesReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getPathsSize() { + return (this.paths == null) ? 0 : this.paths.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPathsIterator() { + return (this.paths == null) ? null : this.paths.iterator(); + } + + public void addToPaths(java.lang.String elem) { + if (this.paths == null) { + this.paths = new java.util.ArrayList(); + } + this.paths.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getPaths() { + return this.paths; + } + + public TSCreateMultiTimeseriesReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { + this.paths = paths; + return this; + } + + public void unsetPaths() { + this.paths = null; + } + + /** Returns true if field paths is set (has been assigned a value) and false otherwise */ + public boolean isSetPaths() { + return this.paths != null; + } + + public void setPathsIsSet(boolean value) { + if (!value) { + this.paths = null; + } + } + + public int getDataTypesSize() { + return (this.dataTypes == null) ? 0 : this.dataTypes.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getDataTypesIterator() { + return (this.dataTypes == null) ? null : this.dataTypes.iterator(); + } + + public void addToDataTypes(int elem) { + if (this.dataTypes == null) { + this.dataTypes = new java.util.ArrayList(); + } + this.dataTypes.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getDataTypes() { + return this.dataTypes; + } + + public TSCreateMultiTimeseriesReq setDataTypes(@org.apache.thrift.annotation.Nullable java.util.List dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + public void unsetDataTypes() { + this.dataTypes = null; + } + + /** Returns true if field dataTypes is set (has been assigned a value) and false otherwise */ + public boolean isSetDataTypes() { + return this.dataTypes != null; + } + + public void setDataTypesIsSet(boolean value) { + if (!value) { + this.dataTypes = null; + } + } + + public int getEncodingsSize() { + return (this.encodings == null) ? 0 : this.encodings.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getEncodingsIterator() { + return (this.encodings == null) ? null : this.encodings.iterator(); + } + + public void addToEncodings(int elem) { + if (this.encodings == null) { + this.encodings = new java.util.ArrayList(); + } + this.encodings.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getEncodings() { + return this.encodings; + } + + public TSCreateMultiTimeseriesReq setEncodings(@org.apache.thrift.annotation.Nullable java.util.List encodings) { + this.encodings = encodings; + return this; + } + + public void unsetEncodings() { + this.encodings = null; + } + + /** Returns true if field encodings is set (has been assigned a value) and false otherwise */ + public boolean isSetEncodings() { + return this.encodings != null; + } + + public void setEncodingsIsSet(boolean value) { + if (!value) { + this.encodings = null; + } + } + + public int getCompressorsSize() { + return (this.compressors == null) ? 0 : this.compressors.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getCompressorsIterator() { + return (this.compressors == null) ? null : this.compressors.iterator(); + } + + public void addToCompressors(int elem) { + if (this.compressors == null) { + this.compressors = new java.util.ArrayList(); + } + this.compressors.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getCompressors() { + return this.compressors; + } + + public TSCreateMultiTimeseriesReq setCompressors(@org.apache.thrift.annotation.Nullable java.util.List compressors) { + this.compressors = compressors; + return this; + } + + public void unsetCompressors() { + this.compressors = null; + } + + /** Returns true if field compressors is set (has been assigned a value) and false otherwise */ + public boolean isSetCompressors() { + return this.compressors != null; + } + + public void setCompressorsIsSet(boolean value) { + if (!value) { + this.compressors = null; + } + } + + public int getPropsListSize() { + return (this.propsList == null) ? 0 : this.propsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getPropsListIterator() { + return (this.propsList == null) ? null : this.propsList.iterator(); + } + + public void addToPropsList(java.util.Map elem) { + if (this.propsList == null) { + this.propsList = new java.util.ArrayList>(); + } + this.propsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getPropsList() { + return this.propsList; + } + + public TSCreateMultiTimeseriesReq setPropsList(@org.apache.thrift.annotation.Nullable java.util.List> propsList) { + this.propsList = propsList; + return this; + } + + public void unsetPropsList() { + this.propsList = null; + } + + /** Returns true if field propsList is set (has been assigned a value) and false otherwise */ + public boolean isSetPropsList() { + return this.propsList != null; + } + + public void setPropsListIsSet(boolean value) { + if (!value) { + this.propsList = null; + } + } + + public int getTagsListSize() { + return (this.tagsList == null) ? 0 : this.tagsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getTagsListIterator() { + return (this.tagsList == null) ? null : this.tagsList.iterator(); + } + + public void addToTagsList(java.util.Map elem) { + if (this.tagsList == null) { + this.tagsList = new java.util.ArrayList>(); + } + this.tagsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getTagsList() { + return this.tagsList; + } + + public TSCreateMultiTimeseriesReq setTagsList(@org.apache.thrift.annotation.Nullable java.util.List> tagsList) { + this.tagsList = tagsList; + return this; + } + + public void unsetTagsList() { + this.tagsList = null; + } + + /** Returns true if field tagsList is set (has been assigned a value) and false otherwise */ + public boolean isSetTagsList() { + return this.tagsList != null; + } + + public void setTagsListIsSet(boolean value) { + if (!value) { + this.tagsList = null; + } + } + + public int getAttributesListSize() { + return (this.attributesList == null) ? 0 : this.attributesList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getAttributesListIterator() { + return (this.attributesList == null) ? null : this.attributesList.iterator(); + } + + public void addToAttributesList(java.util.Map elem) { + if (this.attributesList == null) { + this.attributesList = new java.util.ArrayList>(); + } + this.attributesList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getAttributesList() { + return this.attributesList; + } + + public TSCreateMultiTimeseriesReq setAttributesList(@org.apache.thrift.annotation.Nullable java.util.List> attributesList) { + this.attributesList = attributesList; + return this; + } + + public void unsetAttributesList() { + this.attributesList = null; + } + + /** Returns true if field attributesList is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributesList() { + return this.attributesList != null; + } + + public void setAttributesListIsSet(boolean value) { + if (!value) { + this.attributesList = null; + } + } + + public int getMeasurementAliasListSize() { + return (this.measurementAliasList == null) ? 0 : this.measurementAliasList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getMeasurementAliasListIterator() { + return (this.measurementAliasList == null) ? null : this.measurementAliasList.iterator(); + } + + public void addToMeasurementAliasList(java.lang.String elem) { + if (this.measurementAliasList == null) { + this.measurementAliasList = new java.util.ArrayList(); + } + this.measurementAliasList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getMeasurementAliasList() { + return this.measurementAliasList; + } + + public TSCreateMultiTimeseriesReq setMeasurementAliasList(@org.apache.thrift.annotation.Nullable java.util.List measurementAliasList) { + this.measurementAliasList = measurementAliasList; + return this; + } + + public void unsetMeasurementAliasList() { + this.measurementAliasList = null; + } + + /** Returns true if field measurementAliasList is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurementAliasList() { + return this.measurementAliasList != null; + } + + public void setMeasurementAliasListIsSet(boolean value) { + if (!value) { + this.measurementAliasList = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PATHS: + if (value == null) { + unsetPaths(); + } else { + setPaths((java.util.List)value); + } + break; + + case DATA_TYPES: + if (value == null) { + unsetDataTypes(); + } else { + setDataTypes((java.util.List)value); + } + break; + + case ENCODINGS: + if (value == null) { + unsetEncodings(); + } else { + setEncodings((java.util.List)value); + } + break; + + case COMPRESSORS: + if (value == null) { + unsetCompressors(); + } else { + setCompressors((java.util.List)value); + } + break; + + case PROPS_LIST: + if (value == null) { + unsetPropsList(); + } else { + setPropsList((java.util.List>)value); + } + break; + + case TAGS_LIST: + if (value == null) { + unsetTagsList(); + } else { + setTagsList((java.util.List>)value); + } + break; + + case ATTRIBUTES_LIST: + if (value == null) { + unsetAttributesList(); + } else { + setAttributesList((java.util.List>)value); + } + break; + + case MEASUREMENT_ALIAS_LIST: + if (value == null) { + unsetMeasurementAliasList(); + } else { + setMeasurementAliasList((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PATHS: + return getPaths(); + + case DATA_TYPES: + return getDataTypes(); + + case ENCODINGS: + return getEncodings(); + + case COMPRESSORS: + return getCompressors(); + + case PROPS_LIST: + return getPropsList(); + + case TAGS_LIST: + return getTagsList(); + + case ATTRIBUTES_LIST: + return getAttributesList(); + + case MEASUREMENT_ALIAS_LIST: + return getMeasurementAliasList(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PATHS: + return isSetPaths(); + case DATA_TYPES: + return isSetDataTypes(); + case ENCODINGS: + return isSetEncodings(); + case COMPRESSORS: + return isSetCompressors(); + case PROPS_LIST: + return isSetPropsList(); + case TAGS_LIST: + return isSetTagsList(); + case ATTRIBUTES_LIST: + return isSetAttributesList(); + case MEASUREMENT_ALIAS_LIST: + return isSetMeasurementAliasList(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSCreateMultiTimeseriesReq) + return this.equals((TSCreateMultiTimeseriesReq)that); + return false; + } + + public boolean equals(TSCreateMultiTimeseriesReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_paths = true && this.isSetPaths(); + boolean that_present_paths = true && that.isSetPaths(); + if (this_present_paths || that_present_paths) { + if (!(this_present_paths && that_present_paths)) + return false; + if (!this.paths.equals(that.paths)) + return false; + } + + boolean this_present_dataTypes = true && this.isSetDataTypes(); + boolean that_present_dataTypes = true && that.isSetDataTypes(); + if (this_present_dataTypes || that_present_dataTypes) { + if (!(this_present_dataTypes && that_present_dataTypes)) + return false; + if (!this.dataTypes.equals(that.dataTypes)) + return false; + } + + boolean this_present_encodings = true && this.isSetEncodings(); + boolean that_present_encodings = true && that.isSetEncodings(); + if (this_present_encodings || that_present_encodings) { + if (!(this_present_encodings && that_present_encodings)) + return false; + if (!this.encodings.equals(that.encodings)) + return false; + } + + boolean this_present_compressors = true && this.isSetCompressors(); + boolean that_present_compressors = true && that.isSetCompressors(); + if (this_present_compressors || that_present_compressors) { + if (!(this_present_compressors && that_present_compressors)) + return false; + if (!this.compressors.equals(that.compressors)) + return false; + } + + boolean this_present_propsList = true && this.isSetPropsList(); + boolean that_present_propsList = true && that.isSetPropsList(); + if (this_present_propsList || that_present_propsList) { + if (!(this_present_propsList && that_present_propsList)) + return false; + if (!this.propsList.equals(that.propsList)) + return false; + } + + boolean this_present_tagsList = true && this.isSetTagsList(); + boolean that_present_tagsList = true && that.isSetTagsList(); + if (this_present_tagsList || that_present_tagsList) { + if (!(this_present_tagsList && that_present_tagsList)) + return false; + if (!this.tagsList.equals(that.tagsList)) + return false; + } + + boolean this_present_attributesList = true && this.isSetAttributesList(); + boolean that_present_attributesList = true && that.isSetAttributesList(); + if (this_present_attributesList || that_present_attributesList) { + if (!(this_present_attributesList && that_present_attributesList)) + return false; + if (!this.attributesList.equals(that.attributesList)) + return false; + } + + boolean this_present_measurementAliasList = true && this.isSetMeasurementAliasList(); + boolean that_present_measurementAliasList = true && that.isSetMeasurementAliasList(); + if (this_present_measurementAliasList || that_present_measurementAliasList) { + if (!(this_present_measurementAliasList && that_present_measurementAliasList)) + return false; + if (!this.measurementAliasList.equals(that.measurementAliasList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); + if (isSetPaths()) + hashCode = hashCode * 8191 + paths.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDataTypes()) ? 131071 : 524287); + if (isSetDataTypes()) + hashCode = hashCode * 8191 + dataTypes.hashCode(); + + hashCode = hashCode * 8191 + ((isSetEncodings()) ? 131071 : 524287); + if (isSetEncodings()) + hashCode = hashCode * 8191 + encodings.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCompressors()) ? 131071 : 524287); + if (isSetCompressors()) + hashCode = hashCode * 8191 + compressors.hashCode(); + + hashCode = hashCode * 8191 + ((isSetPropsList()) ? 131071 : 524287); + if (isSetPropsList()) + hashCode = hashCode * 8191 + propsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTagsList()) ? 131071 : 524287); + if (isSetTagsList()) + hashCode = hashCode * 8191 + tagsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAttributesList()) ? 131071 : 524287); + if (isSetAttributesList()) + hashCode = hashCode * 8191 + attributesList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurementAliasList()) ? 131071 : 524287); + if (isSetMeasurementAliasList()) + hashCode = hashCode * 8191 + measurementAliasList.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSCreateMultiTimeseriesReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPaths()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDataTypes(), other.isSetDataTypes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataTypes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTypes, other.dataTypes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEncodings(), other.isSetEncodings()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEncodings()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encodings, other.encodings); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetCompressors(), other.isSetCompressors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressors, other.compressors); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPropsList(), other.isSetPropsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPropsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propsList, other.propsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTagsList(), other.isSetTagsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTagsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagsList, other.tagsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetAttributesList(), other.isSetAttributesList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributesList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributesList, other.attributesList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurementAliasList(), other.isSetMeasurementAliasList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurementAliasList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementAliasList, other.measurementAliasList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCreateMultiTimeseriesReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("paths:"); + if (this.paths == null) { + sb.append("null"); + } else { + sb.append(this.paths); + } + first = false; + if (!first) sb.append(", "); + sb.append("dataTypes:"); + if (this.dataTypes == null) { + sb.append("null"); + } else { + sb.append(this.dataTypes); + } + first = false; + if (!first) sb.append(", "); + sb.append("encodings:"); + if (this.encodings == null) { + sb.append("null"); + } else { + sb.append(this.encodings); + } + first = false; + if (!first) sb.append(", "); + sb.append("compressors:"); + if (this.compressors == null) { + sb.append("null"); + } else { + sb.append(this.compressors); + } + first = false; + if (isSetPropsList()) { + if (!first) sb.append(", "); + sb.append("propsList:"); + if (this.propsList == null) { + sb.append("null"); + } else { + sb.append(this.propsList); + } + first = false; + } + if (isSetTagsList()) { + if (!first) sb.append(", "); + sb.append("tagsList:"); + if (this.tagsList == null) { + sb.append("null"); + } else { + sb.append(this.tagsList); + } + first = false; + } + if (isSetAttributesList()) { + if (!first) sb.append(", "); + sb.append("attributesList:"); + if (this.attributesList == null) { + sb.append("null"); + } else { + sb.append(this.attributesList); + } + first = false; + } + if (isSetMeasurementAliasList()) { + if (!first) sb.append(", "); + sb.append("measurementAliasList:"); + if (this.measurementAliasList == null) { + sb.append("null"); + } else { + sb.append(this.measurementAliasList); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (paths == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); + } + if (dataTypes == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataTypes' was not present! Struct: " + toString()); + } + if (encodings == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'encodings' was not present! Struct: " + toString()); + } + if (compressors == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'compressors' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSCreateMultiTimeseriesReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCreateMultiTimeseriesReqStandardScheme getScheme() { + return new TSCreateMultiTimeseriesReqStandardScheme(); + } + } + + private static class TSCreateMultiTimeseriesReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSCreateMultiTimeseriesReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PATHS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list592 = iprot.readListBegin(); + struct.paths = new java.util.ArrayList(_list592.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem593; + for (int _i594 = 0; _i594 < _list592.size; ++_i594) + { + _elem593 = iprot.readString(); + struct.paths.add(_elem593); + } + iprot.readListEnd(); + } + struct.setPathsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DATA_TYPES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list595 = iprot.readListBegin(); + struct.dataTypes = new java.util.ArrayList(_list595.size); + int _elem596; + for (int _i597 = 0; _i597 < _list595.size; ++_i597) + { + _elem596 = iprot.readI32(); + struct.dataTypes.add(_elem596); + } + iprot.readListEnd(); + } + struct.setDataTypesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ENCODINGS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list598 = iprot.readListBegin(); + struct.encodings = new java.util.ArrayList(_list598.size); + int _elem599; + for (int _i600 = 0; _i600 < _list598.size; ++_i600) + { + _elem599 = iprot.readI32(); + struct.encodings.add(_elem599); + } + iprot.readListEnd(); + } + struct.setEncodingsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // COMPRESSORS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list601 = iprot.readListBegin(); + struct.compressors = new java.util.ArrayList(_list601.size); + int _elem602; + for (int _i603 = 0; _i603 < _list601.size; ++_i603) + { + _elem602 = iprot.readI32(); + struct.compressors.add(_elem602); + } + iprot.readListEnd(); + } + struct.setCompressorsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // PROPS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list604 = iprot.readListBegin(); + struct.propsList = new java.util.ArrayList>(_list604.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem605; + for (int _i606 = 0; _i606 < _list604.size; ++_i606) + { + { + org.apache.thrift.protocol.TMap _map607 = iprot.readMapBegin(); + _elem605 = new java.util.HashMap(2*_map607.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key608; + @org.apache.thrift.annotation.Nullable java.lang.String _val609; + for (int _i610 = 0; _i610 < _map607.size; ++_i610) + { + _key608 = iprot.readString(); + _val609 = iprot.readString(); + _elem605.put(_key608, _val609); + } + iprot.readMapEnd(); + } + struct.propsList.add(_elem605); + } + iprot.readListEnd(); + } + struct.setPropsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // TAGS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list611 = iprot.readListBegin(); + struct.tagsList = new java.util.ArrayList>(_list611.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem612; + for (int _i613 = 0; _i613 < _list611.size; ++_i613) + { + { + org.apache.thrift.protocol.TMap _map614 = iprot.readMapBegin(); + _elem612 = new java.util.HashMap(2*_map614.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key615; + @org.apache.thrift.annotation.Nullable java.lang.String _val616; + for (int _i617 = 0; _i617 < _map614.size; ++_i617) + { + _key615 = iprot.readString(); + _val616 = iprot.readString(); + _elem612.put(_key615, _val616); + } + iprot.readMapEnd(); + } + struct.tagsList.add(_elem612); + } + iprot.readListEnd(); + } + struct.setTagsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // ATTRIBUTES_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list618 = iprot.readListBegin(); + struct.attributesList = new java.util.ArrayList>(_list618.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem619; + for (int _i620 = 0; _i620 < _list618.size; ++_i620) + { + { + org.apache.thrift.protocol.TMap _map621 = iprot.readMapBegin(); + _elem619 = new java.util.HashMap(2*_map621.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key622; + @org.apache.thrift.annotation.Nullable java.lang.String _val623; + for (int _i624 = 0; _i624 < _map621.size; ++_i624) + { + _key622 = iprot.readString(); + _val623 = iprot.readString(); + _elem619.put(_key622, _val623); + } + iprot.readMapEnd(); + } + struct.attributesList.add(_elem619); + } + iprot.readListEnd(); + } + struct.setAttributesListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // MEASUREMENT_ALIAS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list625 = iprot.readListBegin(); + struct.measurementAliasList = new java.util.ArrayList(_list625.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem626; + for (int _i627 = 0; _i627 < _list625.size; ++_i627) + { + _elem626 = iprot.readString(); + struct.measurementAliasList.add(_elem626); + } + iprot.readListEnd(); + } + struct.setMeasurementAliasListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSCreateMultiTimeseriesReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.paths != null) { + oprot.writeFieldBegin(PATHS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); + for (java.lang.String _iter628 : struct.paths) + { + oprot.writeString(_iter628); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.dataTypes != null) { + oprot.writeFieldBegin(DATA_TYPES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dataTypes.size())); + for (int _iter629 : struct.dataTypes) + { + oprot.writeI32(_iter629); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.encodings != null) { + oprot.writeFieldBegin(ENCODINGS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.encodings.size())); + for (int _iter630 : struct.encodings) + { + oprot.writeI32(_iter630); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.compressors != null) { + oprot.writeFieldBegin(COMPRESSORS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.compressors.size())); + for (int _iter631 : struct.compressors) + { + oprot.writeI32(_iter631); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.propsList != null) { + if (struct.isSetPropsList()) { + oprot.writeFieldBegin(PROPS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.propsList.size())); + for (java.util.Map _iter632 : struct.propsList) + { + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter632.size())); + for (java.util.Map.Entry _iter633 : _iter632.entrySet()) + { + oprot.writeString(_iter633.getKey()); + oprot.writeString(_iter633.getValue()); + } + oprot.writeMapEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.tagsList != null) { + if (struct.isSetTagsList()) { + oprot.writeFieldBegin(TAGS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.tagsList.size())); + for (java.util.Map _iter634 : struct.tagsList) + { + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter634.size())); + for (java.util.Map.Entry _iter635 : _iter634.entrySet()) + { + oprot.writeString(_iter635.getKey()); + oprot.writeString(_iter635.getValue()); + } + oprot.writeMapEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.attributesList != null) { + if (struct.isSetAttributesList()) { + oprot.writeFieldBegin(ATTRIBUTES_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.attributesList.size())); + for (java.util.Map _iter636 : struct.attributesList) + { + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter636.size())); + for (java.util.Map.Entry _iter637 : _iter636.entrySet()) + { + oprot.writeString(_iter637.getKey()); + oprot.writeString(_iter637.getValue()); + } + oprot.writeMapEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.measurementAliasList != null) { + if (struct.isSetMeasurementAliasList()) { + oprot.writeFieldBegin(MEASUREMENT_ALIAS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurementAliasList.size())); + for (java.lang.String _iter638 : struct.measurementAliasList) + { + oprot.writeString(_iter638); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSCreateMultiTimeseriesReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCreateMultiTimeseriesReqTupleScheme getScheme() { + return new TSCreateMultiTimeseriesReqTupleScheme(); + } + } + + private static class TSCreateMultiTimeseriesReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSCreateMultiTimeseriesReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + { + oprot.writeI32(struct.paths.size()); + for (java.lang.String _iter639 : struct.paths) + { + oprot.writeString(_iter639); + } + } + { + oprot.writeI32(struct.dataTypes.size()); + for (int _iter640 : struct.dataTypes) + { + oprot.writeI32(_iter640); + } + } + { + oprot.writeI32(struct.encodings.size()); + for (int _iter641 : struct.encodings) + { + oprot.writeI32(_iter641); + } + } + { + oprot.writeI32(struct.compressors.size()); + for (int _iter642 : struct.compressors) + { + oprot.writeI32(_iter642); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetPropsList()) { + optionals.set(0); + } + if (struct.isSetTagsList()) { + optionals.set(1); + } + if (struct.isSetAttributesList()) { + optionals.set(2); + } + if (struct.isSetMeasurementAliasList()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetPropsList()) { + { + oprot.writeI32(struct.propsList.size()); + for (java.util.Map _iter643 : struct.propsList) + { + { + oprot.writeI32(_iter643.size()); + for (java.util.Map.Entry _iter644 : _iter643.entrySet()) + { + oprot.writeString(_iter644.getKey()); + oprot.writeString(_iter644.getValue()); + } + } + } + } + } + if (struct.isSetTagsList()) { + { + oprot.writeI32(struct.tagsList.size()); + for (java.util.Map _iter645 : struct.tagsList) + { + { + oprot.writeI32(_iter645.size()); + for (java.util.Map.Entry _iter646 : _iter645.entrySet()) + { + oprot.writeString(_iter646.getKey()); + oprot.writeString(_iter646.getValue()); + } + } + } + } + } + if (struct.isSetAttributesList()) { + { + oprot.writeI32(struct.attributesList.size()); + for (java.util.Map _iter647 : struct.attributesList) + { + { + oprot.writeI32(_iter647.size()); + for (java.util.Map.Entry _iter648 : _iter647.entrySet()) + { + oprot.writeString(_iter648.getKey()); + oprot.writeString(_iter648.getValue()); + } + } + } + } + } + if (struct.isSetMeasurementAliasList()) { + { + oprot.writeI32(struct.measurementAliasList.size()); + for (java.lang.String _iter649 : struct.measurementAliasList) + { + oprot.writeString(_iter649); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSCreateMultiTimeseriesReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + { + org.apache.thrift.protocol.TList _list650 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.paths = new java.util.ArrayList(_list650.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem651; + for (int _i652 = 0; _i652 < _list650.size; ++_i652) + { + _elem651 = iprot.readString(); + struct.paths.add(_elem651); + } + } + struct.setPathsIsSet(true); + { + org.apache.thrift.protocol.TList _list653 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.dataTypes = new java.util.ArrayList(_list653.size); + int _elem654; + for (int _i655 = 0; _i655 < _list653.size; ++_i655) + { + _elem654 = iprot.readI32(); + struct.dataTypes.add(_elem654); + } + } + struct.setDataTypesIsSet(true); + { + org.apache.thrift.protocol.TList _list656 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.encodings = new java.util.ArrayList(_list656.size); + int _elem657; + for (int _i658 = 0; _i658 < _list656.size; ++_i658) + { + _elem657 = iprot.readI32(); + struct.encodings.add(_elem657); + } + } + struct.setEncodingsIsSet(true); + { + org.apache.thrift.protocol.TList _list659 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.compressors = new java.util.ArrayList(_list659.size); + int _elem660; + for (int _i661 = 0; _i661 < _list659.size; ++_i661) + { + _elem660 = iprot.readI32(); + struct.compressors.add(_elem660); + } + } + struct.setCompressorsIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list662 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); + struct.propsList = new java.util.ArrayList>(_list662.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem663; + for (int _i664 = 0; _i664 < _list662.size; ++_i664) + { + { + org.apache.thrift.protocol.TMap _map665 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + _elem663 = new java.util.HashMap(2*_map665.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key666; + @org.apache.thrift.annotation.Nullable java.lang.String _val667; + for (int _i668 = 0; _i668 < _map665.size; ++_i668) + { + _key666 = iprot.readString(); + _val667 = iprot.readString(); + _elem663.put(_key666, _val667); + } + } + struct.propsList.add(_elem663); + } + } + struct.setPropsListIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list669 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); + struct.tagsList = new java.util.ArrayList>(_list669.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem670; + for (int _i671 = 0; _i671 < _list669.size; ++_i671) + { + { + org.apache.thrift.protocol.TMap _map672 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + _elem670 = new java.util.HashMap(2*_map672.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key673; + @org.apache.thrift.annotation.Nullable java.lang.String _val674; + for (int _i675 = 0; _i675 < _map672.size; ++_i675) + { + _key673 = iprot.readString(); + _val674 = iprot.readString(); + _elem670.put(_key673, _val674); + } + } + struct.tagsList.add(_elem670); + } + } + struct.setTagsListIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list676 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); + struct.attributesList = new java.util.ArrayList>(_list676.size); + @org.apache.thrift.annotation.Nullable java.util.Map _elem677; + for (int _i678 = 0; _i678 < _list676.size; ++_i678) + { + { + org.apache.thrift.protocol.TMap _map679 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + _elem677 = new java.util.HashMap(2*_map679.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key680; + @org.apache.thrift.annotation.Nullable java.lang.String _val681; + for (int _i682 = 0; _i682 < _map679.size; ++_i682) + { + _key680 = iprot.readString(); + _val681 = iprot.readString(); + _elem677.put(_key680, _val681); + } + } + struct.attributesList.add(_elem677); + } + } + struct.setAttributesListIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list683 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.measurementAliasList = new java.util.ArrayList(_list683.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem684; + for (int _i685 = 0; _i685 < _list683.size; ++_i685) + { + _elem684 = iprot.readString(); + struct.measurementAliasList.add(_elem684); + } + } + struct.setMeasurementAliasListIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateSchemaTemplateReq.java new file mode 100644 index 0000000000000..23a3893aab1d5 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateSchemaTemplateReq.java @@ -0,0 +1,592 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSCreateSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCreateSchemaTemplateReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SERIALIZED_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("serializedTemplate", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCreateSchemaTemplateReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCreateSchemaTemplateReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String name; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer serializedTemplate; // 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 { + SESSION_ID((short)1, "sessionId"), + NAME((short)2, "name"), + SERIALIZED_TEMPLATE((short)3, "serializedTemplate"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // NAME + return NAME; + case 3: // SERIALIZED_TEMPLATE + return SERIALIZED_TEMPLATE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SERIALIZED_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("serializedTemplate", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCreateSchemaTemplateReq.class, metaDataMap); + } + + public TSCreateSchemaTemplateReq() { + } + + public TSCreateSchemaTemplateReq( + long sessionId, + java.lang.String name, + java.nio.ByteBuffer serializedTemplate) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.name = name; + this.serializedTemplate = org.apache.thrift.TBaseHelper.copyBinary(serializedTemplate); + } + + /** + * Performs a deep copy on other. + */ + public TSCreateSchemaTemplateReq(TSCreateSchemaTemplateReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetSerializedTemplate()) { + this.serializedTemplate = org.apache.thrift.TBaseHelper.copyBinary(other.serializedTemplate); + } + } + + @Override + public TSCreateSchemaTemplateReq deepCopy() { + return new TSCreateSchemaTemplateReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.name = null; + this.serializedTemplate = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSCreateSchemaTemplateReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getName() { + return this.name; + } + + public TSCreateSchemaTemplateReq setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public byte[] getSerializedTemplate() { + setSerializedTemplate(org.apache.thrift.TBaseHelper.rightSize(serializedTemplate)); + return serializedTemplate == null ? null : serializedTemplate.array(); + } + + public java.nio.ByteBuffer bufferForSerializedTemplate() { + return org.apache.thrift.TBaseHelper.copyBinary(serializedTemplate); + } + + public TSCreateSchemaTemplateReq setSerializedTemplate(byte[] serializedTemplate) { + this.serializedTemplate = serializedTemplate == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(serializedTemplate.clone()); + return this; + } + + public TSCreateSchemaTemplateReq setSerializedTemplate(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer serializedTemplate) { + this.serializedTemplate = org.apache.thrift.TBaseHelper.copyBinary(serializedTemplate); + return this; + } + + public void unsetSerializedTemplate() { + this.serializedTemplate = null; + } + + /** Returns true if field serializedTemplate is set (has been assigned a value) and false otherwise */ + public boolean isSetSerializedTemplate() { + return this.serializedTemplate != null; + } + + public void setSerializedTemplateIsSet(boolean value) { + if (!value) { + this.serializedTemplate = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((java.lang.String)value); + } + break; + + case SERIALIZED_TEMPLATE: + if (value == null) { + unsetSerializedTemplate(); + } else { + if (value instanceof byte[]) { + setSerializedTemplate((byte[])value); + } else { + setSerializedTemplate((java.nio.ByteBuffer)value); + } + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case NAME: + return getName(); + + case SERIALIZED_TEMPLATE: + return getSerializedTemplate(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case NAME: + return isSetName(); + case SERIALIZED_TEMPLATE: + return isSetSerializedTemplate(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSCreateSchemaTemplateReq) + return this.equals((TSCreateSchemaTemplateReq)that); + return false; + } + + public boolean equals(TSCreateSchemaTemplateReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_serializedTemplate = true && this.isSetSerializedTemplate(); + boolean that_present_serializedTemplate = true && that.isSetSerializedTemplate(); + if (this_present_serializedTemplate || that_present_serializedTemplate) { + if (!(this_present_serializedTemplate && that_present_serializedTemplate)) + return false; + if (!this.serializedTemplate.equals(that.serializedTemplate)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); + if (isSetName()) + hashCode = hashCode * 8191 + name.hashCode(); + + hashCode = hashCode * 8191 + ((isSetSerializedTemplate()) ? 131071 : 524287); + if (isSetSerializedTemplate()) + hashCode = hashCode * 8191 + serializedTemplate.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSCreateSchemaTemplateReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSerializedTemplate(), other.isSetSerializedTemplate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSerializedTemplate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serializedTemplate, other.serializedTemplate); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCreateSchemaTemplateReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("serializedTemplate:"); + if (this.serializedTemplate == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.serializedTemplate, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } + if (serializedTemplate == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'serializedTemplate' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSCreateSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCreateSchemaTemplateReqStandardScheme getScheme() { + return new TSCreateSchemaTemplateReqStandardScheme(); + } + } + + private static class TSCreateSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSCreateSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SERIALIZED_TEMPLATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.serializedTemplate = iprot.readBinary(); + struct.setSerializedTemplateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSCreateSchemaTemplateReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.serializedTemplate != null) { + oprot.writeFieldBegin(SERIALIZED_TEMPLATE_FIELD_DESC); + oprot.writeBinary(struct.serializedTemplate); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSCreateSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCreateSchemaTemplateReqTupleScheme getScheme() { + return new TSCreateSchemaTemplateReqTupleScheme(); + } + } + + private static class TSCreateSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSCreateSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.name); + oprot.writeBinary(struct.serializedTemplate); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSCreateSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.name = iprot.readString(); + struct.setNameIsSet(true); + struct.serializedTemplate = iprot.readBinary(); + struct.setSerializedTemplateIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateTimeseriesReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateTimeseriesReq.java new file mode 100644 index 0000000000000..749a5903e5656 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateTimeseriesReq.java @@ -0,0 +1,1345 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSCreateTimeseriesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCreateTimeseriesReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField ENCODING_FIELD_DESC = new org.apache.thrift.protocol.TField("encoding", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField COMPRESSOR_FIELD_DESC = new org.apache.thrift.protocol.TField("compressor", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField PROPS_FIELD_DESC = new org.apache.thrift.protocol.TField("props", org.apache.thrift.protocol.TType.MAP, (short)6); + private static final org.apache.thrift.protocol.TField TAGS_FIELD_DESC = new org.apache.thrift.protocol.TField("tags", org.apache.thrift.protocol.TType.MAP, (short)7); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)8); + private static final org.apache.thrift.protocol.TField MEASUREMENT_ALIAS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementAlias", org.apache.thrift.protocol.TType.STRING, (short)9); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCreateTimeseriesReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCreateTimeseriesReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String path; // required + public int dataType; // required + public int encoding; // required + public int compressor; // required + public @org.apache.thrift.annotation.Nullable java.util.Map props; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map tags; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map attributes; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String measurementAlias; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PATH((short)2, "path"), + DATA_TYPE((short)3, "dataType"), + ENCODING((short)4, "encoding"), + COMPRESSOR((short)5, "compressor"), + PROPS((short)6, "props"), + TAGS((short)7, "tags"), + ATTRIBUTES((short)8, "attributes"), + MEASUREMENT_ALIAS((short)9, "measurementAlias"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PATH + return PATH; + case 3: // DATA_TYPE + return DATA_TYPE; + case 4: // ENCODING + return ENCODING; + case 5: // COMPRESSOR + return COMPRESSOR; + case 6: // PROPS + return PROPS; + case 7: // TAGS + return TAGS; + case 8: // ATTRIBUTES + return ATTRIBUTES; + case 9: // MEASUREMENT_ALIAS + return MEASUREMENT_ALIAS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __DATATYPE_ISSET_ID = 1; + private static final int __ENCODING_ISSET_ID = 2; + private static final int __COMPRESSOR_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.PROPS,_Fields.TAGS,_Fields.ATTRIBUTES,_Fields.MEASUREMENT_ALIAS}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.ENCODING, new org.apache.thrift.meta_data.FieldMetaData("encoding", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.COMPRESSOR, new org.apache.thrift.meta_data.FieldMetaData("compressor", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.PROPS, new org.apache.thrift.meta_data.FieldMetaData("props", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.TAGS, new org.apache.thrift.meta_data.FieldMetaData("tags", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.MEASUREMENT_ALIAS, new org.apache.thrift.meta_data.FieldMetaData("measurementAlias", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCreateTimeseriesReq.class, metaDataMap); + } + + public TSCreateTimeseriesReq() { + } + + public TSCreateTimeseriesReq( + long sessionId, + java.lang.String path, + int dataType, + int encoding, + int compressor) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.path = path; + this.dataType = dataType; + setDataTypeIsSet(true); + this.encoding = encoding; + setEncodingIsSet(true); + this.compressor = compressor; + setCompressorIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSCreateTimeseriesReq(TSCreateTimeseriesReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPath()) { + this.path = other.path; + } + this.dataType = other.dataType; + this.encoding = other.encoding; + this.compressor = other.compressor; + if (other.isSetProps()) { + java.util.Map __this__props = new java.util.HashMap(other.props); + this.props = __this__props; + } + if (other.isSetTags()) { + java.util.Map __this__tags = new java.util.HashMap(other.tags); + this.tags = __this__tags; + } + if (other.isSetAttributes()) { + java.util.Map __this__attributes = new java.util.HashMap(other.attributes); + this.attributes = __this__attributes; + } + if (other.isSetMeasurementAlias()) { + this.measurementAlias = other.measurementAlias; + } + } + + @Override + public TSCreateTimeseriesReq deepCopy() { + return new TSCreateTimeseriesReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.path = null; + setDataTypeIsSet(false); + this.dataType = 0; + setEncodingIsSet(false); + this.encoding = 0; + setCompressorIsSet(false); + this.compressor = 0; + this.props = null; + this.tags = null; + this.attributes = null; + this.measurementAlias = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSCreateTimeseriesReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPath() { + return this.path; + } + + public TSCreateTimeseriesReq setPath(@org.apache.thrift.annotation.Nullable java.lang.String path) { + this.path = path; + return this; + } + + public void unsetPath() { + this.path = null; + } + + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; + } + + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } + } + + public int getDataType() { + return this.dataType; + } + + public TSCreateTimeseriesReq setDataType(int dataType) { + this.dataType = dataType; + setDataTypeIsSet(true); + return this; + } + + public void unsetDataType() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATATYPE_ISSET_ID); + } + + /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ + public boolean isSetDataType() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATATYPE_ISSET_ID); + } + + public void setDataTypeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATATYPE_ISSET_ID, value); + } + + public int getEncoding() { + return this.encoding; + } + + public TSCreateTimeseriesReq setEncoding(int encoding) { + this.encoding = encoding; + setEncodingIsSet(true); + return this; + } + + public void unsetEncoding() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENCODING_ISSET_ID); + } + + /** Returns true if field encoding is set (has been assigned a value) and false otherwise */ + public boolean isSetEncoding() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENCODING_ISSET_ID); + } + + public void setEncodingIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENCODING_ISSET_ID, value); + } + + public int getCompressor() { + return this.compressor; + } + + public TSCreateTimeseriesReq setCompressor(int compressor) { + this.compressor = compressor; + setCompressorIsSet(true); + return this; + } + + public void unsetCompressor() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPRESSOR_ISSET_ID); + } + + /** Returns true if field compressor is set (has been assigned a value) and false otherwise */ + public boolean isSetCompressor() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPRESSOR_ISSET_ID); + } + + public void setCompressorIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPRESSOR_ISSET_ID, value); + } + + public int getPropsSize() { + return (this.props == null) ? 0 : this.props.size(); + } + + public void putToProps(java.lang.String key, java.lang.String val) { + if (this.props == null) { + this.props = new java.util.HashMap(); + } + this.props.put(key, val); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Map getProps() { + return this.props; + } + + public TSCreateTimeseriesReq setProps(@org.apache.thrift.annotation.Nullable java.util.Map props) { + this.props = props; + return this; + } + + public void unsetProps() { + this.props = null; + } + + /** Returns true if field props is set (has been assigned a value) and false otherwise */ + public boolean isSetProps() { + return this.props != null; + } + + public void setPropsIsSet(boolean value) { + if (!value) { + this.props = null; + } + } + + public int getTagsSize() { + return (this.tags == null) ? 0 : this.tags.size(); + } + + public void putToTags(java.lang.String key, java.lang.String val) { + if (this.tags == null) { + this.tags = new java.util.HashMap(); + } + this.tags.put(key, val); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Map getTags() { + return this.tags; + } + + public TSCreateTimeseriesReq setTags(@org.apache.thrift.annotation.Nullable java.util.Map tags) { + this.tags = tags; + return this; + } + + public void unsetTags() { + this.tags = null; + } + + /** Returns true if field tags is set (has been assigned a value) and false otherwise */ + public boolean isSetTags() { + return this.tags != null; + } + + public void setTagsIsSet(boolean value) { + if (!value) { + this.tags = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(java.lang.String key, java.lang.String val) { + if (this.attributes == null) { + this.attributes = new java.util.HashMap(); + } + this.attributes.put(key, val); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Map getAttributes() { + return this.attributes; + } + + public TSCreateTimeseriesReq setAttributes(@org.apache.thrift.annotation.Nullable java.util.Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getMeasurementAlias() { + return this.measurementAlias; + } + + public TSCreateTimeseriesReq setMeasurementAlias(@org.apache.thrift.annotation.Nullable java.lang.String measurementAlias) { + this.measurementAlias = measurementAlias; + return this; + } + + public void unsetMeasurementAlias() { + this.measurementAlias = null; + } + + /** Returns true if field measurementAlias is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurementAlias() { + return this.measurementAlias != null; + } + + public void setMeasurementAliasIsSet(boolean value) { + if (!value) { + this.measurementAlias = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PATH: + if (value == null) { + unsetPath(); + } else { + setPath((java.lang.String)value); + } + break; + + case DATA_TYPE: + if (value == null) { + unsetDataType(); + } else { + setDataType((java.lang.Integer)value); + } + break; + + case ENCODING: + if (value == null) { + unsetEncoding(); + } else { + setEncoding((java.lang.Integer)value); + } + break; + + case COMPRESSOR: + if (value == null) { + unsetCompressor(); + } else { + setCompressor((java.lang.Integer)value); + } + break; + + case PROPS: + if (value == null) { + unsetProps(); + } else { + setProps((java.util.Map)value); + } + break; + + case TAGS: + if (value == null) { + unsetTags(); + } else { + setTags((java.util.Map)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((java.util.Map)value); + } + break; + + case MEASUREMENT_ALIAS: + if (value == null) { + unsetMeasurementAlias(); + } else { + setMeasurementAlias((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PATH: + return getPath(); + + case DATA_TYPE: + return getDataType(); + + case ENCODING: + return getEncoding(); + + case COMPRESSOR: + return getCompressor(); + + case PROPS: + return getProps(); + + case TAGS: + return getTags(); + + case ATTRIBUTES: + return getAttributes(); + + case MEASUREMENT_ALIAS: + return getMeasurementAlias(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PATH: + return isSetPath(); + case DATA_TYPE: + return isSetDataType(); + case ENCODING: + return isSetEncoding(); + case COMPRESSOR: + return isSetCompressor(); + case PROPS: + return isSetProps(); + case TAGS: + return isSetTags(); + case ATTRIBUTES: + return isSetAttributes(); + case MEASUREMENT_ALIAS: + return isSetMeasurementAlias(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSCreateTimeseriesReq) + return this.equals((TSCreateTimeseriesReq)that); + return false; + } + + public boolean equals(TSCreateTimeseriesReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) + return false; + if (!this.path.equals(that.path)) + return false; + } + + boolean this_present_dataType = true; + boolean that_present_dataType = true; + if (this_present_dataType || that_present_dataType) { + if (!(this_present_dataType && that_present_dataType)) + return false; + if (this.dataType != that.dataType) + return false; + } + + boolean this_present_encoding = true; + boolean that_present_encoding = true; + if (this_present_encoding || that_present_encoding) { + if (!(this_present_encoding && that_present_encoding)) + return false; + if (this.encoding != that.encoding) + return false; + } + + boolean this_present_compressor = true; + boolean that_present_compressor = true; + if (this_present_compressor || that_present_compressor) { + if (!(this_present_compressor && that_present_compressor)) + return false; + if (this.compressor != that.compressor) + return false; + } + + boolean this_present_props = true && this.isSetProps(); + boolean that_present_props = true && that.isSetProps(); + if (this_present_props || that_present_props) { + if (!(this_present_props && that_present_props)) + return false; + if (!this.props.equals(that.props)) + return false; + } + + boolean this_present_tags = true && this.isSetTags(); + boolean that_present_tags = true && that.isSetTags(); + if (this_present_tags || that_present_tags) { + if (!(this_present_tags && that_present_tags)) + return false; + if (!this.tags.equals(that.tags)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + boolean this_present_measurementAlias = true && this.isSetMeasurementAlias(); + boolean that_present_measurementAlias = true && that.isSetMeasurementAlias(); + if (this_present_measurementAlias || that_present_measurementAlias) { + if (!(this_present_measurementAlias && that_present_measurementAlias)) + return false; + if (!this.measurementAlias.equals(that.measurementAlias)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287); + if (isSetPath()) + hashCode = hashCode * 8191 + path.hashCode(); + + hashCode = hashCode * 8191 + dataType; + + hashCode = hashCode * 8191 + encoding; + + hashCode = hashCode * 8191 + compressor; + + hashCode = hashCode * 8191 + ((isSetProps()) ? 131071 : 524287); + if (isSetProps()) + hashCode = hashCode * 8191 + props.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTags()) ? 131071 : 524287); + if (isSetTags()) + hashCode = hashCode * 8191 + tags.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAttributes()) ? 131071 : 524287); + if (isSetAttributes()) + hashCode = hashCode * 8191 + attributes.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurementAlias()) ? 131071 : 524287); + if (isSetMeasurementAlias()) + hashCode = hashCode * 8191 + measurementAlias.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSCreateTimeseriesReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPath(), other.isSetPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDataType(), other.isSetDataType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, other.dataType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEncoding(), other.isSetEncoding()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEncoding()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encoding, other.encoding); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetCompressor(), other.isSetCompressor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressor()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressor, other.compressor); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetProps(), other.isSetProps()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProps()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.props, other.props); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTags(), other.isSetTags()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTags()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tags, other.tags); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetAttributes(), other.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurementAlias(), other.isSetMeasurementAlias()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurementAlias()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementAlias, other.measurementAlias); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCreateTimeseriesReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("path:"); + if (this.path == null) { + sb.append("null"); + } else { + sb.append(this.path); + } + first = false; + if (!first) sb.append(", "); + sb.append("dataType:"); + sb.append(this.dataType); + first = false; + if (!first) sb.append(", "); + sb.append("encoding:"); + sb.append(this.encoding); + first = false; + if (!first) sb.append(", "); + sb.append("compressor:"); + sb.append(this.compressor); + first = false; + if (isSetProps()) { + if (!first) sb.append(", "); + sb.append("props:"); + if (this.props == null) { + sb.append("null"); + } else { + sb.append(this.props); + } + first = false; + } + if (isSetTags()) { + if (!first) sb.append(", "); + sb.append("tags:"); + if (this.tags == null) { + sb.append("null"); + } else { + sb.append(this.tags); + } + first = false; + } + if (isSetAttributes()) { + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + } + if (isSetMeasurementAlias()) { + if (!first) sb.append(", "); + sb.append("measurementAlias:"); + if (this.measurementAlias == null) { + sb.append("null"); + } else { + sb.append(this.measurementAlias); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (path == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'path' was not present! Struct: " + toString()); + } + // alas, we cannot check 'dataType' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'encoding' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'compressor' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSCreateTimeseriesReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCreateTimeseriesReqStandardScheme getScheme() { + return new TSCreateTimeseriesReqStandardScheme(); + } + } + + private static class TSCreateTimeseriesReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DATA_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.dataType = iprot.readI32(); + struct.setDataTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ENCODING + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.encoding = iprot.readI32(); + struct.setEncodingIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // COMPRESSOR + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.compressor = iprot.readI32(); + struct.setCompressorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // PROPS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map446 = iprot.readMapBegin(); + struct.props = new java.util.HashMap(2*_map446.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key447; + @org.apache.thrift.annotation.Nullable java.lang.String _val448; + for (int _i449 = 0; _i449 < _map446.size; ++_i449) + { + _key447 = iprot.readString(); + _val448 = iprot.readString(); + struct.props.put(_key447, _val448); + } + iprot.readMapEnd(); + } + struct.setPropsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // TAGS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map450 = iprot.readMapBegin(); + struct.tags = new java.util.HashMap(2*_map450.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key451; + @org.apache.thrift.annotation.Nullable java.lang.String _val452; + for (int _i453 = 0; _i453 < _map450.size; ++_i453) + { + _key451 = iprot.readString(); + _val452 = iprot.readString(); + struct.tags.put(_key451, _val452); + } + iprot.readMapEnd(); + } + struct.setTagsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map454 = iprot.readMapBegin(); + struct.attributes = new java.util.HashMap(2*_map454.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key455; + @org.apache.thrift.annotation.Nullable java.lang.String _val456; + for (int _i457 = 0; _i457 < _map454.size; ++_i457) + { + _key455 = iprot.readString(); + _val456 = iprot.readString(); + struct.attributes.put(_key455, _val456); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // MEASUREMENT_ALIAS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.measurementAlias = iprot.readString(); + struct.setMeasurementAliasIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetDataType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataType' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetEncoding()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'encoding' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetCompressor()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'compressor' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); + oprot.writeI32(struct.dataType); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(ENCODING_FIELD_DESC); + oprot.writeI32(struct.encoding); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(COMPRESSOR_FIELD_DESC); + oprot.writeI32(struct.compressor); + oprot.writeFieldEnd(); + if (struct.props != null) { + if (struct.isSetProps()) { + oprot.writeFieldBegin(PROPS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.props.size())); + for (java.util.Map.Entry _iter458 : struct.props.entrySet()) + { + oprot.writeString(_iter458.getKey()); + oprot.writeString(_iter458.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.tags != null) { + if (struct.isSetTags()) { + oprot.writeFieldBegin(TAGS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.tags.size())); + for (java.util.Map.Entry _iter459 : struct.tags.entrySet()) + { + oprot.writeString(_iter459.getKey()); + oprot.writeString(_iter459.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.attributes != null) { + if (struct.isSetAttributes()) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (java.util.Map.Entry _iter460 : struct.attributes.entrySet()) + { + oprot.writeString(_iter460.getKey()); + oprot.writeString(_iter460.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.measurementAlias != null) { + if (struct.isSetMeasurementAlias()) { + oprot.writeFieldBegin(MEASUREMENT_ALIAS_FIELD_DESC); + oprot.writeString(struct.measurementAlias); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSCreateTimeseriesReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSCreateTimeseriesReqTupleScheme getScheme() { + return new TSCreateTimeseriesReqTupleScheme(); + } + } + + private static class TSCreateTimeseriesReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.path); + oprot.writeI32(struct.dataType); + oprot.writeI32(struct.encoding); + oprot.writeI32(struct.compressor); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetProps()) { + optionals.set(0); + } + if (struct.isSetTags()) { + optionals.set(1); + } + if (struct.isSetAttributes()) { + optionals.set(2); + } + if (struct.isSetMeasurementAlias()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetProps()) { + { + oprot.writeI32(struct.props.size()); + for (java.util.Map.Entry _iter461 : struct.props.entrySet()) + { + oprot.writeString(_iter461.getKey()); + oprot.writeString(_iter461.getValue()); + } + } + } + if (struct.isSetTags()) { + { + oprot.writeI32(struct.tags.size()); + for (java.util.Map.Entry _iter462 : struct.tags.entrySet()) + { + oprot.writeString(_iter462.getKey()); + oprot.writeString(_iter462.getValue()); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (java.util.Map.Entry _iter463 : struct.attributes.entrySet()) + { + oprot.writeString(_iter463.getKey()); + oprot.writeString(_iter463.getValue()); + } + } + } + if (struct.isSetMeasurementAlias()) { + oprot.writeString(struct.measurementAlias); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.path = iprot.readString(); + struct.setPathIsSet(true); + struct.dataType = iprot.readI32(); + struct.setDataTypeIsSet(true); + struct.encoding = iprot.readI32(); + struct.setEncodingIsSet(true); + struct.compressor = iprot.readI32(); + struct.setCompressorIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map464 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.props = new java.util.HashMap(2*_map464.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key465; + @org.apache.thrift.annotation.Nullable java.lang.String _val466; + for (int _i467 = 0; _i467 < _map464.size; ++_i467) + { + _key465 = iprot.readString(); + _val466 = iprot.readString(); + struct.props.put(_key465, _val466); + } + } + struct.setPropsIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map468 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.tags = new java.util.HashMap(2*_map468.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key469; + @org.apache.thrift.annotation.Nullable java.lang.String _val470; + for (int _i471 = 0; _i471 < _map468.size; ++_i471) + { + _key469 = iprot.readString(); + _val470 = iprot.readString(); + struct.tags.put(_key469, _val470); + } + } + struct.setTagsIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map472 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.attributes = new java.util.HashMap(2*_map472.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key473; + @org.apache.thrift.annotation.Nullable java.lang.String _val474; + for (int _i475 = 0; _i475 < _map472.size; ++_i475) + { + _key473 = iprot.readString(); + _val474 = iprot.readString(); + struct.attributes.put(_key473, _val474); + } + } + struct.setAttributesIsSet(true); + } + if (incoming.get(3)) { + struct.measurementAlias = iprot.readString(); + struct.setMeasurementAliasIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSDeleteDataReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSDeleteDataReq.java new file mode 100644 index 0000000000000..6fcd77b487845 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSDeleteDataReq.java @@ -0,0 +1,714 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSDeleteDataReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSDeleteDataReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)4); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSDeleteDataReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSDeleteDataReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List paths; // required + public long startTime; // required + public long endTime; // 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 { + SESSION_ID((short)1, "sessionId"), + PATHS((short)2, "paths"), + START_TIME((short)3, "startTime"), + END_TIME((short)4, "endTime"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PATHS + return PATHS; + case 3: // START_TIME + return START_TIME; + case 4: // END_TIME + return END_TIME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __STARTTIME_ISSET_ID = 1; + private static final int __ENDTIME_ISSET_ID = 2; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSDeleteDataReq.class, metaDataMap); + } + + public TSDeleteDataReq() { + } + + public TSDeleteDataReq( + long sessionId, + java.util.List paths, + long startTime, + long endTime) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.paths = paths; + this.startTime = startTime; + setStartTimeIsSet(true); + this.endTime = endTime; + setEndTimeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSDeleteDataReq(TSDeleteDataReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPaths()) { + java.util.List __this__paths = new java.util.ArrayList(other.paths); + this.paths = __this__paths; + } + this.startTime = other.startTime; + this.endTime = other.endTime; + } + + @Override + public TSDeleteDataReq deepCopy() { + return new TSDeleteDataReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.paths = null; + setStartTimeIsSet(false); + this.startTime = 0; + setEndTimeIsSet(false); + this.endTime = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSDeleteDataReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getPathsSize() { + return (this.paths == null) ? 0 : this.paths.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPathsIterator() { + return (this.paths == null) ? null : this.paths.iterator(); + } + + public void addToPaths(java.lang.String elem) { + if (this.paths == null) { + this.paths = new java.util.ArrayList(); + } + this.paths.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getPaths() { + return this.paths; + } + + public TSDeleteDataReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { + this.paths = paths; + return this; + } + + public void unsetPaths() { + this.paths = null; + } + + /** Returns true if field paths is set (has been assigned a value) and false otherwise */ + public boolean isSetPaths() { + return this.paths != null; + } + + public void setPathsIsSet(boolean value) { + if (!value) { + this.paths = null; + } + } + + public long getStartTime() { + return this.startTime; + } + + public TSDeleteDataReq setStartTime(long startTime) { + this.startTime = startTime; + setStartTimeIsSet(true); + return this; + } + + public void unsetStartTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ + public boolean isSetStartTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + public void setStartTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); + } + + public long getEndTime() { + return this.endTime; + } + + public TSDeleteDataReq setEndTime(long endTime) { + this.endTime = endTime; + setEndTimeIsSet(true); + return this; + } + + public void unsetEndTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ + public boolean isSetEndTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + public void setEndTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PATHS: + if (value == null) { + unsetPaths(); + } else { + setPaths((java.util.List)value); + } + break; + + case START_TIME: + if (value == null) { + unsetStartTime(); + } else { + setStartTime((java.lang.Long)value); + } + break; + + case END_TIME: + if (value == null) { + unsetEndTime(); + } else { + setEndTime((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PATHS: + return getPaths(); + + case START_TIME: + return getStartTime(); + + case END_TIME: + return getEndTime(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PATHS: + return isSetPaths(); + case START_TIME: + return isSetStartTime(); + case END_TIME: + return isSetEndTime(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSDeleteDataReq) + return this.equals((TSDeleteDataReq)that); + return false; + } + + public boolean equals(TSDeleteDataReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_paths = true && this.isSetPaths(); + boolean that_present_paths = true && that.isSetPaths(); + if (this_present_paths || that_present_paths) { + if (!(this_present_paths && that_present_paths)) + return false; + if (!this.paths.equals(that.paths)) + return false; + } + + boolean this_present_startTime = true; + boolean that_present_startTime = true; + if (this_present_startTime || that_present_startTime) { + if (!(this_present_startTime && that_present_startTime)) + return false; + if (this.startTime != that.startTime) + return false; + } + + boolean this_present_endTime = true; + boolean that_present_endTime = true; + if (this_present_endTime || that_present_endTime) { + if (!(this_present_endTime && that_present_endTime)) + return false; + if (this.endTime != that.endTime) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); + if (isSetPaths()) + hashCode = hashCode * 8191 + paths.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime); + + return hashCode; + } + + @Override + public int compareTo(TSDeleteDataReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPaths()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSDeleteDataReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("paths:"); + if (this.paths == null) { + sb.append("null"); + } else { + sb.append(this.paths); + } + first = false; + if (!first) sb.append(", "); + sb.append("startTime:"); + sb.append(this.startTime); + first = false; + if (!first) sb.append(", "); + sb.append("endTime:"); + sb.append(this.endTime); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (paths == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); + } + // alas, we cannot check 'startTime' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'endTime' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSDeleteDataReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSDeleteDataReqStandardScheme getScheme() { + return new TSDeleteDataReqStandardScheme(); + } + } + + private static class TSDeleteDataReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSDeleteDataReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PATHS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list438 = iprot.readListBegin(); + struct.paths = new java.util.ArrayList(_list438.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem439; + for (int _i440 = 0; _i440 < _list438.size; ++_i440) + { + _elem439 = iprot.readString(); + struct.paths.add(_elem439); + } + iprot.readListEnd(); + } + struct.setPathsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // START_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // END_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetStartTime()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'startTime' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetEndTime()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'endTime' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSDeleteDataReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.paths != null) { + oprot.writeFieldBegin(PATHS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); + for (java.lang.String _iter441 : struct.paths) + { + oprot.writeString(_iter441); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(START_TIME_FIELD_DESC); + oprot.writeI64(struct.startTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(END_TIME_FIELD_DESC); + oprot.writeI64(struct.endTime); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSDeleteDataReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSDeleteDataReqTupleScheme getScheme() { + return new TSDeleteDataReqTupleScheme(); + } + } + + private static class TSDeleteDataReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSDeleteDataReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + { + oprot.writeI32(struct.paths.size()); + for (java.lang.String _iter442 : struct.paths) + { + oprot.writeString(_iter442); + } + } + oprot.writeI64(struct.startTime); + oprot.writeI64(struct.endTime); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSDeleteDataReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + { + org.apache.thrift.protocol.TList _list443 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.paths = new java.util.ArrayList(_list443.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem444; + for (int _i445 = 0; _i445 < _list443.size; ++_i445) + { + _elem444 = iprot.readString(); + struct.paths.add(_elem444); + } + } + struct.setPathsIsSet(true); + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSDropSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSDropSchemaTemplateReq.java new file mode 100644 index 0000000000000..82a45714ff323 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSDropSchemaTemplateReq.java @@ -0,0 +1,478 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSDropSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSDropSchemaTemplateReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField TEMPLATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("templateName", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSDropSchemaTemplateReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSDropSchemaTemplateReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String templateName; // 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 { + SESSION_ID((short)1, "sessionId"), + TEMPLATE_NAME((short)2, "templateName"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // TEMPLATE_NAME + return TEMPLATE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TEMPLATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("templateName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSDropSchemaTemplateReq.class, metaDataMap); + } + + public TSDropSchemaTemplateReq() { + } + + public TSDropSchemaTemplateReq( + long sessionId, + java.lang.String templateName) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.templateName = templateName; + } + + /** + * Performs a deep copy on other. + */ + public TSDropSchemaTemplateReq(TSDropSchemaTemplateReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetTemplateName()) { + this.templateName = other.templateName; + } + } + + @Override + public TSDropSchemaTemplateReq deepCopy() { + return new TSDropSchemaTemplateReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.templateName = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSDropSchemaTemplateReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getTemplateName() { + return this.templateName; + } + + public TSDropSchemaTemplateReq setTemplateName(@org.apache.thrift.annotation.Nullable java.lang.String templateName) { + this.templateName = templateName; + return this; + } + + public void unsetTemplateName() { + this.templateName = null; + } + + /** Returns true if field templateName is set (has been assigned a value) and false otherwise */ + public boolean isSetTemplateName() { + return this.templateName != null; + } + + public void setTemplateNameIsSet(boolean value) { + if (!value) { + this.templateName = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case TEMPLATE_NAME: + if (value == null) { + unsetTemplateName(); + } else { + setTemplateName((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case TEMPLATE_NAME: + return getTemplateName(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case TEMPLATE_NAME: + return isSetTemplateName(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSDropSchemaTemplateReq) + return this.equals((TSDropSchemaTemplateReq)that); + return false; + } + + public boolean equals(TSDropSchemaTemplateReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_templateName = true && this.isSetTemplateName(); + boolean that_present_templateName = true && that.isSetTemplateName(); + if (this_present_templateName || that_present_templateName) { + if (!(this_present_templateName && that_present_templateName)) + return false; + if (!this.templateName.equals(that.templateName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetTemplateName()) ? 131071 : 524287); + if (isSetTemplateName()) + hashCode = hashCode * 8191 + templateName.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSDropSchemaTemplateReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTemplateName(), other.isSetTemplateName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTemplateName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.templateName, other.templateName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSDropSchemaTemplateReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("templateName:"); + if (this.templateName == null) { + sb.append("null"); + } else { + sb.append(this.templateName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (templateName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'templateName' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSDropSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSDropSchemaTemplateReqStandardScheme getScheme() { + return new TSDropSchemaTemplateReqStandardScheme(); + } + } + + private static class TSDropSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSDropSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TEMPLATE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.templateName = iprot.readString(); + struct.setTemplateNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSDropSchemaTemplateReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.templateName != null) { + oprot.writeFieldBegin(TEMPLATE_NAME_FIELD_DESC); + oprot.writeString(struct.templateName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSDropSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSDropSchemaTemplateReqTupleScheme getScheme() { + return new TSDropSchemaTemplateReqTupleScheme(); + } + } + + private static class TSDropSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSDropSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.templateName); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSDropSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.templateName = iprot.readString(); + struct.setTemplateNameIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteBatchStatementReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteBatchStatementReq.java new file mode 100644 index 0000000000000..2a5b3e8d35004 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteBatchStatementReq.java @@ -0,0 +1,528 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSExecuteBatchStatementReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSExecuteBatchStatementReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField STATEMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("statements", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSExecuteBatchStatementReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSExecuteBatchStatementReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List statements; // 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 { + SESSION_ID((short)1, "sessionId"), + STATEMENTS((short)2, "statements"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // STATEMENTS + return STATEMENTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATEMENTS, new org.apache.thrift.meta_data.FieldMetaData("statements", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSExecuteBatchStatementReq.class, metaDataMap); + } + + public TSExecuteBatchStatementReq() { + } + + public TSExecuteBatchStatementReq( + long sessionId, + java.util.List statements) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.statements = statements; + } + + /** + * Performs a deep copy on other. + */ + public TSExecuteBatchStatementReq(TSExecuteBatchStatementReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetStatements()) { + java.util.List __this__statements = new java.util.ArrayList(other.statements); + this.statements = __this__statements; + } + } + + @Override + public TSExecuteBatchStatementReq deepCopy() { + return new TSExecuteBatchStatementReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.statements = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSExecuteBatchStatementReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getStatementsSize() { + return (this.statements == null) ? 0 : this.statements.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getStatementsIterator() { + return (this.statements == null) ? null : this.statements.iterator(); + } + + public void addToStatements(java.lang.String elem) { + if (this.statements == null) { + this.statements = new java.util.ArrayList(); + } + this.statements.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getStatements() { + return this.statements; + } + + public TSExecuteBatchStatementReq setStatements(@org.apache.thrift.annotation.Nullable java.util.List statements) { + this.statements = statements; + return this; + } + + public void unsetStatements() { + this.statements = null; + } + + /** Returns true if field statements is set (has been assigned a value) and false otherwise */ + public boolean isSetStatements() { + return this.statements != null; + } + + public void setStatementsIsSet(boolean value) { + if (!value) { + this.statements = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case STATEMENTS: + if (value == null) { + unsetStatements(); + } else { + setStatements((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case STATEMENTS: + return getStatements(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case STATEMENTS: + return isSetStatements(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSExecuteBatchStatementReq) + return this.equals((TSExecuteBatchStatementReq)that); + return false; + } + + public boolean equals(TSExecuteBatchStatementReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_statements = true && this.isSetStatements(); + boolean that_present_statements = true && that.isSetStatements(); + if (this_present_statements || that_present_statements) { + if (!(this_present_statements && that_present_statements)) + return false; + if (!this.statements.equals(that.statements)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetStatements()) ? 131071 : 524287); + if (isSetStatements()) + hashCode = hashCode * 8191 + statements.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSExecuteBatchStatementReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatements(), other.isSetStatements()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatements()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statements, other.statements); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSExecuteBatchStatementReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("statements:"); + if (this.statements == null) { + sb.append("null"); + } else { + sb.append(this.statements); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (statements == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statements' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSExecuteBatchStatementReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSExecuteBatchStatementReqStandardScheme getScheme() { + return new TSExecuteBatchStatementReqStandardScheme(); + } + } + + private static class TSExecuteBatchStatementReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSExecuteBatchStatementReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATEMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list126 = iprot.readListBegin(); + struct.statements = new java.util.ArrayList(_list126.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem127; + for (int _i128 = 0; _i128 < _list126.size; ++_i128) + { + _elem127 = iprot.readString(); + struct.statements.add(_elem127); + } + iprot.readListEnd(); + } + struct.setStatementsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSExecuteBatchStatementReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.statements != null) { + oprot.writeFieldBegin(STATEMENTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.statements.size())); + for (java.lang.String _iter129 : struct.statements) + { + oprot.writeString(_iter129); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSExecuteBatchStatementReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSExecuteBatchStatementReqTupleScheme getScheme() { + return new TSExecuteBatchStatementReqTupleScheme(); + } + } + + private static class TSExecuteBatchStatementReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSExecuteBatchStatementReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + { + oprot.writeI32(struct.statements.size()); + for (java.lang.String _iter130 : struct.statements) + { + oprot.writeString(_iter130); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSExecuteBatchStatementReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + { + org.apache.thrift.protocol.TList _list131 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.statements = new java.util.ArrayList(_list131.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem132; + for (int _i133 = 0; _i133 < _list131.size; ++_i133) + { + _elem132 = iprot.readString(); + struct.statements.add(_elem132); + } + } + struct.setStatementsIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementReq.java new file mode 100644 index 0000000000000..e914f92c37451 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementReq.java @@ -0,0 +1,971 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSExecuteStatementReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSExecuteStatementReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField STATEMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("statement", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField ENABLE_REDIRECT_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("enableRedirectQuery", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField JDBC_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("jdbcQuery", org.apache.thrift.protocol.TType.BOOL, (short)7); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSExecuteStatementReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSExecuteStatementReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String statement; // required + public long statementId; // required + public int fetchSize; // optional + public long timeout; // optional + public boolean enableRedirectQuery; // optional + public boolean jdbcQuery; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + STATEMENT((short)2, "statement"), + STATEMENT_ID((short)3, "statementId"), + FETCH_SIZE((short)4, "fetchSize"), + TIMEOUT((short)5, "timeout"), + ENABLE_REDIRECT_QUERY((short)6, "enableRedirectQuery"), + JDBC_QUERY((short)7, "jdbcQuery"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // STATEMENT + return STATEMENT; + case 3: // STATEMENT_ID + return STATEMENT_ID; + case 4: // FETCH_SIZE + return FETCH_SIZE; + case 5: // TIMEOUT + return TIMEOUT; + case 6: // ENABLE_REDIRECT_QUERY + return ENABLE_REDIRECT_QUERY; + case 7: // JDBC_QUERY + return JDBC_QUERY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __STATEMENTID_ISSET_ID = 1; + private static final int __FETCHSIZE_ISSET_ID = 2; + private static final int __TIMEOUT_ISSET_ID = 3; + private static final int __ENABLEREDIRECTQUERY_ISSET_ID = 4; + private static final int __JDBCQUERY_ISSET_ID = 5; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.FETCH_SIZE,_Fields.TIMEOUT,_Fields.ENABLE_REDIRECT_QUERY,_Fields.JDBC_QUERY}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATEMENT, new org.apache.thrift.meta_data.FieldMetaData("statement", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ENABLE_REDIRECT_QUERY, new org.apache.thrift.meta_data.FieldMetaData("enableRedirectQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.JDBC_QUERY, new org.apache.thrift.meta_data.FieldMetaData("jdbcQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSExecuteStatementReq.class, metaDataMap); + } + + public TSExecuteStatementReq() { + } + + public TSExecuteStatementReq( + long sessionId, + java.lang.String statement, + long statementId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.statement = statement; + this.statementId = statementId; + setStatementIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSExecuteStatementReq(TSExecuteStatementReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetStatement()) { + this.statement = other.statement; + } + this.statementId = other.statementId; + this.fetchSize = other.fetchSize; + this.timeout = other.timeout; + this.enableRedirectQuery = other.enableRedirectQuery; + this.jdbcQuery = other.jdbcQuery; + } + + @Override + public TSExecuteStatementReq deepCopy() { + return new TSExecuteStatementReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.statement = null; + setStatementIdIsSet(false); + this.statementId = 0; + setFetchSizeIsSet(false); + this.fetchSize = 0; + setTimeoutIsSet(false); + this.timeout = 0; + setEnableRedirectQueryIsSet(false); + this.enableRedirectQuery = false; + setJdbcQueryIsSet(false); + this.jdbcQuery = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSExecuteStatementReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getStatement() { + return this.statement; + } + + public TSExecuteStatementReq setStatement(@org.apache.thrift.annotation.Nullable java.lang.String statement) { + this.statement = statement; + return this; + } + + public void unsetStatement() { + this.statement = null; + } + + /** Returns true if field statement is set (has been assigned a value) and false otherwise */ + public boolean isSetStatement() { + return this.statement != null; + } + + public void setStatementIsSet(boolean value) { + if (!value) { + this.statement = null; + } + } + + public long getStatementId() { + return this.statementId; + } + + public TSExecuteStatementReq setStatementId(long statementId) { + this.statementId = statementId; + setStatementIdIsSet(true); + return this; + } + + public void unsetStatementId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ + public boolean isSetStatementId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + public void setStatementIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); + } + + public int getFetchSize() { + return this.fetchSize; + } + + public TSExecuteStatementReq setFetchSize(int fetchSize) { + this.fetchSize = fetchSize; + setFetchSizeIsSet(true); + return this; + } + + public void unsetFetchSize() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ + public boolean isSetFetchSize() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + public void setFetchSizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); + } + + public long getTimeout() { + return this.timeout; + } + + public TSExecuteStatementReq setTimeout(long timeout) { + this.timeout = timeout; + setTimeoutIsSet(true); + return this; + } + + public void unsetTimeout() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeout() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + public void setTimeoutIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + } + + public boolean isEnableRedirectQuery() { + return this.enableRedirectQuery; + } + + public TSExecuteStatementReq setEnableRedirectQuery(boolean enableRedirectQuery) { + this.enableRedirectQuery = enableRedirectQuery; + setEnableRedirectQueryIsSet(true); + return this; + } + + public void unsetEnableRedirectQuery() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); + } + + /** Returns true if field enableRedirectQuery is set (has been assigned a value) and false otherwise */ + public boolean isSetEnableRedirectQuery() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); + } + + public void setEnableRedirectQueryIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID, value); + } + + public boolean isJdbcQuery() { + return this.jdbcQuery; + } + + public TSExecuteStatementReq setJdbcQuery(boolean jdbcQuery) { + this.jdbcQuery = jdbcQuery; + setJdbcQueryIsSet(true); + return this; + } + + public void unsetJdbcQuery() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); + } + + /** Returns true if field jdbcQuery is set (has been assigned a value) and false otherwise */ + public boolean isSetJdbcQuery() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); + } + + public void setJdbcQueryIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JDBCQUERY_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case STATEMENT: + if (value == null) { + unsetStatement(); + } else { + setStatement((java.lang.String)value); + } + break; + + case STATEMENT_ID: + if (value == null) { + unsetStatementId(); + } else { + setStatementId((java.lang.Long)value); + } + break; + + case FETCH_SIZE: + if (value == null) { + unsetFetchSize(); + } else { + setFetchSize((java.lang.Integer)value); + } + break; + + case TIMEOUT: + if (value == null) { + unsetTimeout(); + } else { + setTimeout((java.lang.Long)value); + } + break; + + case ENABLE_REDIRECT_QUERY: + if (value == null) { + unsetEnableRedirectQuery(); + } else { + setEnableRedirectQuery((java.lang.Boolean)value); + } + break; + + case JDBC_QUERY: + if (value == null) { + unsetJdbcQuery(); + } else { + setJdbcQuery((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case STATEMENT: + return getStatement(); + + case STATEMENT_ID: + return getStatementId(); + + case FETCH_SIZE: + return getFetchSize(); + + case TIMEOUT: + return getTimeout(); + + case ENABLE_REDIRECT_QUERY: + return isEnableRedirectQuery(); + + case JDBC_QUERY: + return isJdbcQuery(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case STATEMENT: + return isSetStatement(); + case STATEMENT_ID: + return isSetStatementId(); + case FETCH_SIZE: + return isSetFetchSize(); + case TIMEOUT: + return isSetTimeout(); + case ENABLE_REDIRECT_QUERY: + return isSetEnableRedirectQuery(); + case JDBC_QUERY: + return isSetJdbcQuery(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSExecuteStatementReq) + return this.equals((TSExecuteStatementReq)that); + return false; + } + + public boolean equals(TSExecuteStatementReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_statement = true && this.isSetStatement(); + boolean that_present_statement = true && that.isSetStatement(); + if (this_present_statement || that_present_statement) { + if (!(this_present_statement && that_present_statement)) + return false; + if (!this.statement.equals(that.statement)) + return false; + } + + boolean this_present_statementId = true; + boolean that_present_statementId = true; + if (this_present_statementId || that_present_statementId) { + if (!(this_present_statementId && that_present_statementId)) + return false; + if (this.statementId != that.statementId) + return false; + } + + boolean this_present_fetchSize = true && this.isSetFetchSize(); + boolean that_present_fetchSize = true && that.isSetFetchSize(); + if (this_present_fetchSize || that_present_fetchSize) { + if (!(this_present_fetchSize && that_present_fetchSize)) + return false; + if (this.fetchSize != that.fetchSize) + return false; + } + + boolean this_present_timeout = true && this.isSetTimeout(); + boolean that_present_timeout = true && that.isSetTimeout(); + if (this_present_timeout || that_present_timeout) { + if (!(this_present_timeout && that_present_timeout)) + return false; + if (this.timeout != that.timeout) + return false; + } + + boolean this_present_enableRedirectQuery = true && this.isSetEnableRedirectQuery(); + boolean that_present_enableRedirectQuery = true && that.isSetEnableRedirectQuery(); + if (this_present_enableRedirectQuery || that_present_enableRedirectQuery) { + if (!(this_present_enableRedirectQuery && that_present_enableRedirectQuery)) + return false; + if (this.enableRedirectQuery != that.enableRedirectQuery) + return false; + } + + boolean this_present_jdbcQuery = true && this.isSetJdbcQuery(); + boolean that_present_jdbcQuery = true && that.isSetJdbcQuery(); + if (this_present_jdbcQuery || that_present_jdbcQuery) { + if (!(this_present_jdbcQuery && that_present_jdbcQuery)) + return false; + if (this.jdbcQuery != that.jdbcQuery) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetStatement()) ? 131071 : 524287); + if (isSetStatement()) + hashCode = hashCode * 8191 + statement.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); + + hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); + if (isSetFetchSize()) + hashCode = hashCode * 8191 + fetchSize; + + hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); + if (isSetTimeout()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); + + hashCode = hashCode * 8191 + ((isSetEnableRedirectQuery()) ? 131071 : 524287); + if (isSetEnableRedirectQuery()) + hashCode = hashCode * 8191 + ((enableRedirectQuery) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetJdbcQuery()) ? 131071 : 524287); + if (isSetJdbcQuery()) + hashCode = hashCode * 8191 + ((jdbcQuery) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSExecuteStatementReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatement(), other.isSetStatement()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatement()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statement, other.statement); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatementId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFetchSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEnableRedirectQuery(), other.isSetEnableRedirectQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnableRedirectQuery()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableRedirectQuery, other.enableRedirectQuery); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetJdbcQuery(), other.isSetJdbcQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJdbcQuery()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jdbcQuery, other.jdbcQuery); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSExecuteStatementReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("statement:"); + if (this.statement == null) { + sb.append("null"); + } else { + sb.append(this.statement); + } + first = false; + if (!first) sb.append(", "); + sb.append("statementId:"); + sb.append(this.statementId); + first = false; + if (isSetFetchSize()) { + if (!first) sb.append(", "); + sb.append("fetchSize:"); + sb.append(this.fetchSize); + first = false; + } + if (isSetTimeout()) { + if (!first) sb.append(", "); + sb.append("timeout:"); + sb.append(this.timeout); + first = false; + } + if (isSetEnableRedirectQuery()) { + if (!first) sb.append(", "); + sb.append("enableRedirectQuery:"); + sb.append(this.enableRedirectQuery); + first = false; + } + if (isSetJdbcQuery()) { + if (!first) sb.append(", "); + sb.append("jdbcQuery:"); + sb.append(this.jdbcQuery); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (statement == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statement' was not present! Struct: " + toString()); + } + // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSExecuteStatementReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSExecuteStatementReqStandardScheme getScheme() { + return new TSExecuteStatementReqStandardScheme(); + } + } + + private static class TSExecuteStatementReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSExecuteStatementReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATEMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.statement = iprot.readString(); + struct.setStatementIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STATEMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // FETCH_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // ENABLE_REDIRECT_QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.enableRedirectQuery = iprot.readBool(); + struct.setEnableRedirectQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // JDBC_QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.jdbcQuery = iprot.readBool(); + struct.setJdbcQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetStatementId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSExecuteStatementReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.statement != null) { + oprot.writeFieldBegin(STATEMENT_FIELD_DESC); + oprot.writeString(struct.statement); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); + oprot.writeI64(struct.statementId); + oprot.writeFieldEnd(); + if (struct.isSetFetchSize()) { + oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); + oprot.writeI32(struct.fetchSize); + oprot.writeFieldEnd(); + } + if (struct.isSetTimeout()) { + oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); + oprot.writeI64(struct.timeout); + oprot.writeFieldEnd(); + } + if (struct.isSetEnableRedirectQuery()) { + oprot.writeFieldBegin(ENABLE_REDIRECT_QUERY_FIELD_DESC); + oprot.writeBool(struct.enableRedirectQuery); + oprot.writeFieldEnd(); + } + if (struct.isSetJdbcQuery()) { + oprot.writeFieldBegin(JDBC_QUERY_FIELD_DESC); + oprot.writeBool(struct.jdbcQuery); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSExecuteStatementReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSExecuteStatementReqTupleScheme getScheme() { + return new TSExecuteStatementReqTupleScheme(); + } + } + + private static class TSExecuteStatementReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.statement); + oprot.writeI64(struct.statementId); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetFetchSize()) { + optionals.set(0); + } + if (struct.isSetTimeout()) { + optionals.set(1); + } + if (struct.isSetEnableRedirectQuery()) { + optionals.set(2); + } + if (struct.isSetJdbcQuery()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetFetchSize()) { + oprot.writeI32(struct.fetchSize); + } + if (struct.isSetTimeout()) { + oprot.writeI64(struct.timeout); + } + if (struct.isSetEnableRedirectQuery()) { + oprot.writeBool(struct.enableRedirectQuery); + } + if (struct.isSetJdbcQuery()) { + oprot.writeBool(struct.jdbcQuery); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.statement = iprot.readString(); + struct.setStatementIsSet(true); + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } + if (incoming.get(1)) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } + if (incoming.get(2)) { + struct.enableRedirectQuery = iprot.readBool(); + struct.setEnableRedirectQueryIsSet(true); + } + if (incoming.get(3)) { + struct.jdbcQuery = iprot.readBool(); + struct.setJdbcQueryIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementResp.java new file mode 100644 index 0000000000000..898a0aeb0fdad --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementResp.java @@ -0,0 +1,2441 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSExecuteStatementResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSExecuteStatementResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField IGNORE_TIME_STAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("ignoreTimeStamp", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final org.apache.thrift.protocol.TField DATA_TYPE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTypeList", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField QUERY_DATA_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("queryDataSet", org.apache.thrift.protocol.TType.STRUCT, (short)7); + private static final org.apache.thrift.protocol.TField NON_ALIGN_QUERY_DATA_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("nonAlignQueryDataSet", org.apache.thrift.protocol.TType.STRUCT, (short)8); + private static final org.apache.thrift.protocol.TField COLUMN_NAME_INDEX_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("columnNameIndexMap", org.apache.thrift.protocol.TType.MAP, (short)9); + private static final org.apache.thrift.protocol.TField SG_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("sgColumns", org.apache.thrift.protocol.TType.LIST, (short)10); + private static final org.apache.thrift.protocol.TField ALIAS_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("aliasColumns", org.apache.thrift.protocol.TType.LIST, (short)11); + private static final org.apache.thrift.protocol.TField TRACING_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tracingInfo", org.apache.thrift.protocol.TType.STRUCT, (short)12); + private static final org.apache.thrift.protocol.TField QUERY_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("queryResult", org.apache.thrift.protocol.TType.LIST, (short)13); + private static final org.apache.thrift.protocol.TField MORE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("moreData", org.apache.thrift.protocol.TType.BOOL, (short)14); + private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)15); + private static final org.apache.thrift.protocol.TField TABLE_MODEL_FIELD_DESC = new org.apache.thrift.protocol.TField("tableModel", org.apache.thrift.protocol.TType.BOOL, (short)16); + private static final org.apache.thrift.protocol.TField COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("columnIndex2TsBlockColumnIndexList", org.apache.thrift.protocol.TType.LIST, (short)17); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSExecuteStatementRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSExecuteStatementRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required + public long queryId; // optional + public @org.apache.thrift.annotation.Nullable java.util.List columns; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String operationType; // optional + public boolean ignoreTimeStamp; // optional + public @org.apache.thrift.annotation.Nullable java.util.List dataTypeList; // optional + public @org.apache.thrift.annotation.Nullable TSQueryDataSet queryDataSet; // optional + public @org.apache.thrift.annotation.Nullable TSQueryNonAlignDataSet nonAlignQueryDataSet; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map columnNameIndexMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.List sgColumns; // optional + public @org.apache.thrift.annotation.Nullable java.util.List aliasColumns; // optional + public @org.apache.thrift.annotation.Nullable TSTracingInfo tracingInfo; // optional + public @org.apache.thrift.annotation.Nullable java.util.List queryResult; // optional + public boolean moreData; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String database; // optional + public boolean tableModel; // optional + public @org.apache.thrift.annotation.Nullable java.util.List columnIndex2TsBlockColumnIndexList; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATUS((short)1, "status"), + QUERY_ID((short)2, "queryId"), + COLUMNS((short)3, "columns"), + OPERATION_TYPE((short)4, "operationType"), + IGNORE_TIME_STAMP((short)5, "ignoreTimeStamp"), + DATA_TYPE_LIST((short)6, "dataTypeList"), + QUERY_DATA_SET((short)7, "queryDataSet"), + NON_ALIGN_QUERY_DATA_SET((short)8, "nonAlignQueryDataSet"), + COLUMN_NAME_INDEX_MAP((short)9, "columnNameIndexMap"), + SG_COLUMNS((short)10, "sgColumns"), + ALIAS_COLUMNS((short)11, "aliasColumns"), + TRACING_INFO((short)12, "tracingInfo"), + QUERY_RESULT((short)13, "queryResult"), + MORE_DATA((short)14, "moreData"), + DATABASE((short)15, "database"), + TABLE_MODEL((short)16, "tableModel"), + COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST((short)17, "columnIndex2TsBlockColumnIndexList"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // QUERY_ID + return QUERY_ID; + case 3: // COLUMNS + return COLUMNS; + case 4: // OPERATION_TYPE + return OPERATION_TYPE; + case 5: // IGNORE_TIME_STAMP + return IGNORE_TIME_STAMP; + case 6: // DATA_TYPE_LIST + return DATA_TYPE_LIST; + case 7: // QUERY_DATA_SET + return QUERY_DATA_SET; + case 8: // NON_ALIGN_QUERY_DATA_SET + return NON_ALIGN_QUERY_DATA_SET; + case 9: // COLUMN_NAME_INDEX_MAP + return COLUMN_NAME_INDEX_MAP; + case 10: // SG_COLUMNS + return SG_COLUMNS; + case 11: // ALIAS_COLUMNS + return ALIAS_COLUMNS; + case 12: // TRACING_INFO + return TRACING_INFO; + case 13: // QUERY_RESULT + return QUERY_RESULT; + case 14: // MORE_DATA + return MORE_DATA; + case 15: // DATABASE + return DATABASE; + case 16: // TABLE_MODEL + return TABLE_MODEL; + case 17: // COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST + return COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __QUERYID_ISSET_ID = 0; + private static final int __IGNORETIMESTAMP_ISSET_ID = 1; + private static final int __MOREDATA_ISSET_ID = 2; + private static final int __TABLEMODEL_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.QUERY_ID,_Fields.COLUMNS,_Fields.OPERATION_TYPE,_Fields.IGNORE_TIME_STAMP,_Fields.DATA_TYPE_LIST,_Fields.QUERY_DATA_SET,_Fields.NON_ALIGN_QUERY_DATA_SET,_Fields.COLUMN_NAME_INDEX_MAP,_Fields.SG_COLUMNS,_Fields.ALIAS_COLUMNS,_Fields.TRACING_INFO,_Fields.QUERY_RESULT,_Fields.MORE_DATA,_Fields.DATABASE,_Fields.TABLE_MODEL,_Fields.COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST}; + 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IGNORE_TIME_STAMP, new org.apache.thrift.meta_data.FieldMetaData("ignoreTimeStamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.DATA_TYPE_LIST, new org.apache.thrift.meta_data.FieldMetaData("dataTypeList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.QUERY_DATA_SET, new org.apache.thrift.meta_data.FieldMetaData("queryDataSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryDataSet.class))); + tmpMap.put(_Fields.NON_ALIGN_QUERY_DATA_SET, new org.apache.thrift.meta_data.FieldMetaData("nonAlignQueryDataSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryNonAlignDataSet.class))); + tmpMap.put(_Fields.COLUMN_NAME_INDEX_MAP, new org.apache.thrift.meta_data.FieldMetaData("columnNameIndexMap", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.SG_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("sgColumns", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.ALIAS_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("aliasColumns", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)))); + tmpMap.put(_Fields.TRACING_INFO, new org.apache.thrift.meta_data.FieldMetaData("tracingInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSTracingInfo.class))); + tmpMap.put(_Fields.QUERY_RESULT, new org.apache.thrift.meta_data.FieldMetaData("queryResult", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.MORE_DATA, new org.apache.thrift.meta_data.FieldMetaData("moreData", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_MODEL, new org.apache.thrift.meta_data.FieldMetaData("tableModel", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST, new org.apache.thrift.meta_data.FieldMetaData("columnIndex2TsBlockColumnIndexList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSExecuteStatementResp.class, metaDataMap); + } + + public TSExecuteStatementResp() { + } + + public TSExecuteStatementResp( + org.apache.iotdb.common.rpc.thrift.TSStatus status) + { + this(); + this.status = status; + } + + /** + * Performs a deep copy on other. + */ + public TSExecuteStatementResp(TSExecuteStatementResp other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetStatus()) { + this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); + } + this.queryId = other.queryId; + if (other.isSetColumns()) { + java.util.List __this__columns = new java.util.ArrayList(other.columns); + this.columns = __this__columns; + } + if (other.isSetOperationType()) { + this.operationType = other.operationType; + } + this.ignoreTimeStamp = other.ignoreTimeStamp; + if (other.isSetDataTypeList()) { + java.util.List __this__dataTypeList = new java.util.ArrayList(other.dataTypeList); + this.dataTypeList = __this__dataTypeList; + } + if (other.isSetQueryDataSet()) { + this.queryDataSet = new TSQueryDataSet(other.queryDataSet); + } + if (other.isSetNonAlignQueryDataSet()) { + this.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(other.nonAlignQueryDataSet); + } + if (other.isSetColumnNameIndexMap()) { + java.util.Map __this__columnNameIndexMap = new java.util.HashMap(other.columnNameIndexMap); + this.columnNameIndexMap = __this__columnNameIndexMap; + } + if (other.isSetSgColumns()) { + java.util.List __this__sgColumns = new java.util.ArrayList(other.sgColumns); + this.sgColumns = __this__sgColumns; + } + if (other.isSetAliasColumns()) { + java.util.List __this__aliasColumns = new java.util.ArrayList(other.aliasColumns); + this.aliasColumns = __this__aliasColumns; + } + if (other.isSetTracingInfo()) { + this.tracingInfo = new TSTracingInfo(other.tracingInfo); + } + if (other.isSetQueryResult()) { + java.util.List __this__queryResult = new java.util.ArrayList(other.queryResult); + this.queryResult = __this__queryResult; + } + this.moreData = other.moreData; + if (other.isSetDatabase()) { + this.database = other.database; + } + this.tableModel = other.tableModel; + if (other.isSetColumnIndex2TsBlockColumnIndexList()) { + java.util.List __this__columnIndex2TsBlockColumnIndexList = new java.util.ArrayList(other.columnIndex2TsBlockColumnIndexList); + this.columnIndex2TsBlockColumnIndexList = __this__columnIndex2TsBlockColumnIndexList; + } + } + + @Override + public TSExecuteStatementResp deepCopy() { + return new TSExecuteStatementResp(this); + } + + @Override + public void clear() { + this.status = null; + setQueryIdIsSet(false); + this.queryId = 0; + this.columns = null; + this.operationType = null; + setIgnoreTimeStampIsSet(false); + this.ignoreTimeStamp = false; + this.dataTypeList = null; + this.queryDataSet = null; + this.nonAlignQueryDataSet = null; + this.columnNameIndexMap = null; + this.sgColumns = null; + this.aliasColumns = null; + this.tracingInfo = null; + this.queryResult = null; + setMoreDataIsSet(false); + this.moreData = false; + this.database = null; + setTableModelIsSet(false); + this.tableModel = false; + this.columnIndex2TsBlockColumnIndexList = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { + return this.status; + } + + public TSExecuteStatementResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { + this.status = status; + return this; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + public long getQueryId() { + return this.queryId; + } + + public TSExecuteStatementResp setQueryId(long queryId) { + this.queryId = queryId; + setQueryIdIsSet(true); + return this; + } + + public void unsetQueryId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + public void setQueryIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(java.lang.String elem) { + if (this.columns == null) { + this.columns = new java.util.ArrayList(); + } + this.columns.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getColumns() { + return this.columns; + } + + public TSExecuteStatementResp setColumns(@org.apache.thrift.annotation.Nullable java.util.List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getOperationType() { + return this.operationType; + } + + public TSExecuteStatementResp setOperationType(@org.apache.thrift.annotation.Nullable java.lang.String operationType) { + this.operationType = operationType; + return this; + } + + public void unsetOperationType() { + this.operationType = null; + } + + /** Returns true if field operationType is set (has been assigned a value) and false otherwise */ + public boolean isSetOperationType() { + return this.operationType != null; + } + + public void setOperationTypeIsSet(boolean value) { + if (!value) { + this.operationType = null; + } + } + + public boolean isIgnoreTimeStamp() { + return this.ignoreTimeStamp; + } + + public TSExecuteStatementResp setIgnoreTimeStamp(boolean ignoreTimeStamp) { + this.ignoreTimeStamp = ignoreTimeStamp; + setIgnoreTimeStampIsSet(true); + return this; + } + + public void unsetIgnoreTimeStamp() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IGNORETIMESTAMP_ISSET_ID); + } + + /** Returns true if field ignoreTimeStamp is set (has been assigned a value) and false otherwise */ + public boolean isSetIgnoreTimeStamp() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IGNORETIMESTAMP_ISSET_ID); + } + + public void setIgnoreTimeStampIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IGNORETIMESTAMP_ISSET_ID, value); + } + + public int getDataTypeListSize() { + return (this.dataTypeList == null) ? 0 : this.dataTypeList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getDataTypeListIterator() { + return (this.dataTypeList == null) ? null : this.dataTypeList.iterator(); + } + + public void addToDataTypeList(java.lang.String elem) { + if (this.dataTypeList == null) { + this.dataTypeList = new java.util.ArrayList(); + } + this.dataTypeList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getDataTypeList() { + return this.dataTypeList; + } + + public TSExecuteStatementResp setDataTypeList(@org.apache.thrift.annotation.Nullable java.util.List dataTypeList) { + this.dataTypeList = dataTypeList; + return this; + } + + public void unsetDataTypeList() { + this.dataTypeList = null; + } + + /** Returns true if field dataTypeList is set (has been assigned a value) and false otherwise */ + public boolean isSetDataTypeList() { + return this.dataTypeList != null; + } + + public void setDataTypeListIsSet(boolean value) { + if (!value) { + this.dataTypeList = null; + } + } + + @org.apache.thrift.annotation.Nullable + public TSQueryDataSet getQueryDataSet() { + return this.queryDataSet; + } + + public TSExecuteStatementResp setQueryDataSet(@org.apache.thrift.annotation.Nullable TSQueryDataSet queryDataSet) { + this.queryDataSet = queryDataSet; + return this; + } + + public void unsetQueryDataSet() { + this.queryDataSet = null; + } + + /** Returns true if field queryDataSet is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryDataSet() { + return this.queryDataSet != null; + } + + public void setQueryDataSetIsSet(boolean value) { + if (!value) { + this.queryDataSet = null; + } + } + + @org.apache.thrift.annotation.Nullable + public TSQueryNonAlignDataSet getNonAlignQueryDataSet() { + return this.nonAlignQueryDataSet; + } + + public TSExecuteStatementResp setNonAlignQueryDataSet(@org.apache.thrift.annotation.Nullable TSQueryNonAlignDataSet nonAlignQueryDataSet) { + this.nonAlignQueryDataSet = nonAlignQueryDataSet; + return this; + } + + public void unsetNonAlignQueryDataSet() { + this.nonAlignQueryDataSet = null; + } + + /** Returns true if field nonAlignQueryDataSet is set (has been assigned a value) and false otherwise */ + public boolean isSetNonAlignQueryDataSet() { + return this.nonAlignQueryDataSet != null; + } + + public void setNonAlignQueryDataSetIsSet(boolean value) { + if (!value) { + this.nonAlignQueryDataSet = null; + } + } + + public int getColumnNameIndexMapSize() { + return (this.columnNameIndexMap == null) ? 0 : this.columnNameIndexMap.size(); + } + + public void putToColumnNameIndexMap(java.lang.String key, int val) { + if (this.columnNameIndexMap == null) { + this.columnNameIndexMap = new java.util.HashMap(); + } + this.columnNameIndexMap.put(key, val); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Map getColumnNameIndexMap() { + return this.columnNameIndexMap; + } + + public TSExecuteStatementResp setColumnNameIndexMap(@org.apache.thrift.annotation.Nullable java.util.Map columnNameIndexMap) { + this.columnNameIndexMap = columnNameIndexMap; + return this; + } + + public void unsetColumnNameIndexMap() { + this.columnNameIndexMap = null; + } + + /** Returns true if field columnNameIndexMap is set (has been assigned a value) and false otherwise */ + public boolean isSetColumnNameIndexMap() { + return this.columnNameIndexMap != null; + } + + public void setColumnNameIndexMapIsSet(boolean value) { + if (!value) { + this.columnNameIndexMap = null; + } + } + + public int getSgColumnsSize() { + return (this.sgColumns == null) ? 0 : this.sgColumns.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getSgColumnsIterator() { + return (this.sgColumns == null) ? null : this.sgColumns.iterator(); + } + + public void addToSgColumns(java.lang.String elem) { + if (this.sgColumns == null) { + this.sgColumns = new java.util.ArrayList(); + } + this.sgColumns.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getSgColumns() { + return this.sgColumns; + } + + public TSExecuteStatementResp setSgColumns(@org.apache.thrift.annotation.Nullable java.util.List sgColumns) { + this.sgColumns = sgColumns; + return this; + } + + public void unsetSgColumns() { + this.sgColumns = null; + } + + /** Returns true if field sgColumns is set (has been assigned a value) and false otherwise */ + public boolean isSetSgColumns() { + return this.sgColumns != null; + } + + public void setSgColumnsIsSet(boolean value) { + if (!value) { + this.sgColumns = null; + } + } + + public int getAliasColumnsSize() { + return (this.aliasColumns == null) ? 0 : this.aliasColumns.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getAliasColumnsIterator() { + return (this.aliasColumns == null) ? null : this.aliasColumns.iterator(); + } + + public void addToAliasColumns(byte elem) { + if (this.aliasColumns == null) { + this.aliasColumns = new java.util.ArrayList(); + } + this.aliasColumns.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getAliasColumns() { + return this.aliasColumns; + } + + public TSExecuteStatementResp setAliasColumns(@org.apache.thrift.annotation.Nullable java.util.List aliasColumns) { + this.aliasColumns = aliasColumns; + return this; + } + + public void unsetAliasColumns() { + this.aliasColumns = null; + } + + /** Returns true if field aliasColumns is set (has been assigned a value) and false otherwise */ + public boolean isSetAliasColumns() { + return this.aliasColumns != null; + } + + public void setAliasColumnsIsSet(boolean value) { + if (!value) { + this.aliasColumns = null; + } + } + + @org.apache.thrift.annotation.Nullable + public TSTracingInfo getTracingInfo() { + return this.tracingInfo; + } + + public TSExecuteStatementResp setTracingInfo(@org.apache.thrift.annotation.Nullable TSTracingInfo tracingInfo) { + this.tracingInfo = tracingInfo; + return this; + } + + public void unsetTracingInfo() { + this.tracingInfo = null; + } + + /** Returns true if field tracingInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetTracingInfo() { + return this.tracingInfo != null; + } + + public void setTracingInfoIsSet(boolean value) { + if (!value) { + this.tracingInfo = null; + } + } + + public int getQueryResultSize() { + return (this.queryResult == null) ? 0 : this.queryResult.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getQueryResultIterator() { + return (this.queryResult == null) ? null : this.queryResult.iterator(); + } + + public void addToQueryResult(java.nio.ByteBuffer elem) { + if (this.queryResult == null) { + this.queryResult = new java.util.ArrayList(); + } + this.queryResult.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getQueryResult() { + return this.queryResult; + } + + public TSExecuteStatementResp setQueryResult(@org.apache.thrift.annotation.Nullable java.util.List queryResult) { + this.queryResult = queryResult; + return this; + } + + public void unsetQueryResult() { + this.queryResult = null; + } + + /** Returns true if field queryResult is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryResult() { + return this.queryResult != null; + } + + public void setQueryResultIsSet(boolean value) { + if (!value) { + this.queryResult = null; + } + } + + public boolean isMoreData() { + return this.moreData; + } + + public TSExecuteStatementResp setMoreData(boolean moreData) { + this.moreData = moreData; + setMoreDataIsSet(true); + return this; + } + + public void unsetMoreData() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MOREDATA_ISSET_ID); + } + + /** Returns true if field moreData is set (has been assigned a value) and false otherwise */ + public boolean isSetMoreData() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MOREDATA_ISSET_ID); + } + + public void setMoreDataIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MOREDATA_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getDatabase() { + return this.database; + } + + public TSExecuteStatementResp setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) { + this.database = database; + return this; + } + + public void unsetDatabase() { + this.database = null; + } + + /** Returns true if field database is set (has been assigned a value) and false otherwise */ + public boolean isSetDatabase() { + return this.database != null; + } + + public void setDatabaseIsSet(boolean value) { + if (!value) { + this.database = null; + } + } + + public boolean isTableModel() { + return this.tableModel; + } + + public TSExecuteStatementResp setTableModel(boolean tableModel) { + this.tableModel = tableModel; + setTableModelIsSet(true); + return this; + } + + public void unsetTableModel() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLEMODEL_ISSET_ID); + } + + /** Returns true if field tableModel is set (has been assigned a value) and false otherwise */ + public boolean isSetTableModel() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLEMODEL_ISSET_ID); + } + + public void setTableModelIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLEMODEL_ISSET_ID, value); + } + + public int getColumnIndex2TsBlockColumnIndexListSize() { + return (this.columnIndex2TsBlockColumnIndexList == null) ? 0 : this.columnIndex2TsBlockColumnIndexList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getColumnIndex2TsBlockColumnIndexListIterator() { + return (this.columnIndex2TsBlockColumnIndexList == null) ? null : this.columnIndex2TsBlockColumnIndexList.iterator(); + } + + public void addToColumnIndex2TsBlockColumnIndexList(int elem) { + if (this.columnIndex2TsBlockColumnIndexList == null) { + this.columnIndex2TsBlockColumnIndexList = new java.util.ArrayList(); + } + this.columnIndex2TsBlockColumnIndexList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getColumnIndex2TsBlockColumnIndexList() { + return this.columnIndex2TsBlockColumnIndexList; + } + + public TSExecuteStatementResp setColumnIndex2TsBlockColumnIndexList(@org.apache.thrift.annotation.Nullable java.util.List columnIndex2TsBlockColumnIndexList) { + this.columnIndex2TsBlockColumnIndexList = columnIndex2TsBlockColumnIndexList; + return this; + } + + public void unsetColumnIndex2TsBlockColumnIndexList() { + this.columnIndex2TsBlockColumnIndexList = null; + } + + /** Returns true if field columnIndex2TsBlockColumnIndexList is set (has been assigned a value) and false otherwise */ + public boolean isSetColumnIndex2TsBlockColumnIndexList() { + return this.columnIndex2TsBlockColumnIndexList != null; + } + + public void setColumnIndex2TsBlockColumnIndexListIsSet(boolean value) { + if (!value) { + this.columnIndex2TsBlockColumnIndexList = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + case QUERY_ID: + if (value == null) { + unsetQueryId(); + } else { + setQueryId((java.lang.Long)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((java.util.List)value); + } + break; + + case OPERATION_TYPE: + if (value == null) { + unsetOperationType(); + } else { + setOperationType((java.lang.String)value); + } + break; + + case IGNORE_TIME_STAMP: + if (value == null) { + unsetIgnoreTimeStamp(); + } else { + setIgnoreTimeStamp((java.lang.Boolean)value); + } + break; + + case DATA_TYPE_LIST: + if (value == null) { + unsetDataTypeList(); + } else { + setDataTypeList((java.util.List)value); + } + break; + + case QUERY_DATA_SET: + if (value == null) { + unsetQueryDataSet(); + } else { + setQueryDataSet((TSQueryDataSet)value); + } + break; + + case NON_ALIGN_QUERY_DATA_SET: + if (value == null) { + unsetNonAlignQueryDataSet(); + } else { + setNonAlignQueryDataSet((TSQueryNonAlignDataSet)value); + } + break; + + case COLUMN_NAME_INDEX_MAP: + if (value == null) { + unsetColumnNameIndexMap(); + } else { + setColumnNameIndexMap((java.util.Map)value); + } + break; + + case SG_COLUMNS: + if (value == null) { + unsetSgColumns(); + } else { + setSgColumns((java.util.List)value); + } + break; + + case ALIAS_COLUMNS: + if (value == null) { + unsetAliasColumns(); + } else { + setAliasColumns((java.util.List)value); + } + break; + + case TRACING_INFO: + if (value == null) { + unsetTracingInfo(); + } else { + setTracingInfo((TSTracingInfo)value); + } + break; + + case QUERY_RESULT: + if (value == null) { + unsetQueryResult(); + } else { + setQueryResult((java.util.List)value); + } + break; + + case MORE_DATA: + if (value == null) { + unsetMoreData(); + } else { + setMoreData((java.lang.Boolean)value); + } + break; + + case DATABASE: + if (value == null) { + unsetDatabase(); + } else { + setDatabase((java.lang.String)value); + } + break; + + case TABLE_MODEL: + if (value == null) { + unsetTableModel(); + } else { + setTableModel((java.lang.Boolean)value); + } + break; + + case COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST: + if (value == null) { + unsetColumnIndex2TsBlockColumnIndexList(); + } else { + setColumnIndex2TsBlockColumnIndexList((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case QUERY_ID: + return getQueryId(); + + case COLUMNS: + return getColumns(); + + case OPERATION_TYPE: + return getOperationType(); + + case IGNORE_TIME_STAMP: + return isIgnoreTimeStamp(); + + case DATA_TYPE_LIST: + return getDataTypeList(); + + case QUERY_DATA_SET: + return getQueryDataSet(); + + case NON_ALIGN_QUERY_DATA_SET: + return getNonAlignQueryDataSet(); + + case COLUMN_NAME_INDEX_MAP: + return getColumnNameIndexMap(); + + case SG_COLUMNS: + return getSgColumns(); + + case ALIAS_COLUMNS: + return getAliasColumns(); + + case TRACING_INFO: + return getTracingInfo(); + + case QUERY_RESULT: + return getQueryResult(); + + case MORE_DATA: + return isMoreData(); + + case DATABASE: + return getDatabase(); + + case TABLE_MODEL: + return isTableModel(); + + case COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST: + return getColumnIndex2TsBlockColumnIndexList(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case QUERY_ID: + return isSetQueryId(); + case COLUMNS: + return isSetColumns(); + case OPERATION_TYPE: + return isSetOperationType(); + case IGNORE_TIME_STAMP: + return isSetIgnoreTimeStamp(); + case DATA_TYPE_LIST: + return isSetDataTypeList(); + case QUERY_DATA_SET: + return isSetQueryDataSet(); + case NON_ALIGN_QUERY_DATA_SET: + return isSetNonAlignQueryDataSet(); + case COLUMN_NAME_INDEX_MAP: + return isSetColumnNameIndexMap(); + case SG_COLUMNS: + return isSetSgColumns(); + case ALIAS_COLUMNS: + return isSetAliasColumns(); + case TRACING_INFO: + return isSetTracingInfo(); + case QUERY_RESULT: + return isSetQueryResult(); + case MORE_DATA: + return isSetMoreData(); + case DATABASE: + return isSetDatabase(); + case TABLE_MODEL: + return isSetTableModel(); + case COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST: + return isSetColumnIndex2TsBlockColumnIndexList(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSExecuteStatementResp) + return this.equals((TSExecuteStatementResp)that); + return false; + } + + public boolean equals(TSExecuteStatementResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_queryId = true && this.isSetQueryId(); + boolean that_present_queryId = true && that.isSetQueryId(); + if (this_present_queryId || that_present_queryId) { + if (!(this_present_queryId && that_present_queryId)) + return false; + if (this.queryId != that.queryId) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + 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)) + return false; + if (!this.operationType.equals(that.operationType)) + return false; + } + + boolean this_present_ignoreTimeStamp = true && this.isSetIgnoreTimeStamp(); + boolean that_present_ignoreTimeStamp = true && that.isSetIgnoreTimeStamp(); + if (this_present_ignoreTimeStamp || that_present_ignoreTimeStamp) { + if (!(this_present_ignoreTimeStamp && that_present_ignoreTimeStamp)) + return false; + if (this.ignoreTimeStamp != that.ignoreTimeStamp) + return false; + } + + boolean this_present_dataTypeList = true && this.isSetDataTypeList(); + boolean that_present_dataTypeList = true && that.isSetDataTypeList(); + if (this_present_dataTypeList || that_present_dataTypeList) { + if (!(this_present_dataTypeList && that_present_dataTypeList)) + return false; + if (!this.dataTypeList.equals(that.dataTypeList)) + return false; + } + + boolean this_present_queryDataSet = true && this.isSetQueryDataSet(); + boolean that_present_queryDataSet = true && that.isSetQueryDataSet(); + if (this_present_queryDataSet || that_present_queryDataSet) { + if (!(this_present_queryDataSet && that_present_queryDataSet)) + return false; + if (!this.queryDataSet.equals(that.queryDataSet)) + return false; + } + + boolean this_present_nonAlignQueryDataSet = true && this.isSetNonAlignQueryDataSet(); + boolean that_present_nonAlignQueryDataSet = true && that.isSetNonAlignQueryDataSet(); + if (this_present_nonAlignQueryDataSet || that_present_nonAlignQueryDataSet) { + if (!(this_present_nonAlignQueryDataSet && that_present_nonAlignQueryDataSet)) + return false; + if (!this.nonAlignQueryDataSet.equals(that.nonAlignQueryDataSet)) + return false; + } + + boolean this_present_columnNameIndexMap = true && this.isSetColumnNameIndexMap(); + boolean that_present_columnNameIndexMap = true && that.isSetColumnNameIndexMap(); + if (this_present_columnNameIndexMap || that_present_columnNameIndexMap) { + if (!(this_present_columnNameIndexMap && that_present_columnNameIndexMap)) + return false; + if (!this.columnNameIndexMap.equals(that.columnNameIndexMap)) + return false; + } + + boolean this_present_sgColumns = true && this.isSetSgColumns(); + boolean that_present_sgColumns = true && that.isSetSgColumns(); + if (this_present_sgColumns || that_present_sgColumns) { + if (!(this_present_sgColumns && that_present_sgColumns)) + return false; + if (!this.sgColumns.equals(that.sgColumns)) + return false; + } + + boolean this_present_aliasColumns = true && this.isSetAliasColumns(); + boolean that_present_aliasColumns = true && that.isSetAliasColumns(); + if (this_present_aliasColumns || that_present_aliasColumns) { + if (!(this_present_aliasColumns && that_present_aliasColumns)) + return false; + if (!this.aliasColumns.equals(that.aliasColumns)) + return false; + } + + boolean this_present_tracingInfo = true && this.isSetTracingInfo(); + boolean that_present_tracingInfo = true && that.isSetTracingInfo(); + if (this_present_tracingInfo || that_present_tracingInfo) { + if (!(this_present_tracingInfo && that_present_tracingInfo)) + return false; + if (!this.tracingInfo.equals(that.tracingInfo)) + return false; + } + + boolean this_present_queryResult = true && this.isSetQueryResult(); + boolean that_present_queryResult = true && that.isSetQueryResult(); + if (this_present_queryResult || that_present_queryResult) { + if (!(this_present_queryResult && that_present_queryResult)) + return false; + if (!this.queryResult.equals(that.queryResult)) + return false; + } + + boolean this_present_moreData = true && this.isSetMoreData(); + boolean that_present_moreData = true && that.isSetMoreData(); + if (this_present_moreData || that_present_moreData) { + if (!(this_present_moreData && that_present_moreData)) + return false; + if (this.moreData != that.moreData) + return false; + } + + boolean this_present_database = true && this.isSetDatabase(); + boolean that_present_database = true && that.isSetDatabase(); + if (this_present_database || that_present_database) { + if (!(this_present_database && that_present_database)) + return false; + if (!this.database.equals(that.database)) + return false; + } + + boolean this_present_tableModel = true && this.isSetTableModel(); + boolean that_present_tableModel = true && that.isSetTableModel(); + if (this_present_tableModel || that_present_tableModel) { + if (!(this_present_tableModel && that_present_tableModel)) + return false; + if (this.tableModel != that.tableModel) + return false; + } + + boolean this_present_columnIndex2TsBlockColumnIndexList = true && this.isSetColumnIndex2TsBlockColumnIndexList(); + boolean that_present_columnIndex2TsBlockColumnIndexList = true && that.isSetColumnIndex2TsBlockColumnIndexList(); + if (this_present_columnIndex2TsBlockColumnIndexList || that_present_columnIndex2TsBlockColumnIndexList) { + if (!(this_present_columnIndex2TsBlockColumnIndexList && that_present_columnIndex2TsBlockColumnIndexList)) + return false; + if (!this.columnIndex2TsBlockColumnIndexList.equals(that.columnIndex2TsBlockColumnIndexList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + ((isSetQueryId()) ? 131071 : 524287); + if (isSetQueryId()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); + + hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287); + if (isSetColumns()) + hashCode = hashCode * 8191 + columns.hashCode(); + + hashCode = hashCode * 8191 + ((isSetOperationType()) ? 131071 : 524287); + if (isSetOperationType()) + hashCode = hashCode * 8191 + operationType.hashCode(); + + hashCode = hashCode * 8191 + ((isSetIgnoreTimeStamp()) ? 131071 : 524287); + if (isSetIgnoreTimeStamp()) + hashCode = hashCode * 8191 + ((ignoreTimeStamp) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetDataTypeList()) ? 131071 : 524287); + if (isSetDataTypeList()) + hashCode = hashCode * 8191 + dataTypeList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetQueryDataSet()) ? 131071 : 524287); + if (isSetQueryDataSet()) + hashCode = hashCode * 8191 + queryDataSet.hashCode(); + + hashCode = hashCode * 8191 + ((isSetNonAlignQueryDataSet()) ? 131071 : 524287); + if (isSetNonAlignQueryDataSet()) + hashCode = hashCode * 8191 + nonAlignQueryDataSet.hashCode(); + + hashCode = hashCode * 8191 + ((isSetColumnNameIndexMap()) ? 131071 : 524287); + if (isSetColumnNameIndexMap()) + hashCode = hashCode * 8191 + columnNameIndexMap.hashCode(); + + hashCode = hashCode * 8191 + ((isSetSgColumns()) ? 131071 : 524287); + if (isSetSgColumns()) + hashCode = hashCode * 8191 + sgColumns.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAliasColumns()) ? 131071 : 524287); + if (isSetAliasColumns()) + hashCode = hashCode * 8191 + aliasColumns.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTracingInfo()) ? 131071 : 524287); + if (isSetTracingInfo()) + hashCode = hashCode * 8191 + tracingInfo.hashCode(); + + hashCode = hashCode * 8191 + ((isSetQueryResult()) ? 131071 : 524287); + if (isSetQueryResult()) + hashCode = hashCode * 8191 + queryResult.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMoreData()) ? 131071 : 524287); + if (isSetMoreData()) + hashCode = hashCode * 8191 + ((moreData) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287); + if (isSetDatabase()) + hashCode = hashCode * 8191 + database.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTableModel()) ? 131071 : 524287); + if (isSetTableModel()) + hashCode = hashCode * 8191 + ((tableModel) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetColumnIndex2TsBlockColumnIndexList()) ? 131071 : 524287); + if (isSetColumnIndex2TsBlockColumnIndexList()) + hashCode = hashCode * 8191 + columnIndex2TsBlockColumnIndexList.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSExecuteStatementResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetColumns(), other.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetOperationType(), other.isSetOperationType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperationType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIgnoreTimeStamp(), other.isSetIgnoreTimeStamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIgnoreTimeStamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ignoreTimeStamp, other.ignoreTimeStamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDataTypeList(), other.isSetDataTypeList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataTypeList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTypeList, other.dataTypeList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryDataSet(), other.isSetQueryDataSet()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryDataSet()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryDataSet, other.queryDataSet); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetNonAlignQueryDataSet(), other.isSetNonAlignQueryDataSet()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNonAlignQueryDataSet()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonAlignQueryDataSet, other.nonAlignQueryDataSet); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetColumnNameIndexMap(), other.isSetColumnNameIndexMap()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnNameIndexMap()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnNameIndexMap, other.columnNameIndexMap); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSgColumns(), other.isSetSgColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSgColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sgColumns, other.sgColumns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetAliasColumns(), other.isSetAliasColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAliasColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aliasColumns, other.aliasColumns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTracingInfo(), other.isSetTracingInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTracingInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tracingInfo, other.tracingInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryResult(), other.isSetQueryResult()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryResult()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryResult, other.queryResult); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMoreData(), other.isSetMoreData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMoreData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.moreData, other.moreData); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDatabase(), other.isSetDatabase()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatabase()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTableModel(), other.isSetTableModel()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableModel()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableModel, other.tableModel); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetColumnIndex2TsBlockColumnIndexList(), other.isSetColumnIndex2TsBlockColumnIndexList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnIndex2TsBlockColumnIndexList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnIndex2TsBlockColumnIndexList, other.columnIndex2TsBlockColumnIndexList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSExecuteStatementResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (isSetQueryId()) { + if (!first) sb.append(", "); + sb.append("queryId:"); + sb.append(this.queryId); + first = false; + } + if (isSetColumns()) { + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + } + if (isSetOperationType()) { + if (!first) sb.append(", "); + sb.append("operationType:"); + if (this.operationType == null) { + sb.append("null"); + } else { + sb.append(this.operationType); + } + first = false; + } + if (isSetIgnoreTimeStamp()) { + if (!first) sb.append(", "); + sb.append("ignoreTimeStamp:"); + sb.append(this.ignoreTimeStamp); + first = false; + } + if (isSetDataTypeList()) { + if (!first) sb.append(", "); + sb.append("dataTypeList:"); + if (this.dataTypeList == null) { + sb.append("null"); + } else { + sb.append(this.dataTypeList); + } + first = false; + } + if (isSetQueryDataSet()) { + if (!first) sb.append(", "); + sb.append("queryDataSet:"); + if (this.queryDataSet == null) { + sb.append("null"); + } else { + sb.append(this.queryDataSet); + } + first = false; + } + if (isSetNonAlignQueryDataSet()) { + if (!first) sb.append(", "); + sb.append("nonAlignQueryDataSet:"); + if (this.nonAlignQueryDataSet == null) { + sb.append("null"); + } else { + sb.append(this.nonAlignQueryDataSet); + } + first = false; + } + if (isSetColumnNameIndexMap()) { + if (!first) sb.append(", "); + sb.append("columnNameIndexMap:"); + if (this.columnNameIndexMap == null) { + sb.append("null"); + } else { + sb.append(this.columnNameIndexMap); + } + first = false; + } + if (isSetSgColumns()) { + if (!first) sb.append(", "); + sb.append("sgColumns:"); + if (this.sgColumns == null) { + sb.append("null"); + } else { + sb.append(this.sgColumns); + } + first = false; + } + if (isSetAliasColumns()) { + if (!first) sb.append(", "); + sb.append("aliasColumns:"); + if (this.aliasColumns == null) { + sb.append("null"); + } else { + sb.append(this.aliasColumns); + } + first = false; + } + if (isSetTracingInfo()) { + if (!first) sb.append(", "); + sb.append("tracingInfo:"); + if (this.tracingInfo == null) { + sb.append("null"); + } else { + sb.append(this.tracingInfo); + } + first = false; + } + if (isSetQueryResult()) { + if (!first) sb.append(", "); + sb.append("queryResult:"); + if (this.queryResult == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.queryResult, sb); + } + first = false; + } + if (isSetMoreData()) { + if (!first) sb.append(", "); + sb.append("moreData:"); + sb.append(this.moreData); + first = false; + } + if (isSetDatabase()) { + if (!first) sb.append(", "); + sb.append("database:"); + if (this.database == null) { + sb.append("null"); + } else { + sb.append(this.database); + } + first = false; + } + if (isSetTableModel()) { + if (!first) sb.append(", "); + sb.append("tableModel:"); + sb.append(this.tableModel); + first = false; + } + if (isSetColumnIndex2TsBlockColumnIndexList()) { + if (!first) sb.append(", "); + sb.append("columnIndex2TsBlockColumnIndexList:"); + if (this.columnIndex2TsBlockColumnIndexList == null) { + sb.append("null"); + } else { + sb.append(this.columnIndex2TsBlockColumnIndexList); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (status != null) { + status.validate(); + } + if (queryDataSet != null) { + queryDataSet.validate(); + } + if (nonAlignQueryDataSet != null) { + nonAlignQueryDataSet.validate(); + } + if (tracingInfo != null) { + tracingInfo.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSExecuteStatementRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSExecuteStatementRespStandardScheme getScheme() { + return new TSExecuteStatementRespStandardScheme(); + } + } + + private static class TSExecuteStatementRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSExecuteStatementResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // QUERY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list48 = iprot.readListBegin(); + struct.columns = new java.util.ArrayList(_list48.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem49; + for (int _i50 = 0; _i50 < _list48.size; ++_i50) + { + _elem49 = iprot.readString(); + struct.columns.add(_elem49); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // OPERATION_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.operationType = iprot.readString(); + struct.setOperationTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // IGNORE_TIME_STAMP + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.ignoreTimeStamp = iprot.readBool(); + struct.setIgnoreTimeStampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // DATA_TYPE_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list51 = iprot.readListBegin(); + struct.dataTypeList = new java.util.ArrayList(_list51.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem52; + for (int _i53 = 0; _i53 < _list51.size; ++_i53) + { + _elem52 = iprot.readString(); + struct.dataTypeList.add(_elem52); + } + iprot.readListEnd(); + } + struct.setDataTypeListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // QUERY_DATA_SET + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.queryDataSet = new TSQueryDataSet(); + struct.queryDataSet.read(iprot); + struct.setQueryDataSetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // NON_ALIGN_QUERY_DATA_SET + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(); + struct.nonAlignQueryDataSet.read(iprot); + struct.setNonAlignQueryDataSetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // COLUMN_NAME_INDEX_MAP + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map54 = iprot.readMapBegin(); + struct.columnNameIndexMap = new java.util.HashMap(2*_map54.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key55; + int _val56; + for (int _i57 = 0; _i57 < _map54.size; ++_i57) + { + _key55 = iprot.readString(); + _val56 = iprot.readI32(); + struct.columnNameIndexMap.put(_key55, _val56); + } + iprot.readMapEnd(); + } + struct.setColumnNameIndexMapIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // SG_COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(); + struct.sgColumns = new java.util.ArrayList(_list58.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem59; + for (int _i60 = 0; _i60 < _list58.size; ++_i60) + { + _elem59 = iprot.readString(); + struct.sgColumns.add(_elem59); + } + iprot.readListEnd(); + } + struct.setSgColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // ALIAS_COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list61 = iprot.readListBegin(); + struct.aliasColumns = new java.util.ArrayList(_list61.size); + byte _elem62; + for (int _i63 = 0; _i63 < _list61.size; ++_i63) + { + _elem62 = iprot.readByte(); + struct.aliasColumns.add(_elem62); + } + iprot.readListEnd(); + } + struct.setAliasColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // TRACING_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tracingInfo = new TSTracingInfo(); + struct.tracingInfo.read(iprot); + struct.setTracingInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // QUERY_RESULT + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); + struct.queryResult = new java.util.ArrayList(_list64.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem65; + for (int _i66 = 0; _i66 < _list64.size; ++_i66) + { + _elem65 = iprot.readBinary(); + struct.queryResult.add(_elem65); + } + iprot.readListEnd(); + } + struct.setQueryResultIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // MORE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.moreData = iprot.readBool(); + struct.setMoreDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // DATABASE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.database = iprot.readString(); + struct.setDatabaseIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // TABLE_MODEL + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.tableModel = iprot.readBool(); + struct.setTableModelIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 17: // COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list67 = iprot.readListBegin(); + struct.columnIndex2TsBlockColumnIndexList = new java.util.ArrayList(_list67.size); + int _elem68; + for (int _i69 = 0; _i69 < _list67.size; ++_i69) + { + _elem68 = iprot.readI32(); + struct.columnIndex2TsBlockColumnIndexList.add(_elem68); + } + iprot.readListEnd(); + } + struct.setColumnIndex2TsBlockColumnIndexListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSExecuteStatementResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.isSetQueryId()) { + oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); + oprot.writeI64(struct.queryId); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + if (struct.isSetColumns()) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (java.lang.String _iter70 : struct.columns) + { + oprot.writeString(_iter70); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.operationType != null) { + if (struct.isSetOperationType()) { + oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC); + oprot.writeString(struct.operationType); + oprot.writeFieldEnd(); + } + } + if (struct.isSetIgnoreTimeStamp()) { + oprot.writeFieldBegin(IGNORE_TIME_STAMP_FIELD_DESC); + oprot.writeBool(struct.ignoreTimeStamp); + oprot.writeFieldEnd(); + } + if (struct.dataTypeList != null) { + if (struct.isSetDataTypeList()) { + oprot.writeFieldBegin(DATA_TYPE_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.dataTypeList.size())); + for (java.lang.String _iter71 : struct.dataTypeList) + { + oprot.writeString(_iter71); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.queryDataSet != null) { + if (struct.isSetQueryDataSet()) { + oprot.writeFieldBegin(QUERY_DATA_SET_FIELD_DESC); + struct.queryDataSet.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.nonAlignQueryDataSet != null) { + if (struct.isSetNonAlignQueryDataSet()) { + oprot.writeFieldBegin(NON_ALIGN_QUERY_DATA_SET_FIELD_DESC); + struct.nonAlignQueryDataSet.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.columnNameIndexMap != null) { + if (struct.isSetColumnNameIndexMap()) { + oprot.writeFieldBegin(COLUMN_NAME_INDEX_MAP_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.columnNameIndexMap.size())); + for (java.util.Map.Entry _iter72 : struct.columnNameIndexMap.entrySet()) + { + oprot.writeString(_iter72.getKey()); + oprot.writeI32(_iter72.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.sgColumns != null) { + if (struct.isSetSgColumns()) { + oprot.writeFieldBegin(SG_COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.sgColumns.size())); + for (java.lang.String _iter73 : struct.sgColumns) + { + oprot.writeString(_iter73); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.aliasColumns != null) { + if (struct.isSetAliasColumns()) { + oprot.writeFieldBegin(ALIAS_COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, struct.aliasColumns.size())); + for (byte _iter74 : struct.aliasColumns) + { + oprot.writeByte(_iter74); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.tracingInfo != null) { + if (struct.isSetTracingInfo()) { + oprot.writeFieldBegin(TRACING_INFO_FIELD_DESC); + struct.tracingInfo.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.queryResult != null) { + if (struct.isSetQueryResult()) { + oprot.writeFieldBegin(QUERY_RESULT_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.queryResult.size())); + for (java.nio.ByteBuffer _iter75 : struct.queryResult) + { + oprot.writeBinary(_iter75); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.isSetMoreData()) { + oprot.writeFieldBegin(MORE_DATA_FIELD_DESC); + oprot.writeBool(struct.moreData); + oprot.writeFieldEnd(); + } + if (struct.database != null) { + if (struct.isSetDatabase()) { + oprot.writeFieldBegin(DATABASE_FIELD_DESC); + oprot.writeString(struct.database); + oprot.writeFieldEnd(); + } + } + if (struct.isSetTableModel()) { + oprot.writeFieldBegin(TABLE_MODEL_FIELD_DESC); + oprot.writeBool(struct.tableModel); + oprot.writeFieldEnd(); + } + if (struct.columnIndex2TsBlockColumnIndexList != null) { + if (struct.isSetColumnIndex2TsBlockColumnIndexList()) { + oprot.writeFieldBegin(COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.columnIndex2TsBlockColumnIndexList.size())); + for (int _iter76 : struct.columnIndex2TsBlockColumnIndexList) + { + oprot.writeI32(_iter76); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSExecuteStatementRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSExecuteStatementRespTupleScheme getScheme() { + return new TSExecuteStatementRespTupleScheme(); + } + } + + private static class TSExecuteStatementRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status.write(oprot); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetQueryId()) { + optionals.set(0); + } + if (struct.isSetColumns()) { + optionals.set(1); + } + if (struct.isSetOperationType()) { + optionals.set(2); + } + if (struct.isSetIgnoreTimeStamp()) { + optionals.set(3); + } + if (struct.isSetDataTypeList()) { + optionals.set(4); + } + if (struct.isSetQueryDataSet()) { + optionals.set(5); + } + if (struct.isSetNonAlignQueryDataSet()) { + optionals.set(6); + } + if (struct.isSetColumnNameIndexMap()) { + optionals.set(7); + } + if (struct.isSetSgColumns()) { + optionals.set(8); + } + if (struct.isSetAliasColumns()) { + optionals.set(9); + } + if (struct.isSetTracingInfo()) { + optionals.set(10); + } + if (struct.isSetQueryResult()) { + optionals.set(11); + } + if (struct.isSetMoreData()) { + optionals.set(12); + } + if (struct.isSetDatabase()) { + optionals.set(13); + } + if (struct.isSetTableModel()) { + optionals.set(14); + } + if (struct.isSetColumnIndex2TsBlockColumnIndexList()) { + optionals.set(15); + } + oprot.writeBitSet(optionals, 16); + if (struct.isSetQueryId()) { + oprot.writeI64(struct.queryId); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (java.lang.String _iter77 : struct.columns) + { + oprot.writeString(_iter77); + } + } + } + if (struct.isSetOperationType()) { + oprot.writeString(struct.operationType); + } + if (struct.isSetIgnoreTimeStamp()) { + oprot.writeBool(struct.ignoreTimeStamp); + } + if (struct.isSetDataTypeList()) { + { + oprot.writeI32(struct.dataTypeList.size()); + for (java.lang.String _iter78 : struct.dataTypeList) + { + oprot.writeString(_iter78); + } + } + } + if (struct.isSetQueryDataSet()) { + struct.queryDataSet.write(oprot); + } + if (struct.isSetNonAlignQueryDataSet()) { + struct.nonAlignQueryDataSet.write(oprot); + } + if (struct.isSetColumnNameIndexMap()) { + { + oprot.writeI32(struct.columnNameIndexMap.size()); + for (java.util.Map.Entry _iter79 : struct.columnNameIndexMap.entrySet()) + { + oprot.writeString(_iter79.getKey()); + oprot.writeI32(_iter79.getValue()); + } + } + } + if (struct.isSetSgColumns()) { + { + oprot.writeI32(struct.sgColumns.size()); + for (java.lang.String _iter80 : struct.sgColumns) + { + oprot.writeString(_iter80); + } + } + } + if (struct.isSetAliasColumns()) { + { + oprot.writeI32(struct.aliasColumns.size()); + for (byte _iter81 : struct.aliasColumns) + { + oprot.writeByte(_iter81); + } + } + } + if (struct.isSetTracingInfo()) { + struct.tracingInfo.write(oprot); + } + if (struct.isSetQueryResult()) { + { + oprot.writeI32(struct.queryResult.size()); + for (java.nio.ByteBuffer _iter82 : struct.queryResult) + { + oprot.writeBinary(_iter82); + } + } + } + if (struct.isSetMoreData()) { + oprot.writeBool(struct.moreData); + } + if (struct.isSetDatabase()) { + oprot.writeString(struct.database); + } + if (struct.isSetTableModel()) { + oprot.writeBool(struct.tableModel); + } + if (struct.isSetColumnIndex2TsBlockColumnIndexList()) { + { + oprot.writeI32(struct.columnIndex2TsBlockColumnIndexList.size()); + for (int _iter83 : struct.columnIndex2TsBlockColumnIndexList) + { + oprot.writeI32(_iter83); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(16); + if (incoming.get(0)) { + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list84 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.columns = new java.util.ArrayList(_list84.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem85; + for (int _i86 = 0; _i86 < _list84.size; ++_i86) + { + _elem85 = iprot.readString(); + struct.columns.add(_elem85); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(2)) { + struct.operationType = iprot.readString(); + struct.setOperationTypeIsSet(true); + } + if (incoming.get(3)) { + struct.ignoreTimeStamp = iprot.readBool(); + struct.setIgnoreTimeStampIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list87 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.dataTypeList = new java.util.ArrayList(_list87.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem88; + for (int _i89 = 0; _i89 < _list87.size; ++_i89) + { + _elem88 = iprot.readString(); + struct.dataTypeList.add(_elem88); + } + } + struct.setDataTypeListIsSet(true); + } + if (incoming.get(5)) { + struct.queryDataSet = new TSQueryDataSet(); + struct.queryDataSet.read(iprot); + struct.setQueryDataSetIsSet(true); + } + if (incoming.get(6)) { + struct.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(); + struct.nonAlignQueryDataSet.read(iprot); + struct.setNonAlignQueryDataSetIsSet(true); + } + if (incoming.get(7)) { + { + org.apache.thrift.protocol.TMap _map90 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32); + struct.columnNameIndexMap = new java.util.HashMap(2*_map90.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key91; + int _val92; + for (int _i93 = 0; _i93 < _map90.size; ++_i93) + { + _key91 = iprot.readString(); + _val92 = iprot.readI32(); + struct.columnNameIndexMap.put(_key91, _val92); + } + } + struct.setColumnNameIndexMapIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TList _list94 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.sgColumns = new java.util.ArrayList(_list94.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem95; + for (int _i96 = 0; _i96 < _list94.size; ++_i96) + { + _elem95 = iprot.readString(); + struct.sgColumns.add(_elem95); + } + } + struct.setSgColumnsIsSet(true); + } + if (incoming.get(9)) { + { + org.apache.thrift.protocol.TList _list97 = iprot.readListBegin(org.apache.thrift.protocol.TType.BYTE); + struct.aliasColumns = new java.util.ArrayList(_list97.size); + byte _elem98; + for (int _i99 = 0; _i99 < _list97.size; ++_i99) + { + _elem98 = iprot.readByte(); + struct.aliasColumns.add(_elem98); + } + } + struct.setAliasColumnsIsSet(true); + } + if (incoming.get(10)) { + struct.tracingInfo = new TSTracingInfo(); + struct.tracingInfo.read(iprot); + struct.setTracingInfoIsSet(true); + } + if (incoming.get(11)) { + { + org.apache.thrift.protocol.TList _list100 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.queryResult = new java.util.ArrayList(_list100.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem101; + for (int _i102 = 0; _i102 < _list100.size; ++_i102) + { + _elem101 = iprot.readBinary(); + struct.queryResult.add(_elem101); + } + } + struct.setQueryResultIsSet(true); + } + if (incoming.get(12)) { + struct.moreData = iprot.readBool(); + struct.setMoreDataIsSet(true); + } + if (incoming.get(13)) { + struct.database = iprot.readString(); + struct.setDatabaseIsSet(true); + } + if (incoming.get(14)) { + struct.tableModel = iprot.readBool(); + struct.setTableModelIsSet(true); + } + if (incoming.get(15)) { + { + org.apache.thrift.protocol.TList _list103 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.columnIndex2TsBlockColumnIndexList = new java.util.ArrayList(_list103.size); + int _elem104; + for (int _i105 = 0; _i105 < _list103.size; ++_i105) + { + _elem104 = iprot.readI32(); + struct.columnIndex2TsBlockColumnIndexList.add(_elem104); + } + } + struct.setColumnIndex2TsBlockColumnIndexListIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFastLastDataQueryForOneDeviceReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFastLastDataQueryForOneDeviceReq.java new file mode 100644 index 0000000000000..1e84ff057b5a1 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFastLastDataQueryForOneDeviceReq.java @@ -0,0 +1,1322 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSFastLastDataQueryForOneDeviceReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFastLastDataQueryForOneDeviceReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField DEVICE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("deviceId", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField SENSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("sensors", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField ENABLE_REDIRECT_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("enableRedirectQuery", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField JDBC_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("jdbcQuery", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField LEGAL_PATH_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("legalPathNodes", org.apache.thrift.protocol.TType.BOOL, (short)10); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFastLastDataQueryForOneDeviceReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFastLastDataQueryForOneDeviceReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String db; // required + public @org.apache.thrift.annotation.Nullable java.lang.String deviceId; // required + public @org.apache.thrift.annotation.Nullable java.util.List sensors; // required + public int fetchSize; // optional + public long statementId; // required + public boolean enableRedirectQuery; // optional + public boolean jdbcQuery; // optional + public long timeout; // optional + public boolean legalPathNodes; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + DB((short)2, "db"), + DEVICE_ID((short)3, "deviceId"), + SENSORS((short)4, "sensors"), + FETCH_SIZE((short)5, "fetchSize"), + STATEMENT_ID((short)6, "statementId"), + ENABLE_REDIRECT_QUERY((short)7, "enableRedirectQuery"), + JDBC_QUERY((short)8, "jdbcQuery"), + TIMEOUT((short)9, "timeout"), + LEGAL_PATH_NODES((short)10, "legalPathNodes"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // DB + return DB; + case 3: // DEVICE_ID + return DEVICE_ID; + case 4: // SENSORS + return SENSORS; + case 5: // FETCH_SIZE + return FETCH_SIZE; + case 6: // STATEMENT_ID + return STATEMENT_ID; + case 7: // ENABLE_REDIRECT_QUERY + return ENABLE_REDIRECT_QUERY; + case 8: // JDBC_QUERY + return JDBC_QUERY; + case 9: // TIMEOUT + return TIMEOUT; + case 10: // LEGAL_PATH_NODES + return LEGAL_PATH_NODES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __FETCHSIZE_ISSET_ID = 1; + private static final int __STATEMENTID_ISSET_ID = 2; + private static final int __ENABLEREDIRECTQUERY_ISSET_ID = 3; + private static final int __JDBCQUERY_ISSET_ID = 4; + private static final int __TIMEOUT_ISSET_ID = 5; + private static final int __LEGALPATHNODES_ISSET_ID = 6; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.FETCH_SIZE,_Fields.ENABLE_REDIRECT_QUERY,_Fields.JDBC_QUERY,_Fields.TIMEOUT,_Fields.LEGAL_PATH_NODES}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEVICE_ID, new org.apache.thrift.meta_data.FieldMetaData("deviceId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SENSORS, new org.apache.thrift.meta_data.FieldMetaData("sensors", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ENABLE_REDIRECT_QUERY, new org.apache.thrift.meta_data.FieldMetaData("enableRedirectQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.JDBC_QUERY, new org.apache.thrift.meta_data.FieldMetaData("jdbcQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LEGAL_PATH_NODES, new org.apache.thrift.meta_data.FieldMetaData("legalPathNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFastLastDataQueryForOneDeviceReq.class, metaDataMap); + } + + public TSFastLastDataQueryForOneDeviceReq() { + } + + public TSFastLastDataQueryForOneDeviceReq( + long sessionId, + java.lang.String db, + java.lang.String deviceId, + java.util.List sensors, + long statementId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.db = db; + this.deviceId = deviceId; + this.sensors = sensors; + this.statementId = statementId; + setStatementIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSFastLastDataQueryForOneDeviceReq(TSFastLastDataQueryForOneDeviceReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetDb()) { + this.db = other.db; + } + if (other.isSetDeviceId()) { + this.deviceId = other.deviceId; + } + if (other.isSetSensors()) { + java.util.List __this__sensors = new java.util.ArrayList(other.sensors); + this.sensors = __this__sensors; + } + this.fetchSize = other.fetchSize; + this.statementId = other.statementId; + this.enableRedirectQuery = other.enableRedirectQuery; + this.jdbcQuery = other.jdbcQuery; + this.timeout = other.timeout; + this.legalPathNodes = other.legalPathNodes; + } + + @Override + public TSFastLastDataQueryForOneDeviceReq deepCopy() { + return new TSFastLastDataQueryForOneDeviceReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.db = null; + this.deviceId = null; + this.sensors = null; + setFetchSizeIsSet(false); + this.fetchSize = 0; + setStatementIdIsSet(false); + this.statementId = 0; + setEnableRedirectQueryIsSet(false); + this.enableRedirectQuery = false; + setJdbcQueryIsSet(false); + this.jdbcQuery = false; + setTimeoutIsSet(false); + this.timeout = 0; + setLegalPathNodesIsSet(false); + this.legalPathNodes = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSFastLastDataQueryForOneDeviceReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getDb() { + return this.db; + } + + public TSFastLastDataQueryForOneDeviceReq setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) { + this.db = db; + return this; + } + + public void unsetDb() { + this.db = null; + } + + /** Returns true if field db is set (has been assigned a value) and false otherwise */ + public boolean isSetDb() { + return this.db != null; + } + + public void setDbIsSet(boolean value) { + if (!value) { + this.db = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getDeviceId() { + return this.deviceId; + } + + public TSFastLastDataQueryForOneDeviceReq setDeviceId(@org.apache.thrift.annotation.Nullable java.lang.String deviceId) { + this.deviceId = deviceId; + return this; + } + + public void unsetDeviceId() { + this.deviceId = null; + } + + /** Returns true if field deviceId is set (has been assigned a value) and false otherwise */ + public boolean isSetDeviceId() { + return this.deviceId != null; + } + + public void setDeviceIdIsSet(boolean value) { + if (!value) { + this.deviceId = null; + } + } + + public int getSensorsSize() { + return (this.sensors == null) ? 0 : this.sensors.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getSensorsIterator() { + return (this.sensors == null) ? null : this.sensors.iterator(); + } + + public void addToSensors(java.lang.String elem) { + if (this.sensors == null) { + this.sensors = new java.util.ArrayList(); + } + this.sensors.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getSensors() { + return this.sensors; + } + + public TSFastLastDataQueryForOneDeviceReq setSensors(@org.apache.thrift.annotation.Nullable java.util.List sensors) { + this.sensors = sensors; + return this; + } + + public void unsetSensors() { + this.sensors = null; + } + + /** Returns true if field sensors is set (has been assigned a value) and false otherwise */ + public boolean isSetSensors() { + return this.sensors != null; + } + + public void setSensorsIsSet(boolean value) { + if (!value) { + this.sensors = null; + } + } + + public int getFetchSize() { + return this.fetchSize; + } + + public TSFastLastDataQueryForOneDeviceReq setFetchSize(int fetchSize) { + this.fetchSize = fetchSize; + setFetchSizeIsSet(true); + return this; + } + + public void unsetFetchSize() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ + public boolean isSetFetchSize() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + public void setFetchSizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); + } + + public long getStatementId() { + return this.statementId; + } + + public TSFastLastDataQueryForOneDeviceReq setStatementId(long statementId) { + this.statementId = statementId; + setStatementIdIsSet(true); + return this; + } + + public void unsetStatementId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ + public boolean isSetStatementId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + public void setStatementIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); + } + + public boolean isEnableRedirectQuery() { + return this.enableRedirectQuery; + } + + public TSFastLastDataQueryForOneDeviceReq setEnableRedirectQuery(boolean enableRedirectQuery) { + this.enableRedirectQuery = enableRedirectQuery; + setEnableRedirectQueryIsSet(true); + return this; + } + + public void unsetEnableRedirectQuery() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); + } + + /** Returns true if field enableRedirectQuery is set (has been assigned a value) and false otherwise */ + public boolean isSetEnableRedirectQuery() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); + } + + public void setEnableRedirectQueryIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID, value); + } + + public boolean isJdbcQuery() { + return this.jdbcQuery; + } + + public TSFastLastDataQueryForOneDeviceReq setJdbcQuery(boolean jdbcQuery) { + this.jdbcQuery = jdbcQuery; + setJdbcQueryIsSet(true); + return this; + } + + public void unsetJdbcQuery() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); + } + + /** Returns true if field jdbcQuery is set (has been assigned a value) and false otherwise */ + public boolean isSetJdbcQuery() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); + } + + public void setJdbcQueryIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JDBCQUERY_ISSET_ID, value); + } + + public long getTimeout() { + return this.timeout; + } + + public TSFastLastDataQueryForOneDeviceReq setTimeout(long timeout) { + this.timeout = timeout; + setTimeoutIsSet(true); + return this; + } + + public void unsetTimeout() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeout() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + public void setTimeoutIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + } + + public boolean isLegalPathNodes() { + return this.legalPathNodes; + } + + public TSFastLastDataQueryForOneDeviceReq setLegalPathNodes(boolean legalPathNodes) { + this.legalPathNodes = legalPathNodes; + setLegalPathNodesIsSet(true); + return this; + } + + public void unsetLegalPathNodes() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); + } + + /** Returns true if field legalPathNodes is set (has been assigned a value) and false otherwise */ + public boolean isSetLegalPathNodes() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); + } + + public void setLegalPathNodesIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case DB: + if (value == null) { + unsetDb(); + } else { + setDb((java.lang.String)value); + } + break; + + case DEVICE_ID: + if (value == null) { + unsetDeviceId(); + } else { + setDeviceId((java.lang.String)value); + } + break; + + case SENSORS: + if (value == null) { + unsetSensors(); + } else { + setSensors((java.util.List)value); + } + break; + + case FETCH_SIZE: + if (value == null) { + unsetFetchSize(); + } else { + setFetchSize((java.lang.Integer)value); + } + break; + + case STATEMENT_ID: + if (value == null) { + unsetStatementId(); + } else { + setStatementId((java.lang.Long)value); + } + break; + + case ENABLE_REDIRECT_QUERY: + if (value == null) { + unsetEnableRedirectQuery(); + } else { + setEnableRedirectQuery((java.lang.Boolean)value); + } + break; + + case JDBC_QUERY: + if (value == null) { + unsetJdbcQuery(); + } else { + setJdbcQuery((java.lang.Boolean)value); + } + break; + + case TIMEOUT: + if (value == null) { + unsetTimeout(); + } else { + setTimeout((java.lang.Long)value); + } + break; + + case LEGAL_PATH_NODES: + if (value == null) { + unsetLegalPathNodes(); + } else { + setLegalPathNodes((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case DB: + return getDb(); + + case DEVICE_ID: + return getDeviceId(); + + case SENSORS: + return getSensors(); + + case FETCH_SIZE: + return getFetchSize(); + + case STATEMENT_ID: + return getStatementId(); + + case ENABLE_REDIRECT_QUERY: + return isEnableRedirectQuery(); + + case JDBC_QUERY: + return isJdbcQuery(); + + case TIMEOUT: + return getTimeout(); + + case LEGAL_PATH_NODES: + return isLegalPathNodes(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case DB: + return isSetDb(); + case DEVICE_ID: + return isSetDeviceId(); + case SENSORS: + return isSetSensors(); + case FETCH_SIZE: + return isSetFetchSize(); + case STATEMENT_ID: + return isSetStatementId(); + case ENABLE_REDIRECT_QUERY: + return isSetEnableRedirectQuery(); + case JDBC_QUERY: + return isSetJdbcQuery(); + case TIMEOUT: + return isSetTimeout(); + case LEGAL_PATH_NODES: + return isSetLegalPathNodes(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSFastLastDataQueryForOneDeviceReq) + return this.equals((TSFastLastDataQueryForOneDeviceReq)that); + return false; + } + + public boolean equals(TSFastLastDataQueryForOneDeviceReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_db = true && this.isSetDb(); + boolean that_present_db = true && that.isSetDb(); + if (this_present_db || that_present_db) { + if (!(this_present_db && that_present_db)) + return false; + if (!this.db.equals(that.db)) + return false; + } + + boolean this_present_deviceId = true && this.isSetDeviceId(); + boolean that_present_deviceId = true && that.isSetDeviceId(); + if (this_present_deviceId || that_present_deviceId) { + if (!(this_present_deviceId && that_present_deviceId)) + return false; + if (!this.deviceId.equals(that.deviceId)) + return false; + } + + boolean this_present_sensors = true && this.isSetSensors(); + boolean that_present_sensors = true && that.isSetSensors(); + if (this_present_sensors || that_present_sensors) { + if (!(this_present_sensors && that_present_sensors)) + return false; + if (!this.sensors.equals(that.sensors)) + return false; + } + + boolean this_present_fetchSize = true && this.isSetFetchSize(); + boolean that_present_fetchSize = true && that.isSetFetchSize(); + if (this_present_fetchSize || that_present_fetchSize) { + if (!(this_present_fetchSize && that_present_fetchSize)) + return false; + if (this.fetchSize != that.fetchSize) + return false; + } + + boolean this_present_statementId = true; + boolean that_present_statementId = true; + if (this_present_statementId || that_present_statementId) { + if (!(this_present_statementId && that_present_statementId)) + return false; + if (this.statementId != that.statementId) + return false; + } + + boolean this_present_enableRedirectQuery = true && this.isSetEnableRedirectQuery(); + boolean that_present_enableRedirectQuery = true && that.isSetEnableRedirectQuery(); + if (this_present_enableRedirectQuery || that_present_enableRedirectQuery) { + if (!(this_present_enableRedirectQuery && that_present_enableRedirectQuery)) + return false; + if (this.enableRedirectQuery != that.enableRedirectQuery) + return false; + } + + boolean this_present_jdbcQuery = true && this.isSetJdbcQuery(); + boolean that_present_jdbcQuery = true && that.isSetJdbcQuery(); + if (this_present_jdbcQuery || that_present_jdbcQuery) { + if (!(this_present_jdbcQuery && that_present_jdbcQuery)) + return false; + if (this.jdbcQuery != that.jdbcQuery) + return false; + } + + boolean this_present_timeout = true && this.isSetTimeout(); + boolean that_present_timeout = true && that.isSetTimeout(); + if (this_present_timeout || that_present_timeout) { + if (!(this_present_timeout && that_present_timeout)) + return false; + if (this.timeout != that.timeout) + return false; + } + + boolean this_present_legalPathNodes = true && this.isSetLegalPathNodes(); + boolean that_present_legalPathNodes = true && that.isSetLegalPathNodes(); + if (this_present_legalPathNodes || that_present_legalPathNodes) { + if (!(this_present_legalPathNodes && that_present_legalPathNodes)) + return false; + if (this.legalPathNodes != that.legalPathNodes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287); + if (isSetDb()) + hashCode = hashCode * 8191 + db.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDeviceId()) ? 131071 : 524287); + if (isSetDeviceId()) + hashCode = hashCode * 8191 + deviceId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetSensors()) ? 131071 : 524287); + if (isSetSensors()) + hashCode = hashCode * 8191 + sensors.hashCode(); + + hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); + if (isSetFetchSize()) + hashCode = hashCode * 8191 + fetchSize; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); + + hashCode = hashCode * 8191 + ((isSetEnableRedirectQuery()) ? 131071 : 524287); + if (isSetEnableRedirectQuery()) + hashCode = hashCode * 8191 + ((enableRedirectQuery) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetJdbcQuery()) ? 131071 : 524287); + if (isSetJdbcQuery()) + hashCode = hashCode * 8191 + ((jdbcQuery) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); + if (isSetTimeout()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); + + hashCode = hashCode * 8191 + ((isSetLegalPathNodes()) ? 131071 : 524287); + if (isSetLegalPathNodes()) + hashCode = hashCode * 8191 + ((legalPathNodes) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSFastLastDataQueryForOneDeviceReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDb(), other.isSetDb()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDeviceId(), other.isSetDeviceId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeviceId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deviceId, other.deviceId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSensors(), other.isSetSensors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSensors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sensors, other.sensors); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFetchSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatementId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEnableRedirectQuery(), other.isSetEnableRedirectQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnableRedirectQuery()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableRedirectQuery, other.enableRedirectQuery); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetJdbcQuery(), other.isSetJdbcQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJdbcQuery()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jdbcQuery, other.jdbcQuery); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetLegalPathNodes(), other.isSetLegalPathNodes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLegalPathNodes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legalPathNodes, other.legalPathNodes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFastLastDataQueryForOneDeviceReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("db:"); + if (this.db == null) { + sb.append("null"); + } else { + sb.append(this.db); + } + first = false; + if (!first) sb.append(", "); + sb.append("deviceId:"); + if (this.deviceId == null) { + sb.append("null"); + } else { + sb.append(this.deviceId); + } + first = false; + if (!first) sb.append(", "); + sb.append("sensors:"); + if (this.sensors == null) { + sb.append("null"); + } else { + sb.append(this.sensors); + } + first = false; + if (isSetFetchSize()) { + if (!first) sb.append(", "); + sb.append("fetchSize:"); + sb.append(this.fetchSize); + first = false; + } + if (!first) sb.append(", "); + sb.append("statementId:"); + sb.append(this.statementId); + first = false; + if (isSetEnableRedirectQuery()) { + if (!first) sb.append(", "); + sb.append("enableRedirectQuery:"); + sb.append(this.enableRedirectQuery); + first = false; + } + if (isSetJdbcQuery()) { + if (!first) sb.append(", "); + sb.append("jdbcQuery:"); + sb.append(this.jdbcQuery); + first = false; + } + if (isSetTimeout()) { + if (!first) sb.append(", "); + sb.append("timeout:"); + sb.append(this.timeout); + first = false; + } + if (isSetLegalPathNodes()) { + if (!first) sb.append(", "); + sb.append("legalPathNodes:"); + sb.append(this.legalPathNodes); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (db == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'db' was not present! Struct: " + toString()); + } + if (deviceId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'deviceId' was not present! Struct: " + toString()); + } + if (sensors == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sensors' was not present! Struct: " + toString()); + } + // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSFastLastDataQueryForOneDeviceReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFastLastDataQueryForOneDeviceReqStandardScheme getScheme() { + return new TSFastLastDataQueryForOneDeviceReqStandardScheme(); + } + } + + private static class TSFastLastDataQueryForOneDeviceReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSFastLastDataQueryForOneDeviceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db = iprot.readString(); + struct.setDbIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DEVICE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.deviceId = iprot.readString(); + struct.setDeviceIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // SENSORS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list568 = iprot.readListBegin(); + struct.sensors = new java.util.ArrayList(_list568.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem569; + for (int _i570 = 0; _i570 < _list568.size; ++_i570) + { + _elem569 = iprot.readString(); + struct.sensors.add(_elem569); + } + iprot.readListEnd(); + } + struct.setSensorsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // FETCH_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // STATEMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // ENABLE_REDIRECT_QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.enableRedirectQuery = iprot.readBool(); + struct.setEnableRedirectQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // JDBC_QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.jdbcQuery = iprot.readBool(); + struct.setJdbcQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // LEGAL_PATH_NODES + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.legalPathNodes = iprot.readBool(); + struct.setLegalPathNodesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetStatementId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSFastLastDataQueryForOneDeviceReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.db != null) { + oprot.writeFieldBegin(DB_FIELD_DESC); + oprot.writeString(struct.db); + oprot.writeFieldEnd(); + } + if (struct.deviceId != null) { + oprot.writeFieldBegin(DEVICE_ID_FIELD_DESC); + oprot.writeString(struct.deviceId); + oprot.writeFieldEnd(); + } + if (struct.sensors != null) { + oprot.writeFieldBegin(SENSORS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.sensors.size())); + for (java.lang.String _iter571 : struct.sensors) + { + oprot.writeString(_iter571); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetFetchSize()) { + oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); + oprot.writeI32(struct.fetchSize); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); + oprot.writeI64(struct.statementId); + oprot.writeFieldEnd(); + if (struct.isSetEnableRedirectQuery()) { + oprot.writeFieldBegin(ENABLE_REDIRECT_QUERY_FIELD_DESC); + oprot.writeBool(struct.enableRedirectQuery); + oprot.writeFieldEnd(); + } + if (struct.isSetJdbcQuery()) { + oprot.writeFieldBegin(JDBC_QUERY_FIELD_DESC); + oprot.writeBool(struct.jdbcQuery); + oprot.writeFieldEnd(); + } + if (struct.isSetTimeout()) { + oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); + oprot.writeI64(struct.timeout); + oprot.writeFieldEnd(); + } + if (struct.isSetLegalPathNodes()) { + oprot.writeFieldBegin(LEGAL_PATH_NODES_FIELD_DESC); + oprot.writeBool(struct.legalPathNodes); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSFastLastDataQueryForOneDeviceReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFastLastDataQueryForOneDeviceReqTupleScheme getScheme() { + return new TSFastLastDataQueryForOneDeviceReqTupleScheme(); + } + } + + private static class TSFastLastDataQueryForOneDeviceReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSFastLastDataQueryForOneDeviceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.db); + oprot.writeString(struct.deviceId); + { + oprot.writeI32(struct.sensors.size()); + for (java.lang.String _iter572 : struct.sensors) + { + oprot.writeString(_iter572); + } + } + oprot.writeI64(struct.statementId); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetFetchSize()) { + optionals.set(0); + } + if (struct.isSetEnableRedirectQuery()) { + optionals.set(1); + } + if (struct.isSetJdbcQuery()) { + optionals.set(2); + } + if (struct.isSetTimeout()) { + optionals.set(3); + } + if (struct.isSetLegalPathNodes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetFetchSize()) { + oprot.writeI32(struct.fetchSize); + } + if (struct.isSetEnableRedirectQuery()) { + oprot.writeBool(struct.enableRedirectQuery); + } + if (struct.isSetJdbcQuery()) { + oprot.writeBool(struct.jdbcQuery); + } + if (struct.isSetTimeout()) { + oprot.writeI64(struct.timeout); + } + if (struct.isSetLegalPathNodes()) { + oprot.writeBool(struct.legalPathNodes); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSFastLastDataQueryForOneDeviceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.db = iprot.readString(); + struct.setDbIsSet(true); + struct.deviceId = iprot.readString(); + struct.setDeviceIdIsSet(true); + { + org.apache.thrift.protocol.TList _list573 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.sensors = new java.util.ArrayList(_list573.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem574; + for (int _i575 = 0; _i575 < _list573.size; ++_i575) + { + _elem574 = iprot.readString(); + struct.sensors.add(_elem574); + } + } + struct.setSensorsIsSet(true); + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } + if (incoming.get(1)) { + struct.enableRedirectQuery = iprot.readBool(); + struct.setEnableRedirectQueryIsSet(true); + } + if (incoming.get(2)) { + struct.jdbcQuery = iprot.readBool(); + struct.setJdbcQueryIsSet(true); + } + if (incoming.get(3)) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } + if (incoming.get(4)) { + struct.legalPathNodes = iprot.readBool(); + struct.setLegalPathNodesIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataReq.java new file mode 100644 index 0000000000000..bf60f2409daad --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataReq.java @@ -0,0 +1,589 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSFetchMetadataReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFetchMetadataReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("columnPath", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFetchMetadataReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFetchMetadataReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String type; // required + public @org.apache.thrift.annotation.Nullable java.lang.String columnPath; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + TYPE((short)2, "type"), + COLUMN_PATH((short)3, "columnPath"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // TYPE + return TYPE; + case 3: // COLUMN_PATH + return COLUMN_PATH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.COLUMN_PATH}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COLUMN_PATH, new org.apache.thrift.meta_data.FieldMetaData("columnPath", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFetchMetadataReq.class, metaDataMap); + } + + public TSFetchMetadataReq() { + } + + public TSFetchMetadataReq( + long sessionId, + java.lang.String type) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public TSFetchMetadataReq(TSFetchMetadataReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetType()) { + this.type = other.type; + } + if (other.isSetColumnPath()) { + this.columnPath = other.columnPath; + } + } + + @Override + public TSFetchMetadataReq deepCopy() { + return new TSFetchMetadataReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.type = null; + this.columnPath = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSFetchMetadataReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getType() { + return this.type; + } + + public TSFetchMetadataReq setType(@org.apache.thrift.annotation.Nullable java.lang.String type) { + this.type = type; + return this; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getColumnPath() { + return this.columnPath; + } + + public TSFetchMetadataReq setColumnPath(@org.apache.thrift.annotation.Nullable java.lang.String columnPath) { + this.columnPath = columnPath; + return this; + } + + public void unsetColumnPath() { + this.columnPath = null; + } + + /** Returns true if field columnPath is set (has been assigned a value) and false otherwise */ + public boolean isSetColumnPath() { + return this.columnPath != null; + } + + public void setColumnPathIsSet(boolean value) { + if (!value) { + this.columnPath = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((java.lang.String)value); + } + break; + + case COLUMN_PATH: + if (value == null) { + unsetColumnPath(); + } else { + setColumnPath((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case TYPE: + return getType(); + + case COLUMN_PATH: + return getColumnPath(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case TYPE: + return isSetType(); + case COLUMN_PATH: + return isSetColumnPath(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSFetchMetadataReq) + return this.equals((TSFetchMetadataReq)that); + return false; + } + + public boolean equals(TSFetchMetadataReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + boolean this_present_columnPath = true && this.isSetColumnPath(); + boolean that_present_columnPath = true && that.isSetColumnPath(); + if (this_present_columnPath || that_present_columnPath) { + if (!(this_present_columnPath && that_present_columnPath)) + return false; + if (!this.columnPath.equals(that.columnPath)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); + if (isSetType()) + hashCode = hashCode * 8191 + type.hashCode(); + + hashCode = hashCode * 8191 + ((isSetColumnPath()) ? 131071 : 524287); + if (isSetColumnPath()) + hashCode = hashCode * 8191 + columnPath.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSFetchMetadataReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetColumnPath(), other.isSetColumnPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnPath, other.columnPath); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFetchMetadataReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (isSetColumnPath()) { + if (!first) sb.append(", "); + sb.append("columnPath:"); + if (this.columnPath == null) { + sb.append("null"); + } else { + sb.append(this.columnPath); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSFetchMetadataReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFetchMetadataReqStandardScheme getScheme() { + return new TSFetchMetadataReqStandardScheme(); + } + } + + private static class TSFetchMetadataReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSFetchMetadataReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMN_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.columnPath = iprot.readString(); + struct.setColumnPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSFetchMetadataReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeString(struct.type); + oprot.writeFieldEnd(); + } + if (struct.columnPath != null) { + if (struct.isSetColumnPath()) { + oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC); + oprot.writeString(struct.columnPath); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSFetchMetadataReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFetchMetadataReqTupleScheme getScheme() { + return new TSFetchMetadataReqTupleScheme(); + } + } + + private static class TSFetchMetadataReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.type); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetColumnPath()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetColumnPath()) { + oprot.writeString(struct.columnPath); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.columnPath = iprot.readString(); + struct.setColumnPathIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataResp.java new file mode 100644 index 0000000000000..6de48c6db1d35 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataResp.java @@ -0,0 +1,761 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSFetchMetadataResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFetchMetadataResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField METADATA_IN_JSON_FIELD_DESC = new org.apache.thrift.protocol.TField("metadataInJson", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMNS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("columnsList", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFetchMetadataRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFetchMetadataRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required + public @org.apache.thrift.annotation.Nullable java.lang.String metadataInJson; // optional + public @org.apache.thrift.annotation.Nullable java.util.List columnsList; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String dataType; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATUS((short)1, "status"), + METADATA_IN_JSON((short)2, "metadataInJson"), + COLUMNS_LIST((short)3, "columnsList"), + DATA_TYPE((short)4, "dataType"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // METADATA_IN_JSON + return METADATA_IN_JSON; + case 3: // COLUMNS_LIST + return COLUMNS_LIST; + case 4: // DATA_TYPE + return DATA_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.METADATA_IN_JSON,_Fields.COLUMNS_LIST,_Fields.DATA_TYPE}; + 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + tmpMap.put(_Fields.METADATA_IN_JSON, new org.apache.thrift.meta_data.FieldMetaData("metadataInJson", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COLUMNS_LIST, new org.apache.thrift.meta_data.FieldMetaData("columnsList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFetchMetadataResp.class, metaDataMap); + } + + public TSFetchMetadataResp() { + } + + public TSFetchMetadataResp( + org.apache.iotdb.common.rpc.thrift.TSStatus status) + { + this(); + this.status = status; + } + + /** + * Performs a deep copy on other. + */ + public TSFetchMetadataResp(TSFetchMetadataResp other) { + if (other.isSetStatus()) { + this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); + } + if (other.isSetMetadataInJson()) { + this.metadataInJson = other.metadataInJson; + } + if (other.isSetColumnsList()) { + java.util.List __this__columnsList = new java.util.ArrayList(other.columnsList); + this.columnsList = __this__columnsList; + } + if (other.isSetDataType()) { + this.dataType = other.dataType; + } + } + + @Override + public TSFetchMetadataResp deepCopy() { + return new TSFetchMetadataResp(this); + } + + @Override + public void clear() { + this.status = null; + this.metadataInJson = null; + this.columnsList = null; + this.dataType = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { + return this.status; + } + + public TSFetchMetadataResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { + this.status = status; + return this; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getMetadataInJson() { + return this.metadataInJson; + } + + public TSFetchMetadataResp setMetadataInJson(@org.apache.thrift.annotation.Nullable java.lang.String metadataInJson) { + this.metadataInJson = metadataInJson; + return this; + } + + public void unsetMetadataInJson() { + this.metadataInJson = null; + } + + /** Returns true if field metadataInJson is set (has been assigned a value) and false otherwise */ + public boolean isSetMetadataInJson() { + return this.metadataInJson != null; + } + + public void setMetadataInJsonIsSet(boolean value) { + if (!value) { + this.metadataInJson = null; + } + } + + public int getColumnsListSize() { + return (this.columnsList == null) ? 0 : this.columnsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getColumnsListIterator() { + return (this.columnsList == null) ? null : this.columnsList.iterator(); + } + + public void addToColumnsList(java.lang.String elem) { + if (this.columnsList == null) { + this.columnsList = new java.util.ArrayList(); + } + this.columnsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getColumnsList() { + return this.columnsList; + } + + public TSFetchMetadataResp setColumnsList(@org.apache.thrift.annotation.Nullable java.util.List columnsList) { + this.columnsList = columnsList; + return this; + } + + public void unsetColumnsList() { + this.columnsList = null; + } + + /** Returns true if field columnsList is set (has been assigned a value) and false otherwise */ + public boolean isSetColumnsList() { + return this.columnsList != null; + } + + public void setColumnsListIsSet(boolean value) { + if (!value) { + this.columnsList = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getDataType() { + return this.dataType; + } + + public TSFetchMetadataResp setDataType(@org.apache.thrift.annotation.Nullable java.lang.String dataType) { + this.dataType = dataType; + return this; + } + + public void unsetDataType() { + this.dataType = null; + } + + /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ + public boolean isSetDataType() { + return this.dataType != null; + } + + public void setDataTypeIsSet(boolean value) { + if (!value) { + this.dataType = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + case METADATA_IN_JSON: + if (value == null) { + unsetMetadataInJson(); + } else { + setMetadataInJson((java.lang.String)value); + } + break; + + case COLUMNS_LIST: + if (value == null) { + unsetColumnsList(); + } else { + setColumnsList((java.util.List)value); + } + break; + + case DATA_TYPE: + if (value == null) { + unsetDataType(); + } else { + setDataType((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case METADATA_IN_JSON: + return getMetadataInJson(); + + case COLUMNS_LIST: + return getColumnsList(); + + case DATA_TYPE: + return getDataType(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case METADATA_IN_JSON: + return isSetMetadataInJson(); + case COLUMNS_LIST: + return isSetColumnsList(); + case DATA_TYPE: + return isSetDataType(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSFetchMetadataResp) + return this.equals((TSFetchMetadataResp)that); + return false; + } + + public boolean equals(TSFetchMetadataResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_metadataInJson = true && this.isSetMetadataInJson(); + boolean that_present_metadataInJson = true && that.isSetMetadataInJson(); + if (this_present_metadataInJson || that_present_metadataInJson) { + if (!(this_present_metadataInJson && that_present_metadataInJson)) + return false; + if (!this.metadataInJson.equals(that.metadataInJson)) + return false; + } + + boolean this_present_columnsList = true && this.isSetColumnsList(); + boolean that_present_columnsList = true && that.isSetColumnsList(); + if (this_present_columnsList || that_present_columnsList) { + if (!(this_present_columnsList && that_present_columnsList)) + return false; + if (!this.columnsList.equals(that.columnsList)) + return false; + } + + boolean this_present_dataType = true && this.isSetDataType(); + boolean that_present_dataType = true && that.isSetDataType(); + if (this_present_dataType || that_present_dataType) { + if (!(this_present_dataType && that_present_dataType)) + return false; + if (!this.dataType.equals(that.dataType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMetadataInJson()) ? 131071 : 524287); + if (isSetMetadataInJson()) + hashCode = hashCode * 8191 + metadataInJson.hashCode(); + + hashCode = hashCode * 8191 + ((isSetColumnsList()) ? 131071 : 524287); + if (isSetColumnsList()) + hashCode = hashCode * 8191 + columnsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDataType()) ? 131071 : 524287); + if (isSetDataType()) + hashCode = hashCode * 8191 + dataType.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSFetchMetadataResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMetadataInJson(), other.isSetMetadataInJson()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMetadataInJson()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadataInJson, other.metadataInJson); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetColumnsList(), other.isSetColumnsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnsList, other.columnsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDataType(), other.isSetDataType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, other.dataType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFetchMetadataResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (isSetMetadataInJson()) { + if (!first) sb.append(", "); + sb.append("metadataInJson:"); + if (this.metadataInJson == null) { + sb.append("null"); + } else { + sb.append(this.metadataInJson); + } + first = false; + } + if (isSetColumnsList()) { + if (!first) sb.append(", "); + sb.append("columnsList:"); + if (this.columnsList == null) { + sb.append("null"); + } else { + sb.append(this.columnsList); + } + first = false; + } + if (isSetDataType()) { + if (!first) sb.append(", "); + sb.append("dataType:"); + if (this.dataType == null) { + sb.append("null"); + } else { + sb.append(this.dataType); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (status != null) { + status.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class TSFetchMetadataRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFetchMetadataRespStandardScheme getScheme() { + return new TSFetchMetadataRespStandardScheme(); + } + } + + private static class TSFetchMetadataRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSFetchMetadataResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // METADATA_IN_JSON + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.metadataInJson = iprot.readString(); + struct.setMetadataInJsonIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMNS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list142 = iprot.readListBegin(); + struct.columnsList = new java.util.ArrayList(_list142.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem143; + for (int _i144 = 0; _i144 < _list142.size; ++_i144) + { + _elem143 = iprot.readString(); + struct.columnsList.add(_elem143); + } + iprot.readListEnd(); + } + struct.setColumnsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DATA_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dataType = iprot.readString(); + struct.setDataTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSFetchMetadataResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.metadataInJson != null) { + if (struct.isSetMetadataInJson()) { + oprot.writeFieldBegin(METADATA_IN_JSON_FIELD_DESC); + oprot.writeString(struct.metadataInJson); + oprot.writeFieldEnd(); + } + } + if (struct.columnsList != null) { + if (struct.isSetColumnsList()) { + oprot.writeFieldBegin(COLUMNS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columnsList.size())); + for (java.lang.String _iter145 : struct.columnsList) + { + oprot.writeString(_iter145); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.dataType != null) { + if (struct.isSetDataType()) { + oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); + oprot.writeString(struct.dataType); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSFetchMetadataRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFetchMetadataRespTupleScheme getScheme() { + return new TSFetchMetadataRespTupleScheme(); + } + } + + private static class TSFetchMetadataRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status.write(oprot); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetMetadataInJson()) { + optionals.set(0); + } + if (struct.isSetColumnsList()) { + optionals.set(1); + } + if (struct.isSetDataType()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetMetadataInJson()) { + oprot.writeString(struct.metadataInJson); + } + if (struct.isSetColumnsList()) { + { + oprot.writeI32(struct.columnsList.size()); + for (java.lang.String _iter146 : struct.columnsList) + { + oprot.writeString(_iter146); + } + } + } + if (struct.isSetDataType()) { + oprot.writeString(struct.dataType); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.metadataInJson = iprot.readString(); + struct.setMetadataInJsonIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list147 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.columnsList = new java.util.ArrayList(_list147.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem148; + for (int _i149 = 0; _i149 < _list147.size; ++_i149) + { + _elem148 = iprot.readString(); + struct.columnsList.add(_elem148); + } + } + struct.setColumnsListIsSet(true); + } + if (incoming.get(2)) { + struct.dataType = iprot.readString(); + struct.setDataTypeIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsReq.java new file mode 100644 index 0000000000000..30128ee169d0f --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsReq.java @@ -0,0 +1,959 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSFetchResultsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFetchResultsReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField STATEMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("statement", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField IS_ALIGN_FIELD_DESC = new org.apache.thrift.protocol.TField("isAlign", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)7); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFetchResultsReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFetchResultsReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String statement; // required + public int fetchSize; // required + public long queryId; // required + public boolean isAlign; // required + public long timeout; // optional + public long statementId; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + STATEMENT((short)2, "statement"), + FETCH_SIZE((short)3, "fetchSize"), + QUERY_ID((short)4, "queryId"), + IS_ALIGN((short)5, "isAlign"), + TIMEOUT((short)6, "timeout"), + STATEMENT_ID((short)7, "statementId"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // STATEMENT + return STATEMENT; + case 3: // FETCH_SIZE + return FETCH_SIZE; + case 4: // QUERY_ID + return QUERY_ID; + case 5: // IS_ALIGN + return IS_ALIGN; + case 6: // TIMEOUT + return TIMEOUT; + case 7: // STATEMENT_ID + return STATEMENT_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __FETCHSIZE_ISSET_ID = 1; + private static final int __QUERYID_ISSET_ID = 2; + private static final int __ISALIGN_ISSET_ID = 3; + private static final int __TIMEOUT_ISSET_ID = 4; + private static final int __STATEMENTID_ISSET_ID = 5; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.TIMEOUT,_Fields.STATEMENT_ID}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATEMENT, new org.apache.thrift.meta_data.FieldMetaData("statement", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.IS_ALIGN, new org.apache.thrift.meta_data.FieldMetaData("isAlign", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFetchResultsReq.class, metaDataMap); + } + + public TSFetchResultsReq() { + } + + public TSFetchResultsReq( + long sessionId, + java.lang.String statement, + int fetchSize, + long queryId, + boolean isAlign) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.statement = statement; + this.fetchSize = fetchSize; + setFetchSizeIsSet(true); + this.queryId = queryId; + setQueryIdIsSet(true); + this.isAlign = isAlign; + setIsAlignIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSFetchResultsReq(TSFetchResultsReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetStatement()) { + this.statement = other.statement; + } + this.fetchSize = other.fetchSize; + this.queryId = other.queryId; + this.isAlign = other.isAlign; + this.timeout = other.timeout; + this.statementId = other.statementId; + } + + @Override + public TSFetchResultsReq deepCopy() { + return new TSFetchResultsReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.statement = null; + setFetchSizeIsSet(false); + this.fetchSize = 0; + setQueryIdIsSet(false); + this.queryId = 0; + setIsAlignIsSet(false); + this.isAlign = false; + setTimeoutIsSet(false); + this.timeout = 0; + setStatementIdIsSet(false); + this.statementId = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSFetchResultsReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getStatement() { + return this.statement; + } + + public TSFetchResultsReq setStatement(@org.apache.thrift.annotation.Nullable java.lang.String statement) { + this.statement = statement; + return this; + } + + public void unsetStatement() { + this.statement = null; + } + + /** Returns true if field statement is set (has been assigned a value) and false otherwise */ + public boolean isSetStatement() { + return this.statement != null; + } + + public void setStatementIsSet(boolean value) { + if (!value) { + this.statement = null; + } + } + + public int getFetchSize() { + return this.fetchSize; + } + + public TSFetchResultsReq setFetchSize(int fetchSize) { + this.fetchSize = fetchSize; + setFetchSizeIsSet(true); + return this; + } + + public void unsetFetchSize() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ + public boolean isSetFetchSize() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + public void setFetchSizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); + } + + public long getQueryId() { + return this.queryId; + } + + public TSFetchResultsReq setQueryId(long queryId) { + this.queryId = queryId; + setQueryIdIsSet(true); + return this; + } + + public void unsetQueryId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + public void setQueryIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); + } + + public boolean isIsAlign() { + return this.isAlign; + } + + public TSFetchResultsReq setIsAlign(boolean isAlign) { + this.isAlign = isAlign; + setIsAlignIsSet(true); + return this; + } + + public void unsetIsAlign() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGN_ISSET_ID); + } + + /** Returns true if field isAlign is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAlign() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGN_ISSET_ID); + } + + public void setIsAlignIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGN_ISSET_ID, value); + } + + public long getTimeout() { + return this.timeout; + } + + public TSFetchResultsReq setTimeout(long timeout) { + this.timeout = timeout; + setTimeoutIsSet(true); + return this; + } + + public void unsetTimeout() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeout() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + public void setTimeoutIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + } + + public long getStatementId() { + return this.statementId; + } + + public TSFetchResultsReq setStatementId(long statementId) { + this.statementId = statementId; + setStatementIdIsSet(true); + return this; + } + + public void unsetStatementId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ + public boolean isSetStatementId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + public void setStatementIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case STATEMENT: + if (value == null) { + unsetStatement(); + } else { + setStatement((java.lang.String)value); + } + break; + + case FETCH_SIZE: + if (value == null) { + unsetFetchSize(); + } else { + setFetchSize((java.lang.Integer)value); + } + break; + + case QUERY_ID: + if (value == null) { + unsetQueryId(); + } else { + setQueryId((java.lang.Long)value); + } + break; + + case IS_ALIGN: + if (value == null) { + unsetIsAlign(); + } else { + setIsAlign((java.lang.Boolean)value); + } + break; + + case TIMEOUT: + if (value == null) { + unsetTimeout(); + } else { + setTimeout((java.lang.Long)value); + } + break; + + case STATEMENT_ID: + if (value == null) { + unsetStatementId(); + } else { + setStatementId((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case STATEMENT: + return getStatement(); + + case FETCH_SIZE: + return getFetchSize(); + + case QUERY_ID: + return getQueryId(); + + case IS_ALIGN: + return isIsAlign(); + + case TIMEOUT: + return getTimeout(); + + case STATEMENT_ID: + return getStatementId(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case STATEMENT: + return isSetStatement(); + case FETCH_SIZE: + return isSetFetchSize(); + case QUERY_ID: + return isSetQueryId(); + case IS_ALIGN: + return isSetIsAlign(); + case TIMEOUT: + return isSetTimeout(); + case STATEMENT_ID: + return isSetStatementId(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSFetchResultsReq) + return this.equals((TSFetchResultsReq)that); + return false; + } + + public boolean equals(TSFetchResultsReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_statement = true && this.isSetStatement(); + boolean that_present_statement = true && that.isSetStatement(); + if (this_present_statement || that_present_statement) { + if (!(this_present_statement && that_present_statement)) + return false; + if (!this.statement.equals(that.statement)) + return false; + } + + boolean this_present_fetchSize = true; + boolean that_present_fetchSize = true; + if (this_present_fetchSize || that_present_fetchSize) { + if (!(this_present_fetchSize && that_present_fetchSize)) + return false; + if (this.fetchSize != that.fetchSize) + return false; + } + + boolean this_present_queryId = true; + boolean that_present_queryId = true; + if (this_present_queryId || that_present_queryId) { + if (!(this_present_queryId && that_present_queryId)) + return false; + if (this.queryId != that.queryId) + return false; + } + + boolean this_present_isAlign = true; + boolean that_present_isAlign = true; + if (this_present_isAlign || that_present_isAlign) { + if (!(this_present_isAlign && that_present_isAlign)) + return false; + if (this.isAlign != that.isAlign) + return false; + } + + boolean this_present_timeout = true && this.isSetTimeout(); + boolean that_present_timeout = true && that.isSetTimeout(); + if (this_present_timeout || that_present_timeout) { + if (!(this_present_timeout && that_present_timeout)) + return false; + if (this.timeout != that.timeout) + return false; + } + + boolean this_present_statementId = true && this.isSetStatementId(); + boolean that_present_statementId = true && that.isSetStatementId(); + if (this_present_statementId || that_present_statementId) { + if (!(this_present_statementId && that_present_statementId)) + return false; + if (this.statementId != that.statementId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetStatement()) ? 131071 : 524287); + if (isSetStatement()) + hashCode = hashCode * 8191 + statement.hashCode(); + + hashCode = hashCode * 8191 + fetchSize; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); + + hashCode = hashCode * 8191 + ((isAlign) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); + if (isSetTimeout()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); + + hashCode = hashCode * 8191 + ((isSetStatementId()) ? 131071 : 524287); + if (isSetStatementId()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); + + return hashCode; + } + + @Override + public int compareTo(TSFetchResultsReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatement(), other.isSetStatement()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatement()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statement, other.statement); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFetchSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAlign(), other.isSetIsAlign()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAlign()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAlign, other.isAlign); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatementId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFetchResultsReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("statement:"); + if (this.statement == null) { + sb.append("null"); + } else { + sb.append(this.statement); + } + first = false; + if (!first) sb.append(", "); + sb.append("fetchSize:"); + sb.append(this.fetchSize); + first = false; + if (!first) sb.append(", "); + sb.append("queryId:"); + sb.append(this.queryId); + first = false; + if (!first) sb.append(", "); + sb.append("isAlign:"); + sb.append(this.isAlign); + first = false; + if (isSetTimeout()) { + if (!first) sb.append(", "); + sb.append("timeout:"); + sb.append(this.timeout); + first = false; + } + if (isSetStatementId()) { + if (!first) sb.append(", "); + sb.append("statementId:"); + sb.append(this.statementId); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (statement == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statement' was not present! Struct: " + toString()); + } + // alas, we cannot check 'fetchSize' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'queryId' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'isAlign' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSFetchResultsReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFetchResultsReqStandardScheme getScheme() { + return new TSFetchResultsReqStandardScheme(); + } + } + + private static class TSFetchResultsReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSFetchResultsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATEMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.statement = iprot.readString(); + struct.setStatementIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FETCH_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // QUERY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // IS_ALIGN + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAlign = iprot.readBool(); + struct.setIsAlignIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // STATEMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetFetchSize()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'fetchSize' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetQueryId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetIsAlign()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'isAlign' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSFetchResultsReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.statement != null) { + oprot.writeFieldBegin(STATEMENT_FIELD_DESC); + oprot.writeString(struct.statement); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); + oprot.writeI32(struct.fetchSize); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); + oprot.writeI64(struct.queryId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ALIGN_FIELD_DESC); + oprot.writeBool(struct.isAlign); + oprot.writeFieldEnd(); + if (struct.isSetTimeout()) { + oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); + oprot.writeI64(struct.timeout); + oprot.writeFieldEnd(); + } + if (struct.isSetStatementId()) { + oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); + oprot.writeI64(struct.statementId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSFetchResultsReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFetchResultsReqTupleScheme getScheme() { + return new TSFetchResultsReqTupleScheme(); + } + } + + private static class TSFetchResultsReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchResultsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.statement); + oprot.writeI32(struct.fetchSize); + oprot.writeI64(struct.queryId); + oprot.writeBool(struct.isAlign); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetTimeout()) { + optionals.set(0); + } + if (struct.isSetStatementId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetTimeout()) { + oprot.writeI64(struct.timeout); + } + if (struct.isSetStatementId()) { + oprot.writeI64(struct.statementId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSFetchResultsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.statement = iprot.readString(); + struct.setStatementIsSet(true); + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + struct.isAlign = iprot.readBool(); + struct.setIsAlignIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } + if (incoming.get(1)) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsResp.java new file mode 100644 index 0000000000000..75307ccb55064 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsResp.java @@ -0,0 +1,1060 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSFetchResultsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFetchResultsResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField HAS_RESULT_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("hasResultSet", org.apache.thrift.protocol.TType.BOOL, (short)2); + private static final org.apache.thrift.protocol.TField IS_ALIGN_FIELD_DESC = new org.apache.thrift.protocol.TField("isAlign", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField QUERY_DATA_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("queryDataSet", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final org.apache.thrift.protocol.TField NON_ALIGN_QUERY_DATA_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("nonAlignQueryDataSet", org.apache.thrift.protocol.TType.STRUCT, (short)5); + private static final org.apache.thrift.protocol.TField QUERY_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("queryResult", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField MORE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("moreData", org.apache.thrift.protocol.TType.BOOL, (short)7); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFetchResultsRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFetchResultsRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required + public boolean hasResultSet; // required + public boolean isAlign; // required + public @org.apache.thrift.annotation.Nullable TSQueryDataSet queryDataSet; // optional + public @org.apache.thrift.annotation.Nullable TSQueryNonAlignDataSet nonAlignQueryDataSet; // optional + public @org.apache.thrift.annotation.Nullable java.util.List queryResult; // optional + public boolean moreData; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATUS((short)1, "status"), + HAS_RESULT_SET((short)2, "hasResultSet"), + IS_ALIGN((short)3, "isAlign"), + QUERY_DATA_SET((short)4, "queryDataSet"), + NON_ALIGN_QUERY_DATA_SET((short)5, "nonAlignQueryDataSet"), + QUERY_RESULT((short)6, "queryResult"), + MORE_DATA((short)7, "moreData"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // HAS_RESULT_SET + return HAS_RESULT_SET; + case 3: // IS_ALIGN + return IS_ALIGN; + case 4: // QUERY_DATA_SET + return QUERY_DATA_SET; + case 5: // NON_ALIGN_QUERY_DATA_SET + return NON_ALIGN_QUERY_DATA_SET; + case 6: // QUERY_RESULT + return QUERY_RESULT; + case 7: // MORE_DATA + return MORE_DATA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __HASRESULTSET_ISSET_ID = 0; + private static final int __ISALIGN_ISSET_ID = 1; + private static final int __MOREDATA_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.QUERY_DATA_SET,_Fields.NON_ALIGN_QUERY_DATA_SET,_Fields.QUERY_RESULT,_Fields.MORE_DATA}; + 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + tmpMap.put(_Fields.HAS_RESULT_SET, new org.apache.thrift.meta_data.FieldMetaData("hasResultSet", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IS_ALIGN, new org.apache.thrift.meta_data.FieldMetaData("isAlign", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.QUERY_DATA_SET, new org.apache.thrift.meta_data.FieldMetaData("queryDataSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryDataSet.class))); + tmpMap.put(_Fields.NON_ALIGN_QUERY_DATA_SET, new org.apache.thrift.meta_data.FieldMetaData("nonAlignQueryDataSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryNonAlignDataSet.class))); + tmpMap.put(_Fields.QUERY_RESULT, new org.apache.thrift.meta_data.FieldMetaData("queryResult", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.MORE_DATA, new org.apache.thrift.meta_data.FieldMetaData("moreData", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFetchResultsResp.class, metaDataMap); + } + + public TSFetchResultsResp() { + } + + public TSFetchResultsResp( + org.apache.iotdb.common.rpc.thrift.TSStatus status, + boolean hasResultSet, + boolean isAlign) + { + this(); + this.status = status; + this.hasResultSet = hasResultSet; + setHasResultSetIsSet(true); + this.isAlign = isAlign; + setIsAlignIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSFetchResultsResp(TSFetchResultsResp other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetStatus()) { + this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); + } + this.hasResultSet = other.hasResultSet; + this.isAlign = other.isAlign; + if (other.isSetQueryDataSet()) { + this.queryDataSet = new TSQueryDataSet(other.queryDataSet); + } + if (other.isSetNonAlignQueryDataSet()) { + this.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(other.nonAlignQueryDataSet); + } + if (other.isSetQueryResult()) { + java.util.List __this__queryResult = new java.util.ArrayList(other.queryResult); + this.queryResult = __this__queryResult; + } + this.moreData = other.moreData; + } + + @Override + public TSFetchResultsResp deepCopy() { + return new TSFetchResultsResp(this); + } + + @Override + public void clear() { + this.status = null; + setHasResultSetIsSet(false); + this.hasResultSet = false; + setIsAlignIsSet(false); + this.isAlign = false; + this.queryDataSet = null; + this.nonAlignQueryDataSet = null; + this.queryResult = null; + setMoreDataIsSet(false); + this.moreData = false; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { + return this.status; + } + + public TSFetchResultsResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { + this.status = status; + return this; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + public boolean isHasResultSet() { + return this.hasResultSet; + } + + public TSFetchResultsResp setHasResultSet(boolean hasResultSet) { + this.hasResultSet = hasResultSet; + setHasResultSetIsSet(true); + return this; + } + + public void unsetHasResultSet() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASRESULTSET_ISSET_ID); + } + + /** Returns true if field hasResultSet is set (has been assigned a value) and false otherwise */ + public boolean isSetHasResultSet() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASRESULTSET_ISSET_ID); + } + + public void setHasResultSetIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASRESULTSET_ISSET_ID, value); + } + + public boolean isIsAlign() { + return this.isAlign; + } + + public TSFetchResultsResp setIsAlign(boolean isAlign) { + this.isAlign = isAlign; + setIsAlignIsSet(true); + return this; + } + + public void unsetIsAlign() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGN_ISSET_ID); + } + + /** Returns true if field isAlign is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAlign() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGN_ISSET_ID); + } + + public void setIsAlignIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGN_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public TSQueryDataSet getQueryDataSet() { + return this.queryDataSet; + } + + public TSFetchResultsResp setQueryDataSet(@org.apache.thrift.annotation.Nullable TSQueryDataSet queryDataSet) { + this.queryDataSet = queryDataSet; + return this; + } + + public void unsetQueryDataSet() { + this.queryDataSet = null; + } + + /** Returns true if field queryDataSet is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryDataSet() { + return this.queryDataSet != null; + } + + public void setQueryDataSetIsSet(boolean value) { + if (!value) { + this.queryDataSet = null; + } + } + + @org.apache.thrift.annotation.Nullable + public TSQueryNonAlignDataSet getNonAlignQueryDataSet() { + return this.nonAlignQueryDataSet; + } + + public TSFetchResultsResp setNonAlignQueryDataSet(@org.apache.thrift.annotation.Nullable TSQueryNonAlignDataSet nonAlignQueryDataSet) { + this.nonAlignQueryDataSet = nonAlignQueryDataSet; + return this; + } + + public void unsetNonAlignQueryDataSet() { + this.nonAlignQueryDataSet = null; + } + + /** Returns true if field nonAlignQueryDataSet is set (has been assigned a value) and false otherwise */ + public boolean isSetNonAlignQueryDataSet() { + return this.nonAlignQueryDataSet != null; + } + + public void setNonAlignQueryDataSetIsSet(boolean value) { + if (!value) { + this.nonAlignQueryDataSet = null; + } + } + + public int getQueryResultSize() { + return (this.queryResult == null) ? 0 : this.queryResult.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getQueryResultIterator() { + return (this.queryResult == null) ? null : this.queryResult.iterator(); + } + + public void addToQueryResult(java.nio.ByteBuffer elem) { + if (this.queryResult == null) { + this.queryResult = new java.util.ArrayList(); + } + this.queryResult.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getQueryResult() { + return this.queryResult; + } + + public TSFetchResultsResp setQueryResult(@org.apache.thrift.annotation.Nullable java.util.List queryResult) { + this.queryResult = queryResult; + return this; + } + + public void unsetQueryResult() { + this.queryResult = null; + } + + /** Returns true if field queryResult is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryResult() { + return this.queryResult != null; + } + + public void setQueryResultIsSet(boolean value) { + if (!value) { + this.queryResult = null; + } + } + + public boolean isMoreData() { + return this.moreData; + } + + public TSFetchResultsResp setMoreData(boolean moreData) { + this.moreData = moreData; + setMoreDataIsSet(true); + return this; + } + + public void unsetMoreData() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MOREDATA_ISSET_ID); + } + + /** Returns true if field moreData is set (has been assigned a value) and false otherwise */ + public boolean isSetMoreData() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MOREDATA_ISSET_ID); + } + + public void setMoreDataIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MOREDATA_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + case HAS_RESULT_SET: + if (value == null) { + unsetHasResultSet(); + } else { + setHasResultSet((java.lang.Boolean)value); + } + break; + + case IS_ALIGN: + if (value == null) { + unsetIsAlign(); + } else { + setIsAlign((java.lang.Boolean)value); + } + break; + + case QUERY_DATA_SET: + if (value == null) { + unsetQueryDataSet(); + } else { + setQueryDataSet((TSQueryDataSet)value); + } + break; + + case NON_ALIGN_QUERY_DATA_SET: + if (value == null) { + unsetNonAlignQueryDataSet(); + } else { + setNonAlignQueryDataSet((TSQueryNonAlignDataSet)value); + } + break; + + case QUERY_RESULT: + if (value == null) { + unsetQueryResult(); + } else { + setQueryResult((java.util.List)value); + } + break; + + case MORE_DATA: + if (value == null) { + unsetMoreData(); + } else { + setMoreData((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case HAS_RESULT_SET: + return isHasResultSet(); + + case IS_ALIGN: + return isIsAlign(); + + case QUERY_DATA_SET: + return getQueryDataSet(); + + case NON_ALIGN_QUERY_DATA_SET: + return getNonAlignQueryDataSet(); + + case QUERY_RESULT: + return getQueryResult(); + + case MORE_DATA: + return isMoreData(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case HAS_RESULT_SET: + return isSetHasResultSet(); + case IS_ALIGN: + return isSetIsAlign(); + case QUERY_DATA_SET: + return isSetQueryDataSet(); + case NON_ALIGN_QUERY_DATA_SET: + return isSetNonAlignQueryDataSet(); + case QUERY_RESULT: + return isSetQueryResult(); + case MORE_DATA: + return isSetMoreData(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSFetchResultsResp) + return this.equals((TSFetchResultsResp)that); + return false; + } + + public boolean equals(TSFetchResultsResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_hasResultSet = true; + boolean that_present_hasResultSet = true; + if (this_present_hasResultSet || that_present_hasResultSet) { + if (!(this_present_hasResultSet && that_present_hasResultSet)) + return false; + if (this.hasResultSet != that.hasResultSet) + return false; + } + + boolean this_present_isAlign = true; + boolean that_present_isAlign = true; + if (this_present_isAlign || that_present_isAlign) { + if (!(this_present_isAlign && that_present_isAlign)) + return false; + if (this.isAlign != that.isAlign) + return false; + } + + boolean this_present_queryDataSet = true && this.isSetQueryDataSet(); + boolean that_present_queryDataSet = true && that.isSetQueryDataSet(); + if (this_present_queryDataSet || that_present_queryDataSet) { + if (!(this_present_queryDataSet && that_present_queryDataSet)) + return false; + if (!this.queryDataSet.equals(that.queryDataSet)) + return false; + } + + boolean this_present_nonAlignQueryDataSet = true && this.isSetNonAlignQueryDataSet(); + boolean that_present_nonAlignQueryDataSet = true && that.isSetNonAlignQueryDataSet(); + if (this_present_nonAlignQueryDataSet || that_present_nonAlignQueryDataSet) { + if (!(this_present_nonAlignQueryDataSet && that_present_nonAlignQueryDataSet)) + return false; + if (!this.nonAlignQueryDataSet.equals(that.nonAlignQueryDataSet)) + return false; + } + + boolean this_present_queryResult = true && this.isSetQueryResult(); + boolean that_present_queryResult = true && that.isSetQueryResult(); + if (this_present_queryResult || that_present_queryResult) { + if (!(this_present_queryResult && that_present_queryResult)) + return false; + if (!this.queryResult.equals(that.queryResult)) + return false; + } + + boolean this_present_moreData = true && this.isSetMoreData(); + boolean that_present_moreData = true && that.isSetMoreData(); + if (this_present_moreData || that_present_moreData) { + if (!(this_present_moreData && that_present_moreData)) + return false; + if (this.moreData != that.moreData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + ((hasResultSet) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isAlign) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetQueryDataSet()) ? 131071 : 524287); + if (isSetQueryDataSet()) + hashCode = hashCode * 8191 + queryDataSet.hashCode(); + + hashCode = hashCode * 8191 + ((isSetNonAlignQueryDataSet()) ? 131071 : 524287); + if (isSetNonAlignQueryDataSet()) + hashCode = hashCode * 8191 + nonAlignQueryDataSet.hashCode(); + + hashCode = hashCode * 8191 + ((isSetQueryResult()) ? 131071 : 524287); + if (isSetQueryResult()) + hashCode = hashCode * 8191 + queryResult.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMoreData()) ? 131071 : 524287); + if (isSetMoreData()) + hashCode = hashCode * 8191 + ((moreData) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSFetchResultsResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetHasResultSet(), other.isSetHasResultSet()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHasResultSet()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAlign(), other.isSetIsAlign()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAlign()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAlign, other.isAlign); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryDataSet(), other.isSetQueryDataSet()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryDataSet()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryDataSet, other.queryDataSet); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetNonAlignQueryDataSet(), other.isSetNonAlignQueryDataSet()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNonAlignQueryDataSet()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonAlignQueryDataSet, other.nonAlignQueryDataSet); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryResult(), other.isSetQueryResult()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryResult()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryResult, other.queryResult); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMoreData(), other.isSetMoreData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMoreData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.moreData, other.moreData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFetchResultsResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (!first) sb.append(", "); + sb.append("hasResultSet:"); + sb.append(this.hasResultSet); + first = false; + if (!first) sb.append(", "); + sb.append("isAlign:"); + sb.append(this.isAlign); + first = false; + if (isSetQueryDataSet()) { + if (!first) sb.append(", "); + sb.append("queryDataSet:"); + if (this.queryDataSet == null) { + sb.append("null"); + } else { + sb.append(this.queryDataSet); + } + first = false; + } + if (isSetNonAlignQueryDataSet()) { + if (!first) sb.append(", "); + sb.append("nonAlignQueryDataSet:"); + if (this.nonAlignQueryDataSet == null) { + sb.append("null"); + } else { + sb.append(this.nonAlignQueryDataSet); + } + first = false; + } + if (isSetQueryResult()) { + if (!first) sb.append(", "); + sb.append("queryResult:"); + if (this.queryResult == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.queryResult, sb); + } + first = false; + } + if (isSetMoreData()) { + if (!first) sb.append(", "); + sb.append("moreData:"); + sb.append(this.moreData); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); + } + // alas, we cannot check 'hasResultSet' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'isAlign' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + if (status != null) { + status.validate(); + } + if (queryDataSet != null) { + queryDataSet.validate(); + } + if (nonAlignQueryDataSet != null) { + nonAlignQueryDataSet.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSFetchResultsRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFetchResultsRespStandardScheme getScheme() { + return new TSFetchResultsRespStandardScheme(); + } + } + + private static class TSFetchResultsRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSFetchResultsResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // HAS_RESULT_SET + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.hasResultSet = iprot.readBool(); + struct.setHasResultSetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // IS_ALIGN + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAlign = iprot.readBool(); + struct.setIsAlignIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // QUERY_DATA_SET + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.queryDataSet = new TSQueryDataSet(); + struct.queryDataSet.read(iprot); + struct.setQueryDataSetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // NON_ALIGN_QUERY_DATA_SET + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(); + struct.nonAlignQueryDataSet.read(iprot); + struct.setNonAlignQueryDataSetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // QUERY_RESULT + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list134 = iprot.readListBegin(); + struct.queryResult = new java.util.ArrayList(_list134.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem135; + for (int _i136 = 0; _i136 < _list134.size; ++_i136) + { + _elem135 = iprot.readBinary(); + struct.queryResult.add(_elem135); + } + iprot.readListEnd(); + } + struct.setQueryResultIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // MORE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.moreData = iprot.readBool(); + struct.setMoreDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetHasResultSet()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasResultSet' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetIsAlign()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'isAlign' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSFetchResultsResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(HAS_RESULT_SET_FIELD_DESC); + oprot.writeBool(struct.hasResultSet); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ALIGN_FIELD_DESC); + oprot.writeBool(struct.isAlign); + oprot.writeFieldEnd(); + if (struct.queryDataSet != null) { + if (struct.isSetQueryDataSet()) { + oprot.writeFieldBegin(QUERY_DATA_SET_FIELD_DESC); + struct.queryDataSet.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.nonAlignQueryDataSet != null) { + if (struct.isSetNonAlignQueryDataSet()) { + oprot.writeFieldBegin(NON_ALIGN_QUERY_DATA_SET_FIELD_DESC); + struct.nonAlignQueryDataSet.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.queryResult != null) { + if (struct.isSetQueryResult()) { + oprot.writeFieldBegin(QUERY_RESULT_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.queryResult.size())); + for (java.nio.ByteBuffer _iter137 : struct.queryResult) + { + oprot.writeBinary(_iter137); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.isSetMoreData()) { + oprot.writeFieldBegin(MORE_DATA_FIELD_DESC); + oprot.writeBool(struct.moreData); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSFetchResultsRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSFetchResultsRespTupleScheme getScheme() { + return new TSFetchResultsRespTupleScheme(); + } + } + + private static class TSFetchResultsRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchResultsResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status.write(oprot); + oprot.writeBool(struct.hasResultSet); + oprot.writeBool(struct.isAlign); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetQueryDataSet()) { + optionals.set(0); + } + if (struct.isSetNonAlignQueryDataSet()) { + optionals.set(1); + } + if (struct.isSetQueryResult()) { + optionals.set(2); + } + if (struct.isSetMoreData()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetQueryDataSet()) { + struct.queryDataSet.write(oprot); + } + if (struct.isSetNonAlignQueryDataSet()) { + struct.nonAlignQueryDataSet.write(oprot); + } + if (struct.isSetQueryResult()) { + { + oprot.writeI32(struct.queryResult.size()); + for (java.nio.ByteBuffer _iter138 : struct.queryResult) + { + oprot.writeBinary(_iter138); + } + } + } + if (struct.isSetMoreData()) { + oprot.writeBool(struct.moreData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSFetchResultsResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + struct.hasResultSet = iprot.readBool(); + struct.setHasResultSetIsSet(true); + struct.isAlign = iprot.readBool(); + struct.setIsAlignIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.queryDataSet = new TSQueryDataSet(); + struct.queryDataSet.read(iprot); + struct.setQueryDataSetIsSet(true); + } + if (incoming.get(1)) { + struct.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(); + struct.nonAlignQueryDataSet.read(iprot); + struct.setNonAlignQueryDataSetIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list139 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.queryResult = new java.util.ArrayList(_list139.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem140; + for (int _i141 = 0; _i141 < _list139.size; ++_i141) + { + _elem140 = iprot.readBinary(); + struct.queryResult.add(_elem140); + } + } + struct.setQueryResultIsSet(true); + } + if (incoming.get(3)) { + struct.moreData = iprot.readBool(); + struct.setMoreDataIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetOperationStatusReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetOperationStatusReq.java new file mode 100644 index 0000000000000..366f0800da662 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetOperationStatusReq.java @@ -0,0 +1,470 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSGetOperationStatusReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSGetOperationStatusReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSGetOperationStatusReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSGetOperationStatusReqTupleSchemeFactory(); + + public long sessionId; // required + public long queryId; // 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 { + SESSION_ID((short)1, "sessionId"), + QUERY_ID((short)2, "queryId"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // QUERY_ID + return QUERY_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __QUERYID_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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSGetOperationStatusReq.class, metaDataMap); + } + + public TSGetOperationStatusReq() { + } + + public TSGetOperationStatusReq( + long sessionId, + long queryId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.queryId = queryId; + setQueryIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSGetOperationStatusReq(TSGetOperationStatusReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + this.queryId = other.queryId; + } + + @Override + public TSGetOperationStatusReq deepCopy() { + return new TSGetOperationStatusReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + setQueryIdIsSet(false); + this.queryId = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSGetOperationStatusReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public long getQueryId() { + return this.queryId; + } + + public TSGetOperationStatusReq setQueryId(long queryId) { + this.queryId = queryId; + setQueryIdIsSet(true); + return this; + } + + public void unsetQueryId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); + } + + public void setQueryIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case QUERY_ID: + if (value == null) { + unsetQueryId(); + } else { + setQueryId((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case QUERY_ID: + return getQueryId(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case QUERY_ID: + return isSetQueryId(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSGetOperationStatusReq) + return this.equals((TSGetOperationStatusReq)that); + return false; + } + + public boolean equals(TSGetOperationStatusReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_queryId = true; + boolean that_present_queryId = true; + if (this_present_queryId || that_present_queryId) { + if (!(this_present_queryId && that_present_queryId)) + return false; + if (this.queryId != that.queryId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); + + return hashCode; + } + + @Override + public int compareTo(TSGetOperationStatusReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSGetOperationStatusReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("queryId:"); + sb.append(this.queryId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'queryId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSGetOperationStatusReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSGetOperationStatusReqStandardScheme getScheme() { + return new TSGetOperationStatusReqStandardScheme(); + } + } + + private static class TSGetOperationStatusReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSGetOperationStatusReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // QUERY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetQueryId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSGetOperationStatusReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); + oprot.writeI64(struct.queryId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSGetOperationStatusReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSGetOperationStatusReqTupleScheme getScheme() { + return new TSGetOperationStatusReqTupleScheme(); + } + } + + private static class TSGetOperationStatusReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSGetOperationStatusReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeI64(struct.queryId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSGetOperationStatusReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.queryId = iprot.readI64(); + struct.setQueryIdIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetTimeZoneResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetTimeZoneResp.java new file mode 100644 index 0000000000000..113b06fe2636d --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetTimeZoneResp.java @@ -0,0 +1,487 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSGetTimeZoneResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSGetTimeZoneResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField TIME_ZONE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeZone", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSGetTimeZoneRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSGetTimeZoneRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required + public @org.apache.thrift.annotation.Nullable java.lang.String timeZone; // 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 { + STATUS((short)1, "status"), + TIME_ZONE((short)2, "timeZone"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // TIME_ZONE + return TIME_ZONE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + tmpMap.put(_Fields.TIME_ZONE, new org.apache.thrift.meta_data.FieldMetaData("timeZone", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSGetTimeZoneResp.class, metaDataMap); + } + + public TSGetTimeZoneResp() { + } + + public TSGetTimeZoneResp( + org.apache.iotdb.common.rpc.thrift.TSStatus status, + java.lang.String timeZone) + { + this(); + this.status = status; + this.timeZone = timeZone; + } + + /** + * Performs a deep copy on other. + */ + public TSGetTimeZoneResp(TSGetTimeZoneResp other) { + if (other.isSetStatus()) { + this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); + } + if (other.isSetTimeZone()) { + this.timeZone = other.timeZone; + } + } + + @Override + public TSGetTimeZoneResp deepCopy() { + return new TSGetTimeZoneResp(this); + } + + @Override + public void clear() { + this.status = null; + this.timeZone = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { + return this.status; + } + + public TSGetTimeZoneResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { + this.status = status; + return this; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getTimeZone() { + return this.timeZone; + } + + public TSGetTimeZoneResp setTimeZone(@org.apache.thrift.annotation.Nullable java.lang.String timeZone) { + this.timeZone = timeZone; + return this; + } + + public void unsetTimeZone() { + this.timeZone = null; + } + + /** Returns true if field timeZone is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeZone() { + return this.timeZone != null; + } + + public void setTimeZoneIsSet(boolean value) { + if (!value) { + this.timeZone = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + case TIME_ZONE: + if (value == null) { + unsetTimeZone(); + } else { + setTimeZone((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case TIME_ZONE: + return getTimeZone(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case TIME_ZONE: + return isSetTimeZone(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSGetTimeZoneResp) + return this.equals((TSGetTimeZoneResp)that); + return false; + } + + public boolean equals(TSGetTimeZoneResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_timeZone = true && this.isSetTimeZone(); + boolean that_present_timeZone = true && that.isSetTimeZone(); + if (this_present_timeZone || that_present_timeZone) { + if (!(this_present_timeZone && that_present_timeZone)) + return false; + if (!this.timeZone.equals(that.timeZone)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTimeZone()) ? 131071 : 524287); + if (isSetTimeZone()) + hashCode = hashCode * 8191 + timeZone.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSGetTimeZoneResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeZone(), other.isSetTimeZone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeZone()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeZone, other.timeZone); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSGetTimeZoneResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (!first) sb.append(", "); + sb.append("timeZone:"); + if (this.timeZone == null) { + sb.append("null"); + } else { + sb.append(this.timeZone); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); + } + if (timeZone == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeZone' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (status != null) { + status.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class TSGetTimeZoneRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSGetTimeZoneRespStandardScheme getScheme() { + return new TSGetTimeZoneRespStandardScheme(); + } + } + + private static class TSGetTimeZoneRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TIME_ZONE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.timeZone = iprot.readString(); + struct.setTimeZoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.timeZone != null) { + oprot.writeFieldBegin(TIME_ZONE_FIELD_DESC); + oprot.writeString(struct.timeZone); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSGetTimeZoneRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSGetTimeZoneRespTupleScheme getScheme() { + return new TSGetTimeZoneRespTupleScheme(); + } + } + + private static class TSGetTimeZoneRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status.write(oprot); + oprot.writeString(struct.timeZone); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + struct.timeZone = iprot.readString(); + struct.setTimeZoneIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSGroupByQueryIntervalReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSGroupByQueryIntervalReq.java new file mode 100644 index 0000000000000..754bebd94f211 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSGroupByQueryIntervalReq.java @@ -0,0 +1,1488 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSGroupByQueryIntervalReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSGroupByQueryIntervalReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField DEVICE_FIELD_DESC = new org.apache.thrift.protocol.TField("device", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField MEASUREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("measurement", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField AGGREGATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregationType", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)8); + private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("interval", org.apache.thrift.protocol.TType.I64, (short)10); + private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)11); + private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)12); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSGroupByQueryIntervalReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSGroupByQueryIntervalReqTupleSchemeFactory(); + + public long sessionId; // required + public long statementId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String device; // required + public @org.apache.thrift.annotation.Nullable java.lang.String measurement; // required + public int dataType; // required + /** + * + * @see org.apache.iotdb.common.rpc.thrift.TAggregationType + */ + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType aggregationType; // required + public @org.apache.thrift.annotation.Nullable java.lang.String database; // optional + public long startTime; // optional + public long endTime; // optional + public long interval; // optional + public int fetchSize; // optional + public long timeout; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + STATEMENT_ID((short)2, "statementId"), + DEVICE((short)3, "device"), + MEASUREMENT((short)4, "measurement"), + DATA_TYPE((short)5, "dataType"), + /** + * + * @see org.apache.iotdb.common.rpc.thrift.TAggregationType + */ + AGGREGATION_TYPE((short)6, "aggregationType"), + DATABASE((short)7, "database"), + START_TIME((short)8, "startTime"), + END_TIME((short)9, "endTime"), + INTERVAL((short)10, "interval"), + FETCH_SIZE((short)11, "fetchSize"), + TIMEOUT((short)12, "timeout"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // STATEMENT_ID + return STATEMENT_ID; + case 3: // DEVICE + return DEVICE; + case 4: // MEASUREMENT + return MEASUREMENT; + case 5: // DATA_TYPE + return DATA_TYPE; + case 6: // AGGREGATION_TYPE + return AGGREGATION_TYPE; + case 7: // DATABASE + return DATABASE; + case 8: // START_TIME + return START_TIME; + case 9: // END_TIME + return END_TIME; + case 10: // INTERVAL + return INTERVAL; + case 11: // FETCH_SIZE + return FETCH_SIZE; + case 12: // TIMEOUT + return TIMEOUT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __STATEMENTID_ISSET_ID = 1; + private static final int __DATATYPE_ISSET_ID = 2; + private static final int __STARTTIME_ISSET_ID = 3; + private static final int __ENDTIME_ISSET_ID = 4; + private static final int __INTERVAL_ISSET_ID = 5; + private static final int __FETCHSIZE_ISSET_ID = 6; + private static final int __TIMEOUT_ISSET_ID = 7; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.DATABASE,_Fields.START_TIME,_Fields.END_TIME,_Fields.INTERVAL,_Fields.FETCH_SIZE,_Fields.TIMEOUT}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.DEVICE, new org.apache.thrift.meta_data.FieldMetaData("device", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MEASUREMENT, new org.apache.thrift.meta_data.FieldMetaData("measurement", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.AGGREGATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("aggregationType", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.iotdb.common.rpc.thrift.TAggregationType.class))); + tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.INTERVAL, new org.apache.thrift.meta_data.FieldMetaData("interval", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSGroupByQueryIntervalReq.class, metaDataMap); + } + + public TSGroupByQueryIntervalReq() { + } + + public TSGroupByQueryIntervalReq( + long sessionId, + long statementId, + java.lang.String device, + java.lang.String measurement, + int dataType, + org.apache.iotdb.common.rpc.thrift.TAggregationType aggregationType) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.statementId = statementId; + setStatementIdIsSet(true); + this.device = device; + this.measurement = measurement; + this.dataType = dataType; + setDataTypeIsSet(true); + this.aggregationType = aggregationType; + } + + /** + * Performs a deep copy on other. + */ + public TSGroupByQueryIntervalReq(TSGroupByQueryIntervalReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + this.statementId = other.statementId; + if (other.isSetDevice()) { + this.device = other.device; + } + if (other.isSetMeasurement()) { + this.measurement = other.measurement; + } + this.dataType = other.dataType; + if (other.isSetAggregationType()) { + this.aggregationType = other.aggregationType; + } + if (other.isSetDatabase()) { + this.database = other.database; + } + this.startTime = other.startTime; + this.endTime = other.endTime; + this.interval = other.interval; + this.fetchSize = other.fetchSize; + this.timeout = other.timeout; + } + + @Override + public TSGroupByQueryIntervalReq deepCopy() { + return new TSGroupByQueryIntervalReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + setStatementIdIsSet(false); + this.statementId = 0; + this.device = null; + this.measurement = null; + setDataTypeIsSet(false); + this.dataType = 0; + this.aggregationType = null; + this.database = null; + setStartTimeIsSet(false); + this.startTime = 0; + setEndTimeIsSet(false); + this.endTime = 0; + setIntervalIsSet(false); + this.interval = 0; + setFetchSizeIsSet(false); + this.fetchSize = 0; + setTimeoutIsSet(false); + this.timeout = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSGroupByQueryIntervalReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public long getStatementId() { + return this.statementId; + } + + public TSGroupByQueryIntervalReq setStatementId(long statementId) { + this.statementId = statementId; + setStatementIdIsSet(true); + return this; + } + + public void unsetStatementId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ + public boolean isSetStatementId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + public void setStatementIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getDevice() { + return this.device; + } + + public TSGroupByQueryIntervalReq setDevice(@org.apache.thrift.annotation.Nullable java.lang.String device) { + this.device = device; + return this; + } + + public void unsetDevice() { + this.device = null; + } + + /** Returns true if field device is set (has been assigned a value) and false otherwise */ + public boolean isSetDevice() { + return this.device != null; + } + + public void setDeviceIsSet(boolean value) { + if (!value) { + this.device = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getMeasurement() { + return this.measurement; + } + + public TSGroupByQueryIntervalReq setMeasurement(@org.apache.thrift.annotation.Nullable java.lang.String measurement) { + this.measurement = measurement; + return this; + } + + public void unsetMeasurement() { + this.measurement = null; + } + + /** Returns true if field measurement is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurement() { + return this.measurement != null; + } + + public void setMeasurementIsSet(boolean value) { + if (!value) { + this.measurement = null; + } + } + + public int getDataType() { + return this.dataType; + } + + public TSGroupByQueryIntervalReq setDataType(int dataType) { + this.dataType = dataType; + setDataTypeIsSet(true); + return this; + } + + public void unsetDataType() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATATYPE_ISSET_ID); + } + + /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ + public boolean isSetDataType() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATATYPE_ISSET_ID); + } + + public void setDataTypeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATATYPE_ISSET_ID, value); + } + + /** + * + * @see org.apache.iotdb.common.rpc.thrift.TAggregationType + */ + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TAggregationType getAggregationType() { + return this.aggregationType; + } + + /** + * + * @see org.apache.iotdb.common.rpc.thrift.TAggregationType + */ + public TSGroupByQueryIntervalReq setAggregationType(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + public void unsetAggregationType() { + this.aggregationType = null; + } + + /** Returns true if field aggregationType is set (has been assigned a value) and false otherwise */ + public boolean isSetAggregationType() { + return this.aggregationType != null; + } + + public void setAggregationTypeIsSet(boolean value) { + if (!value) { + this.aggregationType = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getDatabase() { + return this.database; + } + + public TSGroupByQueryIntervalReq setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) { + this.database = database; + return this; + } + + public void unsetDatabase() { + this.database = null; + } + + /** Returns true if field database is set (has been assigned a value) and false otherwise */ + public boolean isSetDatabase() { + return this.database != null; + } + + public void setDatabaseIsSet(boolean value) { + if (!value) { + this.database = null; + } + } + + public long getStartTime() { + return this.startTime; + } + + public TSGroupByQueryIntervalReq setStartTime(long startTime) { + this.startTime = startTime; + setStartTimeIsSet(true); + return this; + } + + public void unsetStartTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ + public boolean isSetStartTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + public void setStartTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); + } + + public long getEndTime() { + return this.endTime; + } + + public TSGroupByQueryIntervalReq setEndTime(long endTime) { + this.endTime = endTime; + setEndTimeIsSet(true); + return this; + } + + public void unsetEndTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ + public boolean isSetEndTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + public void setEndTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); + } + + public long getInterval() { + return this.interval; + } + + public TSGroupByQueryIntervalReq setInterval(long interval) { + this.interval = interval; + setIntervalIsSet(true); + return this; + } + + public void unsetInterval() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INTERVAL_ISSET_ID); + } + + /** Returns true if field interval is set (has been assigned a value) and false otherwise */ + public boolean isSetInterval() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INTERVAL_ISSET_ID); + } + + public void setIntervalIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INTERVAL_ISSET_ID, value); + } + + public int getFetchSize() { + return this.fetchSize; + } + + public TSGroupByQueryIntervalReq setFetchSize(int fetchSize) { + this.fetchSize = fetchSize; + setFetchSizeIsSet(true); + return this; + } + + public void unsetFetchSize() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ + public boolean isSetFetchSize() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + public void setFetchSizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); + } + + public long getTimeout() { + return this.timeout; + } + + public TSGroupByQueryIntervalReq setTimeout(long timeout) { + this.timeout = timeout; + setTimeoutIsSet(true); + return this; + } + + public void unsetTimeout() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeout() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + public void setTimeoutIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case STATEMENT_ID: + if (value == null) { + unsetStatementId(); + } else { + setStatementId((java.lang.Long)value); + } + break; + + case DEVICE: + if (value == null) { + unsetDevice(); + } else { + setDevice((java.lang.String)value); + } + break; + + case MEASUREMENT: + if (value == null) { + unsetMeasurement(); + } else { + setMeasurement((java.lang.String)value); + } + break; + + case DATA_TYPE: + if (value == null) { + unsetDataType(); + } else { + setDataType((java.lang.Integer)value); + } + break; + + case AGGREGATION_TYPE: + if (value == null) { + unsetAggregationType(); + } else { + setAggregationType((org.apache.iotdb.common.rpc.thrift.TAggregationType)value); + } + break; + + case DATABASE: + if (value == null) { + unsetDatabase(); + } else { + setDatabase((java.lang.String)value); + } + break; + + case START_TIME: + if (value == null) { + unsetStartTime(); + } else { + setStartTime((java.lang.Long)value); + } + break; + + case END_TIME: + if (value == null) { + unsetEndTime(); + } else { + setEndTime((java.lang.Long)value); + } + break; + + case INTERVAL: + if (value == null) { + unsetInterval(); + } else { + setInterval((java.lang.Long)value); + } + break; + + case FETCH_SIZE: + if (value == null) { + unsetFetchSize(); + } else { + setFetchSize((java.lang.Integer)value); + } + break; + + case TIMEOUT: + if (value == null) { + unsetTimeout(); + } else { + setTimeout((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case STATEMENT_ID: + return getStatementId(); + + case DEVICE: + return getDevice(); + + case MEASUREMENT: + return getMeasurement(); + + case DATA_TYPE: + return getDataType(); + + case AGGREGATION_TYPE: + return getAggregationType(); + + case DATABASE: + return getDatabase(); + + case START_TIME: + return getStartTime(); + + case END_TIME: + return getEndTime(); + + case INTERVAL: + return getInterval(); + + case FETCH_SIZE: + return getFetchSize(); + + case TIMEOUT: + return getTimeout(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case STATEMENT_ID: + return isSetStatementId(); + case DEVICE: + return isSetDevice(); + case MEASUREMENT: + return isSetMeasurement(); + case DATA_TYPE: + return isSetDataType(); + case AGGREGATION_TYPE: + return isSetAggregationType(); + case DATABASE: + return isSetDatabase(); + case START_TIME: + return isSetStartTime(); + case END_TIME: + return isSetEndTime(); + case INTERVAL: + return isSetInterval(); + case FETCH_SIZE: + return isSetFetchSize(); + case TIMEOUT: + return isSetTimeout(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSGroupByQueryIntervalReq) + return this.equals((TSGroupByQueryIntervalReq)that); + return false; + } + + public boolean equals(TSGroupByQueryIntervalReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_statementId = true; + boolean that_present_statementId = true; + if (this_present_statementId || that_present_statementId) { + if (!(this_present_statementId && that_present_statementId)) + return false; + if (this.statementId != that.statementId) + return false; + } + + boolean this_present_device = true && this.isSetDevice(); + boolean that_present_device = true && that.isSetDevice(); + if (this_present_device || that_present_device) { + if (!(this_present_device && that_present_device)) + return false; + if (!this.device.equals(that.device)) + return false; + } + + boolean this_present_measurement = true && this.isSetMeasurement(); + boolean that_present_measurement = true && that.isSetMeasurement(); + if (this_present_measurement || that_present_measurement) { + if (!(this_present_measurement && that_present_measurement)) + return false; + if (!this.measurement.equals(that.measurement)) + return false; + } + + boolean this_present_dataType = true; + boolean that_present_dataType = true; + if (this_present_dataType || that_present_dataType) { + if (!(this_present_dataType && that_present_dataType)) + return false; + if (this.dataType != that.dataType) + return false; + } + + boolean this_present_aggregationType = true && this.isSetAggregationType(); + boolean that_present_aggregationType = true && that.isSetAggregationType(); + if (this_present_aggregationType || that_present_aggregationType) { + if (!(this_present_aggregationType && that_present_aggregationType)) + return false; + if (!this.aggregationType.equals(that.aggregationType)) + return false; + } + + boolean this_present_database = true && this.isSetDatabase(); + boolean that_present_database = true && that.isSetDatabase(); + if (this_present_database || that_present_database) { + if (!(this_present_database && that_present_database)) + return false; + if (!this.database.equals(that.database)) + return false; + } + + boolean this_present_startTime = true && this.isSetStartTime(); + boolean that_present_startTime = true && that.isSetStartTime(); + if (this_present_startTime || that_present_startTime) { + if (!(this_present_startTime && that_present_startTime)) + return false; + if (this.startTime != that.startTime) + return false; + } + + boolean this_present_endTime = true && this.isSetEndTime(); + boolean that_present_endTime = true && that.isSetEndTime(); + if (this_present_endTime || that_present_endTime) { + if (!(this_present_endTime && that_present_endTime)) + return false; + if (this.endTime != that.endTime) + return false; + } + + boolean this_present_interval = true && this.isSetInterval(); + boolean that_present_interval = true && that.isSetInterval(); + if (this_present_interval || that_present_interval) { + if (!(this_present_interval && that_present_interval)) + return false; + if (this.interval != that.interval) + return false; + } + + boolean this_present_fetchSize = true && this.isSetFetchSize(); + boolean that_present_fetchSize = true && that.isSetFetchSize(); + if (this_present_fetchSize || that_present_fetchSize) { + if (!(this_present_fetchSize && that_present_fetchSize)) + return false; + if (this.fetchSize != that.fetchSize) + return false; + } + + boolean this_present_timeout = true && this.isSetTimeout(); + boolean that_present_timeout = true && that.isSetTimeout(); + if (this_present_timeout || that_present_timeout) { + if (!(this_present_timeout && that_present_timeout)) + return false; + if (this.timeout != that.timeout) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); + + hashCode = hashCode * 8191 + ((isSetDevice()) ? 131071 : 524287); + if (isSetDevice()) + hashCode = hashCode * 8191 + device.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurement()) ? 131071 : 524287); + if (isSetMeasurement()) + hashCode = hashCode * 8191 + measurement.hashCode(); + + hashCode = hashCode * 8191 + dataType; + + hashCode = hashCode * 8191 + ((isSetAggregationType()) ? 131071 : 524287); + if (isSetAggregationType()) + hashCode = hashCode * 8191 + aggregationType.getValue(); + + hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287); + if (isSetDatabase()) + hashCode = hashCode * 8191 + database.hashCode(); + + hashCode = hashCode * 8191 + ((isSetStartTime()) ? 131071 : 524287); + if (isSetStartTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime); + + hashCode = hashCode * 8191 + ((isSetEndTime()) ? 131071 : 524287); + if (isSetEndTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime); + + hashCode = hashCode * 8191 + ((isSetInterval()) ? 131071 : 524287); + if (isSetInterval()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(interval); + + hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); + if (isSetFetchSize()) + hashCode = hashCode * 8191 + fetchSize; + + hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); + if (isSetTimeout()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); + + return hashCode; + } + + @Override + public int compareTo(TSGroupByQueryIntervalReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatementId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDevice(), other.isSetDevice()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDevice()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device, other.device); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurement(), other.isSetMeasurement()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurement()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurement, other.measurement); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDataType(), other.isSetDataType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, other.dataType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetAggregationType(), other.isSetAggregationType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAggregationType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregationType, other.aggregationType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDatabase(), other.isSetDatabase()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatabase()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetInterval(), other.isSetInterval()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetInterval()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.interval, other.interval); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFetchSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSGroupByQueryIntervalReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("statementId:"); + sb.append(this.statementId); + first = false; + if (!first) sb.append(", "); + sb.append("device:"); + if (this.device == null) { + sb.append("null"); + } else { + sb.append(this.device); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurement:"); + if (this.measurement == null) { + sb.append("null"); + } else { + sb.append(this.measurement); + } + first = false; + if (!first) sb.append(", "); + sb.append("dataType:"); + sb.append(this.dataType); + first = false; + if (!first) sb.append(", "); + sb.append("aggregationType:"); + if (this.aggregationType == null) { + sb.append("null"); + } else { + sb.append(this.aggregationType); + } + first = false; + if (isSetDatabase()) { + if (!first) sb.append(", "); + sb.append("database:"); + if (this.database == null) { + sb.append("null"); + } else { + sb.append(this.database); + } + first = false; + } + if (isSetStartTime()) { + if (!first) sb.append(", "); + sb.append("startTime:"); + sb.append(this.startTime); + first = false; + } + if (isSetEndTime()) { + if (!first) sb.append(", "); + sb.append("endTime:"); + sb.append(this.endTime); + first = false; + } + if (isSetInterval()) { + if (!first) sb.append(", "); + sb.append("interval:"); + sb.append(this.interval); + first = false; + } + if (isSetFetchSize()) { + if (!first) sb.append(", "); + sb.append("fetchSize:"); + sb.append(this.fetchSize); + first = false; + } + if (isSetTimeout()) { + if (!first) sb.append(", "); + sb.append("timeout:"); + sb.append(this.timeout); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. + if (device == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'device' was not present! Struct: " + toString()); + } + if (measurement == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurement' was not present! Struct: " + toString()); + } + // alas, we cannot check 'dataType' because it's a primitive and you chose the non-beans generator. + if (aggregationType == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'aggregationType' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSGroupByQueryIntervalReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSGroupByQueryIntervalReqStandardScheme getScheme() { + return new TSGroupByQueryIntervalReqStandardScheme(); + } + } + + private static class TSGroupByQueryIntervalReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATEMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DEVICE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.device = iprot.readString(); + struct.setDeviceIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MEASUREMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.measurement = iprot.readString(); + struct.setMeasurementIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DATA_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.dataType = iprot.readI32(); + struct.setDataTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // AGGREGATION_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.aggregationType = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32()); + struct.setAggregationTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // DATABASE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.database = iprot.readString(); + struct.setDatabaseIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // START_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // END_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // INTERVAL + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.interval = iprot.readI64(); + struct.setIntervalIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // FETCH_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetStatementId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetDataType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataType' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); + oprot.writeI64(struct.statementId); + oprot.writeFieldEnd(); + if (struct.device != null) { + oprot.writeFieldBegin(DEVICE_FIELD_DESC); + oprot.writeString(struct.device); + oprot.writeFieldEnd(); + } + if (struct.measurement != null) { + oprot.writeFieldBegin(MEASUREMENT_FIELD_DESC); + oprot.writeString(struct.measurement); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); + oprot.writeI32(struct.dataType); + oprot.writeFieldEnd(); + if (struct.aggregationType != null) { + oprot.writeFieldBegin(AGGREGATION_TYPE_FIELD_DESC); + oprot.writeI32(struct.aggregationType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.database != null) { + if (struct.isSetDatabase()) { + oprot.writeFieldBegin(DATABASE_FIELD_DESC); + oprot.writeString(struct.database); + oprot.writeFieldEnd(); + } + } + if (struct.isSetStartTime()) { + oprot.writeFieldBegin(START_TIME_FIELD_DESC); + oprot.writeI64(struct.startTime); + oprot.writeFieldEnd(); + } + if (struct.isSetEndTime()) { + oprot.writeFieldBegin(END_TIME_FIELD_DESC); + oprot.writeI64(struct.endTime); + oprot.writeFieldEnd(); + } + if (struct.isSetInterval()) { + oprot.writeFieldBegin(INTERVAL_FIELD_DESC); + oprot.writeI64(struct.interval); + oprot.writeFieldEnd(); + } + if (struct.isSetFetchSize()) { + oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); + oprot.writeI32(struct.fetchSize); + oprot.writeFieldEnd(); + } + if (struct.isSetTimeout()) { + oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); + oprot.writeI64(struct.timeout); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSGroupByQueryIntervalReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSGroupByQueryIntervalReqTupleScheme getScheme() { + return new TSGroupByQueryIntervalReqTupleScheme(); + } + } + + private static class TSGroupByQueryIntervalReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeI64(struct.statementId); + oprot.writeString(struct.device); + oprot.writeString(struct.measurement); + oprot.writeI32(struct.dataType); + oprot.writeI32(struct.aggregationType.getValue()); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetDatabase()) { + optionals.set(0); + } + if (struct.isSetStartTime()) { + optionals.set(1); + } + if (struct.isSetEndTime()) { + optionals.set(2); + } + if (struct.isSetInterval()) { + optionals.set(3); + } + if (struct.isSetFetchSize()) { + optionals.set(4); + } + if (struct.isSetTimeout()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetDatabase()) { + oprot.writeString(struct.database); + } + if (struct.isSetStartTime()) { + oprot.writeI64(struct.startTime); + } + if (struct.isSetEndTime()) { + oprot.writeI64(struct.endTime); + } + if (struct.isSetInterval()) { + oprot.writeI64(struct.interval); + } + if (struct.isSetFetchSize()) { + oprot.writeI32(struct.fetchSize); + } + if (struct.isSetTimeout()) { + oprot.writeI64(struct.timeout); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + struct.device = iprot.readString(); + struct.setDeviceIsSet(true); + struct.measurement = iprot.readString(); + struct.setMeasurementIsSet(true); + struct.dataType = iprot.readI32(); + struct.setDataTypeIsSet(true); + struct.aggregationType = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32()); + struct.setAggregationTypeIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.database = iprot.readString(); + struct.setDatabaseIsSet(true); + } + if (incoming.get(1)) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } + if (incoming.get(2)) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } + if (incoming.get(3)) { + struct.interval = iprot.readI64(); + struct.setIntervalIsSet(true); + } + if (incoming.get(4)) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } + if (incoming.get(5)) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordReq.java new file mode 100644 index 0000000000000..5780ac4976651 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordReq.java @@ -0,0 +1,1195 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSInsertRecordReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertRecordReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField IS_WRITE_TO_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("isWriteToTable", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField COLUMN_CATEGORYIES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnCategoryies", org.apache.thrift.protocol.TType.LIST, (short)8); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertRecordReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertRecordReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required + public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer values; // required + public long timestamp; // required + public boolean isAligned; // optional + public boolean isWriteToTable; // optional + public @org.apache.thrift.annotation.Nullable java.util.List columnCategoryies; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATH((short)2, "prefixPath"), + MEASUREMENTS((short)3, "measurements"), + VALUES((short)4, "values"), + TIMESTAMP((short)5, "timestamp"), + IS_ALIGNED((short)6, "isAligned"), + IS_WRITE_TO_TABLE((short)7, "isWriteToTable"), + COLUMN_CATEGORYIES((short)8, "columnCategoryies"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATH + return PREFIX_PATH; + case 3: // MEASUREMENTS + return MEASUREMENTS; + case 4: // VALUES + return VALUES; + case 5: // TIMESTAMP + return TIMESTAMP; + case 6: // IS_ALIGNED + return IS_ALIGNED; + case 7: // IS_WRITE_TO_TABLE + return IS_WRITE_TO_TABLE; + case 8: // COLUMN_CATEGORYIES + return COLUMN_CATEGORYIES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __TIMESTAMP_ISSET_ID = 1; + private static final int __ISALIGNED_ISSET_ID = 2; + private static final int __ISWRITETOTABLE_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.IS_ALIGNED,_Fields.IS_WRITE_TO_TABLE,_Fields.COLUMN_CATEGORYIES}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IS_WRITE_TO_TABLE, new org.apache.thrift.meta_data.FieldMetaData("isWriteToTable", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.COLUMN_CATEGORYIES, new org.apache.thrift.meta_data.FieldMetaData("columnCategoryies", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertRecordReq.class, metaDataMap); + } + + public TSInsertRecordReq() { + } + + public TSInsertRecordReq( + long sessionId, + java.lang.String prefixPath, + java.util.List measurements, + java.nio.ByteBuffer values, + long timestamp) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPath = prefixPath; + this.measurements = measurements; + this.values = org.apache.thrift.TBaseHelper.copyBinary(values); + this.timestamp = timestamp; + setTimestampIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSInsertRecordReq(TSInsertRecordReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPath()) { + this.prefixPath = other.prefixPath; + } + if (other.isSetMeasurements()) { + java.util.List __this__measurements = new java.util.ArrayList(other.measurements); + this.measurements = __this__measurements; + } + if (other.isSetValues()) { + this.values = org.apache.thrift.TBaseHelper.copyBinary(other.values); + } + this.timestamp = other.timestamp; + this.isAligned = other.isAligned; + this.isWriteToTable = other.isWriteToTable; + if (other.isSetColumnCategoryies()) { + java.util.List __this__columnCategoryies = new java.util.ArrayList(other.columnCategoryies); + this.columnCategoryies = __this__columnCategoryies; + } + } + + @Override + public TSInsertRecordReq deepCopy() { + return new TSInsertRecordReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPath = null; + this.measurements = null; + this.values = null; + setTimestampIsSet(false); + this.timestamp = 0; + setIsAlignedIsSet(false); + this.isAligned = false; + setIsWriteToTableIsSet(false); + this.isWriteToTable = false; + this.columnCategoryies = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSInsertRecordReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPrefixPath() { + return this.prefixPath; + } + + public TSInsertRecordReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { + this.prefixPath = prefixPath; + return this; + } + + public void unsetPrefixPath() { + this.prefixPath = null; + } + + /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPath() { + return this.prefixPath != null; + } + + public void setPrefixPathIsSet(boolean value) { + if (!value) { + this.prefixPath = null; + } + } + + public int getMeasurementsSize() { + return (this.measurements == null) ? 0 : this.measurements.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getMeasurementsIterator() { + return (this.measurements == null) ? null : this.measurements.iterator(); + } + + public void addToMeasurements(java.lang.String elem) { + if (this.measurements == null) { + this.measurements = new java.util.ArrayList(); + } + this.measurements.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getMeasurements() { + return this.measurements; + } + + public TSInsertRecordReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { + this.measurements = measurements; + return this; + } + + public void unsetMeasurements() { + this.measurements = null; + } + + /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurements() { + return this.measurements != null; + } + + public void setMeasurementsIsSet(boolean value) { + if (!value) { + this.measurements = null; + } + } + + public byte[] getValues() { + setValues(org.apache.thrift.TBaseHelper.rightSize(values)); + return values == null ? null : values.array(); + } + + public java.nio.ByteBuffer bufferForValues() { + return org.apache.thrift.TBaseHelper.copyBinary(values); + } + + public TSInsertRecordReq setValues(byte[] values) { + this.values = values == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(values.clone()); + return this; + } + + public TSInsertRecordReq setValues(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer values) { + this.values = org.apache.thrift.TBaseHelper.copyBinary(values); + return this; + } + + public void unsetValues() { + this.values = null; + } + + /** Returns true if field values is set (has been assigned a value) and false otherwise */ + public boolean isSetValues() { + return this.values != null; + } + + public void setValuesIsSet(boolean value) { + if (!value) { + this.values = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public TSInsertRecordReq setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); + } + + public boolean isIsAligned() { + return this.isAligned; + } + + public TSInsertRecordReq setIsAligned(boolean isAligned) { + this.isAligned = isAligned; + setIsAlignedIsSet(true); + return this; + } + + public void unsetIsAligned() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAligned() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + public void setIsAlignedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); + } + + public boolean isIsWriteToTable() { + return this.isWriteToTable; + } + + public TSInsertRecordReq setIsWriteToTable(boolean isWriteToTable) { + this.isWriteToTable = isWriteToTable; + setIsWriteToTableIsSet(true); + return this; + } + + public void unsetIsWriteToTable() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISWRITETOTABLE_ISSET_ID); + } + + /** Returns true if field isWriteToTable is set (has been assigned a value) and false otherwise */ + public boolean isSetIsWriteToTable() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISWRITETOTABLE_ISSET_ID); + } + + public void setIsWriteToTableIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISWRITETOTABLE_ISSET_ID, value); + } + + public int getColumnCategoryiesSize() { + return (this.columnCategoryies == null) ? 0 : this.columnCategoryies.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getColumnCategoryiesIterator() { + return (this.columnCategoryies == null) ? null : this.columnCategoryies.iterator(); + } + + public void addToColumnCategoryies(byte elem) { + if (this.columnCategoryies == null) { + this.columnCategoryies = new java.util.ArrayList(); + } + this.columnCategoryies.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getColumnCategoryies() { + return this.columnCategoryies; + } + + public TSInsertRecordReq setColumnCategoryies(@org.apache.thrift.annotation.Nullable java.util.List columnCategoryies) { + this.columnCategoryies = columnCategoryies; + return this; + } + + public void unsetColumnCategoryies() { + this.columnCategoryies = null; + } + + /** Returns true if field columnCategoryies is set (has been assigned a value) and false otherwise */ + public boolean isSetColumnCategoryies() { + return this.columnCategoryies != null; + } + + public void setColumnCategoryiesIsSet(boolean value) { + if (!value) { + this.columnCategoryies = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATH: + if (value == null) { + unsetPrefixPath(); + } else { + setPrefixPath((java.lang.String)value); + } + break; + + case MEASUREMENTS: + if (value == null) { + unsetMeasurements(); + } else { + setMeasurements((java.util.List)value); + } + break; + + case VALUES: + if (value == null) { + unsetValues(); + } else { + if (value instanceof byte[]) { + setValues((byte[])value); + } else { + setValues((java.nio.ByteBuffer)value); + } + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((java.lang.Long)value); + } + break; + + case IS_ALIGNED: + if (value == null) { + unsetIsAligned(); + } else { + setIsAligned((java.lang.Boolean)value); + } + break; + + case IS_WRITE_TO_TABLE: + if (value == null) { + unsetIsWriteToTable(); + } else { + setIsWriteToTable((java.lang.Boolean)value); + } + break; + + case COLUMN_CATEGORYIES: + if (value == null) { + unsetColumnCategoryies(); + } else { + setColumnCategoryies((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATH: + return getPrefixPath(); + + case MEASUREMENTS: + return getMeasurements(); + + case VALUES: + return getValues(); + + case TIMESTAMP: + return getTimestamp(); + + case IS_ALIGNED: + return isIsAligned(); + + case IS_WRITE_TO_TABLE: + return isIsWriteToTable(); + + case COLUMN_CATEGORYIES: + return getColumnCategoryies(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATH: + return isSetPrefixPath(); + case MEASUREMENTS: + return isSetMeasurements(); + case VALUES: + return isSetValues(); + case TIMESTAMP: + return isSetTimestamp(); + case IS_ALIGNED: + return isSetIsAligned(); + case IS_WRITE_TO_TABLE: + return isSetIsWriteToTable(); + case COLUMN_CATEGORYIES: + return isSetColumnCategoryies(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSInsertRecordReq) + return this.equals((TSInsertRecordReq)that); + return false; + } + + public boolean equals(TSInsertRecordReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPath = true && this.isSetPrefixPath(); + boolean that_present_prefixPath = true && that.isSetPrefixPath(); + if (this_present_prefixPath || that_present_prefixPath) { + if (!(this_present_prefixPath && that_present_prefixPath)) + return false; + if (!this.prefixPath.equals(that.prefixPath)) + return false; + } + + boolean this_present_measurements = true && this.isSetMeasurements(); + boolean that_present_measurements = true && that.isSetMeasurements(); + if (this_present_measurements || that_present_measurements) { + if (!(this_present_measurements && that_present_measurements)) + return false; + if (!this.measurements.equals(that.measurements)) + return false; + } + + boolean this_present_values = true && this.isSetValues(); + boolean that_present_values = true && that.isSetValues(); + if (this_present_values || that_present_values) { + if (!(this_present_values && that_present_values)) + return false; + if (!this.values.equals(that.values)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_isAligned = true && this.isSetIsAligned(); + boolean that_present_isAligned = true && that.isSetIsAligned(); + if (this_present_isAligned || that_present_isAligned) { + if (!(this_present_isAligned && that_present_isAligned)) + return false; + if (this.isAligned != that.isAligned) + return false; + } + + boolean this_present_isWriteToTable = true && this.isSetIsWriteToTable(); + boolean that_present_isWriteToTable = true && that.isSetIsWriteToTable(); + if (this_present_isWriteToTable || that_present_isWriteToTable) { + if (!(this_present_isWriteToTable && that_present_isWriteToTable)) + return false; + if (this.isWriteToTable != that.isWriteToTable) + return false; + } + + boolean this_present_columnCategoryies = true && this.isSetColumnCategoryies(); + boolean that_present_columnCategoryies = true && that.isSetColumnCategoryies(); + if (this_present_columnCategoryies || that_present_columnCategoryies) { + if (!(this_present_columnCategoryies && that_present_columnCategoryies)) + return false; + if (!this.columnCategoryies.equals(that.columnCategoryies)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); + if (isSetPrefixPath()) + hashCode = hashCode * 8191 + prefixPath.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); + if (isSetMeasurements()) + hashCode = hashCode * 8191 + measurements.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValues()) ? 131071 : 524287); + if (isSetValues()) + hashCode = hashCode * 8191 + values.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp); + + hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); + if (isSetIsAligned()) + hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetIsWriteToTable()) ? 131071 : 524287); + if (isSetIsWriteToTable()) + hashCode = hashCode * 8191 + ((isWriteToTable) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetColumnCategoryies()) ? 131071 : 524287); + if (isSetColumnCategoryies()) + hashCode = hashCode * 8191 + columnCategoryies.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSInsertRecordReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurements()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValues(), other.isSetValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimestamp(), other.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAligned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsWriteToTable(), other.isSetIsWriteToTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsWriteToTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isWriteToTable, other.isWriteToTable); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetColumnCategoryies(), other.isSetColumnCategoryies()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnCategoryies()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnCategoryies, other.columnCategoryies); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertRecordReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPath:"); + if (this.prefixPath == null) { + sb.append("null"); + } else { + sb.append(this.prefixPath); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurements:"); + if (this.measurements == null) { + sb.append("null"); + } else { + sb.append(this.measurements); + } + first = false; + if (!first) sb.append(", "); + sb.append("values:"); + if (this.values == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.values, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (isSetIsAligned()) { + if (!first) sb.append(", "); + sb.append("isAligned:"); + sb.append(this.isAligned); + first = false; + } + if (isSetIsWriteToTable()) { + if (!first) sb.append(", "); + sb.append("isWriteToTable:"); + sb.append(this.isWriteToTable); + first = false; + } + if (isSetColumnCategoryies()) { + if (!first) sb.append(", "); + sb.append("columnCategoryies:"); + if (this.columnCategoryies == null) { + sb.append("null"); + } else { + sb.append(this.columnCategoryies); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPath == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); + } + if (measurements == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); + } + if (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); + } + // alas, we cannot check 'timestamp' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSInsertRecordReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertRecordReqStandardScheme getScheme() { + return new TSInsertRecordReqStandardScheme(); + } + } + + private static class TSInsertRecordReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertRecordReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MEASUREMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list150 = iprot.readListBegin(); + struct.measurements = new java.util.ArrayList(_list150.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem151; + for (int _i152 = 0; _i152 < _list150.size; ++_i152) + { + _elem151 = iprot.readString(); + struct.measurements.add(_elem151); + } + iprot.readListEnd(); + } + struct.setMeasurementsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.values = iprot.readBinary(); + struct.setValuesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IS_ALIGNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // IS_WRITE_TO_TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isWriteToTable = iprot.readBool(); + struct.setIsWriteToTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // COLUMN_CATEGORYIES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list153 = iprot.readListBegin(); + struct.columnCategoryies = new java.util.ArrayList(_list153.size); + byte _elem154; + for (int _i155 = 0; _i155 < _list153.size; ++_i155) + { + _elem154 = iprot.readByte(); + struct.columnCategoryies.add(_elem154); + } + iprot.readListEnd(); + } + struct.setColumnCategoryiesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetTimestamp()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamp' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertRecordReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPath != null) { + oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); + oprot.writeString(struct.prefixPath); + oprot.writeFieldEnd(); + } + if (struct.measurements != null) { + oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); + for (java.lang.String _iter156 : struct.measurements) + { + oprot.writeString(_iter156); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.values != null) { + oprot.writeFieldBegin(VALUES_FIELD_DESC); + oprot.writeBinary(struct.values); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.isSetIsAligned()) { + oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); + oprot.writeBool(struct.isAligned); + oprot.writeFieldEnd(); + } + if (struct.isSetIsWriteToTable()) { + oprot.writeFieldBegin(IS_WRITE_TO_TABLE_FIELD_DESC); + oprot.writeBool(struct.isWriteToTable); + oprot.writeFieldEnd(); + } + if (struct.columnCategoryies != null) { + if (struct.isSetColumnCategoryies()) { + oprot.writeFieldBegin(COLUMN_CATEGORYIES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, struct.columnCategoryies.size())); + for (byte _iter157 : struct.columnCategoryies) + { + oprot.writeByte(_iter157); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSInsertRecordReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertRecordReqTupleScheme getScheme() { + return new TSInsertRecordReqTupleScheme(); + } + } + + private static class TSInsertRecordReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.prefixPath); + { + oprot.writeI32(struct.measurements.size()); + for (java.lang.String _iter158 : struct.measurements) + { + oprot.writeString(_iter158); + } + } + oprot.writeBinary(struct.values); + oprot.writeI64(struct.timestamp); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetIsAligned()) { + optionals.set(0); + } + if (struct.isSetIsWriteToTable()) { + optionals.set(1); + } + if (struct.isSetColumnCategoryies()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetIsAligned()) { + oprot.writeBool(struct.isAligned); + } + if (struct.isSetIsWriteToTable()) { + oprot.writeBool(struct.isWriteToTable); + } + if (struct.isSetColumnCategoryies()) { + { + oprot.writeI32(struct.columnCategoryies.size()); + for (byte _iter159 : struct.columnCategoryies) + { + oprot.writeByte(_iter159); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + { + org.apache.thrift.protocol.TList _list160 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.measurements = new java.util.ArrayList(_list160.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem161; + for (int _i162 = 0; _i162 < _list160.size; ++_i162) + { + _elem161 = iprot.readString(); + struct.measurements.add(_elem161); + } + } + struct.setMeasurementsIsSet(true); + struct.values = iprot.readBinary(); + struct.setValuesIsSet(true); + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } + if (incoming.get(1)) { + struct.isWriteToTable = iprot.readBool(); + struct.setIsWriteToTableIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list163 = iprot.readListBegin(org.apache.thrift.protocol.TType.BYTE); + struct.columnCategoryies = new java.util.ArrayList(_list163.size); + byte _elem164; + for (int _i165 = 0; _i165 < _list163.size; ++_i165) + { + _elem164 = iprot.readByte(); + struct.columnCategoryies.add(_elem164); + } + } + struct.setColumnCategoryiesIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsOfOneDeviceReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsOfOneDeviceReq.java new file mode 100644 index 0000000000000..ce6c992aa6a58 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsOfOneDeviceReq.java @@ -0,0 +1,1071 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSInsertRecordsOfOneDeviceReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertRecordsOfOneDeviceReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertRecordsOfOneDeviceReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertRecordsOfOneDeviceReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required + public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required + public @org.apache.thrift.annotation.Nullable java.util.List valuesList; // required + public @org.apache.thrift.annotation.Nullable java.util.List timestamps; // required + public boolean isAligned; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATH((short)2, "prefixPath"), + MEASUREMENTS_LIST((short)3, "measurementsList"), + VALUES_LIST((short)4, "valuesList"), + TIMESTAMPS((short)5, "timestamps"), + IS_ALIGNED((short)6, "isAligned"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATH + return PREFIX_PATH; + case 3: // MEASUREMENTS_LIST + return MEASUREMENTS_LIST; + case 4: // VALUES_LIST + return VALUES_LIST; + case 5: // TIMESTAMPS + return TIMESTAMPS; + case 6: // IS_ALIGNED + return IS_ALIGNED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __ISALIGNED_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertRecordsOfOneDeviceReq.class, metaDataMap); + } + + public TSInsertRecordsOfOneDeviceReq() { + } + + public TSInsertRecordsOfOneDeviceReq( + long sessionId, + java.lang.String prefixPath, + java.util.List> measurementsList, + java.util.List valuesList, + java.util.List timestamps) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPath = prefixPath; + this.measurementsList = measurementsList; + this.valuesList = valuesList; + this.timestamps = timestamps; + } + + /** + * Performs a deep copy on other. + */ + public TSInsertRecordsOfOneDeviceReq(TSInsertRecordsOfOneDeviceReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPath()) { + this.prefixPath = other.prefixPath; + } + if (other.isSetMeasurementsList()) { + java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); + for (java.util.List other_element : other.measurementsList) { + java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); + __this__measurementsList.add(__this__measurementsList_copy); + } + this.measurementsList = __this__measurementsList; + } + if (other.isSetValuesList()) { + java.util.List __this__valuesList = new java.util.ArrayList(other.valuesList); + this.valuesList = __this__valuesList; + } + if (other.isSetTimestamps()) { + java.util.List __this__timestamps = new java.util.ArrayList(other.timestamps); + this.timestamps = __this__timestamps; + } + this.isAligned = other.isAligned; + } + + @Override + public TSInsertRecordsOfOneDeviceReq deepCopy() { + return new TSInsertRecordsOfOneDeviceReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPath = null; + this.measurementsList = null; + this.valuesList = null; + this.timestamps = null; + setIsAlignedIsSet(false); + this.isAligned = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSInsertRecordsOfOneDeviceReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPrefixPath() { + return this.prefixPath; + } + + public TSInsertRecordsOfOneDeviceReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { + this.prefixPath = prefixPath; + return this; + } + + public void unsetPrefixPath() { + this.prefixPath = null; + } + + /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPath() { + return this.prefixPath != null; + } + + public void setPrefixPathIsSet(boolean value) { + if (!value) { + this.prefixPath = null; + } + } + + public int getMeasurementsListSize() { + return (this.measurementsList == null) ? 0 : this.measurementsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getMeasurementsListIterator() { + return (this.measurementsList == null) ? null : this.measurementsList.iterator(); + } + + public void addToMeasurementsList(java.util.List elem) { + if (this.measurementsList == null) { + this.measurementsList = new java.util.ArrayList>(); + } + this.measurementsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getMeasurementsList() { + return this.measurementsList; + } + + public TSInsertRecordsOfOneDeviceReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { + this.measurementsList = measurementsList; + return this; + } + + public void unsetMeasurementsList() { + this.measurementsList = null; + } + + /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurementsList() { + return this.measurementsList != null; + } + + public void setMeasurementsListIsSet(boolean value) { + if (!value) { + this.measurementsList = null; + } + } + + public int getValuesListSize() { + return (this.valuesList == null) ? 0 : this.valuesList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getValuesListIterator() { + return (this.valuesList == null) ? null : this.valuesList.iterator(); + } + + public void addToValuesList(java.nio.ByteBuffer elem) { + if (this.valuesList == null) { + this.valuesList = new java.util.ArrayList(); + } + this.valuesList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getValuesList() { + return this.valuesList; + } + + public TSInsertRecordsOfOneDeviceReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List valuesList) { + this.valuesList = valuesList; + return this; + } + + public void unsetValuesList() { + this.valuesList = null; + } + + /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ + public boolean isSetValuesList() { + return this.valuesList != null; + } + + public void setValuesListIsSet(boolean value) { + if (!value) { + this.valuesList = null; + } + } + + public int getTimestampsSize() { + return (this.timestamps == null) ? 0 : this.timestamps.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTimestampsIterator() { + return (this.timestamps == null) ? null : this.timestamps.iterator(); + } + + public void addToTimestamps(long elem) { + if (this.timestamps == null) { + this.timestamps = new java.util.ArrayList(); + } + this.timestamps.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getTimestamps() { + return this.timestamps; + } + + public TSInsertRecordsOfOneDeviceReq setTimestamps(@org.apache.thrift.annotation.Nullable java.util.List timestamps) { + this.timestamps = timestamps; + return this; + } + + public void unsetTimestamps() { + this.timestamps = null; + } + + /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamps() { + return this.timestamps != null; + } + + public void setTimestampsIsSet(boolean value) { + if (!value) { + this.timestamps = null; + } + } + + public boolean isIsAligned() { + return this.isAligned; + } + + public TSInsertRecordsOfOneDeviceReq setIsAligned(boolean isAligned) { + this.isAligned = isAligned; + setIsAlignedIsSet(true); + return this; + } + + public void unsetIsAligned() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAligned() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + public void setIsAlignedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATH: + if (value == null) { + unsetPrefixPath(); + } else { + setPrefixPath((java.lang.String)value); + } + break; + + case MEASUREMENTS_LIST: + if (value == null) { + unsetMeasurementsList(); + } else { + setMeasurementsList((java.util.List>)value); + } + break; + + case VALUES_LIST: + if (value == null) { + unsetValuesList(); + } else { + setValuesList((java.util.List)value); + } + break; + + case TIMESTAMPS: + if (value == null) { + unsetTimestamps(); + } else { + setTimestamps((java.util.List)value); + } + break; + + case IS_ALIGNED: + if (value == null) { + unsetIsAligned(); + } else { + setIsAligned((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATH: + return getPrefixPath(); + + case MEASUREMENTS_LIST: + return getMeasurementsList(); + + case VALUES_LIST: + return getValuesList(); + + case TIMESTAMPS: + return getTimestamps(); + + case IS_ALIGNED: + return isIsAligned(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATH: + return isSetPrefixPath(); + case MEASUREMENTS_LIST: + return isSetMeasurementsList(); + case VALUES_LIST: + return isSetValuesList(); + case TIMESTAMPS: + return isSetTimestamps(); + case IS_ALIGNED: + return isSetIsAligned(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSInsertRecordsOfOneDeviceReq) + return this.equals((TSInsertRecordsOfOneDeviceReq)that); + return false; + } + + public boolean equals(TSInsertRecordsOfOneDeviceReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPath = true && this.isSetPrefixPath(); + boolean that_present_prefixPath = true && that.isSetPrefixPath(); + if (this_present_prefixPath || that_present_prefixPath) { + if (!(this_present_prefixPath && that_present_prefixPath)) + return false; + if (!this.prefixPath.equals(that.prefixPath)) + return false; + } + + boolean this_present_measurementsList = true && this.isSetMeasurementsList(); + boolean that_present_measurementsList = true && that.isSetMeasurementsList(); + if (this_present_measurementsList || that_present_measurementsList) { + if (!(this_present_measurementsList && that_present_measurementsList)) + return false; + if (!this.measurementsList.equals(that.measurementsList)) + return false; + } + + boolean this_present_valuesList = true && this.isSetValuesList(); + boolean that_present_valuesList = true && that.isSetValuesList(); + if (this_present_valuesList || that_present_valuesList) { + if (!(this_present_valuesList && that_present_valuesList)) + return false; + if (!this.valuesList.equals(that.valuesList)) + return false; + } + + boolean this_present_timestamps = true && this.isSetTimestamps(); + boolean that_present_timestamps = true && that.isSetTimestamps(); + if (this_present_timestamps || that_present_timestamps) { + if (!(this_present_timestamps && that_present_timestamps)) + return false; + if (!this.timestamps.equals(that.timestamps)) + return false; + } + + boolean this_present_isAligned = true && this.isSetIsAligned(); + boolean that_present_isAligned = true && that.isSetIsAligned(); + if (this_present_isAligned || that_present_isAligned) { + if (!(this_present_isAligned && that_present_isAligned)) + return false; + if (this.isAligned != that.isAligned) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); + if (isSetPrefixPath()) + hashCode = hashCode * 8191 + prefixPath.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); + if (isSetMeasurementsList()) + hashCode = hashCode * 8191 + measurementsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); + if (isSetValuesList()) + hashCode = hashCode * 8191 + valuesList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); + if (isSetTimestamps()) + hashCode = hashCode * 8191 + timestamps.hashCode(); + + hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); + if (isSetIsAligned()) + hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSInsertRecordsOfOneDeviceReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurementsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValuesList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamps()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAligned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertRecordsOfOneDeviceReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPath:"); + if (this.prefixPath == null) { + sb.append("null"); + } else { + sb.append(this.prefixPath); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurementsList:"); + if (this.measurementsList == null) { + sb.append("null"); + } else { + sb.append(this.measurementsList); + } + first = false; + if (!first) sb.append(", "); + sb.append("valuesList:"); + if (this.valuesList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.valuesList, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamps:"); + if (this.timestamps == null) { + sb.append("null"); + } else { + sb.append(this.timestamps); + } + first = false; + if (isSetIsAligned()) { + if (!first) sb.append(", "); + sb.append("isAligned:"); + sb.append(this.isAligned); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPath == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); + } + if (measurementsList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); + } + if (valuesList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); + } + if (timestamps == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSInsertRecordsOfOneDeviceReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertRecordsOfOneDeviceReqStandardScheme getScheme() { + return new TSInsertRecordsOfOneDeviceReqStandardScheme(); + } + } + + private static class TSInsertRecordsOfOneDeviceReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MEASUREMENTS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list318 = iprot.readListBegin(); + struct.measurementsList = new java.util.ArrayList>(_list318.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem319; + for (int _i320 = 0; _i320 < _list318.size; ++_i320) + { + { + org.apache.thrift.protocol.TList _list321 = iprot.readListBegin(); + _elem319 = new java.util.ArrayList(_list321.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem322; + for (int _i323 = 0; _i323 < _list321.size; ++_i323) + { + _elem322 = iprot.readString(); + _elem319.add(_elem322); + } + iprot.readListEnd(); + } + struct.measurementsList.add(_elem319); + } + iprot.readListEnd(); + } + struct.setMeasurementsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // VALUES_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list324 = iprot.readListBegin(); + struct.valuesList = new java.util.ArrayList(_list324.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem325; + for (int _i326 = 0; _i326 < _list324.size; ++_i326) + { + _elem325 = iprot.readBinary(); + struct.valuesList.add(_elem325); + } + iprot.readListEnd(); + } + struct.setValuesListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMESTAMPS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list327 = iprot.readListBegin(); + struct.timestamps = new java.util.ArrayList(_list327.size); + long _elem328; + for (int _i329 = 0; _i329 < _list327.size; ++_i329) + { + _elem328 = iprot.readI64(); + struct.timestamps.add(_elem328); + } + iprot.readListEnd(); + } + struct.setTimestampsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IS_ALIGNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPath != null) { + oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); + oprot.writeString(struct.prefixPath); + oprot.writeFieldEnd(); + } + if (struct.measurementsList != null) { + oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); + for (java.util.List _iter330 : struct.measurementsList) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter330.size())); + for (java.lang.String _iter331 : _iter330) + { + oprot.writeString(_iter331); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.valuesList != null) { + oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valuesList.size())); + for (java.nio.ByteBuffer _iter332 : struct.valuesList) + { + oprot.writeBinary(_iter332); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.timestamps != null) { + oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.timestamps.size())); + for (long _iter333 : struct.timestamps) + { + oprot.writeI64(_iter333); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetIsAligned()) { + oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); + oprot.writeBool(struct.isAligned); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSInsertRecordsOfOneDeviceReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertRecordsOfOneDeviceReqTupleScheme getScheme() { + return new TSInsertRecordsOfOneDeviceReqTupleScheme(); + } + } + + private static class TSInsertRecordsOfOneDeviceReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.prefixPath); + { + oprot.writeI32(struct.measurementsList.size()); + for (java.util.List _iter334 : struct.measurementsList) + { + { + oprot.writeI32(_iter334.size()); + for (java.lang.String _iter335 : _iter334) + { + oprot.writeString(_iter335); + } + } + } + } + { + oprot.writeI32(struct.valuesList.size()); + for (java.nio.ByteBuffer _iter336 : struct.valuesList) + { + oprot.writeBinary(_iter336); + } + } + { + oprot.writeI32(struct.timestamps.size()); + for (long _iter337 : struct.timestamps) + { + oprot.writeI64(_iter337); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetIsAligned()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIsAligned()) { + oprot.writeBool(struct.isAligned); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + { + org.apache.thrift.protocol.TList _list338 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); + struct.measurementsList = new java.util.ArrayList>(_list338.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem339; + for (int _i340 = 0; _i340 < _list338.size; ++_i340) + { + { + org.apache.thrift.protocol.TList _list341 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + _elem339 = new java.util.ArrayList(_list341.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem342; + for (int _i343 = 0; _i343 < _list341.size; ++_i343) + { + _elem342 = iprot.readString(); + _elem339.add(_elem342); + } + } + struct.measurementsList.add(_elem339); + } + } + struct.setMeasurementsListIsSet(true); + { + org.apache.thrift.protocol.TList _list344 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.valuesList = new java.util.ArrayList(_list344.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem345; + for (int _i346 = 0; _i346 < _list344.size; ++_i346) + { + _elem345 = iprot.readBinary(); + struct.valuesList.add(_elem345); + } + } + struct.setValuesListIsSet(true); + { + org.apache.thrift.protocol.TList _list347 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); + struct.timestamps = new java.util.ArrayList(_list347.size); + long _elem348; + for (int _i349 = 0; _i349 < _list347.size; ++_i349) + { + _elem348 = iprot.readI64(); + struct.timestamps.add(_elem348); + } + } + struct.setTimestampsIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsReq.java new file mode 100644 index 0000000000000..da6c98755e705 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsReq.java @@ -0,0 +1,1121 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSInsertRecordsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertRecordsReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPaths", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertRecordsReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertRecordsReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List prefixPaths; // required + public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required + public @org.apache.thrift.annotation.Nullable java.util.List valuesList; // required + public @org.apache.thrift.annotation.Nullable java.util.List timestamps; // required + public boolean isAligned; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATHS((short)2, "prefixPaths"), + MEASUREMENTS_LIST((short)3, "measurementsList"), + VALUES_LIST((short)4, "valuesList"), + TIMESTAMPS((short)5, "timestamps"), + IS_ALIGNED((short)6, "isAligned"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATHS + return PREFIX_PATHS; + case 3: // MEASUREMENTS_LIST + return MEASUREMENTS_LIST; + case 4: // VALUES_LIST + return VALUES_LIST; + case 5: // TIMESTAMPS + return TIMESTAMPS; + case 6: // IS_ALIGNED + return IS_ALIGNED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __ISALIGNED_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATHS, new org.apache.thrift.meta_data.FieldMetaData("prefixPaths", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertRecordsReq.class, metaDataMap); + } + + public TSInsertRecordsReq() { + } + + public TSInsertRecordsReq( + long sessionId, + java.util.List prefixPaths, + java.util.List> measurementsList, + java.util.List valuesList, + java.util.List timestamps) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPaths = prefixPaths; + this.measurementsList = measurementsList; + this.valuesList = valuesList; + this.timestamps = timestamps; + } + + /** + * Performs a deep copy on other. + */ + public TSInsertRecordsReq(TSInsertRecordsReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPaths()) { + java.util.List __this__prefixPaths = new java.util.ArrayList(other.prefixPaths); + this.prefixPaths = __this__prefixPaths; + } + if (other.isSetMeasurementsList()) { + java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); + for (java.util.List other_element : other.measurementsList) { + java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); + __this__measurementsList.add(__this__measurementsList_copy); + } + this.measurementsList = __this__measurementsList; + } + if (other.isSetValuesList()) { + java.util.List __this__valuesList = new java.util.ArrayList(other.valuesList); + this.valuesList = __this__valuesList; + } + if (other.isSetTimestamps()) { + java.util.List __this__timestamps = new java.util.ArrayList(other.timestamps); + this.timestamps = __this__timestamps; + } + this.isAligned = other.isAligned; + } + + @Override + public TSInsertRecordsReq deepCopy() { + return new TSInsertRecordsReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPaths = null; + this.measurementsList = null; + this.valuesList = null; + this.timestamps = null; + setIsAlignedIsSet(false); + this.isAligned = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSInsertRecordsReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getPrefixPathsSize() { + return (this.prefixPaths == null) ? 0 : this.prefixPaths.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPrefixPathsIterator() { + return (this.prefixPaths == null) ? null : this.prefixPaths.iterator(); + } + + public void addToPrefixPaths(java.lang.String elem) { + if (this.prefixPaths == null) { + this.prefixPaths = new java.util.ArrayList(); + } + this.prefixPaths.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getPrefixPaths() { + return this.prefixPaths; + } + + public TSInsertRecordsReq setPrefixPaths(@org.apache.thrift.annotation.Nullable java.util.List prefixPaths) { + this.prefixPaths = prefixPaths; + return this; + } + + public void unsetPrefixPaths() { + this.prefixPaths = null; + } + + /** Returns true if field prefixPaths is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPaths() { + return this.prefixPaths != null; + } + + public void setPrefixPathsIsSet(boolean value) { + if (!value) { + this.prefixPaths = null; + } + } + + public int getMeasurementsListSize() { + return (this.measurementsList == null) ? 0 : this.measurementsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getMeasurementsListIterator() { + return (this.measurementsList == null) ? null : this.measurementsList.iterator(); + } + + public void addToMeasurementsList(java.util.List elem) { + if (this.measurementsList == null) { + this.measurementsList = new java.util.ArrayList>(); + } + this.measurementsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getMeasurementsList() { + return this.measurementsList; + } + + public TSInsertRecordsReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { + this.measurementsList = measurementsList; + return this; + } + + public void unsetMeasurementsList() { + this.measurementsList = null; + } + + /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurementsList() { + return this.measurementsList != null; + } + + public void setMeasurementsListIsSet(boolean value) { + if (!value) { + this.measurementsList = null; + } + } + + public int getValuesListSize() { + return (this.valuesList == null) ? 0 : this.valuesList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getValuesListIterator() { + return (this.valuesList == null) ? null : this.valuesList.iterator(); + } + + public void addToValuesList(java.nio.ByteBuffer elem) { + if (this.valuesList == null) { + this.valuesList = new java.util.ArrayList(); + } + this.valuesList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getValuesList() { + return this.valuesList; + } + + public TSInsertRecordsReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List valuesList) { + this.valuesList = valuesList; + return this; + } + + public void unsetValuesList() { + this.valuesList = null; + } + + /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ + public boolean isSetValuesList() { + return this.valuesList != null; + } + + public void setValuesListIsSet(boolean value) { + if (!value) { + this.valuesList = null; + } + } + + public int getTimestampsSize() { + return (this.timestamps == null) ? 0 : this.timestamps.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTimestampsIterator() { + return (this.timestamps == null) ? null : this.timestamps.iterator(); + } + + public void addToTimestamps(long elem) { + if (this.timestamps == null) { + this.timestamps = new java.util.ArrayList(); + } + this.timestamps.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getTimestamps() { + return this.timestamps; + } + + public TSInsertRecordsReq setTimestamps(@org.apache.thrift.annotation.Nullable java.util.List timestamps) { + this.timestamps = timestamps; + return this; + } + + public void unsetTimestamps() { + this.timestamps = null; + } + + /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamps() { + return this.timestamps != null; + } + + public void setTimestampsIsSet(boolean value) { + if (!value) { + this.timestamps = null; + } + } + + public boolean isIsAligned() { + return this.isAligned; + } + + public TSInsertRecordsReq setIsAligned(boolean isAligned) { + this.isAligned = isAligned; + setIsAlignedIsSet(true); + return this; + } + + public void unsetIsAligned() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAligned() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + public void setIsAlignedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATHS: + if (value == null) { + unsetPrefixPaths(); + } else { + setPrefixPaths((java.util.List)value); + } + break; + + case MEASUREMENTS_LIST: + if (value == null) { + unsetMeasurementsList(); + } else { + setMeasurementsList((java.util.List>)value); + } + break; + + case VALUES_LIST: + if (value == null) { + unsetValuesList(); + } else { + setValuesList((java.util.List)value); + } + break; + + case TIMESTAMPS: + if (value == null) { + unsetTimestamps(); + } else { + setTimestamps((java.util.List)value); + } + break; + + case IS_ALIGNED: + if (value == null) { + unsetIsAligned(); + } else { + setIsAligned((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATHS: + return getPrefixPaths(); + + case MEASUREMENTS_LIST: + return getMeasurementsList(); + + case VALUES_LIST: + return getValuesList(); + + case TIMESTAMPS: + return getTimestamps(); + + case IS_ALIGNED: + return isIsAligned(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATHS: + return isSetPrefixPaths(); + case MEASUREMENTS_LIST: + return isSetMeasurementsList(); + case VALUES_LIST: + return isSetValuesList(); + case TIMESTAMPS: + return isSetTimestamps(); + case IS_ALIGNED: + return isSetIsAligned(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSInsertRecordsReq) + return this.equals((TSInsertRecordsReq)that); + return false; + } + + public boolean equals(TSInsertRecordsReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPaths = true && this.isSetPrefixPaths(); + boolean that_present_prefixPaths = true && that.isSetPrefixPaths(); + if (this_present_prefixPaths || that_present_prefixPaths) { + if (!(this_present_prefixPaths && that_present_prefixPaths)) + return false; + if (!this.prefixPaths.equals(that.prefixPaths)) + return false; + } + + boolean this_present_measurementsList = true && this.isSetMeasurementsList(); + boolean that_present_measurementsList = true && that.isSetMeasurementsList(); + if (this_present_measurementsList || that_present_measurementsList) { + if (!(this_present_measurementsList && that_present_measurementsList)) + return false; + if (!this.measurementsList.equals(that.measurementsList)) + return false; + } + + boolean this_present_valuesList = true && this.isSetValuesList(); + boolean that_present_valuesList = true && that.isSetValuesList(); + if (this_present_valuesList || that_present_valuesList) { + if (!(this_present_valuesList && that_present_valuesList)) + return false; + if (!this.valuesList.equals(that.valuesList)) + return false; + } + + boolean this_present_timestamps = true && this.isSetTimestamps(); + boolean that_present_timestamps = true && that.isSetTimestamps(); + if (this_present_timestamps || that_present_timestamps) { + if (!(this_present_timestamps && that_present_timestamps)) + return false; + if (!this.timestamps.equals(that.timestamps)) + return false; + } + + boolean this_present_isAligned = true && this.isSetIsAligned(); + boolean that_present_isAligned = true && that.isSetIsAligned(); + if (this_present_isAligned || that_present_isAligned) { + if (!(this_present_isAligned && that_present_isAligned)) + return false; + if (this.isAligned != that.isAligned) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPaths()) ? 131071 : 524287); + if (isSetPrefixPaths()) + hashCode = hashCode * 8191 + prefixPaths.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); + if (isSetMeasurementsList()) + hashCode = hashCode * 8191 + measurementsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); + if (isSetValuesList()) + hashCode = hashCode * 8191 + valuesList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); + if (isSetTimestamps()) + hashCode = hashCode * 8191 + timestamps.hashCode(); + + hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); + if (isSetIsAligned()) + hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSInsertRecordsReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPaths(), other.isSetPrefixPaths()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPaths()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPaths, other.prefixPaths); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurementsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValuesList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamps()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAligned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertRecordsReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPaths:"); + if (this.prefixPaths == null) { + sb.append("null"); + } else { + sb.append(this.prefixPaths); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurementsList:"); + if (this.measurementsList == null) { + sb.append("null"); + } else { + sb.append(this.measurementsList); + } + first = false; + if (!first) sb.append(", "); + sb.append("valuesList:"); + if (this.valuesList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.valuesList, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamps:"); + if (this.timestamps == null) { + sb.append("null"); + } else { + sb.append(this.timestamps); + } + first = false; + if (isSetIsAligned()) { + if (!first) sb.append(", "); + sb.append("isAligned:"); + sb.append(this.isAligned); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPaths == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPaths' was not present! Struct: " + toString()); + } + if (measurementsList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); + } + if (valuesList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); + } + if (timestamps == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSInsertRecordsReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertRecordsReqStandardScheme getScheme() { + return new TSInsertRecordsReqStandardScheme(); + } + } + + private static class TSInsertRecordsReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertRecordsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATHS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list278 = iprot.readListBegin(); + struct.prefixPaths = new java.util.ArrayList(_list278.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem279; + for (int _i280 = 0; _i280 < _list278.size; ++_i280) + { + _elem279 = iprot.readString(); + struct.prefixPaths.add(_elem279); + } + iprot.readListEnd(); + } + struct.setPrefixPathsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MEASUREMENTS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list281 = iprot.readListBegin(); + struct.measurementsList = new java.util.ArrayList>(_list281.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem282; + for (int _i283 = 0; _i283 < _list281.size; ++_i283) + { + { + org.apache.thrift.protocol.TList _list284 = iprot.readListBegin(); + _elem282 = new java.util.ArrayList(_list284.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem285; + for (int _i286 = 0; _i286 < _list284.size; ++_i286) + { + _elem285 = iprot.readString(); + _elem282.add(_elem285); + } + iprot.readListEnd(); + } + struct.measurementsList.add(_elem282); + } + iprot.readListEnd(); + } + struct.setMeasurementsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // VALUES_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list287 = iprot.readListBegin(); + struct.valuesList = new java.util.ArrayList(_list287.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem288; + for (int _i289 = 0; _i289 < _list287.size; ++_i289) + { + _elem288 = iprot.readBinary(); + struct.valuesList.add(_elem288); + } + iprot.readListEnd(); + } + struct.setValuesListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMESTAMPS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list290 = iprot.readListBegin(); + struct.timestamps = new java.util.ArrayList(_list290.size); + long _elem291; + for (int _i292 = 0; _i292 < _list290.size; ++_i292) + { + _elem291 = iprot.readI64(); + struct.timestamps.add(_elem291); + } + iprot.readListEnd(); + } + struct.setTimestampsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IS_ALIGNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertRecordsReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPaths != null) { + oprot.writeFieldBegin(PREFIX_PATHS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.prefixPaths.size())); + for (java.lang.String _iter293 : struct.prefixPaths) + { + oprot.writeString(_iter293); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.measurementsList != null) { + oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); + for (java.util.List _iter294 : struct.measurementsList) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter294.size())); + for (java.lang.String _iter295 : _iter294) + { + oprot.writeString(_iter295); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.valuesList != null) { + oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valuesList.size())); + for (java.nio.ByteBuffer _iter296 : struct.valuesList) + { + oprot.writeBinary(_iter296); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.timestamps != null) { + oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.timestamps.size())); + for (long _iter297 : struct.timestamps) + { + oprot.writeI64(_iter297); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetIsAligned()) { + oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); + oprot.writeBool(struct.isAligned); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSInsertRecordsReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertRecordsReqTupleScheme getScheme() { + return new TSInsertRecordsReqTupleScheme(); + } + } + + private static class TSInsertRecordsReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + { + oprot.writeI32(struct.prefixPaths.size()); + for (java.lang.String _iter298 : struct.prefixPaths) + { + oprot.writeString(_iter298); + } + } + { + oprot.writeI32(struct.measurementsList.size()); + for (java.util.List _iter299 : struct.measurementsList) + { + { + oprot.writeI32(_iter299.size()); + for (java.lang.String _iter300 : _iter299) + { + oprot.writeString(_iter300); + } + } + } + } + { + oprot.writeI32(struct.valuesList.size()); + for (java.nio.ByteBuffer _iter301 : struct.valuesList) + { + oprot.writeBinary(_iter301); + } + } + { + oprot.writeI32(struct.timestamps.size()); + for (long _iter302 : struct.timestamps) + { + oprot.writeI64(_iter302); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetIsAligned()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIsAligned()) { + oprot.writeBool(struct.isAligned); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + { + org.apache.thrift.protocol.TList _list303 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.prefixPaths = new java.util.ArrayList(_list303.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem304; + for (int _i305 = 0; _i305 < _list303.size; ++_i305) + { + _elem304 = iprot.readString(); + struct.prefixPaths.add(_elem304); + } + } + struct.setPrefixPathsIsSet(true); + { + org.apache.thrift.protocol.TList _list306 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); + struct.measurementsList = new java.util.ArrayList>(_list306.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem307; + for (int _i308 = 0; _i308 < _list306.size; ++_i308) + { + { + org.apache.thrift.protocol.TList _list309 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + _elem307 = new java.util.ArrayList(_list309.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem310; + for (int _i311 = 0; _i311 < _list309.size; ++_i311) + { + _elem310 = iprot.readString(); + _elem307.add(_elem310); + } + } + struct.measurementsList.add(_elem307); + } + } + struct.setMeasurementsListIsSet(true); + { + org.apache.thrift.protocol.TList _list312 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.valuesList = new java.util.ArrayList(_list312.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem313; + for (int _i314 = 0; _i314 < _list312.size; ++_i314) + { + _elem313 = iprot.readBinary(); + struct.valuesList.add(_elem313); + } + } + struct.setValuesListIsSet(true); + { + org.apache.thrift.protocol.TList _list315 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); + struct.timestamps = new java.util.ArrayList(_list315.size); + long _elem316; + for (int _i317 = 0; _i317 < _list315.size; ++_i317) + { + _elem316 = iprot.readI64(); + struct.timestamps.add(_elem316); + } + } + struct.setTimestampsIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordReq.java new file mode 100644 index 0000000000000..0e71f8432d566 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordReq.java @@ -0,0 +1,1075 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSInsertStringRecordReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertStringRecordReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)7); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertStringRecordReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertStringRecordReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required + public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required + public @org.apache.thrift.annotation.Nullable java.util.List values; // required + public long timestamp; // required + public boolean isAligned; // optional + public long timeout; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATH((short)2, "prefixPath"), + MEASUREMENTS((short)3, "measurements"), + VALUES((short)4, "values"), + TIMESTAMP((short)5, "timestamp"), + IS_ALIGNED((short)6, "isAligned"), + TIMEOUT((short)7, "timeout"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATH + return PREFIX_PATH; + case 3: // MEASUREMENTS + return MEASUREMENTS; + case 4: // VALUES + return VALUES; + case 5: // TIMESTAMP + return TIMESTAMP; + case 6: // IS_ALIGNED + return IS_ALIGNED; + case 7: // TIMEOUT + return TIMEOUT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __TIMESTAMP_ISSET_ID = 1; + private static final int __ISALIGNED_ISSET_ID = 2; + private static final int __TIMEOUT_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.IS_ALIGNED,_Fields.TIMEOUT}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertStringRecordReq.class, metaDataMap); + } + + public TSInsertStringRecordReq() { + } + + public TSInsertStringRecordReq( + long sessionId, + java.lang.String prefixPath, + java.util.List measurements, + java.util.List values, + long timestamp) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPath = prefixPath; + this.measurements = measurements; + this.values = values; + this.timestamp = timestamp; + setTimestampIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSInsertStringRecordReq(TSInsertStringRecordReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPath()) { + this.prefixPath = other.prefixPath; + } + if (other.isSetMeasurements()) { + java.util.List __this__measurements = new java.util.ArrayList(other.measurements); + this.measurements = __this__measurements; + } + if (other.isSetValues()) { + java.util.List __this__values = new java.util.ArrayList(other.values); + this.values = __this__values; + } + this.timestamp = other.timestamp; + this.isAligned = other.isAligned; + this.timeout = other.timeout; + } + + @Override + public TSInsertStringRecordReq deepCopy() { + return new TSInsertStringRecordReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPath = null; + this.measurements = null; + this.values = null; + setTimestampIsSet(false); + this.timestamp = 0; + setIsAlignedIsSet(false); + this.isAligned = false; + setTimeoutIsSet(false); + this.timeout = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSInsertStringRecordReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPrefixPath() { + return this.prefixPath; + } + + public TSInsertStringRecordReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { + this.prefixPath = prefixPath; + return this; + } + + public void unsetPrefixPath() { + this.prefixPath = null; + } + + /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPath() { + return this.prefixPath != null; + } + + public void setPrefixPathIsSet(boolean value) { + if (!value) { + this.prefixPath = null; + } + } + + public int getMeasurementsSize() { + return (this.measurements == null) ? 0 : this.measurements.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getMeasurementsIterator() { + return (this.measurements == null) ? null : this.measurements.iterator(); + } + + public void addToMeasurements(java.lang.String elem) { + if (this.measurements == null) { + this.measurements = new java.util.ArrayList(); + } + this.measurements.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getMeasurements() { + return this.measurements; + } + + public TSInsertStringRecordReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { + this.measurements = measurements; + return this; + } + + public void unsetMeasurements() { + this.measurements = null; + } + + /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurements() { + return this.measurements != null; + } + + public void setMeasurementsIsSet(boolean value) { + if (!value) { + this.measurements = null; + } + } + + public int getValuesSize() { + return (this.values == null) ? 0 : this.values.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getValuesIterator() { + return (this.values == null) ? null : this.values.iterator(); + } + + public void addToValues(java.lang.String elem) { + if (this.values == null) { + this.values = new java.util.ArrayList(); + } + this.values.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getValues() { + return this.values; + } + + public TSInsertStringRecordReq setValues(@org.apache.thrift.annotation.Nullable java.util.List values) { + this.values = values; + return this; + } + + public void unsetValues() { + this.values = null; + } + + /** Returns true if field values is set (has been assigned a value) and false otherwise */ + public boolean isSetValues() { + return this.values != null; + } + + public void setValuesIsSet(boolean value) { + if (!value) { + this.values = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public TSInsertStringRecordReq setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); + } + + public boolean isIsAligned() { + return this.isAligned; + } + + public TSInsertStringRecordReq setIsAligned(boolean isAligned) { + this.isAligned = isAligned; + setIsAlignedIsSet(true); + return this; + } + + public void unsetIsAligned() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAligned() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + public void setIsAlignedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); + } + + public long getTimeout() { + return this.timeout; + } + + public TSInsertStringRecordReq setTimeout(long timeout) { + this.timeout = timeout; + setTimeoutIsSet(true); + return this; + } + + public void unsetTimeout() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeout() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + public void setTimeoutIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATH: + if (value == null) { + unsetPrefixPath(); + } else { + setPrefixPath((java.lang.String)value); + } + break; + + case MEASUREMENTS: + if (value == null) { + unsetMeasurements(); + } else { + setMeasurements((java.util.List)value); + } + break; + + case VALUES: + if (value == null) { + unsetValues(); + } else { + setValues((java.util.List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((java.lang.Long)value); + } + break; + + case IS_ALIGNED: + if (value == null) { + unsetIsAligned(); + } else { + setIsAligned((java.lang.Boolean)value); + } + break; + + case TIMEOUT: + if (value == null) { + unsetTimeout(); + } else { + setTimeout((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATH: + return getPrefixPath(); + + case MEASUREMENTS: + return getMeasurements(); + + case VALUES: + return getValues(); + + case TIMESTAMP: + return getTimestamp(); + + case IS_ALIGNED: + return isIsAligned(); + + case TIMEOUT: + return getTimeout(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATH: + return isSetPrefixPath(); + case MEASUREMENTS: + return isSetMeasurements(); + case VALUES: + return isSetValues(); + case TIMESTAMP: + return isSetTimestamp(); + case IS_ALIGNED: + return isSetIsAligned(); + case TIMEOUT: + return isSetTimeout(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSInsertStringRecordReq) + return this.equals((TSInsertStringRecordReq)that); + return false; + } + + public boolean equals(TSInsertStringRecordReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPath = true && this.isSetPrefixPath(); + boolean that_present_prefixPath = true && that.isSetPrefixPath(); + if (this_present_prefixPath || that_present_prefixPath) { + if (!(this_present_prefixPath && that_present_prefixPath)) + return false; + if (!this.prefixPath.equals(that.prefixPath)) + return false; + } + + boolean this_present_measurements = true && this.isSetMeasurements(); + boolean that_present_measurements = true && that.isSetMeasurements(); + if (this_present_measurements || that_present_measurements) { + if (!(this_present_measurements && that_present_measurements)) + return false; + if (!this.measurements.equals(that.measurements)) + return false; + } + + boolean this_present_values = true && this.isSetValues(); + boolean that_present_values = true && that.isSetValues(); + if (this_present_values || that_present_values) { + if (!(this_present_values && that_present_values)) + return false; + if (!this.values.equals(that.values)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_isAligned = true && this.isSetIsAligned(); + boolean that_present_isAligned = true && that.isSetIsAligned(); + if (this_present_isAligned || that_present_isAligned) { + if (!(this_present_isAligned && that_present_isAligned)) + return false; + if (this.isAligned != that.isAligned) + return false; + } + + boolean this_present_timeout = true && this.isSetTimeout(); + boolean that_present_timeout = true && that.isSetTimeout(); + if (this_present_timeout || that_present_timeout) { + if (!(this_present_timeout && that_present_timeout)) + return false; + if (this.timeout != that.timeout) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); + if (isSetPrefixPath()) + hashCode = hashCode * 8191 + prefixPath.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); + if (isSetMeasurements()) + hashCode = hashCode * 8191 + measurements.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValues()) ? 131071 : 524287); + if (isSetValues()) + hashCode = hashCode * 8191 + values.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp); + + hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); + if (isSetIsAligned()) + hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); + if (isSetTimeout()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); + + return hashCode; + } + + @Override + public int compareTo(TSInsertStringRecordReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurements()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValues(), other.isSetValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimestamp(), other.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAligned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertStringRecordReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPath:"); + if (this.prefixPath == null) { + sb.append("null"); + } else { + sb.append(this.prefixPath); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurements:"); + if (this.measurements == null) { + sb.append("null"); + } else { + sb.append(this.measurements); + } + first = false; + if (!first) sb.append(", "); + sb.append("values:"); + if (this.values == null) { + sb.append("null"); + } else { + sb.append(this.values); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (isSetIsAligned()) { + if (!first) sb.append(", "); + sb.append("isAligned:"); + sb.append(this.isAligned); + first = false; + } + if (isSetTimeout()) { + if (!first) sb.append(", "); + sb.append("timeout:"); + sb.append(this.timeout); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPath == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); + } + if (measurements == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); + } + if (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); + } + // alas, we cannot check 'timestamp' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSInsertStringRecordReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertStringRecordReqStandardScheme getScheme() { + return new TSInsertStringRecordReqStandardScheme(); + } + } + + private static class TSInsertStringRecordReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertStringRecordReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MEASUREMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list166 = iprot.readListBegin(); + struct.measurements = new java.util.ArrayList(_list166.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem167; + for (int _i168 = 0; _i168 < _list166.size; ++_i168) + { + _elem167 = iprot.readString(); + struct.measurements.add(_elem167); + } + iprot.readListEnd(); + } + struct.setMeasurementsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list169 = iprot.readListBegin(); + struct.values = new java.util.ArrayList(_list169.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem170; + for (int _i171 = 0; _i171 < _list169.size; ++_i171) + { + _elem170 = iprot.readString(); + struct.values.add(_elem170); + } + iprot.readListEnd(); + } + struct.setValuesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IS_ALIGNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetTimestamp()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamp' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertStringRecordReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPath != null) { + oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); + oprot.writeString(struct.prefixPath); + oprot.writeFieldEnd(); + } + if (struct.measurements != null) { + oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); + for (java.lang.String _iter172 : struct.measurements) + { + oprot.writeString(_iter172); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.values != null) { + oprot.writeFieldBegin(VALUES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size())); + for (java.lang.String _iter173 : struct.values) + { + oprot.writeString(_iter173); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.isSetIsAligned()) { + oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); + oprot.writeBool(struct.isAligned); + oprot.writeFieldEnd(); + } + if (struct.isSetTimeout()) { + oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); + oprot.writeI64(struct.timeout); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSInsertStringRecordReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertStringRecordReqTupleScheme getScheme() { + return new TSInsertStringRecordReqTupleScheme(); + } + } + + private static class TSInsertStringRecordReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.prefixPath); + { + oprot.writeI32(struct.measurements.size()); + for (java.lang.String _iter174 : struct.measurements) + { + oprot.writeString(_iter174); + } + } + { + oprot.writeI32(struct.values.size()); + for (java.lang.String _iter175 : struct.values) + { + oprot.writeString(_iter175); + } + } + oprot.writeI64(struct.timestamp); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetIsAligned()) { + optionals.set(0); + } + if (struct.isSetTimeout()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetIsAligned()) { + oprot.writeBool(struct.isAligned); + } + if (struct.isSetTimeout()) { + oprot.writeI64(struct.timeout); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + { + org.apache.thrift.protocol.TList _list176 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.measurements = new java.util.ArrayList(_list176.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem177; + for (int _i178 = 0; _i178 < _list176.size; ++_i178) + { + _elem177 = iprot.readString(); + struct.measurements.add(_elem177); + } + } + struct.setMeasurementsIsSet(true); + { + org.apache.thrift.protocol.TList _list179 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.values = new java.util.ArrayList(_list179.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem180; + for (int _i181 = 0; _i181 < _list179.size; ++_i181) + { + _elem180 = iprot.readString(); + struct.values.add(_elem180); + } + } + struct.setValuesIsSet(true); + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } + if (incoming.get(1)) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsOfOneDeviceReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsOfOneDeviceReq.java new file mode 100644 index 0000000000000..a6f8a01ba9eeb --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsOfOneDeviceReq.java @@ -0,0 +1,1108 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSInsertStringRecordsOfOneDeviceReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertStringRecordsOfOneDeviceReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertStringRecordsOfOneDeviceReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertStringRecordsOfOneDeviceReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required + public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required + public @org.apache.thrift.annotation.Nullable java.util.List> valuesList; // required + public @org.apache.thrift.annotation.Nullable java.util.List timestamps; // required + public boolean isAligned; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATH((short)2, "prefixPath"), + MEASUREMENTS_LIST((short)3, "measurementsList"), + VALUES_LIST((short)4, "valuesList"), + TIMESTAMPS((short)5, "timestamps"), + IS_ALIGNED((short)6, "isAligned"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATH + return PREFIX_PATH; + case 3: // MEASUREMENTS_LIST + return MEASUREMENTS_LIST; + case 4: // VALUES_LIST + return VALUES_LIST; + case 5: // TIMESTAMPS + return TIMESTAMPS; + case 6: // IS_ALIGNED + return IS_ALIGNED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __ISALIGNED_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertStringRecordsOfOneDeviceReq.class, metaDataMap); + } + + public TSInsertStringRecordsOfOneDeviceReq() { + } + + public TSInsertStringRecordsOfOneDeviceReq( + long sessionId, + java.lang.String prefixPath, + java.util.List> measurementsList, + java.util.List> valuesList, + java.util.List timestamps) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPath = prefixPath; + this.measurementsList = measurementsList; + this.valuesList = valuesList; + this.timestamps = timestamps; + } + + /** + * Performs a deep copy on other. + */ + public TSInsertStringRecordsOfOneDeviceReq(TSInsertStringRecordsOfOneDeviceReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPath()) { + this.prefixPath = other.prefixPath; + } + if (other.isSetMeasurementsList()) { + java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); + for (java.util.List other_element : other.measurementsList) { + java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); + __this__measurementsList.add(__this__measurementsList_copy); + } + this.measurementsList = __this__measurementsList; + } + if (other.isSetValuesList()) { + java.util.List> __this__valuesList = new java.util.ArrayList>(other.valuesList.size()); + for (java.util.List other_element : other.valuesList) { + java.util.List __this__valuesList_copy = new java.util.ArrayList(other_element); + __this__valuesList.add(__this__valuesList_copy); + } + this.valuesList = __this__valuesList; + } + if (other.isSetTimestamps()) { + java.util.List __this__timestamps = new java.util.ArrayList(other.timestamps); + this.timestamps = __this__timestamps; + } + this.isAligned = other.isAligned; + } + + @Override + public TSInsertStringRecordsOfOneDeviceReq deepCopy() { + return new TSInsertStringRecordsOfOneDeviceReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPath = null; + this.measurementsList = null; + this.valuesList = null; + this.timestamps = null; + setIsAlignedIsSet(false); + this.isAligned = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSInsertStringRecordsOfOneDeviceReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPrefixPath() { + return this.prefixPath; + } + + public TSInsertStringRecordsOfOneDeviceReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { + this.prefixPath = prefixPath; + return this; + } + + public void unsetPrefixPath() { + this.prefixPath = null; + } + + /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPath() { + return this.prefixPath != null; + } + + public void setPrefixPathIsSet(boolean value) { + if (!value) { + this.prefixPath = null; + } + } + + public int getMeasurementsListSize() { + return (this.measurementsList == null) ? 0 : this.measurementsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getMeasurementsListIterator() { + return (this.measurementsList == null) ? null : this.measurementsList.iterator(); + } + + public void addToMeasurementsList(java.util.List elem) { + if (this.measurementsList == null) { + this.measurementsList = new java.util.ArrayList>(); + } + this.measurementsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getMeasurementsList() { + return this.measurementsList; + } + + public TSInsertStringRecordsOfOneDeviceReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { + this.measurementsList = measurementsList; + return this; + } + + public void unsetMeasurementsList() { + this.measurementsList = null; + } + + /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurementsList() { + return this.measurementsList != null; + } + + public void setMeasurementsListIsSet(boolean value) { + if (!value) { + this.measurementsList = null; + } + } + + public int getValuesListSize() { + return (this.valuesList == null) ? 0 : this.valuesList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getValuesListIterator() { + return (this.valuesList == null) ? null : this.valuesList.iterator(); + } + + public void addToValuesList(java.util.List elem) { + if (this.valuesList == null) { + this.valuesList = new java.util.ArrayList>(); + } + this.valuesList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getValuesList() { + return this.valuesList; + } + + public TSInsertStringRecordsOfOneDeviceReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List> valuesList) { + this.valuesList = valuesList; + return this; + } + + public void unsetValuesList() { + this.valuesList = null; + } + + /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ + public boolean isSetValuesList() { + return this.valuesList != null; + } + + public void setValuesListIsSet(boolean value) { + if (!value) { + this.valuesList = null; + } + } + + public int getTimestampsSize() { + return (this.timestamps == null) ? 0 : this.timestamps.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTimestampsIterator() { + return (this.timestamps == null) ? null : this.timestamps.iterator(); + } + + public void addToTimestamps(long elem) { + if (this.timestamps == null) { + this.timestamps = new java.util.ArrayList(); + } + this.timestamps.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getTimestamps() { + return this.timestamps; + } + + public TSInsertStringRecordsOfOneDeviceReq setTimestamps(@org.apache.thrift.annotation.Nullable java.util.List timestamps) { + this.timestamps = timestamps; + return this; + } + + public void unsetTimestamps() { + this.timestamps = null; + } + + /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamps() { + return this.timestamps != null; + } + + public void setTimestampsIsSet(boolean value) { + if (!value) { + this.timestamps = null; + } + } + + public boolean isIsAligned() { + return this.isAligned; + } + + public TSInsertStringRecordsOfOneDeviceReq setIsAligned(boolean isAligned) { + this.isAligned = isAligned; + setIsAlignedIsSet(true); + return this; + } + + public void unsetIsAligned() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAligned() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + public void setIsAlignedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATH: + if (value == null) { + unsetPrefixPath(); + } else { + setPrefixPath((java.lang.String)value); + } + break; + + case MEASUREMENTS_LIST: + if (value == null) { + unsetMeasurementsList(); + } else { + setMeasurementsList((java.util.List>)value); + } + break; + + case VALUES_LIST: + if (value == null) { + unsetValuesList(); + } else { + setValuesList((java.util.List>)value); + } + break; + + case TIMESTAMPS: + if (value == null) { + unsetTimestamps(); + } else { + setTimestamps((java.util.List)value); + } + break; + + case IS_ALIGNED: + if (value == null) { + unsetIsAligned(); + } else { + setIsAligned((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATH: + return getPrefixPath(); + + case MEASUREMENTS_LIST: + return getMeasurementsList(); + + case VALUES_LIST: + return getValuesList(); + + case TIMESTAMPS: + return getTimestamps(); + + case IS_ALIGNED: + return isIsAligned(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATH: + return isSetPrefixPath(); + case MEASUREMENTS_LIST: + return isSetMeasurementsList(); + case VALUES_LIST: + return isSetValuesList(); + case TIMESTAMPS: + return isSetTimestamps(); + case IS_ALIGNED: + return isSetIsAligned(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSInsertStringRecordsOfOneDeviceReq) + return this.equals((TSInsertStringRecordsOfOneDeviceReq)that); + return false; + } + + public boolean equals(TSInsertStringRecordsOfOneDeviceReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPath = true && this.isSetPrefixPath(); + boolean that_present_prefixPath = true && that.isSetPrefixPath(); + if (this_present_prefixPath || that_present_prefixPath) { + if (!(this_present_prefixPath && that_present_prefixPath)) + return false; + if (!this.prefixPath.equals(that.prefixPath)) + return false; + } + + boolean this_present_measurementsList = true && this.isSetMeasurementsList(); + boolean that_present_measurementsList = true && that.isSetMeasurementsList(); + if (this_present_measurementsList || that_present_measurementsList) { + if (!(this_present_measurementsList && that_present_measurementsList)) + return false; + if (!this.measurementsList.equals(that.measurementsList)) + return false; + } + + boolean this_present_valuesList = true && this.isSetValuesList(); + boolean that_present_valuesList = true && that.isSetValuesList(); + if (this_present_valuesList || that_present_valuesList) { + if (!(this_present_valuesList && that_present_valuesList)) + return false; + if (!this.valuesList.equals(that.valuesList)) + return false; + } + + boolean this_present_timestamps = true && this.isSetTimestamps(); + boolean that_present_timestamps = true && that.isSetTimestamps(); + if (this_present_timestamps || that_present_timestamps) { + if (!(this_present_timestamps && that_present_timestamps)) + return false; + if (!this.timestamps.equals(that.timestamps)) + return false; + } + + boolean this_present_isAligned = true && this.isSetIsAligned(); + boolean that_present_isAligned = true && that.isSetIsAligned(); + if (this_present_isAligned || that_present_isAligned) { + if (!(this_present_isAligned && that_present_isAligned)) + return false; + if (this.isAligned != that.isAligned) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); + if (isSetPrefixPath()) + hashCode = hashCode * 8191 + prefixPath.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); + if (isSetMeasurementsList()) + hashCode = hashCode * 8191 + measurementsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); + if (isSetValuesList()) + hashCode = hashCode * 8191 + valuesList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); + if (isSetTimestamps()) + hashCode = hashCode * 8191 + timestamps.hashCode(); + + hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); + if (isSetIsAligned()) + hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSInsertStringRecordsOfOneDeviceReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurementsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValuesList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamps()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAligned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertStringRecordsOfOneDeviceReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPath:"); + if (this.prefixPath == null) { + sb.append("null"); + } else { + sb.append(this.prefixPath); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurementsList:"); + if (this.measurementsList == null) { + sb.append("null"); + } else { + sb.append(this.measurementsList); + } + first = false; + if (!first) sb.append(", "); + sb.append("valuesList:"); + if (this.valuesList == null) { + sb.append("null"); + } else { + sb.append(this.valuesList); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamps:"); + if (this.timestamps == null) { + sb.append("null"); + } else { + sb.append(this.timestamps); + } + first = false; + if (isSetIsAligned()) { + if (!first) sb.append(", "); + sb.append("isAligned:"); + sb.append(this.isAligned); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPath == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); + } + if (measurementsList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); + } + if (valuesList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); + } + if (timestamps == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSInsertStringRecordsOfOneDeviceReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertStringRecordsOfOneDeviceReqStandardScheme getScheme() { + return new TSInsertStringRecordsOfOneDeviceReqStandardScheme(); + } + } + + private static class TSInsertStringRecordsOfOneDeviceReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertStringRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MEASUREMENTS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list350 = iprot.readListBegin(); + struct.measurementsList = new java.util.ArrayList>(_list350.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem351; + for (int _i352 = 0; _i352 < _list350.size; ++_i352) + { + { + org.apache.thrift.protocol.TList _list353 = iprot.readListBegin(); + _elem351 = new java.util.ArrayList(_list353.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem354; + for (int _i355 = 0; _i355 < _list353.size; ++_i355) + { + _elem354 = iprot.readString(); + _elem351.add(_elem354); + } + iprot.readListEnd(); + } + struct.measurementsList.add(_elem351); + } + iprot.readListEnd(); + } + struct.setMeasurementsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // VALUES_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list356 = iprot.readListBegin(); + struct.valuesList = new java.util.ArrayList>(_list356.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem357; + for (int _i358 = 0; _i358 < _list356.size; ++_i358) + { + { + org.apache.thrift.protocol.TList _list359 = iprot.readListBegin(); + _elem357 = new java.util.ArrayList(_list359.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem360; + for (int _i361 = 0; _i361 < _list359.size; ++_i361) + { + _elem360 = iprot.readString(); + _elem357.add(_elem360); + } + iprot.readListEnd(); + } + struct.valuesList.add(_elem357); + } + iprot.readListEnd(); + } + struct.setValuesListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMESTAMPS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list362 = iprot.readListBegin(); + struct.timestamps = new java.util.ArrayList(_list362.size); + long _elem363; + for (int _i364 = 0; _i364 < _list362.size; ++_i364) + { + _elem363 = iprot.readI64(); + struct.timestamps.add(_elem363); + } + iprot.readListEnd(); + } + struct.setTimestampsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IS_ALIGNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertStringRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPath != null) { + oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); + oprot.writeString(struct.prefixPath); + oprot.writeFieldEnd(); + } + if (struct.measurementsList != null) { + oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); + for (java.util.List _iter365 : struct.measurementsList) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter365.size())); + for (java.lang.String _iter366 : _iter365) + { + oprot.writeString(_iter366); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.valuesList != null) { + oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.valuesList.size())); + for (java.util.List _iter367 : struct.valuesList) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter367.size())); + for (java.lang.String _iter368 : _iter367) + { + oprot.writeString(_iter368); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.timestamps != null) { + oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.timestamps.size())); + for (long _iter369 : struct.timestamps) + { + oprot.writeI64(_iter369); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetIsAligned()) { + oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); + oprot.writeBool(struct.isAligned); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSInsertStringRecordsOfOneDeviceReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertStringRecordsOfOneDeviceReqTupleScheme getScheme() { + return new TSInsertStringRecordsOfOneDeviceReqTupleScheme(); + } + } + + private static class TSInsertStringRecordsOfOneDeviceReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.prefixPath); + { + oprot.writeI32(struct.measurementsList.size()); + for (java.util.List _iter370 : struct.measurementsList) + { + { + oprot.writeI32(_iter370.size()); + for (java.lang.String _iter371 : _iter370) + { + oprot.writeString(_iter371); + } + } + } + } + { + oprot.writeI32(struct.valuesList.size()); + for (java.util.List _iter372 : struct.valuesList) + { + { + oprot.writeI32(_iter372.size()); + for (java.lang.String _iter373 : _iter372) + { + oprot.writeString(_iter373); + } + } + } + } + { + oprot.writeI32(struct.timestamps.size()); + for (long _iter374 : struct.timestamps) + { + oprot.writeI64(_iter374); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetIsAligned()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIsAligned()) { + oprot.writeBool(struct.isAligned); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + { + org.apache.thrift.protocol.TList _list375 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); + struct.measurementsList = new java.util.ArrayList>(_list375.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem376; + for (int _i377 = 0; _i377 < _list375.size; ++_i377) + { + { + org.apache.thrift.protocol.TList _list378 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + _elem376 = new java.util.ArrayList(_list378.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem379; + for (int _i380 = 0; _i380 < _list378.size; ++_i380) + { + _elem379 = iprot.readString(); + _elem376.add(_elem379); + } + } + struct.measurementsList.add(_elem376); + } + } + struct.setMeasurementsListIsSet(true); + { + org.apache.thrift.protocol.TList _list381 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); + struct.valuesList = new java.util.ArrayList>(_list381.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem382; + for (int _i383 = 0; _i383 < _list381.size; ++_i383) + { + { + org.apache.thrift.protocol.TList _list384 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + _elem382 = new java.util.ArrayList(_list384.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem385; + for (int _i386 = 0; _i386 < _list384.size; ++_i386) + { + _elem385 = iprot.readString(); + _elem382.add(_elem385); + } + } + struct.valuesList.add(_elem382); + } + } + struct.setValuesListIsSet(true); + { + org.apache.thrift.protocol.TList _list387 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); + struct.timestamps = new java.util.ArrayList(_list387.size); + long _elem388; + for (int _i389 = 0; _i389 < _list387.size; ++_i389) + { + _elem388 = iprot.readI64(); + struct.timestamps.add(_elem388); + } + } + struct.setTimestampsIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsReq.java new file mode 100644 index 0000000000000..d741f2830301d --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsReq.java @@ -0,0 +1,1158 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSInsertStringRecordsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertStringRecordsReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPaths", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertStringRecordsReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertStringRecordsReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List prefixPaths; // required + public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required + public @org.apache.thrift.annotation.Nullable java.util.List> valuesList; // required + public @org.apache.thrift.annotation.Nullable java.util.List timestamps; // required + public boolean isAligned; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATHS((short)2, "prefixPaths"), + MEASUREMENTS_LIST((short)3, "measurementsList"), + VALUES_LIST((short)4, "valuesList"), + TIMESTAMPS((short)5, "timestamps"), + IS_ALIGNED((short)6, "isAligned"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATHS + return PREFIX_PATHS; + case 3: // MEASUREMENTS_LIST + return MEASUREMENTS_LIST; + case 4: // VALUES_LIST + return VALUES_LIST; + case 5: // TIMESTAMPS + return TIMESTAMPS; + case 6: // IS_ALIGNED + return IS_ALIGNED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __ISALIGNED_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATHS, new org.apache.thrift.meta_data.FieldMetaData("prefixPaths", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertStringRecordsReq.class, metaDataMap); + } + + public TSInsertStringRecordsReq() { + } + + public TSInsertStringRecordsReq( + long sessionId, + java.util.List prefixPaths, + java.util.List> measurementsList, + java.util.List> valuesList, + java.util.List timestamps) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPaths = prefixPaths; + this.measurementsList = measurementsList; + this.valuesList = valuesList; + this.timestamps = timestamps; + } + + /** + * Performs a deep copy on other. + */ + public TSInsertStringRecordsReq(TSInsertStringRecordsReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPaths()) { + java.util.List __this__prefixPaths = new java.util.ArrayList(other.prefixPaths); + this.prefixPaths = __this__prefixPaths; + } + if (other.isSetMeasurementsList()) { + java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); + for (java.util.List other_element : other.measurementsList) { + java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); + __this__measurementsList.add(__this__measurementsList_copy); + } + this.measurementsList = __this__measurementsList; + } + if (other.isSetValuesList()) { + java.util.List> __this__valuesList = new java.util.ArrayList>(other.valuesList.size()); + for (java.util.List other_element : other.valuesList) { + java.util.List __this__valuesList_copy = new java.util.ArrayList(other_element); + __this__valuesList.add(__this__valuesList_copy); + } + this.valuesList = __this__valuesList; + } + if (other.isSetTimestamps()) { + java.util.List __this__timestamps = new java.util.ArrayList(other.timestamps); + this.timestamps = __this__timestamps; + } + this.isAligned = other.isAligned; + } + + @Override + public TSInsertStringRecordsReq deepCopy() { + return new TSInsertStringRecordsReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPaths = null; + this.measurementsList = null; + this.valuesList = null; + this.timestamps = null; + setIsAlignedIsSet(false); + this.isAligned = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSInsertStringRecordsReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getPrefixPathsSize() { + return (this.prefixPaths == null) ? 0 : this.prefixPaths.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPrefixPathsIterator() { + return (this.prefixPaths == null) ? null : this.prefixPaths.iterator(); + } + + public void addToPrefixPaths(java.lang.String elem) { + if (this.prefixPaths == null) { + this.prefixPaths = new java.util.ArrayList(); + } + this.prefixPaths.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getPrefixPaths() { + return this.prefixPaths; + } + + public TSInsertStringRecordsReq setPrefixPaths(@org.apache.thrift.annotation.Nullable java.util.List prefixPaths) { + this.prefixPaths = prefixPaths; + return this; + } + + public void unsetPrefixPaths() { + this.prefixPaths = null; + } + + /** Returns true if field prefixPaths is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPaths() { + return this.prefixPaths != null; + } + + public void setPrefixPathsIsSet(boolean value) { + if (!value) { + this.prefixPaths = null; + } + } + + public int getMeasurementsListSize() { + return (this.measurementsList == null) ? 0 : this.measurementsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getMeasurementsListIterator() { + return (this.measurementsList == null) ? null : this.measurementsList.iterator(); + } + + public void addToMeasurementsList(java.util.List elem) { + if (this.measurementsList == null) { + this.measurementsList = new java.util.ArrayList>(); + } + this.measurementsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getMeasurementsList() { + return this.measurementsList; + } + + public TSInsertStringRecordsReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { + this.measurementsList = measurementsList; + return this; + } + + public void unsetMeasurementsList() { + this.measurementsList = null; + } + + /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurementsList() { + return this.measurementsList != null; + } + + public void setMeasurementsListIsSet(boolean value) { + if (!value) { + this.measurementsList = null; + } + } + + public int getValuesListSize() { + return (this.valuesList == null) ? 0 : this.valuesList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getValuesListIterator() { + return (this.valuesList == null) ? null : this.valuesList.iterator(); + } + + public void addToValuesList(java.util.List elem) { + if (this.valuesList == null) { + this.valuesList = new java.util.ArrayList>(); + } + this.valuesList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getValuesList() { + return this.valuesList; + } + + public TSInsertStringRecordsReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List> valuesList) { + this.valuesList = valuesList; + return this; + } + + public void unsetValuesList() { + this.valuesList = null; + } + + /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ + public boolean isSetValuesList() { + return this.valuesList != null; + } + + public void setValuesListIsSet(boolean value) { + if (!value) { + this.valuesList = null; + } + } + + public int getTimestampsSize() { + return (this.timestamps == null) ? 0 : this.timestamps.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTimestampsIterator() { + return (this.timestamps == null) ? null : this.timestamps.iterator(); + } + + public void addToTimestamps(long elem) { + if (this.timestamps == null) { + this.timestamps = new java.util.ArrayList(); + } + this.timestamps.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getTimestamps() { + return this.timestamps; + } + + public TSInsertStringRecordsReq setTimestamps(@org.apache.thrift.annotation.Nullable java.util.List timestamps) { + this.timestamps = timestamps; + return this; + } + + public void unsetTimestamps() { + this.timestamps = null; + } + + /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamps() { + return this.timestamps != null; + } + + public void setTimestampsIsSet(boolean value) { + if (!value) { + this.timestamps = null; + } + } + + public boolean isIsAligned() { + return this.isAligned; + } + + public TSInsertStringRecordsReq setIsAligned(boolean isAligned) { + this.isAligned = isAligned; + setIsAlignedIsSet(true); + return this; + } + + public void unsetIsAligned() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAligned() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + public void setIsAlignedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATHS: + if (value == null) { + unsetPrefixPaths(); + } else { + setPrefixPaths((java.util.List)value); + } + break; + + case MEASUREMENTS_LIST: + if (value == null) { + unsetMeasurementsList(); + } else { + setMeasurementsList((java.util.List>)value); + } + break; + + case VALUES_LIST: + if (value == null) { + unsetValuesList(); + } else { + setValuesList((java.util.List>)value); + } + break; + + case TIMESTAMPS: + if (value == null) { + unsetTimestamps(); + } else { + setTimestamps((java.util.List)value); + } + break; + + case IS_ALIGNED: + if (value == null) { + unsetIsAligned(); + } else { + setIsAligned((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATHS: + return getPrefixPaths(); + + case MEASUREMENTS_LIST: + return getMeasurementsList(); + + case VALUES_LIST: + return getValuesList(); + + case TIMESTAMPS: + return getTimestamps(); + + case IS_ALIGNED: + return isIsAligned(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATHS: + return isSetPrefixPaths(); + case MEASUREMENTS_LIST: + return isSetMeasurementsList(); + case VALUES_LIST: + return isSetValuesList(); + case TIMESTAMPS: + return isSetTimestamps(); + case IS_ALIGNED: + return isSetIsAligned(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSInsertStringRecordsReq) + return this.equals((TSInsertStringRecordsReq)that); + return false; + } + + public boolean equals(TSInsertStringRecordsReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPaths = true && this.isSetPrefixPaths(); + boolean that_present_prefixPaths = true && that.isSetPrefixPaths(); + if (this_present_prefixPaths || that_present_prefixPaths) { + if (!(this_present_prefixPaths && that_present_prefixPaths)) + return false; + if (!this.prefixPaths.equals(that.prefixPaths)) + return false; + } + + boolean this_present_measurementsList = true && this.isSetMeasurementsList(); + boolean that_present_measurementsList = true && that.isSetMeasurementsList(); + if (this_present_measurementsList || that_present_measurementsList) { + if (!(this_present_measurementsList && that_present_measurementsList)) + return false; + if (!this.measurementsList.equals(that.measurementsList)) + return false; + } + + boolean this_present_valuesList = true && this.isSetValuesList(); + boolean that_present_valuesList = true && that.isSetValuesList(); + if (this_present_valuesList || that_present_valuesList) { + if (!(this_present_valuesList && that_present_valuesList)) + return false; + if (!this.valuesList.equals(that.valuesList)) + return false; + } + + boolean this_present_timestamps = true && this.isSetTimestamps(); + boolean that_present_timestamps = true && that.isSetTimestamps(); + if (this_present_timestamps || that_present_timestamps) { + if (!(this_present_timestamps && that_present_timestamps)) + return false; + if (!this.timestamps.equals(that.timestamps)) + return false; + } + + boolean this_present_isAligned = true && this.isSetIsAligned(); + boolean that_present_isAligned = true && that.isSetIsAligned(); + if (this_present_isAligned || that_present_isAligned) { + if (!(this_present_isAligned && that_present_isAligned)) + return false; + if (this.isAligned != that.isAligned) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPaths()) ? 131071 : 524287); + if (isSetPrefixPaths()) + hashCode = hashCode * 8191 + prefixPaths.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); + if (isSetMeasurementsList()) + hashCode = hashCode * 8191 + measurementsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); + if (isSetValuesList()) + hashCode = hashCode * 8191 + valuesList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); + if (isSetTimestamps()) + hashCode = hashCode * 8191 + timestamps.hashCode(); + + hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); + if (isSetIsAligned()) + hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSInsertStringRecordsReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPaths(), other.isSetPrefixPaths()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPaths()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPaths, other.prefixPaths); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurementsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValuesList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamps()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAligned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertStringRecordsReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPaths:"); + if (this.prefixPaths == null) { + sb.append("null"); + } else { + sb.append(this.prefixPaths); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurementsList:"); + if (this.measurementsList == null) { + sb.append("null"); + } else { + sb.append(this.measurementsList); + } + first = false; + if (!first) sb.append(", "); + sb.append("valuesList:"); + if (this.valuesList == null) { + sb.append("null"); + } else { + sb.append(this.valuesList); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamps:"); + if (this.timestamps == null) { + sb.append("null"); + } else { + sb.append(this.timestamps); + } + first = false; + if (isSetIsAligned()) { + if (!first) sb.append(", "); + sb.append("isAligned:"); + sb.append(this.isAligned); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPaths == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPaths' was not present! Struct: " + toString()); + } + if (measurementsList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); + } + if (valuesList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); + } + if (timestamps == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSInsertStringRecordsReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertStringRecordsReqStandardScheme getScheme() { + return new TSInsertStringRecordsReqStandardScheme(); + } + } + + private static class TSInsertStringRecordsReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertStringRecordsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATHS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list390 = iprot.readListBegin(); + struct.prefixPaths = new java.util.ArrayList(_list390.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem391; + for (int _i392 = 0; _i392 < _list390.size; ++_i392) + { + _elem391 = iprot.readString(); + struct.prefixPaths.add(_elem391); + } + iprot.readListEnd(); + } + struct.setPrefixPathsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MEASUREMENTS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list393 = iprot.readListBegin(); + struct.measurementsList = new java.util.ArrayList>(_list393.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem394; + for (int _i395 = 0; _i395 < _list393.size; ++_i395) + { + { + org.apache.thrift.protocol.TList _list396 = iprot.readListBegin(); + _elem394 = new java.util.ArrayList(_list396.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem397; + for (int _i398 = 0; _i398 < _list396.size; ++_i398) + { + _elem397 = iprot.readString(); + _elem394.add(_elem397); + } + iprot.readListEnd(); + } + struct.measurementsList.add(_elem394); + } + iprot.readListEnd(); + } + struct.setMeasurementsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // VALUES_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list399 = iprot.readListBegin(); + struct.valuesList = new java.util.ArrayList>(_list399.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem400; + for (int _i401 = 0; _i401 < _list399.size; ++_i401) + { + { + org.apache.thrift.protocol.TList _list402 = iprot.readListBegin(); + _elem400 = new java.util.ArrayList(_list402.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem403; + for (int _i404 = 0; _i404 < _list402.size; ++_i404) + { + _elem403 = iprot.readString(); + _elem400.add(_elem403); + } + iprot.readListEnd(); + } + struct.valuesList.add(_elem400); + } + iprot.readListEnd(); + } + struct.setValuesListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMESTAMPS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list405 = iprot.readListBegin(); + struct.timestamps = new java.util.ArrayList(_list405.size); + long _elem406; + for (int _i407 = 0; _i407 < _list405.size; ++_i407) + { + _elem406 = iprot.readI64(); + struct.timestamps.add(_elem406); + } + iprot.readListEnd(); + } + struct.setTimestampsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IS_ALIGNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertStringRecordsReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPaths != null) { + oprot.writeFieldBegin(PREFIX_PATHS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.prefixPaths.size())); + for (java.lang.String _iter408 : struct.prefixPaths) + { + oprot.writeString(_iter408); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.measurementsList != null) { + oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); + for (java.util.List _iter409 : struct.measurementsList) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter409.size())); + for (java.lang.String _iter410 : _iter409) + { + oprot.writeString(_iter410); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.valuesList != null) { + oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.valuesList.size())); + for (java.util.List _iter411 : struct.valuesList) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter411.size())); + for (java.lang.String _iter412 : _iter411) + { + oprot.writeString(_iter412); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.timestamps != null) { + oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.timestamps.size())); + for (long _iter413 : struct.timestamps) + { + oprot.writeI64(_iter413); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetIsAligned()) { + oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); + oprot.writeBool(struct.isAligned); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSInsertStringRecordsReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertStringRecordsReqTupleScheme getScheme() { + return new TSInsertStringRecordsReqTupleScheme(); + } + } + + private static class TSInsertStringRecordsReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + { + oprot.writeI32(struct.prefixPaths.size()); + for (java.lang.String _iter414 : struct.prefixPaths) + { + oprot.writeString(_iter414); + } + } + { + oprot.writeI32(struct.measurementsList.size()); + for (java.util.List _iter415 : struct.measurementsList) + { + { + oprot.writeI32(_iter415.size()); + for (java.lang.String _iter416 : _iter415) + { + oprot.writeString(_iter416); + } + } + } + } + { + oprot.writeI32(struct.valuesList.size()); + for (java.util.List _iter417 : struct.valuesList) + { + { + oprot.writeI32(_iter417.size()); + for (java.lang.String _iter418 : _iter417) + { + oprot.writeString(_iter418); + } + } + } + } + { + oprot.writeI32(struct.timestamps.size()); + for (long _iter419 : struct.timestamps) + { + oprot.writeI64(_iter419); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetIsAligned()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIsAligned()) { + oprot.writeBool(struct.isAligned); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + { + org.apache.thrift.protocol.TList _list420 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.prefixPaths = new java.util.ArrayList(_list420.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem421; + for (int _i422 = 0; _i422 < _list420.size; ++_i422) + { + _elem421 = iprot.readString(); + struct.prefixPaths.add(_elem421); + } + } + struct.setPrefixPathsIsSet(true); + { + org.apache.thrift.protocol.TList _list423 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); + struct.measurementsList = new java.util.ArrayList>(_list423.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem424; + for (int _i425 = 0; _i425 < _list423.size; ++_i425) + { + { + org.apache.thrift.protocol.TList _list426 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + _elem424 = new java.util.ArrayList(_list426.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem427; + for (int _i428 = 0; _i428 < _list426.size; ++_i428) + { + _elem427 = iprot.readString(); + _elem424.add(_elem427); + } + } + struct.measurementsList.add(_elem424); + } + } + struct.setMeasurementsListIsSet(true); + { + org.apache.thrift.protocol.TList _list429 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); + struct.valuesList = new java.util.ArrayList>(_list429.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem430; + for (int _i431 = 0; _i431 < _list429.size; ++_i431) + { + { + org.apache.thrift.protocol.TList _list432 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + _elem430 = new java.util.ArrayList(_list432.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem433; + for (int _i434 = 0; _i434 < _list432.size; ++_i434) + { + _elem433 = iprot.readString(); + _elem430.add(_elem433); + } + } + struct.valuesList.add(_elem430); + } + } + struct.setValuesListIsSet(true); + { + org.apache.thrift.protocol.TList _list435 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); + struct.timestamps = new java.util.ArrayList(_list435.size); + long _elem436; + for (int _i437 = 0; _i437 < _list435.size; ++_i437) + { + _elem436 = iprot.readI64(); + struct.timestamps.add(_elem436); + } + } + struct.setTimestampsIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletReq.java new file mode 100644 index 0000000000000..a7d8682a8ad2a --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletReq.java @@ -0,0 +1,1815 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSInsertTabletReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertTabletReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("types", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("size", org.apache.thrift.protocol.TType.I32, (short)7); + private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField WRITE_TO_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToTable", org.apache.thrift.protocol.TType.BOOL, (short)9); + private static final org.apache.thrift.protocol.TField COLUMN_CATEGORIES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnCategories", org.apache.thrift.protocol.TType.LIST, (short)10); + private static final org.apache.thrift.protocol.TField IS_COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("isCompressed", org.apache.thrift.protocol.TType.BOOL, (short)11); + private static final org.apache.thrift.protocol.TField ENCODING_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("encodingTypes", org.apache.thrift.protocol.TType.LIST, (short)12); + private static final org.apache.thrift.protocol.TField COMPRESS_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("compressType", org.apache.thrift.protocol.TType.I32, (short)13); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertTabletReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertTabletReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required + public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer values; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer timestamps; // required + public @org.apache.thrift.annotation.Nullable java.util.List types; // required + public int size; // required + public boolean isAligned; // optional + public boolean writeToTable; // optional + public @org.apache.thrift.annotation.Nullable java.util.List columnCategories; // optional + public boolean isCompressed; // optional + public @org.apache.thrift.annotation.Nullable java.util.List encodingTypes; // optional + public int compressType; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATH((short)2, "prefixPath"), + MEASUREMENTS((short)3, "measurements"), + VALUES((short)4, "values"), + TIMESTAMPS((short)5, "timestamps"), + TYPES((short)6, "types"), + SIZE((short)7, "size"), + IS_ALIGNED((short)8, "isAligned"), + WRITE_TO_TABLE((short)9, "writeToTable"), + COLUMN_CATEGORIES((short)10, "columnCategories"), + IS_COMPRESSED((short)11, "isCompressed"), + ENCODING_TYPES((short)12, "encodingTypes"), + COMPRESS_TYPE((short)13, "compressType"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATH + return PREFIX_PATH; + case 3: // MEASUREMENTS + return MEASUREMENTS; + case 4: // VALUES + return VALUES; + case 5: // TIMESTAMPS + return TIMESTAMPS; + case 6: // TYPES + return TYPES; + case 7: // SIZE + return SIZE; + case 8: // IS_ALIGNED + return IS_ALIGNED; + case 9: // WRITE_TO_TABLE + return WRITE_TO_TABLE; + case 10: // COLUMN_CATEGORIES + return COLUMN_CATEGORIES; + case 11: // IS_COMPRESSED + return IS_COMPRESSED; + case 12: // ENCODING_TYPES + return ENCODING_TYPES; + case 13: // COMPRESS_TYPE + return COMPRESS_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __SIZE_ISSET_ID = 1; + private static final int __ISALIGNED_ISSET_ID = 2; + private static final int __WRITETOTABLE_ISSET_ID = 3; + private static final int __ISCOMPRESSED_ISSET_ID = 4; + private static final int __COMPRESSTYPE_ISSET_ID = 5; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.IS_ALIGNED,_Fields.WRITE_TO_TABLE,_Fields.COLUMN_CATEGORIES,_Fields.IS_COMPRESSED,_Fields.ENCODING_TYPES,_Fields.COMPRESS_TYPE}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TYPES, new org.apache.thrift.meta_data.FieldMetaData("types", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.SIZE, new org.apache.thrift.meta_data.FieldMetaData("size", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.WRITE_TO_TABLE, new org.apache.thrift.meta_data.FieldMetaData("writeToTable", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.COLUMN_CATEGORIES, new org.apache.thrift.meta_data.FieldMetaData("columnCategories", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)))); + tmpMap.put(_Fields.IS_COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("isCompressed", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.ENCODING_TYPES, new org.apache.thrift.meta_data.FieldMetaData("encodingTypes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.COMPRESS_TYPE, new org.apache.thrift.meta_data.FieldMetaData("compressType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertTabletReq.class, metaDataMap); + } + + public TSInsertTabletReq() { + } + + public TSInsertTabletReq( + long sessionId, + java.lang.String prefixPath, + java.util.List measurements, + java.nio.ByteBuffer values, + java.nio.ByteBuffer timestamps, + java.util.List types, + int size) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPath = prefixPath; + this.measurements = measurements; + this.values = org.apache.thrift.TBaseHelper.copyBinary(values); + this.timestamps = org.apache.thrift.TBaseHelper.copyBinary(timestamps); + this.types = types; + this.size = size; + setSizeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSInsertTabletReq(TSInsertTabletReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPath()) { + this.prefixPath = other.prefixPath; + } + if (other.isSetMeasurements()) { + java.util.List __this__measurements = new java.util.ArrayList(other.measurements); + this.measurements = __this__measurements; + } + if (other.isSetValues()) { + this.values = org.apache.thrift.TBaseHelper.copyBinary(other.values); + } + if (other.isSetTimestamps()) { + this.timestamps = org.apache.thrift.TBaseHelper.copyBinary(other.timestamps); + } + if (other.isSetTypes()) { + java.util.List __this__types = new java.util.ArrayList(other.types); + this.types = __this__types; + } + this.size = other.size; + this.isAligned = other.isAligned; + this.writeToTable = other.writeToTable; + if (other.isSetColumnCategories()) { + java.util.List __this__columnCategories = new java.util.ArrayList(other.columnCategories); + this.columnCategories = __this__columnCategories; + } + this.isCompressed = other.isCompressed; + if (other.isSetEncodingTypes()) { + java.util.List __this__encodingTypes = new java.util.ArrayList(other.encodingTypes); + this.encodingTypes = __this__encodingTypes; + } + this.compressType = other.compressType; + } + + @Override + public TSInsertTabletReq deepCopy() { + return new TSInsertTabletReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPath = null; + this.measurements = null; + this.values = null; + this.timestamps = null; + this.types = null; + setSizeIsSet(false); + this.size = 0; + setIsAlignedIsSet(false); + this.isAligned = false; + setWriteToTableIsSet(false); + this.writeToTable = false; + this.columnCategories = null; + setIsCompressedIsSet(false); + this.isCompressed = false; + this.encodingTypes = null; + setCompressTypeIsSet(false); + this.compressType = 0; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSInsertTabletReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPrefixPath() { + return this.prefixPath; + } + + public TSInsertTabletReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { + this.prefixPath = prefixPath; + return this; + } + + public void unsetPrefixPath() { + this.prefixPath = null; + } + + /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPath() { + return this.prefixPath != null; + } + + public void setPrefixPathIsSet(boolean value) { + if (!value) { + this.prefixPath = null; + } + } + + public int getMeasurementsSize() { + return (this.measurements == null) ? 0 : this.measurements.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getMeasurementsIterator() { + return (this.measurements == null) ? null : this.measurements.iterator(); + } + + public void addToMeasurements(java.lang.String elem) { + if (this.measurements == null) { + this.measurements = new java.util.ArrayList(); + } + this.measurements.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getMeasurements() { + return this.measurements; + } + + public TSInsertTabletReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { + this.measurements = measurements; + return this; + } + + public void unsetMeasurements() { + this.measurements = null; + } + + /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurements() { + return this.measurements != null; + } + + public void setMeasurementsIsSet(boolean value) { + if (!value) { + this.measurements = null; + } + } + + public byte[] getValues() { + setValues(org.apache.thrift.TBaseHelper.rightSize(values)); + return values == null ? null : values.array(); + } + + public java.nio.ByteBuffer bufferForValues() { + return org.apache.thrift.TBaseHelper.copyBinary(values); + } + + public TSInsertTabletReq setValues(byte[] values) { + this.values = values == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(values.clone()); + return this; + } + + public TSInsertTabletReq setValues(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer values) { + this.values = org.apache.thrift.TBaseHelper.copyBinary(values); + return this; + } + + public void unsetValues() { + this.values = null; + } + + /** Returns true if field values is set (has been assigned a value) and false otherwise */ + public boolean isSetValues() { + return this.values != null; + } + + public void setValuesIsSet(boolean value) { + if (!value) { + this.values = null; + } + } + + public byte[] getTimestamps() { + setTimestamps(org.apache.thrift.TBaseHelper.rightSize(timestamps)); + return timestamps == null ? null : timestamps.array(); + } + + public java.nio.ByteBuffer bufferForTimestamps() { + return org.apache.thrift.TBaseHelper.copyBinary(timestamps); + } + + public TSInsertTabletReq setTimestamps(byte[] timestamps) { + this.timestamps = timestamps == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(timestamps.clone()); + return this; + } + + public TSInsertTabletReq setTimestamps(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer timestamps) { + this.timestamps = org.apache.thrift.TBaseHelper.copyBinary(timestamps); + return this; + } + + public void unsetTimestamps() { + this.timestamps = null; + } + + /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamps() { + return this.timestamps != null; + } + + public void setTimestampsIsSet(boolean value) { + if (!value) { + this.timestamps = null; + } + } + + public int getTypesSize() { + return (this.types == null) ? 0 : this.types.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTypesIterator() { + return (this.types == null) ? null : this.types.iterator(); + } + + public void addToTypes(int elem) { + if (this.types == null) { + this.types = new java.util.ArrayList(); + } + this.types.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getTypes() { + return this.types; + } + + public TSInsertTabletReq setTypes(@org.apache.thrift.annotation.Nullable java.util.List types) { + this.types = types; + return this; + } + + public void unsetTypes() { + this.types = null; + } + + /** Returns true if field types is set (has been assigned a value) and false otherwise */ + public boolean isSetTypes() { + return this.types != null; + } + + public void setTypesIsSet(boolean value) { + if (!value) { + this.types = null; + } + } + + public int getSize() { + return this.size; + } + + public TSInsertTabletReq setSize(int size) { + this.size = size; + setSizeIsSet(true); + return this; + } + + public void unsetSize() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SIZE_ISSET_ID); + } + + /** Returns true if field size is set (has been assigned a value) and false otherwise */ + public boolean isSetSize() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SIZE_ISSET_ID); + } + + public void setSizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SIZE_ISSET_ID, value); + } + + public boolean isIsAligned() { + return this.isAligned; + } + + public TSInsertTabletReq setIsAligned(boolean isAligned) { + this.isAligned = isAligned; + setIsAlignedIsSet(true); + return this; + } + + public void unsetIsAligned() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAligned() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + public void setIsAlignedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); + } + + public boolean isWriteToTable() { + return this.writeToTable; + } + + public TSInsertTabletReq setWriteToTable(boolean writeToTable) { + this.writeToTable = writeToTable; + setWriteToTableIsSet(true); + return this; + } + + public void unsetWriteToTable() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WRITETOTABLE_ISSET_ID); + } + + /** Returns true if field writeToTable is set (has been assigned a value) and false otherwise */ + public boolean isSetWriteToTable() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WRITETOTABLE_ISSET_ID); + } + + public void setWriteToTableIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WRITETOTABLE_ISSET_ID, value); + } + + public int getColumnCategoriesSize() { + return (this.columnCategories == null) ? 0 : this.columnCategories.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getColumnCategoriesIterator() { + return (this.columnCategories == null) ? null : this.columnCategories.iterator(); + } + + public void addToColumnCategories(byte elem) { + if (this.columnCategories == null) { + this.columnCategories = new java.util.ArrayList(); + } + this.columnCategories.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getColumnCategories() { + return this.columnCategories; + } + + public TSInsertTabletReq setColumnCategories(@org.apache.thrift.annotation.Nullable java.util.List columnCategories) { + this.columnCategories = columnCategories; + return this; + } + + public void unsetColumnCategories() { + this.columnCategories = null; + } + + /** Returns true if field columnCategories is set (has been assigned a value) and false otherwise */ + public boolean isSetColumnCategories() { + return this.columnCategories != null; + } + + public void setColumnCategoriesIsSet(boolean value) { + if (!value) { + this.columnCategories = null; + } + } + + public boolean isIsCompressed() { + return this.isCompressed; + } + + public TSInsertTabletReq setIsCompressed(boolean isCompressed) { + this.isCompressed = isCompressed; + setIsCompressedIsSet(true); + return this; + } + + public void unsetIsCompressed() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISCOMPRESSED_ISSET_ID); + } + + /** Returns true if field isCompressed is set (has been assigned a value) and false otherwise */ + public boolean isSetIsCompressed() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISCOMPRESSED_ISSET_ID); + } + + public void setIsCompressedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISCOMPRESSED_ISSET_ID, value); + } + + public int getEncodingTypesSize() { + return (this.encodingTypes == null) ? 0 : this.encodingTypes.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getEncodingTypesIterator() { + return (this.encodingTypes == null) ? null : this.encodingTypes.iterator(); + } + + public void addToEncodingTypes(int elem) { + if (this.encodingTypes == null) { + this.encodingTypes = new java.util.ArrayList(); + } + this.encodingTypes.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getEncodingTypes() { + return this.encodingTypes; + } + + public TSInsertTabletReq setEncodingTypes(@org.apache.thrift.annotation.Nullable java.util.List encodingTypes) { + this.encodingTypes = encodingTypes; + return this; + } + + public void unsetEncodingTypes() { + this.encodingTypes = null; + } + + /** Returns true if field encodingTypes is set (has been assigned a value) and false otherwise */ + public boolean isSetEncodingTypes() { + return this.encodingTypes != null; + } + + public void setEncodingTypesIsSet(boolean value) { + if (!value) { + this.encodingTypes = null; + } + } + + public int getCompressType() { + return this.compressType; + } + + public TSInsertTabletReq setCompressType(int compressType) { + this.compressType = compressType; + setCompressTypeIsSet(true); + return this; + } + + public void unsetCompressType() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPRESSTYPE_ISSET_ID); + } + + /** Returns true if field compressType is set (has been assigned a value) and false otherwise */ + public boolean isSetCompressType() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPRESSTYPE_ISSET_ID); + } + + public void setCompressTypeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPRESSTYPE_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATH: + if (value == null) { + unsetPrefixPath(); + } else { + setPrefixPath((java.lang.String)value); + } + break; + + case MEASUREMENTS: + if (value == null) { + unsetMeasurements(); + } else { + setMeasurements((java.util.List)value); + } + break; + + case VALUES: + if (value == null) { + unsetValues(); + } else { + if (value instanceof byte[]) { + setValues((byte[])value); + } else { + setValues((java.nio.ByteBuffer)value); + } + } + break; + + case TIMESTAMPS: + if (value == null) { + unsetTimestamps(); + } else { + if (value instanceof byte[]) { + setTimestamps((byte[])value); + } else { + setTimestamps((java.nio.ByteBuffer)value); + } + } + break; + + case TYPES: + if (value == null) { + unsetTypes(); + } else { + setTypes((java.util.List)value); + } + break; + + case SIZE: + if (value == null) { + unsetSize(); + } else { + setSize((java.lang.Integer)value); + } + break; + + case IS_ALIGNED: + if (value == null) { + unsetIsAligned(); + } else { + setIsAligned((java.lang.Boolean)value); + } + break; + + case WRITE_TO_TABLE: + if (value == null) { + unsetWriteToTable(); + } else { + setWriteToTable((java.lang.Boolean)value); + } + break; + + case COLUMN_CATEGORIES: + if (value == null) { + unsetColumnCategories(); + } else { + setColumnCategories((java.util.List)value); + } + break; + + case IS_COMPRESSED: + if (value == null) { + unsetIsCompressed(); + } else { + setIsCompressed((java.lang.Boolean)value); + } + break; + + case ENCODING_TYPES: + if (value == null) { + unsetEncodingTypes(); + } else { + setEncodingTypes((java.util.List)value); + } + break; + + case COMPRESS_TYPE: + if (value == null) { + unsetCompressType(); + } else { + setCompressType((java.lang.Integer)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATH: + return getPrefixPath(); + + case MEASUREMENTS: + return getMeasurements(); + + case VALUES: + return getValues(); + + case TIMESTAMPS: + return getTimestamps(); + + case TYPES: + return getTypes(); + + case SIZE: + return getSize(); + + case IS_ALIGNED: + return isIsAligned(); + + case WRITE_TO_TABLE: + return isWriteToTable(); + + case COLUMN_CATEGORIES: + return getColumnCategories(); + + case IS_COMPRESSED: + return isIsCompressed(); + + case ENCODING_TYPES: + return getEncodingTypes(); + + case COMPRESS_TYPE: + return getCompressType(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATH: + return isSetPrefixPath(); + case MEASUREMENTS: + return isSetMeasurements(); + case VALUES: + return isSetValues(); + case TIMESTAMPS: + return isSetTimestamps(); + case TYPES: + return isSetTypes(); + case SIZE: + return isSetSize(); + case IS_ALIGNED: + return isSetIsAligned(); + case WRITE_TO_TABLE: + return isSetWriteToTable(); + case COLUMN_CATEGORIES: + return isSetColumnCategories(); + case IS_COMPRESSED: + return isSetIsCompressed(); + case ENCODING_TYPES: + return isSetEncodingTypes(); + case COMPRESS_TYPE: + return isSetCompressType(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSInsertTabletReq) + return this.equals((TSInsertTabletReq)that); + return false; + } + + public boolean equals(TSInsertTabletReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPath = true && this.isSetPrefixPath(); + boolean that_present_prefixPath = true && that.isSetPrefixPath(); + if (this_present_prefixPath || that_present_prefixPath) { + if (!(this_present_prefixPath && that_present_prefixPath)) + return false; + if (!this.prefixPath.equals(that.prefixPath)) + return false; + } + + boolean this_present_measurements = true && this.isSetMeasurements(); + boolean that_present_measurements = true && that.isSetMeasurements(); + if (this_present_measurements || that_present_measurements) { + if (!(this_present_measurements && that_present_measurements)) + return false; + if (!this.measurements.equals(that.measurements)) + return false; + } + + boolean this_present_values = true && this.isSetValues(); + boolean that_present_values = true && that.isSetValues(); + if (this_present_values || that_present_values) { + if (!(this_present_values && that_present_values)) + return false; + if (!this.values.equals(that.values)) + return false; + } + + boolean this_present_timestamps = true && this.isSetTimestamps(); + boolean that_present_timestamps = true && that.isSetTimestamps(); + if (this_present_timestamps || that_present_timestamps) { + if (!(this_present_timestamps && that_present_timestamps)) + return false; + if (!this.timestamps.equals(that.timestamps)) + return false; + } + + boolean this_present_types = true && this.isSetTypes(); + boolean that_present_types = true && that.isSetTypes(); + if (this_present_types || that_present_types) { + if (!(this_present_types && that_present_types)) + return false; + if (!this.types.equals(that.types)) + return false; + } + + boolean this_present_size = true; + boolean that_present_size = true; + if (this_present_size || that_present_size) { + if (!(this_present_size && that_present_size)) + return false; + if (this.size != that.size) + return false; + } + + boolean this_present_isAligned = true && this.isSetIsAligned(); + boolean that_present_isAligned = true && that.isSetIsAligned(); + if (this_present_isAligned || that_present_isAligned) { + if (!(this_present_isAligned && that_present_isAligned)) + return false; + if (this.isAligned != that.isAligned) + return false; + } + + boolean this_present_writeToTable = true && this.isSetWriteToTable(); + boolean that_present_writeToTable = true && that.isSetWriteToTable(); + if (this_present_writeToTable || that_present_writeToTable) { + if (!(this_present_writeToTable && that_present_writeToTable)) + return false; + if (this.writeToTable != that.writeToTable) + return false; + } + + boolean this_present_columnCategories = true && this.isSetColumnCategories(); + boolean that_present_columnCategories = true && that.isSetColumnCategories(); + if (this_present_columnCategories || that_present_columnCategories) { + if (!(this_present_columnCategories && that_present_columnCategories)) + return false; + if (!this.columnCategories.equals(that.columnCategories)) + return false; + } + + boolean this_present_isCompressed = true && this.isSetIsCompressed(); + boolean that_present_isCompressed = true && that.isSetIsCompressed(); + if (this_present_isCompressed || that_present_isCompressed) { + if (!(this_present_isCompressed && that_present_isCompressed)) + return false; + if (this.isCompressed != that.isCompressed) + return false; + } + + boolean this_present_encodingTypes = true && this.isSetEncodingTypes(); + boolean that_present_encodingTypes = true && that.isSetEncodingTypes(); + if (this_present_encodingTypes || that_present_encodingTypes) { + if (!(this_present_encodingTypes && that_present_encodingTypes)) + return false; + if (!this.encodingTypes.equals(that.encodingTypes)) + return false; + } + + boolean this_present_compressType = true && this.isSetCompressType(); + boolean that_present_compressType = true && that.isSetCompressType(); + if (this_present_compressType || that_present_compressType) { + if (!(this_present_compressType && that_present_compressType)) + return false; + if (this.compressType != that.compressType) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); + if (isSetPrefixPath()) + hashCode = hashCode * 8191 + prefixPath.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); + if (isSetMeasurements()) + hashCode = hashCode * 8191 + measurements.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValues()) ? 131071 : 524287); + if (isSetValues()) + hashCode = hashCode * 8191 + values.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); + if (isSetTimestamps()) + hashCode = hashCode * 8191 + timestamps.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTypes()) ? 131071 : 524287); + if (isSetTypes()) + hashCode = hashCode * 8191 + types.hashCode(); + + hashCode = hashCode * 8191 + size; + + hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); + if (isSetIsAligned()) + hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetWriteToTable()) ? 131071 : 524287); + if (isSetWriteToTable()) + hashCode = hashCode * 8191 + ((writeToTable) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetColumnCategories()) ? 131071 : 524287); + if (isSetColumnCategories()) + hashCode = hashCode * 8191 + columnCategories.hashCode(); + + hashCode = hashCode * 8191 + ((isSetIsCompressed()) ? 131071 : 524287); + if (isSetIsCompressed()) + hashCode = hashCode * 8191 + ((isCompressed) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetEncodingTypes()) ? 131071 : 524287); + if (isSetEncodingTypes()) + hashCode = hashCode * 8191 + encodingTypes.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCompressType()) ? 131071 : 524287); + if (isSetCompressType()) + hashCode = hashCode * 8191 + compressType; + + return hashCode; + } + + @Override + public int compareTo(TSInsertTabletReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurements()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValues(), other.isSetValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamps()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTypes(), other.isSetTypes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTypes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.types, other.types); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSize(), other.isSetSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.size, other.size); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAligned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetWriteToTable(), other.isSetWriteToTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetWriteToTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeToTable, other.writeToTable); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetColumnCategories(), other.isSetColumnCategories()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnCategories()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnCategories, other.columnCategories); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsCompressed(), other.isSetIsCompressed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsCompressed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isCompressed, other.isCompressed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEncodingTypes(), other.isSetEncodingTypes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEncodingTypes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encodingTypes, other.encodingTypes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetCompressType(), other.isSetCompressType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressType, other.compressType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertTabletReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPath:"); + if (this.prefixPath == null) { + sb.append("null"); + } else { + sb.append(this.prefixPath); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurements:"); + if (this.measurements == null) { + sb.append("null"); + } else { + sb.append(this.measurements); + } + first = false; + if (!first) sb.append(", "); + sb.append("values:"); + if (this.values == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.values, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamps:"); + if (this.timestamps == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.timestamps, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("types:"); + if (this.types == null) { + sb.append("null"); + } else { + sb.append(this.types); + } + first = false; + if (!first) sb.append(", "); + sb.append("size:"); + sb.append(this.size); + first = false; + if (isSetIsAligned()) { + if (!first) sb.append(", "); + sb.append("isAligned:"); + sb.append(this.isAligned); + first = false; + } + if (isSetWriteToTable()) { + if (!first) sb.append(", "); + sb.append("writeToTable:"); + sb.append(this.writeToTable); + first = false; + } + if (isSetColumnCategories()) { + if (!first) sb.append(", "); + sb.append("columnCategories:"); + if (this.columnCategories == null) { + sb.append("null"); + } else { + sb.append(this.columnCategories); + } + first = false; + } + if (isSetIsCompressed()) { + if (!first) sb.append(", "); + sb.append("isCompressed:"); + sb.append(this.isCompressed); + first = false; + } + if (isSetEncodingTypes()) { + if (!first) sb.append(", "); + sb.append("encodingTypes:"); + if (this.encodingTypes == null) { + sb.append("null"); + } else { + sb.append(this.encodingTypes); + } + first = false; + } + if (isSetCompressType()) { + if (!first) sb.append(", "); + sb.append("compressType:"); + sb.append(this.compressType); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPath == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); + } + if (measurements == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); + } + if (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); + } + if (timestamps == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); + } + if (types == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'types' was not present! Struct: " + toString()); + } + // alas, we cannot check 'size' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSInsertTabletReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertTabletReqStandardScheme getScheme() { + return new TSInsertTabletReqStandardScheme(); + } + } + + private static class TSInsertTabletReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertTabletReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MEASUREMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list182 = iprot.readListBegin(); + struct.measurements = new java.util.ArrayList(_list182.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem183; + for (int _i184 = 0; _i184 < _list182.size; ++_i184) + { + _elem183 = iprot.readString(); + struct.measurements.add(_elem183); + } + iprot.readListEnd(); + } + struct.setMeasurementsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.values = iprot.readBinary(); + struct.setValuesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMESTAMPS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.timestamps = iprot.readBinary(); + struct.setTimestampsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // TYPES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list185 = iprot.readListBegin(); + struct.types = new java.util.ArrayList(_list185.size); + int _elem186; + for (int _i187 = 0; _i187 < _list185.size; ++_i187) + { + _elem186 = iprot.readI32(); + struct.types.add(_elem186); + } + iprot.readListEnd(); + } + struct.setTypesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.size = iprot.readI32(); + struct.setSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // IS_ALIGNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // WRITE_TO_TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.writeToTable = iprot.readBool(); + struct.setWriteToTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // COLUMN_CATEGORIES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list188 = iprot.readListBegin(); + struct.columnCategories = new java.util.ArrayList(_list188.size); + byte _elem189; + for (int _i190 = 0; _i190 < _list188.size; ++_i190) + { + _elem189 = iprot.readByte(); + struct.columnCategories.add(_elem189); + } + iprot.readListEnd(); + } + struct.setColumnCategoriesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // IS_COMPRESSED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isCompressed = iprot.readBool(); + struct.setIsCompressedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // ENCODING_TYPES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list191 = iprot.readListBegin(); + struct.encodingTypes = new java.util.ArrayList(_list191.size); + int _elem192; + for (int _i193 = 0; _i193 < _list191.size; ++_i193) + { + _elem192 = iprot.readI32(); + struct.encodingTypes.add(_elem192); + } + iprot.readListEnd(); + } + struct.setEncodingTypesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // COMPRESS_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.compressType = iprot.readI32(); + struct.setCompressTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetSize()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'size' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertTabletReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPath != null) { + oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); + oprot.writeString(struct.prefixPath); + oprot.writeFieldEnd(); + } + if (struct.measurements != null) { + oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); + for (java.lang.String _iter194 : struct.measurements) + { + oprot.writeString(_iter194); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.values != null) { + oprot.writeFieldBegin(VALUES_FIELD_DESC); + oprot.writeBinary(struct.values); + oprot.writeFieldEnd(); + } + if (struct.timestamps != null) { + oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); + oprot.writeBinary(struct.timestamps); + oprot.writeFieldEnd(); + } + if (struct.types != null) { + oprot.writeFieldBegin(TYPES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.types.size())); + for (int _iter195 : struct.types) + { + oprot.writeI32(_iter195); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(SIZE_FIELD_DESC); + oprot.writeI32(struct.size); + oprot.writeFieldEnd(); + if (struct.isSetIsAligned()) { + oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); + oprot.writeBool(struct.isAligned); + oprot.writeFieldEnd(); + } + if (struct.isSetWriteToTable()) { + oprot.writeFieldBegin(WRITE_TO_TABLE_FIELD_DESC); + oprot.writeBool(struct.writeToTable); + oprot.writeFieldEnd(); + } + if (struct.columnCategories != null) { + if (struct.isSetColumnCategories()) { + oprot.writeFieldBegin(COLUMN_CATEGORIES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, struct.columnCategories.size())); + for (byte _iter196 : struct.columnCategories) + { + oprot.writeByte(_iter196); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.isSetIsCompressed()) { + oprot.writeFieldBegin(IS_COMPRESSED_FIELD_DESC); + oprot.writeBool(struct.isCompressed); + oprot.writeFieldEnd(); + } + if (struct.encodingTypes != null) { + if (struct.isSetEncodingTypes()) { + oprot.writeFieldBegin(ENCODING_TYPES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.encodingTypes.size())); + for (int _iter197 : struct.encodingTypes) + { + oprot.writeI32(_iter197); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.isSetCompressType()) { + oprot.writeFieldBegin(COMPRESS_TYPE_FIELD_DESC); + oprot.writeI32(struct.compressType); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSInsertTabletReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertTabletReqTupleScheme getScheme() { + return new TSInsertTabletReqTupleScheme(); + } + } + + private static class TSInsertTabletReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertTabletReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.prefixPath); + { + oprot.writeI32(struct.measurements.size()); + for (java.lang.String _iter198 : struct.measurements) + { + oprot.writeString(_iter198); + } + } + oprot.writeBinary(struct.values); + oprot.writeBinary(struct.timestamps); + { + oprot.writeI32(struct.types.size()); + for (int _iter199 : struct.types) + { + oprot.writeI32(_iter199); + } + } + oprot.writeI32(struct.size); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetIsAligned()) { + optionals.set(0); + } + if (struct.isSetWriteToTable()) { + optionals.set(1); + } + if (struct.isSetColumnCategories()) { + optionals.set(2); + } + if (struct.isSetIsCompressed()) { + optionals.set(3); + } + if (struct.isSetEncodingTypes()) { + optionals.set(4); + } + if (struct.isSetCompressType()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetIsAligned()) { + oprot.writeBool(struct.isAligned); + } + if (struct.isSetWriteToTable()) { + oprot.writeBool(struct.writeToTable); + } + if (struct.isSetColumnCategories()) { + { + oprot.writeI32(struct.columnCategories.size()); + for (byte _iter200 : struct.columnCategories) + { + oprot.writeByte(_iter200); + } + } + } + if (struct.isSetIsCompressed()) { + oprot.writeBool(struct.isCompressed); + } + if (struct.isSetEncodingTypes()) { + { + oprot.writeI32(struct.encodingTypes.size()); + for (int _iter201 : struct.encodingTypes) + { + oprot.writeI32(_iter201); + } + } + } + if (struct.isSetCompressType()) { + oprot.writeI32(struct.compressType); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertTabletReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + { + org.apache.thrift.protocol.TList _list202 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.measurements = new java.util.ArrayList(_list202.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem203; + for (int _i204 = 0; _i204 < _list202.size; ++_i204) + { + _elem203 = iprot.readString(); + struct.measurements.add(_elem203); + } + } + struct.setMeasurementsIsSet(true); + struct.values = iprot.readBinary(); + struct.setValuesIsSet(true); + struct.timestamps = iprot.readBinary(); + struct.setTimestampsIsSet(true); + { + org.apache.thrift.protocol.TList _list205 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.types = new java.util.ArrayList(_list205.size); + int _elem206; + for (int _i207 = 0; _i207 < _list205.size; ++_i207) + { + _elem206 = iprot.readI32(); + struct.types.add(_elem206); + } + } + struct.setTypesIsSet(true); + struct.size = iprot.readI32(); + struct.setSizeIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } + if (incoming.get(1)) { + struct.writeToTable = iprot.readBool(); + struct.setWriteToTableIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list208 = iprot.readListBegin(org.apache.thrift.protocol.TType.BYTE); + struct.columnCategories = new java.util.ArrayList(_list208.size); + byte _elem209; + for (int _i210 = 0; _i210 < _list208.size; ++_i210) + { + _elem209 = iprot.readByte(); + struct.columnCategories.add(_elem209); + } + } + struct.setColumnCategoriesIsSet(true); + } + if (incoming.get(3)) { + struct.isCompressed = iprot.readBool(); + struct.setIsCompressedIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list211 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.encodingTypes = new java.util.ArrayList(_list211.size); + int _elem212; + for (int _i213 = 0; _i213 < _list211.size; ++_i213) + { + _elem212 = iprot.readI32(); + struct.encodingTypes.add(_elem212); + } + } + struct.setEncodingTypesIsSet(true); + } + if (incoming.get(5)) { + struct.compressType = iprot.readI32(); + struct.setCompressTypeIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletsReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletsReq.java new file mode 100644 index 0000000000000..619488d73230a --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletsReq.java @@ -0,0 +1,1460 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSInsertTabletsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertTabletsReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPaths", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField TIMESTAMPS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("timestampsList", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final org.apache.thrift.protocol.TField TYPES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("typesList", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField SIZE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("sizeList", org.apache.thrift.protocol.TType.LIST, (short)7); + private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)8); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertTabletsReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertTabletsReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List prefixPaths; // required + public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required + public @org.apache.thrift.annotation.Nullable java.util.List valuesList; // required + public @org.apache.thrift.annotation.Nullable java.util.List timestampsList; // required + public @org.apache.thrift.annotation.Nullable java.util.List> typesList; // required + public @org.apache.thrift.annotation.Nullable java.util.List sizeList; // required + public boolean isAligned; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATHS((short)2, "prefixPaths"), + MEASUREMENTS_LIST((short)3, "measurementsList"), + VALUES_LIST((short)4, "valuesList"), + TIMESTAMPS_LIST((short)5, "timestampsList"), + TYPES_LIST((short)6, "typesList"), + SIZE_LIST((short)7, "sizeList"), + IS_ALIGNED((short)8, "isAligned"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATHS + return PREFIX_PATHS; + case 3: // MEASUREMENTS_LIST + return MEASUREMENTS_LIST; + case 4: // VALUES_LIST + return VALUES_LIST; + case 5: // TIMESTAMPS_LIST + return TIMESTAMPS_LIST; + case 6: // TYPES_LIST + return TYPES_LIST; + case 7: // SIZE_LIST + return SIZE_LIST; + case 8: // IS_ALIGNED + return IS_ALIGNED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __ISALIGNED_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATHS, new org.apache.thrift.meta_data.FieldMetaData("prefixPaths", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.TIMESTAMPS_LIST, new org.apache.thrift.meta_data.FieldMetaData("timestampsList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.TYPES_LIST, new org.apache.thrift.meta_data.FieldMetaData("typesList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))))); + tmpMap.put(_Fields.SIZE_LIST, new org.apache.thrift.meta_data.FieldMetaData("sizeList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertTabletsReq.class, metaDataMap); + } + + public TSInsertTabletsReq() { + } + + public TSInsertTabletsReq( + long sessionId, + java.util.List prefixPaths, + java.util.List> measurementsList, + java.util.List valuesList, + java.util.List timestampsList, + java.util.List> typesList, + java.util.List sizeList) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPaths = prefixPaths; + this.measurementsList = measurementsList; + this.valuesList = valuesList; + this.timestampsList = timestampsList; + this.typesList = typesList; + this.sizeList = sizeList; + } + + /** + * Performs a deep copy on other. + */ + public TSInsertTabletsReq(TSInsertTabletsReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPaths()) { + java.util.List __this__prefixPaths = new java.util.ArrayList(other.prefixPaths); + this.prefixPaths = __this__prefixPaths; + } + if (other.isSetMeasurementsList()) { + java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); + for (java.util.List other_element : other.measurementsList) { + java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); + __this__measurementsList.add(__this__measurementsList_copy); + } + this.measurementsList = __this__measurementsList; + } + if (other.isSetValuesList()) { + java.util.List __this__valuesList = new java.util.ArrayList(other.valuesList); + this.valuesList = __this__valuesList; + } + if (other.isSetTimestampsList()) { + java.util.List __this__timestampsList = new java.util.ArrayList(other.timestampsList); + this.timestampsList = __this__timestampsList; + } + if (other.isSetTypesList()) { + java.util.List> __this__typesList = new java.util.ArrayList>(other.typesList.size()); + for (java.util.List other_element : other.typesList) { + java.util.List __this__typesList_copy = new java.util.ArrayList(other_element); + __this__typesList.add(__this__typesList_copy); + } + this.typesList = __this__typesList; + } + if (other.isSetSizeList()) { + java.util.List __this__sizeList = new java.util.ArrayList(other.sizeList); + this.sizeList = __this__sizeList; + } + this.isAligned = other.isAligned; + } + + @Override + public TSInsertTabletsReq deepCopy() { + return new TSInsertTabletsReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPaths = null; + this.measurementsList = null; + this.valuesList = null; + this.timestampsList = null; + this.typesList = null; + this.sizeList = null; + setIsAlignedIsSet(false); + this.isAligned = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSInsertTabletsReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getPrefixPathsSize() { + return (this.prefixPaths == null) ? 0 : this.prefixPaths.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPrefixPathsIterator() { + return (this.prefixPaths == null) ? null : this.prefixPaths.iterator(); + } + + public void addToPrefixPaths(java.lang.String elem) { + if (this.prefixPaths == null) { + this.prefixPaths = new java.util.ArrayList(); + } + this.prefixPaths.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getPrefixPaths() { + return this.prefixPaths; + } + + public TSInsertTabletsReq setPrefixPaths(@org.apache.thrift.annotation.Nullable java.util.List prefixPaths) { + this.prefixPaths = prefixPaths; + return this; + } + + public void unsetPrefixPaths() { + this.prefixPaths = null; + } + + /** Returns true if field prefixPaths is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPaths() { + return this.prefixPaths != null; + } + + public void setPrefixPathsIsSet(boolean value) { + if (!value) { + this.prefixPaths = null; + } + } + + public int getMeasurementsListSize() { + return (this.measurementsList == null) ? 0 : this.measurementsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getMeasurementsListIterator() { + return (this.measurementsList == null) ? null : this.measurementsList.iterator(); + } + + public void addToMeasurementsList(java.util.List elem) { + if (this.measurementsList == null) { + this.measurementsList = new java.util.ArrayList>(); + } + this.measurementsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getMeasurementsList() { + return this.measurementsList; + } + + public TSInsertTabletsReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { + this.measurementsList = measurementsList; + return this; + } + + public void unsetMeasurementsList() { + this.measurementsList = null; + } + + /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurementsList() { + return this.measurementsList != null; + } + + public void setMeasurementsListIsSet(boolean value) { + if (!value) { + this.measurementsList = null; + } + } + + public int getValuesListSize() { + return (this.valuesList == null) ? 0 : this.valuesList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getValuesListIterator() { + return (this.valuesList == null) ? null : this.valuesList.iterator(); + } + + public void addToValuesList(java.nio.ByteBuffer elem) { + if (this.valuesList == null) { + this.valuesList = new java.util.ArrayList(); + } + this.valuesList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getValuesList() { + return this.valuesList; + } + + public TSInsertTabletsReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List valuesList) { + this.valuesList = valuesList; + return this; + } + + public void unsetValuesList() { + this.valuesList = null; + } + + /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ + public boolean isSetValuesList() { + return this.valuesList != null; + } + + public void setValuesListIsSet(boolean value) { + if (!value) { + this.valuesList = null; + } + } + + public int getTimestampsListSize() { + return (this.timestampsList == null) ? 0 : this.timestampsList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTimestampsListIterator() { + return (this.timestampsList == null) ? null : this.timestampsList.iterator(); + } + + public void addToTimestampsList(java.nio.ByteBuffer elem) { + if (this.timestampsList == null) { + this.timestampsList = new java.util.ArrayList(); + } + this.timestampsList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getTimestampsList() { + return this.timestampsList; + } + + public TSInsertTabletsReq setTimestampsList(@org.apache.thrift.annotation.Nullable java.util.List timestampsList) { + this.timestampsList = timestampsList; + return this; + } + + public void unsetTimestampsList() { + this.timestampsList = null; + } + + /** Returns true if field timestampsList is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestampsList() { + return this.timestampsList != null; + } + + public void setTimestampsListIsSet(boolean value) { + if (!value) { + this.timestampsList = null; + } + } + + public int getTypesListSize() { + return (this.typesList == null) ? 0 : this.typesList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator> getTypesListIterator() { + return (this.typesList == null) ? null : this.typesList.iterator(); + } + + public void addToTypesList(java.util.List elem) { + if (this.typesList == null) { + this.typesList = new java.util.ArrayList>(); + } + this.typesList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List> getTypesList() { + return this.typesList; + } + + public TSInsertTabletsReq setTypesList(@org.apache.thrift.annotation.Nullable java.util.List> typesList) { + this.typesList = typesList; + return this; + } + + public void unsetTypesList() { + this.typesList = null; + } + + /** Returns true if field typesList is set (has been assigned a value) and false otherwise */ + public boolean isSetTypesList() { + return this.typesList != null; + } + + public void setTypesListIsSet(boolean value) { + if (!value) { + this.typesList = null; + } + } + + public int getSizeListSize() { + return (this.sizeList == null) ? 0 : this.sizeList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getSizeListIterator() { + return (this.sizeList == null) ? null : this.sizeList.iterator(); + } + + public void addToSizeList(int elem) { + if (this.sizeList == null) { + this.sizeList = new java.util.ArrayList(); + } + this.sizeList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getSizeList() { + return this.sizeList; + } + + public TSInsertTabletsReq setSizeList(@org.apache.thrift.annotation.Nullable java.util.List sizeList) { + this.sizeList = sizeList; + return this; + } + + public void unsetSizeList() { + this.sizeList = null; + } + + /** Returns true if field sizeList is set (has been assigned a value) and false otherwise */ + public boolean isSetSizeList() { + return this.sizeList != null; + } + + public void setSizeListIsSet(boolean value) { + if (!value) { + this.sizeList = null; + } + } + + public boolean isIsAligned() { + return this.isAligned; + } + + public TSInsertTabletsReq setIsAligned(boolean isAligned) { + this.isAligned = isAligned; + setIsAlignedIsSet(true); + return this; + } + + public void unsetIsAligned() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAligned() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); + } + + public void setIsAlignedIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATHS: + if (value == null) { + unsetPrefixPaths(); + } else { + setPrefixPaths((java.util.List)value); + } + break; + + case MEASUREMENTS_LIST: + if (value == null) { + unsetMeasurementsList(); + } else { + setMeasurementsList((java.util.List>)value); + } + break; + + case VALUES_LIST: + if (value == null) { + unsetValuesList(); + } else { + setValuesList((java.util.List)value); + } + break; + + case TIMESTAMPS_LIST: + if (value == null) { + unsetTimestampsList(); + } else { + setTimestampsList((java.util.List)value); + } + break; + + case TYPES_LIST: + if (value == null) { + unsetTypesList(); + } else { + setTypesList((java.util.List>)value); + } + break; + + case SIZE_LIST: + if (value == null) { + unsetSizeList(); + } else { + setSizeList((java.util.List)value); + } + break; + + case IS_ALIGNED: + if (value == null) { + unsetIsAligned(); + } else { + setIsAligned((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATHS: + return getPrefixPaths(); + + case MEASUREMENTS_LIST: + return getMeasurementsList(); + + case VALUES_LIST: + return getValuesList(); + + case TIMESTAMPS_LIST: + return getTimestampsList(); + + case TYPES_LIST: + return getTypesList(); + + case SIZE_LIST: + return getSizeList(); + + case IS_ALIGNED: + return isIsAligned(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATHS: + return isSetPrefixPaths(); + case MEASUREMENTS_LIST: + return isSetMeasurementsList(); + case VALUES_LIST: + return isSetValuesList(); + case TIMESTAMPS_LIST: + return isSetTimestampsList(); + case TYPES_LIST: + return isSetTypesList(); + case SIZE_LIST: + return isSetSizeList(); + case IS_ALIGNED: + return isSetIsAligned(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSInsertTabletsReq) + return this.equals((TSInsertTabletsReq)that); + return false; + } + + public boolean equals(TSInsertTabletsReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPaths = true && this.isSetPrefixPaths(); + boolean that_present_prefixPaths = true && that.isSetPrefixPaths(); + if (this_present_prefixPaths || that_present_prefixPaths) { + if (!(this_present_prefixPaths && that_present_prefixPaths)) + return false; + if (!this.prefixPaths.equals(that.prefixPaths)) + return false; + } + + boolean this_present_measurementsList = true && this.isSetMeasurementsList(); + boolean that_present_measurementsList = true && that.isSetMeasurementsList(); + if (this_present_measurementsList || that_present_measurementsList) { + if (!(this_present_measurementsList && that_present_measurementsList)) + return false; + if (!this.measurementsList.equals(that.measurementsList)) + return false; + } + + boolean this_present_valuesList = true && this.isSetValuesList(); + boolean that_present_valuesList = true && that.isSetValuesList(); + if (this_present_valuesList || that_present_valuesList) { + if (!(this_present_valuesList && that_present_valuesList)) + return false; + if (!this.valuesList.equals(that.valuesList)) + return false; + } + + boolean this_present_timestampsList = true && this.isSetTimestampsList(); + boolean that_present_timestampsList = true && that.isSetTimestampsList(); + if (this_present_timestampsList || that_present_timestampsList) { + if (!(this_present_timestampsList && that_present_timestampsList)) + return false; + if (!this.timestampsList.equals(that.timestampsList)) + return false; + } + + boolean this_present_typesList = true && this.isSetTypesList(); + boolean that_present_typesList = true && that.isSetTypesList(); + if (this_present_typesList || that_present_typesList) { + if (!(this_present_typesList && that_present_typesList)) + return false; + if (!this.typesList.equals(that.typesList)) + return false; + } + + boolean this_present_sizeList = true && this.isSetSizeList(); + boolean that_present_sizeList = true && that.isSetSizeList(); + if (this_present_sizeList || that_present_sizeList) { + if (!(this_present_sizeList && that_present_sizeList)) + return false; + if (!this.sizeList.equals(that.sizeList)) + return false; + } + + boolean this_present_isAligned = true && this.isSetIsAligned(); + boolean that_present_isAligned = true && that.isSetIsAligned(); + if (this_present_isAligned || that_present_isAligned) { + if (!(this_present_isAligned && that_present_isAligned)) + return false; + if (this.isAligned != that.isAligned) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPaths()) ? 131071 : 524287); + if (isSetPrefixPaths()) + hashCode = hashCode * 8191 + prefixPaths.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); + if (isSetMeasurementsList()) + hashCode = hashCode * 8191 + measurementsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); + if (isSetValuesList()) + hashCode = hashCode * 8191 + valuesList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTimestampsList()) ? 131071 : 524287); + if (isSetTimestampsList()) + hashCode = hashCode * 8191 + timestampsList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTypesList()) ? 131071 : 524287); + if (isSetTypesList()) + hashCode = hashCode * 8191 + typesList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetSizeList()) ? 131071 : 524287); + if (isSetSizeList()) + hashCode = hashCode * 8191 + sizeList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); + if (isSetIsAligned()) + hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSInsertTabletsReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPaths(), other.isSetPrefixPaths()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPaths()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPaths, other.prefixPaths); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurementsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValuesList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimestampsList(), other.isSetTimestampsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestampsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestampsList, other.timestampsList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTypesList(), other.isSetTypesList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTypesList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typesList, other.typesList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSizeList(), other.isSetSizeList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSizeList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sizeList, other.sizeList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAligned()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertTabletsReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPaths:"); + if (this.prefixPaths == null) { + sb.append("null"); + } else { + sb.append(this.prefixPaths); + } + first = false; + if (!first) sb.append(", "); + sb.append("measurementsList:"); + if (this.measurementsList == null) { + sb.append("null"); + } else { + sb.append(this.measurementsList); + } + first = false; + if (!first) sb.append(", "); + sb.append("valuesList:"); + if (this.valuesList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.valuesList, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestampsList:"); + if (this.timestampsList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.timestampsList, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("typesList:"); + if (this.typesList == null) { + sb.append("null"); + } else { + sb.append(this.typesList); + } + first = false; + if (!first) sb.append(", "); + sb.append("sizeList:"); + if (this.sizeList == null) { + sb.append("null"); + } else { + sb.append(this.sizeList); + } + first = false; + if (isSetIsAligned()) { + if (!first) sb.append(", "); + sb.append("isAligned:"); + sb.append(this.isAligned); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPaths == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPaths' was not present! Struct: " + toString()); + } + if (measurementsList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); + } + if (valuesList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); + } + if (timestampsList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestampsList' was not present! Struct: " + toString()); + } + if (typesList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'typesList' was not present! Struct: " + toString()); + } + if (sizeList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sizeList' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSInsertTabletsReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertTabletsReqStandardScheme getScheme() { + return new TSInsertTabletsReqStandardScheme(); + } + } + + private static class TSInsertTabletsReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertTabletsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATHS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list214 = iprot.readListBegin(); + struct.prefixPaths = new java.util.ArrayList(_list214.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem215; + for (int _i216 = 0; _i216 < _list214.size; ++_i216) + { + _elem215 = iprot.readString(); + struct.prefixPaths.add(_elem215); + } + iprot.readListEnd(); + } + struct.setPrefixPathsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MEASUREMENTS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list217 = iprot.readListBegin(); + struct.measurementsList = new java.util.ArrayList>(_list217.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem218; + for (int _i219 = 0; _i219 < _list217.size; ++_i219) + { + { + org.apache.thrift.protocol.TList _list220 = iprot.readListBegin(); + _elem218 = new java.util.ArrayList(_list220.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem221; + for (int _i222 = 0; _i222 < _list220.size; ++_i222) + { + _elem221 = iprot.readString(); + _elem218.add(_elem221); + } + iprot.readListEnd(); + } + struct.measurementsList.add(_elem218); + } + iprot.readListEnd(); + } + struct.setMeasurementsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // VALUES_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list223 = iprot.readListBegin(); + struct.valuesList = new java.util.ArrayList(_list223.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem224; + for (int _i225 = 0; _i225 < _list223.size; ++_i225) + { + _elem224 = iprot.readBinary(); + struct.valuesList.add(_elem224); + } + iprot.readListEnd(); + } + struct.setValuesListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMESTAMPS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list226 = iprot.readListBegin(); + struct.timestampsList = new java.util.ArrayList(_list226.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem227; + for (int _i228 = 0; _i228 < _list226.size; ++_i228) + { + _elem227 = iprot.readBinary(); + struct.timestampsList.add(_elem227); + } + iprot.readListEnd(); + } + struct.setTimestampsListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // TYPES_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list229 = iprot.readListBegin(); + struct.typesList = new java.util.ArrayList>(_list229.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem230; + for (int _i231 = 0; _i231 < _list229.size; ++_i231) + { + { + org.apache.thrift.protocol.TList _list232 = iprot.readListBegin(); + _elem230 = new java.util.ArrayList(_list232.size); + int _elem233; + for (int _i234 = 0; _i234 < _list232.size; ++_i234) + { + _elem233 = iprot.readI32(); + _elem230.add(_elem233); + } + iprot.readListEnd(); + } + struct.typesList.add(_elem230); + } + iprot.readListEnd(); + } + struct.setTypesListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SIZE_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list235 = iprot.readListBegin(); + struct.sizeList = new java.util.ArrayList(_list235.size); + int _elem236; + for (int _i237 = 0; _i237 < _list235.size; ++_i237) + { + _elem236 = iprot.readI32(); + struct.sizeList.add(_elem236); + } + iprot.readListEnd(); + } + struct.setSizeListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // IS_ALIGNED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertTabletsReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPaths != null) { + oprot.writeFieldBegin(PREFIX_PATHS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.prefixPaths.size())); + for (java.lang.String _iter238 : struct.prefixPaths) + { + oprot.writeString(_iter238); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.measurementsList != null) { + oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); + for (java.util.List _iter239 : struct.measurementsList) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter239.size())); + for (java.lang.String _iter240 : _iter239) + { + oprot.writeString(_iter240); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.valuesList != null) { + oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valuesList.size())); + for (java.nio.ByteBuffer _iter241 : struct.valuesList) + { + oprot.writeBinary(_iter241); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.timestampsList != null) { + oprot.writeFieldBegin(TIMESTAMPS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.timestampsList.size())); + for (java.nio.ByteBuffer _iter242 : struct.timestampsList) + { + oprot.writeBinary(_iter242); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.typesList != null) { + oprot.writeFieldBegin(TYPES_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.typesList.size())); + for (java.util.List _iter243 : struct.typesList) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, _iter243.size())); + for (int _iter244 : _iter243) + { + oprot.writeI32(_iter244); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.sizeList != null) { + oprot.writeFieldBegin(SIZE_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.sizeList.size())); + for (int _iter245 : struct.sizeList) + { + oprot.writeI32(_iter245); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetIsAligned()) { + oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); + oprot.writeBool(struct.isAligned); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSInsertTabletsReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSInsertTabletsReqTupleScheme getScheme() { + return new TSInsertTabletsReqTupleScheme(); + } + } + + private static class TSInsertTabletsReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertTabletsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + { + oprot.writeI32(struct.prefixPaths.size()); + for (java.lang.String _iter246 : struct.prefixPaths) + { + oprot.writeString(_iter246); + } + } + { + oprot.writeI32(struct.measurementsList.size()); + for (java.util.List _iter247 : struct.measurementsList) + { + { + oprot.writeI32(_iter247.size()); + for (java.lang.String _iter248 : _iter247) + { + oprot.writeString(_iter248); + } + } + } + } + { + oprot.writeI32(struct.valuesList.size()); + for (java.nio.ByteBuffer _iter249 : struct.valuesList) + { + oprot.writeBinary(_iter249); + } + } + { + oprot.writeI32(struct.timestampsList.size()); + for (java.nio.ByteBuffer _iter250 : struct.timestampsList) + { + oprot.writeBinary(_iter250); + } + } + { + oprot.writeI32(struct.typesList.size()); + for (java.util.List _iter251 : struct.typesList) + { + { + oprot.writeI32(_iter251.size()); + for (int _iter252 : _iter251) + { + oprot.writeI32(_iter252); + } + } + } + } + { + oprot.writeI32(struct.sizeList.size()); + for (int _iter253 : struct.sizeList) + { + oprot.writeI32(_iter253); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetIsAligned()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIsAligned()) { + oprot.writeBool(struct.isAligned); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertTabletsReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + { + org.apache.thrift.protocol.TList _list254 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.prefixPaths = new java.util.ArrayList(_list254.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem255; + for (int _i256 = 0; _i256 < _list254.size; ++_i256) + { + _elem255 = iprot.readString(); + struct.prefixPaths.add(_elem255); + } + } + struct.setPrefixPathsIsSet(true); + { + org.apache.thrift.protocol.TList _list257 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); + struct.measurementsList = new java.util.ArrayList>(_list257.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem258; + for (int _i259 = 0; _i259 < _list257.size; ++_i259) + { + { + org.apache.thrift.protocol.TList _list260 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + _elem258 = new java.util.ArrayList(_list260.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem261; + for (int _i262 = 0; _i262 < _list260.size; ++_i262) + { + _elem261 = iprot.readString(); + _elem258.add(_elem261); + } + } + struct.measurementsList.add(_elem258); + } + } + struct.setMeasurementsListIsSet(true); + { + org.apache.thrift.protocol.TList _list263 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.valuesList = new java.util.ArrayList(_list263.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem264; + for (int _i265 = 0; _i265 < _list263.size; ++_i265) + { + _elem264 = iprot.readBinary(); + struct.valuesList.add(_elem264); + } + } + struct.setValuesListIsSet(true); + { + org.apache.thrift.protocol.TList _list266 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.timestampsList = new java.util.ArrayList(_list266.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem267; + for (int _i268 = 0; _i268 < _list266.size; ++_i268) + { + _elem267 = iprot.readBinary(); + struct.timestampsList.add(_elem267); + } + } + struct.setTimestampsListIsSet(true); + { + org.apache.thrift.protocol.TList _list269 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); + struct.typesList = new java.util.ArrayList>(_list269.size); + @org.apache.thrift.annotation.Nullable java.util.List _elem270; + for (int _i271 = 0; _i271 < _list269.size; ++_i271) + { + { + org.apache.thrift.protocol.TList _list272 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + _elem270 = new java.util.ArrayList(_list272.size); + int _elem273; + for (int _i274 = 0; _i274 < _list272.size; ++_i274) + { + _elem273 = iprot.readI32(); + _elem270.add(_elem273); + } + } + struct.typesList.add(_elem270); + } + } + struct.setTypesListIsSet(true); + { + org.apache.thrift.protocol.TList _list275 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); + struct.sizeList = new java.util.ArrayList(_list275.size); + int _elem276; + for (int _i277 = 0; _i277 < _list275.size; ++_i277) + { + _elem276 = iprot.readI32(); + struct.sizeList.add(_elem276); + } + } + struct.setSizeListIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.isAligned = iprot.readBool(); + struct.setIsAlignedIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSLastDataQueryReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSLastDataQueryReq.java new file mode 100644 index 0000000000000..01b56d63f9f56 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSLastDataQueryReq.java @@ -0,0 +1,1213 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSLastDataQueryReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSLastDataQueryReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField ENABLE_REDIRECT_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("enableRedirectQuery", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField JDBC_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("jdbcQuery", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)8); + private static final org.apache.thrift.protocol.TField LEGAL_PATH_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("legalPathNodes", org.apache.thrift.protocol.TType.BOOL, (short)9); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSLastDataQueryReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSLastDataQueryReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List paths; // required + public int fetchSize; // optional + public long time; // required + public long statementId; // required + public boolean enableRedirectQuery; // optional + public boolean jdbcQuery; // optional + public long timeout; // optional + public boolean legalPathNodes; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PATHS((short)2, "paths"), + FETCH_SIZE((short)3, "fetchSize"), + TIME((short)4, "time"), + STATEMENT_ID((short)5, "statementId"), + ENABLE_REDIRECT_QUERY((short)6, "enableRedirectQuery"), + JDBC_QUERY((short)7, "jdbcQuery"), + TIMEOUT((short)8, "timeout"), + LEGAL_PATH_NODES((short)9, "legalPathNodes"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PATHS + return PATHS; + case 3: // FETCH_SIZE + return FETCH_SIZE; + case 4: // TIME + return TIME; + case 5: // STATEMENT_ID + return STATEMENT_ID; + case 6: // ENABLE_REDIRECT_QUERY + return ENABLE_REDIRECT_QUERY; + case 7: // JDBC_QUERY + return JDBC_QUERY; + case 8: // TIMEOUT + return TIMEOUT; + case 9: // LEGAL_PATH_NODES + return LEGAL_PATH_NODES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __FETCHSIZE_ISSET_ID = 1; + private static final int __TIME_ISSET_ID = 2; + private static final int __STATEMENTID_ISSET_ID = 3; + private static final int __ENABLEREDIRECTQUERY_ISSET_ID = 4; + private static final int __JDBCQUERY_ISSET_ID = 5; + private static final int __TIMEOUT_ISSET_ID = 6; + private static final int __LEGALPATHNODES_ISSET_ID = 7; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.FETCH_SIZE,_Fields.ENABLE_REDIRECT_QUERY,_Fields.JDBC_QUERY,_Fields.TIMEOUT,_Fields.LEGAL_PATH_NODES}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ENABLE_REDIRECT_QUERY, new org.apache.thrift.meta_data.FieldMetaData("enableRedirectQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.JDBC_QUERY, new org.apache.thrift.meta_data.FieldMetaData("jdbcQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LEGAL_PATH_NODES, new org.apache.thrift.meta_data.FieldMetaData("legalPathNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSLastDataQueryReq.class, metaDataMap); + } + + public TSLastDataQueryReq() { + } + + public TSLastDataQueryReq( + long sessionId, + java.util.List paths, + long time, + long statementId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.paths = paths; + this.time = time; + setTimeIsSet(true); + this.statementId = statementId; + setStatementIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSLastDataQueryReq(TSLastDataQueryReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPaths()) { + java.util.List __this__paths = new java.util.ArrayList(other.paths); + this.paths = __this__paths; + } + this.fetchSize = other.fetchSize; + this.time = other.time; + this.statementId = other.statementId; + this.enableRedirectQuery = other.enableRedirectQuery; + this.jdbcQuery = other.jdbcQuery; + this.timeout = other.timeout; + this.legalPathNodes = other.legalPathNodes; + } + + @Override + public TSLastDataQueryReq deepCopy() { + return new TSLastDataQueryReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.paths = null; + setFetchSizeIsSet(false); + this.fetchSize = 0; + setTimeIsSet(false); + this.time = 0; + setStatementIdIsSet(false); + this.statementId = 0; + setEnableRedirectQueryIsSet(false); + this.enableRedirectQuery = false; + setJdbcQueryIsSet(false); + this.jdbcQuery = false; + setTimeoutIsSet(false); + this.timeout = 0; + setLegalPathNodesIsSet(false); + this.legalPathNodes = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSLastDataQueryReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getPathsSize() { + return (this.paths == null) ? 0 : this.paths.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPathsIterator() { + return (this.paths == null) ? null : this.paths.iterator(); + } + + public void addToPaths(java.lang.String elem) { + if (this.paths == null) { + this.paths = new java.util.ArrayList(); + } + this.paths.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getPaths() { + return this.paths; + } + + public TSLastDataQueryReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { + this.paths = paths; + return this; + } + + public void unsetPaths() { + this.paths = null; + } + + /** Returns true if field paths is set (has been assigned a value) and false otherwise */ + public boolean isSetPaths() { + return this.paths != null; + } + + public void setPathsIsSet(boolean value) { + if (!value) { + this.paths = null; + } + } + + public int getFetchSize() { + return this.fetchSize; + } + + public TSLastDataQueryReq setFetchSize(int fetchSize) { + this.fetchSize = fetchSize; + setFetchSizeIsSet(true); + return this; + } + + public void unsetFetchSize() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ + public boolean isSetFetchSize() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + public void setFetchSizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); + } + + public long getTime() { + return this.time; + } + + public TSLastDataQueryReq setTime(long time) { + this.time = time; + setTimeIsSet(true); + return this; + } + + public void unsetTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_ISSET_ID); + } + + /** Returns true if field time is set (has been assigned a value) and false otherwise */ + public boolean isSetTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID); + } + + public void setTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_ISSET_ID, value); + } + + public long getStatementId() { + return this.statementId; + } + + public TSLastDataQueryReq setStatementId(long statementId) { + this.statementId = statementId; + setStatementIdIsSet(true); + return this; + } + + public void unsetStatementId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ + public boolean isSetStatementId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + public void setStatementIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); + } + + public boolean isEnableRedirectQuery() { + return this.enableRedirectQuery; + } + + public TSLastDataQueryReq setEnableRedirectQuery(boolean enableRedirectQuery) { + this.enableRedirectQuery = enableRedirectQuery; + setEnableRedirectQueryIsSet(true); + return this; + } + + public void unsetEnableRedirectQuery() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); + } + + /** Returns true if field enableRedirectQuery is set (has been assigned a value) and false otherwise */ + public boolean isSetEnableRedirectQuery() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); + } + + public void setEnableRedirectQueryIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID, value); + } + + public boolean isJdbcQuery() { + return this.jdbcQuery; + } + + public TSLastDataQueryReq setJdbcQuery(boolean jdbcQuery) { + this.jdbcQuery = jdbcQuery; + setJdbcQueryIsSet(true); + return this; + } + + public void unsetJdbcQuery() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); + } + + /** Returns true if field jdbcQuery is set (has been assigned a value) and false otherwise */ + public boolean isSetJdbcQuery() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); + } + + public void setJdbcQueryIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JDBCQUERY_ISSET_ID, value); + } + + public long getTimeout() { + return this.timeout; + } + + public TSLastDataQueryReq setTimeout(long timeout) { + this.timeout = timeout; + setTimeoutIsSet(true); + return this; + } + + public void unsetTimeout() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeout() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + public void setTimeoutIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + } + + public boolean isLegalPathNodes() { + return this.legalPathNodes; + } + + public TSLastDataQueryReq setLegalPathNodes(boolean legalPathNodes) { + this.legalPathNodes = legalPathNodes; + setLegalPathNodesIsSet(true); + return this; + } + + public void unsetLegalPathNodes() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); + } + + /** Returns true if field legalPathNodes is set (has been assigned a value) and false otherwise */ + public boolean isSetLegalPathNodes() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); + } + + public void setLegalPathNodesIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PATHS: + if (value == null) { + unsetPaths(); + } else { + setPaths((java.util.List)value); + } + break; + + case FETCH_SIZE: + if (value == null) { + unsetFetchSize(); + } else { + setFetchSize((java.lang.Integer)value); + } + break; + + case TIME: + if (value == null) { + unsetTime(); + } else { + setTime((java.lang.Long)value); + } + break; + + case STATEMENT_ID: + if (value == null) { + unsetStatementId(); + } else { + setStatementId((java.lang.Long)value); + } + break; + + case ENABLE_REDIRECT_QUERY: + if (value == null) { + unsetEnableRedirectQuery(); + } else { + setEnableRedirectQuery((java.lang.Boolean)value); + } + break; + + case JDBC_QUERY: + if (value == null) { + unsetJdbcQuery(); + } else { + setJdbcQuery((java.lang.Boolean)value); + } + break; + + case TIMEOUT: + if (value == null) { + unsetTimeout(); + } else { + setTimeout((java.lang.Long)value); + } + break; + + case LEGAL_PATH_NODES: + if (value == null) { + unsetLegalPathNodes(); + } else { + setLegalPathNodes((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PATHS: + return getPaths(); + + case FETCH_SIZE: + return getFetchSize(); + + case TIME: + return getTime(); + + case STATEMENT_ID: + return getStatementId(); + + case ENABLE_REDIRECT_QUERY: + return isEnableRedirectQuery(); + + case JDBC_QUERY: + return isJdbcQuery(); + + case TIMEOUT: + return getTimeout(); + + case LEGAL_PATH_NODES: + return isLegalPathNodes(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PATHS: + return isSetPaths(); + case FETCH_SIZE: + return isSetFetchSize(); + case TIME: + return isSetTime(); + case STATEMENT_ID: + return isSetStatementId(); + case ENABLE_REDIRECT_QUERY: + return isSetEnableRedirectQuery(); + case JDBC_QUERY: + return isSetJdbcQuery(); + case TIMEOUT: + return isSetTimeout(); + case LEGAL_PATH_NODES: + return isSetLegalPathNodes(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSLastDataQueryReq) + return this.equals((TSLastDataQueryReq)that); + return false; + } + + public boolean equals(TSLastDataQueryReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_paths = true && this.isSetPaths(); + boolean that_present_paths = true && that.isSetPaths(); + if (this_present_paths || that_present_paths) { + if (!(this_present_paths && that_present_paths)) + return false; + if (!this.paths.equals(that.paths)) + return false; + } + + boolean this_present_fetchSize = true && this.isSetFetchSize(); + boolean that_present_fetchSize = true && that.isSetFetchSize(); + if (this_present_fetchSize || that_present_fetchSize) { + if (!(this_present_fetchSize && that_present_fetchSize)) + return false; + if (this.fetchSize != that.fetchSize) + return false; + } + + boolean this_present_time = true; + boolean that_present_time = true; + if (this_present_time || that_present_time) { + if (!(this_present_time && that_present_time)) + return false; + if (this.time != that.time) + return false; + } + + boolean this_present_statementId = true; + boolean that_present_statementId = true; + if (this_present_statementId || that_present_statementId) { + if (!(this_present_statementId && that_present_statementId)) + return false; + if (this.statementId != that.statementId) + return false; + } + + boolean this_present_enableRedirectQuery = true && this.isSetEnableRedirectQuery(); + boolean that_present_enableRedirectQuery = true && that.isSetEnableRedirectQuery(); + if (this_present_enableRedirectQuery || that_present_enableRedirectQuery) { + if (!(this_present_enableRedirectQuery && that_present_enableRedirectQuery)) + return false; + if (this.enableRedirectQuery != that.enableRedirectQuery) + return false; + } + + boolean this_present_jdbcQuery = true && this.isSetJdbcQuery(); + boolean that_present_jdbcQuery = true && that.isSetJdbcQuery(); + if (this_present_jdbcQuery || that_present_jdbcQuery) { + if (!(this_present_jdbcQuery && that_present_jdbcQuery)) + return false; + if (this.jdbcQuery != that.jdbcQuery) + return false; + } + + boolean this_present_timeout = true && this.isSetTimeout(); + boolean that_present_timeout = true && that.isSetTimeout(); + if (this_present_timeout || that_present_timeout) { + if (!(this_present_timeout && that_present_timeout)) + return false; + if (this.timeout != that.timeout) + return false; + } + + boolean this_present_legalPathNodes = true && this.isSetLegalPathNodes(); + boolean that_present_legalPathNodes = true && that.isSetLegalPathNodes(); + if (this_present_legalPathNodes || that_present_legalPathNodes) { + if (!(this_present_legalPathNodes && that_present_legalPathNodes)) + return false; + if (this.legalPathNodes != that.legalPathNodes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); + if (isSetPaths()) + hashCode = hashCode * 8191 + paths.hashCode(); + + hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); + if (isSetFetchSize()) + hashCode = hashCode * 8191 + fetchSize; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(time); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); + + hashCode = hashCode * 8191 + ((isSetEnableRedirectQuery()) ? 131071 : 524287); + if (isSetEnableRedirectQuery()) + hashCode = hashCode * 8191 + ((enableRedirectQuery) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetJdbcQuery()) ? 131071 : 524287); + if (isSetJdbcQuery()) + hashCode = hashCode * 8191 + ((jdbcQuery) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); + if (isSetTimeout()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); + + hashCode = hashCode * 8191 + ((isSetLegalPathNodes()) ? 131071 : 524287); + if (isSetLegalPathNodes()) + hashCode = hashCode * 8191 + ((legalPathNodes) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSLastDataQueryReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPaths()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFetchSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTime(), other.isSetTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time, other.time); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatementId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEnableRedirectQuery(), other.isSetEnableRedirectQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnableRedirectQuery()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableRedirectQuery, other.enableRedirectQuery); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetJdbcQuery(), other.isSetJdbcQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJdbcQuery()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jdbcQuery, other.jdbcQuery); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetLegalPathNodes(), other.isSetLegalPathNodes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLegalPathNodes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legalPathNodes, other.legalPathNodes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSLastDataQueryReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("paths:"); + if (this.paths == null) { + sb.append("null"); + } else { + sb.append(this.paths); + } + first = false; + if (isSetFetchSize()) { + if (!first) sb.append(", "); + sb.append("fetchSize:"); + sb.append(this.fetchSize); + first = false; + } + if (!first) sb.append(", "); + sb.append("time:"); + sb.append(this.time); + first = false; + if (!first) sb.append(", "); + sb.append("statementId:"); + sb.append(this.statementId); + first = false; + if (isSetEnableRedirectQuery()) { + if (!first) sb.append(", "); + sb.append("enableRedirectQuery:"); + sb.append(this.enableRedirectQuery); + first = false; + } + if (isSetJdbcQuery()) { + if (!first) sb.append(", "); + sb.append("jdbcQuery:"); + sb.append(this.jdbcQuery); + first = false; + } + if (isSetTimeout()) { + if (!first) sb.append(", "); + sb.append("timeout:"); + sb.append(this.timeout); + first = false; + } + if (isSetLegalPathNodes()) { + if (!first) sb.append(", "); + sb.append("legalPathNodes:"); + sb.append(this.legalPathNodes); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (paths == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); + } + // alas, we cannot check 'time' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSLastDataQueryReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSLastDataQueryReqStandardScheme getScheme() { + return new TSLastDataQueryReqStandardScheme(); + } + } + + private static class TSLastDataQueryReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSLastDataQueryReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PATHS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list560 = iprot.readListBegin(); + struct.paths = new java.util.ArrayList(_list560.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem561; + for (int _i562 = 0; _i562 < _list560.size; ++_i562) + { + _elem561 = iprot.readString(); + struct.paths.add(_elem561); + } + iprot.readListEnd(); + } + struct.setPathsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FETCH_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.time = iprot.readI64(); + struct.setTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // STATEMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // ENABLE_REDIRECT_QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.enableRedirectQuery = iprot.readBool(); + struct.setEnableRedirectQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // JDBC_QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.jdbcQuery = iprot.readBool(); + struct.setJdbcQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // LEGAL_PATH_NODES + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.legalPathNodes = iprot.readBool(); + struct.setLegalPathNodesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetTime()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'time' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetStatementId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSLastDataQueryReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.paths != null) { + oprot.writeFieldBegin(PATHS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); + for (java.lang.String _iter563 : struct.paths) + { + oprot.writeString(_iter563); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetFetchSize()) { + oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); + oprot.writeI32(struct.fetchSize); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIME_FIELD_DESC); + oprot.writeI64(struct.time); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); + oprot.writeI64(struct.statementId); + oprot.writeFieldEnd(); + if (struct.isSetEnableRedirectQuery()) { + oprot.writeFieldBegin(ENABLE_REDIRECT_QUERY_FIELD_DESC); + oprot.writeBool(struct.enableRedirectQuery); + oprot.writeFieldEnd(); + } + if (struct.isSetJdbcQuery()) { + oprot.writeFieldBegin(JDBC_QUERY_FIELD_DESC); + oprot.writeBool(struct.jdbcQuery); + oprot.writeFieldEnd(); + } + if (struct.isSetTimeout()) { + oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); + oprot.writeI64(struct.timeout); + oprot.writeFieldEnd(); + } + if (struct.isSetLegalPathNodes()) { + oprot.writeFieldBegin(LEGAL_PATH_NODES_FIELD_DESC); + oprot.writeBool(struct.legalPathNodes); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSLastDataQueryReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSLastDataQueryReqTupleScheme getScheme() { + return new TSLastDataQueryReqTupleScheme(); + } + } + + private static class TSLastDataQueryReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSLastDataQueryReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + { + oprot.writeI32(struct.paths.size()); + for (java.lang.String _iter564 : struct.paths) + { + oprot.writeString(_iter564); + } + } + oprot.writeI64(struct.time); + oprot.writeI64(struct.statementId); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetFetchSize()) { + optionals.set(0); + } + if (struct.isSetEnableRedirectQuery()) { + optionals.set(1); + } + if (struct.isSetJdbcQuery()) { + optionals.set(2); + } + if (struct.isSetTimeout()) { + optionals.set(3); + } + if (struct.isSetLegalPathNodes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetFetchSize()) { + oprot.writeI32(struct.fetchSize); + } + if (struct.isSetEnableRedirectQuery()) { + oprot.writeBool(struct.enableRedirectQuery); + } + if (struct.isSetJdbcQuery()) { + oprot.writeBool(struct.jdbcQuery); + } + if (struct.isSetTimeout()) { + oprot.writeI64(struct.timeout); + } + if (struct.isSetLegalPathNodes()) { + oprot.writeBool(struct.legalPathNodes); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSLastDataQueryReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + { + org.apache.thrift.protocol.TList _list565 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.paths = new java.util.ArrayList(_list565.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem566; + for (int _i567 = 0; _i567 < _list565.size; ++_i567) + { + _elem566 = iprot.readString(); + struct.paths.add(_elem566); + } + } + struct.setPathsIsSet(true); + struct.time = iprot.readI64(); + struct.setTimeIsSet(true); + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } + if (incoming.get(1)) { + struct.enableRedirectQuery = iprot.readBool(); + struct.setEnableRedirectQueryIsSet(true); + } + if (incoming.get(2)) { + struct.jdbcQuery = iprot.readBool(); + struct.setJdbcQueryIsSet(true); + } + if (incoming.get(3)) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } + if (incoming.get(4)) { + struct.legalPathNodes = iprot.readBool(); + struct.setLegalPathNodesIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionReq.java new file mode 100644 index 0000000000000..2f030bb01d9c4 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionReq.java @@ -0,0 +1,872 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSOpenSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSOpenSessionReq"); + + private static final org.apache.thrift.protocol.TField CLIENT_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("client_protocol", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField ZONE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("zoneId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)5); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSOpenSessionReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSOpenSessionReqTupleSchemeFactory(); + + /** + * + * @see TSProtocolVersion + */ + public @org.apache.thrift.annotation.Nullable TSProtocolVersion client_protocol; // required + public @org.apache.thrift.annotation.Nullable java.lang.String zoneId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String username; // required + public @org.apache.thrift.annotation.Nullable java.lang.String password; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map configuration; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see TSProtocolVersion + */ + CLIENT_PROTOCOL((short)1, "client_protocol"), + ZONE_ID((short)2, "zoneId"), + USERNAME((short)3, "username"), + PASSWORD((short)4, "password"), + CONFIGURATION((short)5, "configuration"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // CLIENT_PROTOCOL + return CLIENT_PROTOCOL; + case 2: // ZONE_ID + return ZONE_ID; + case 3: // USERNAME + return USERNAME; + case 4: // PASSWORD + return PASSWORD; + case 5: // CONFIGURATION + return CONFIGURATION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.PASSWORD,_Fields.CONFIGURATION}; + 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.CLIENT_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("client_protocol", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TSProtocolVersion.class))); + tmpMap.put(_Fields.ZONE_ID, new org.apache.thrift.meta_data.FieldMetaData("zoneId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSOpenSessionReq.class, metaDataMap); + } + + public TSOpenSessionReq() { + this.client_protocol = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V3; + + } + + public TSOpenSessionReq( + TSProtocolVersion client_protocol, + java.lang.String zoneId, + java.lang.String username) + { + this(); + this.client_protocol = client_protocol; + this.zoneId = zoneId; + this.username = username; + } + + /** + * Performs a deep copy on other. + */ + public TSOpenSessionReq(TSOpenSessionReq other) { + if (other.isSetClient_protocol()) { + this.client_protocol = other.client_protocol; + } + if (other.isSetZoneId()) { + this.zoneId = other.zoneId; + } + if (other.isSetUsername()) { + this.username = other.username; + } + if (other.isSetPassword()) { + this.password = other.password; + } + if (other.isSetConfiguration()) { + java.util.Map __this__configuration = new java.util.HashMap(other.configuration); + this.configuration = __this__configuration; + } + } + + @Override + public TSOpenSessionReq deepCopy() { + return new TSOpenSessionReq(this); + } + + @Override + public void clear() { + this.client_protocol = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V3; + + this.zoneId = null; + this.username = null; + this.password = null; + this.configuration = null; + } + + /** + * + * @see TSProtocolVersion + */ + @org.apache.thrift.annotation.Nullable + public TSProtocolVersion getClient_protocol() { + return this.client_protocol; + } + + /** + * + * @see TSProtocolVersion + */ + public TSOpenSessionReq setClient_protocol(@org.apache.thrift.annotation.Nullable TSProtocolVersion client_protocol) { + this.client_protocol = client_protocol; + return this; + } + + public void unsetClient_protocol() { + this.client_protocol = null; + } + + /** Returns true if field client_protocol is set (has been assigned a value) and false otherwise */ + public boolean isSetClient_protocol() { + return this.client_protocol != null; + } + + public void setClient_protocolIsSet(boolean value) { + if (!value) { + this.client_protocol = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getZoneId() { + return this.zoneId; + } + + public TSOpenSessionReq setZoneId(@org.apache.thrift.annotation.Nullable java.lang.String zoneId) { + this.zoneId = zoneId; + return this; + } + + public void unsetZoneId() { + this.zoneId = null; + } + + /** Returns true if field zoneId is set (has been assigned a value) and false otherwise */ + public boolean isSetZoneId() { + return this.zoneId != null; + } + + public void setZoneIdIsSet(boolean value) { + if (!value) { + this.zoneId = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getUsername() { + return this.username; + } + + public TSOpenSessionReq setUsername(@org.apache.thrift.annotation.Nullable java.lang.String username) { + this.username = username; + return this; + } + + public void unsetUsername() { + this.username = null; + } + + /** Returns true if field username is set (has been assigned a value) and false otherwise */ + public boolean isSetUsername() { + return this.username != null; + } + + public void setUsernameIsSet(boolean value) { + if (!value) { + this.username = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPassword() { + return this.password; + } + + public TSOpenSessionReq setPassword(@org.apache.thrift.annotation.Nullable java.lang.String password) { + this.password = password; + return this; + } + + public void unsetPassword() { + this.password = null; + } + + /** Returns true if field password is set (has been assigned a value) and false otherwise */ + public boolean isSetPassword() { + return this.password != null; + } + + public void setPasswordIsSet(boolean value) { + if (!value) { + this.password = null; + } + } + + public int getConfigurationSize() { + return (this.configuration == null) ? 0 : this.configuration.size(); + } + + public void putToConfiguration(java.lang.String key, java.lang.String val) { + if (this.configuration == null) { + this.configuration = new java.util.HashMap(); + } + this.configuration.put(key, val); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Map getConfiguration() { + return this.configuration; + } + + public TSOpenSessionReq setConfiguration(@org.apache.thrift.annotation.Nullable java.util.Map configuration) { + this.configuration = configuration; + return this; + } + + public void unsetConfiguration() { + this.configuration = null; + } + + /** Returns true if field configuration is set (has been assigned a value) and false otherwise */ + public boolean isSetConfiguration() { + return this.configuration != null; + } + + public void setConfigurationIsSet(boolean value) { + if (!value) { + this.configuration = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case CLIENT_PROTOCOL: + if (value == null) { + unsetClient_protocol(); + } else { + setClient_protocol((TSProtocolVersion)value); + } + break; + + case ZONE_ID: + if (value == null) { + unsetZoneId(); + } else { + setZoneId((java.lang.String)value); + } + break; + + case USERNAME: + if (value == null) { + unsetUsername(); + } else { + setUsername((java.lang.String)value); + } + break; + + case PASSWORD: + if (value == null) { + unsetPassword(); + } else { + setPassword((java.lang.String)value); + } + break; + + case CONFIGURATION: + if (value == null) { + unsetConfiguration(); + } else { + setConfiguration((java.util.Map)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case CLIENT_PROTOCOL: + return getClient_protocol(); + + case ZONE_ID: + return getZoneId(); + + case USERNAME: + return getUsername(); + + case PASSWORD: + return getPassword(); + + case CONFIGURATION: + return getConfiguration(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case CLIENT_PROTOCOL: + return isSetClient_protocol(); + case ZONE_ID: + return isSetZoneId(); + case USERNAME: + return isSetUsername(); + case PASSWORD: + return isSetPassword(); + case CONFIGURATION: + return isSetConfiguration(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSOpenSessionReq) + return this.equals((TSOpenSessionReq)that); + return false; + } + + public boolean equals(TSOpenSessionReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_client_protocol = true && this.isSetClient_protocol(); + boolean that_present_client_protocol = true && that.isSetClient_protocol(); + if (this_present_client_protocol || that_present_client_protocol) { + if (!(this_present_client_protocol && that_present_client_protocol)) + return false; + if (!this.client_protocol.equals(that.client_protocol)) + return false; + } + + boolean this_present_zoneId = true && this.isSetZoneId(); + boolean that_present_zoneId = true && that.isSetZoneId(); + if (this_present_zoneId || that_present_zoneId) { + if (!(this_present_zoneId && that_present_zoneId)) + return false; + if (!this.zoneId.equals(that.zoneId)) + return false; + } + + boolean this_present_username = true && this.isSetUsername(); + boolean that_present_username = true && that.isSetUsername(); + if (this_present_username || that_present_username) { + if (!(this_present_username && that_present_username)) + return false; + if (!this.username.equals(that.username)) + return false; + } + + boolean this_present_password = true && this.isSetPassword(); + boolean that_present_password = true && that.isSetPassword(); + if (this_present_password || that_present_password) { + if (!(this_present_password && that_present_password)) + return false; + if (!this.password.equals(that.password)) + return false; + } + + boolean this_present_configuration = true && this.isSetConfiguration(); + boolean that_present_configuration = true && that.isSetConfiguration(); + if (this_present_configuration || that_present_configuration) { + if (!(this_present_configuration && that_present_configuration)) + return false; + if (!this.configuration.equals(that.configuration)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetClient_protocol()) ? 131071 : 524287); + if (isSetClient_protocol()) + hashCode = hashCode * 8191 + client_protocol.getValue(); + + hashCode = hashCode * 8191 + ((isSetZoneId()) ? 131071 : 524287); + if (isSetZoneId()) + hashCode = hashCode * 8191 + zoneId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287); + if (isSetUsername()) + hashCode = hashCode * 8191 + username.hashCode(); + + hashCode = hashCode * 8191 + ((isSetPassword()) ? 131071 : 524287); + if (isSetPassword()) + hashCode = hashCode * 8191 + password.hashCode(); + + hashCode = hashCode * 8191 + ((isSetConfiguration()) ? 131071 : 524287); + if (isSetConfiguration()) + hashCode = hashCode * 8191 + configuration.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSOpenSessionReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetClient_protocol(), other.isSetClient_protocol()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetClient_protocol()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.client_protocol, other.client_protocol); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetZoneId(), other.isSetZoneId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetZoneId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.zoneId, other.zoneId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetUsername(), other.isSetUsername()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUsername()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPassword(), other.isSetPassword()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPassword()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetConfiguration(), other.isSetConfiguration()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetConfiguration()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSOpenSessionReq("); + boolean first = true; + + sb.append("client_protocol:"); + if (this.client_protocol == null) { + sb.append("null"); + } else { + sb.append(this.client_protocol); + } + first = false; + if (!first) sb.append(", "); + sb.append("zoneId:"); + if (this.zoneId == null) { + sb.append("null"); + } else { + sb.append(this.zoneId); + } + first = false; + if (!first) sb.append(", "); + sb.append("username:"); + if (this.username == null) { + sb.append("null"); + } else { + sb.append(this.username); + } + first = false; + if (isSetPassword()) { + if (!first) sb.append(", "); + sb.append("password:"); + if (this.password == null) { + sb.append("null"); + } else { + sb.append(this.password); + } + first = false; + } + if (isSetConfiguration()) { + if (!first) sb.append(", "); + sb.append("configuration:"); + if (this.configuration == null) { + sb.append("null"); + } else { + sb.append(this.configuration); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (client_protocol == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'client_protocol' was not present! Struct: " + toString()); + } + if (zoneId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'zoneId' was not present! Struct: " + toString()); + } + if (username == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class TSOpenSessionReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSOpenSessionReqStandardScheme getScheme() { + return new TSOpenSessionReqStandardScheme(); + } + } + + private static class TSOpenSessionReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSOpenSessionReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // CLIENT_PROTOCOL + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.client_protocol = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.findByValue(iprot.readI32()); + struct.setClient_protocolIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ZONE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.zoneId = iprot.readString(); + struct.setZoneIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // USERNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PASSWORD + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // CONFIGURATION + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map116 = iprot.readMapBegin(); + struct.configuration = new java.util.HashMap(2*_map116.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key117; + @org.apache.thrift.annotation.Nullable java.lang.String _val118; + for (int _i119 = 0; _i119 < _map116.size; ++_i119) + { + _key117 = iprot.readString(); + _val118 = iprot.readString(); + struct.configuration.put(_key117, _val118); + } + iprot.readMapEnd(); + } + struct.setConfigurationIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSOpenSessionReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.client_protocol != null) { + oprot.writeFieldBegin(CLIENT_PROTOCOL_FIELD_DESC); + oprot.writeI32(struct.client_protocol.getValue()); + oprot.writeFieldEnd(); + } + if (struct.zoneId != null) { + oprot.writeFieldBegin(ZONE_ID_FIELD_DESC); + oprot.writeString(struct.zoneId); + oprot.writeFieldEnd(); + } + if (struct.username != null) { + oprot.writeFieldBegin(USERNAME_FIELD_DESC); + oprot.writeString(struct.username); + oprot.writeFieldEnd(); + } + if (struct.password != null) { + if (struct.isSetPassword()) { + oprot.writeFieldBegin(PASSWORD_FIELD_DESC); + oprot.writeString(struct.password); + oprot.writeFieldEnd(); + } + } + if (struct.configuration != null) { + if (struct.isSetConfiguration()) { + oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size())); + for (java.util.Map.Entry _iter120 : struct.configuration.entrySet()) + { + oprot.writeString(_iter120.getKey()); + oprot.writeString(_iter120.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSOpenSessionReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSOpenSessionReqTupleScheme getScheme() { + return new TSOpenSessionReqTupleScheme(); + } + } + + private static class TSOpenSessionReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSOpenSessionReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI32(struct.client_protocol.getValue()); + oprot.writeString(struct.zoneId); + oprot.writeString(struct.username); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetPassword()) { + optionals.set(0); + } + if (struct.isSetConfiguration()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetPassword()) { + oprot.writeString(struct.password); + } + if (struct.isSetConfiguration()) { + { + oprot.writeI32(struct.configuration.size()); + for (java.util.Map.Entry _iter121 : struct.configuration.entrySet()) + { + oprot.writeString(_iter121.getKey()); + oprot.writeString(_iter121.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSOpenSessionReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.client_protocol = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.findByValue(iprot.readI32()); + struct.setClient_protocolIsSet(true); + struct.zoneId = iprot.readString(); + struct.setZoneIdIsSet(true); + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.password = iprot.readString(); + struct.setPasswordIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map122 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.configuration = new java.util.HashMap(2*_map122.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key123; + @org.apache.thrift.annotation.Nullable java.lang.String _val124; + for (int _i125 = 0; _i125 < _map122.size; ++_i125) + { + _key123 = iprot.readString(); + _val124 = iprot.readString(); + struct.configuration.put(_key123, _val124); + } + } + struct.setConfigurationIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionResp.java new file mode 100644 index 0000000000000..3318c7bcb2c6f --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionResp.java @@ -0,0 +1,772 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSOpenSessionResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSOpenSessionResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SERVER_PROTOCOL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("serverProtocolVersion", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSOpenSessionRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSOpenSessionRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required + /** + * + * @see TSProtocolVersion + */ + public @org.apache.thrift.annotation.Nullable TSProtocolVersion serverProtocolVersion; // required + public long sessionId; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map configuration; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATUS((short)1, "status"), + /** + * + * @see TSProtocolVersion + */ + SERVER_PROTOCOL_VERSION((short)2, "serverProtocolVersion"), + SESSION_ID((short)3, "sessionId"), + CONFIGURATION((short)4, "configuration"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // SERVER_PROTOCOL_VERSION + return SERVER_PROTOCOL_VERSION; + case 3: // SESSION_ID + return SESSION_ID; + case 4: // CONFIGURATION + return CONFIGURATION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.SESSION_ID,_Fields.CONFIGURATION}; + 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + tmpMap.put(_Fields.SERVER_PROTOCOL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("serverProtocolVersion", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TSProtocolVersion.class))); + tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSOpenSessionResp.class, metaDataMap); + } + + public TSOpenSessionResp() { + this.serverProtocolVersion = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V1; + + } + + public TSOpenSessionResp( + org.apache.iotdb.common.rpc.thrift.TSStatus status, + TSProtocolVersion serverProtocolVersion) + { + this(); + this.status = status; + this.serverProtocolVersion = serverProtocolVersion; + } + + /** + * Performs a deep copy on other. + */ + public TSOpenSessionResp(TSOpenSessionResp other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetStatus()) { + this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); + } + if (other.isSetServerProtocolVersion()) { + this.serverProtocolVersion = other.serverProtocolVersion; + } + this.sessionId = other.sessionId; + if (other.isSetConfiguration()) { + java.util.Map __this__configuration = new java.util.HashMap(other.configuration); + this.configuration = __this__configuration; + } + } + + @Override + public TSOpenSessionResp deepCopy() { + return new TSOpenSessionResp(this); + } + + @Override + public void clear() { + this.status = null; + this.serverProtocolVersion = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V1; + + setSessionIdIsSet(false); + this.sessionId = 0; + this.configuration = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { + return this.status; + } + + public TSOpenSessionResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { + this.status = status; + return this; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + /** + * + * @see TSProtocolVersion + */ + @org.apache.thrift.annotation.Nullable + public TSProtocolVersion getServerProtocolVersion() { + return this.serverProtocolVersion; + } + + /** + * + * @see TSProtocolVersion + */ + public TSOpenSessionResp setServerProtocolVersion(@org.apache.thrift.annotation.Nullable TSProtocolVersion serverProtocolVersion) { + this.serverProtocolVersion = serverProtocolVersion; + return this; + } + + public void unsetServerProtocolVersion() { + this.serverProtocolVersion = null; + } + + /** Returns true if field serverProtocolVersion is set (has been assigned a value) and false otherwise */ + public boolean isSetServerProtocolVersion() { + return this.serverProtocolVersion != null; + } + + public void setServerProtocolVersionIsSet(boolean value) { + if (!value) { + this.serverProtocolVersion = null; + } + } + + public long getSessionId() { + return this.sessionId; + } + + public TSOpenSessionResp setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getConfigurationSize() { + return (this.configuration == null) ? 0 : this.configuration.size(); + } + + public void putToConfiguration(java.lang.String key, java.lang.String val) { + if (this.configuration == null) { + this.configuration = new java.util.HashMap(); + } + this.configuration.put(key, val); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Map getConfiguration() { + return this.configuration; + } + + public TSOpenSessionResp setConfiguration(@org.apache.thrift.annotation.Nullable java.util.Map configuration) { + this.configuration = configuration; + return this; + } + + public void unsetConfiguration() { + this.configuration = null; + } + + /** Returns true if field configuration is set (has been assigned a value) and false otherwise */ + public boolean isSetConfiguration() { + return this.configuration != null; + } + + public void setConfigurationIsSet(boolean value) { + if (!value) { + this.configuration = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + case SERVER_PROTOCOL_VERSION: + if (value == null) { + unsetServerProtocolVersion(); + } else { + setServerProtocolVersion((TSProtocolVersion)value); + } + break; + + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case CONFIGURATION: + if (value == null) { + unsetConfiguration(); + } else { + setConfiguration((java.util.Map)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case SERVER_PROTOCOL_VERSION: + return getServerProtocolVersion(); + + case SESSION_ID: + return getSessionId(); + + case CONFIGURATION: + return getConfiguration(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case SERVER_PROTOCOL_VERSION: + return isSetServerProtocolVersion(); + case SESSION_ID: + return isSetSessionId(); + case CONFIGURATION: + return isSetConfiguration(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSOpenSessionResp) + return this.equals((TSOpenSessionResp)that); + return false; + } + + public boolean equals(TSOpenSessionResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_serverProtocolVersion = true && this.isSetServerProtocolVersion(); + boolean that_present_serverProtocolVersion = true && that.isSetServerProtocolVersion(); + if (this_present_serverProtocolVersion || that_present_serverProtocolVersion) { + if (!(this_present_serverProtocolVersion && that_present_serverProtocolVersion)) + return false; + if (!this.serverProtocolVersion.equals(that.serverProtocolVersion)) + return false; + } + + boolean this_present_sessionId = true && this.isSetSessionId(); + boolean that_present_sessionId = true && that.isSetSessionId(); + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_configuration = true && this.isSetConfiguration(); + boolean that_present_configuration = true && that.isSetConfiguration(); + if (this_present_configuration || that_present_configuration) { + if (!(this_present_configuration && that_present_configuration)) + return false; + if (!this.configuration.equals(that.configuration)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + ((isSetServerProtocolVersion()) ? 131071 : 524287); + if (isSetServerProtocolVersion()) + hashCode = hashCode * 8191 + serverProtocolVersion.getValue(); + + hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287); + if (isSetSessionId()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetConfiguration()) ? 131071 : 524287); + if (isSetConfiguration()) + hashCode = hashCode * 8191 + configuration.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSOpenSessionResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetServerProtocolVersion(), other.isSetServerProtocolVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerProtocolVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverProtocolVersion, other.serverProtocolVersion); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetConfiguration(), other.isSetConfiguration()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetConfiguration()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSOpenSessionResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (!first) sb.append(", "); + sb.append("serverProtocolVersion:"); + if (this.serverProtocolVersion == null) { + sb.append("null"); + } else { + sb.append(this.serverProtocolVersion); + } + first = false; + if (isSetSessionId()) { + if (!first) sb.append(", "); + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + } + if (isSetConfiguration()) { + if (!first) sb.append(", "); + sb.append("configuration:"); + if (this.configuration == null) { + sb.append("null"); + } else { + sb.append(this.configuration); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); + } + if (serverProtocolVersion == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'serverProtocolVersion' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (status != null) { + status.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSOpenSessionRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSOpenSessionRespStandardScheme getScheme() { + return new TSOpenSessionRespStandardScheme(); + } + } + + private static class TSOpenSessionRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSOpenSessionResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SERVER_PROTOCOL_VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.serverProtocolVersion = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.findByValue(iprot.readI32()); + struct.setServerProtocolVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // CONFIGURATION + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map106 = iprot.readMapBegin(); + struct.configuration = new java.util.HashMap(2*_map106.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key107; + @org.apache.thrift.annotation.Nullable java.lang.String _val108; + for (int _i109 = 0; _i109 < _map106.size; ++_i109) + { + _key107 = iprot.readString(); + _val108 = iprot.readString(); + struct.configuration.put(_key107, _val108); + } + iprot.readMapEnd(); + } + struct.setConfigurationIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSOpenSessionResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.serverProtocolVersion != null) { + oprot.writeFieldBegin(SERVER_PROTOCOL_VERSION_FIELD_DESC); + oprot.writeI32(struct.serverProtocolVersion.getValue()); + oprot.writeFieldEnd(); + } + if (struct.isSetSessionId()) { + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + } + if (struct.configuration != null) { + if (struct.isSetConfiguration()) { + oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size())); + for (java.util.Map.Entry _iter110 : struct.configuration.entrySet()) + { + oprot.writeString(_iter110.getKey()); + oprot.writeString(_iter110.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSOpenSessionRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSOpenSessionRespTupleScheme getScheme() { + return new TSOpenSessionRespTupleScheme(); + } + } + + private static class TSOpenSessionRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSOpenSessionResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status.write(oprot); + oprot.writeI32(struct.serverProtocolVersion.getValue()); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSessionId()) { + optionals.set(0); + } + if (struct.isSetConfiguration()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSessionId()) { + oprot.writeI64(struct.sessionId); + } + if (struct.isSetConfiguration()) { + { + oprot.writeI32(struct.configuration.size()); + for (java.util.Map.Entry _iter111 : struct.configuration.entrySet()) + { + oprot.writeString(_iter111.getKey()); + oprot.writeString(_iter111.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSOpenSessionResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + struct.serverProtocolVersion = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.findByValue(iprot.readI32()); + struct.setServerProtocolVersionIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map112 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.configuration = new java.util.HashMap(2*_map112.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key113; + @org.apache.thrift.annotation.Nullable java.lang.String _val114; + for (int _i115 = 0; _i115 < _map112.size; ++_i115) + { + _key113 = iprot.readString(); + _val114 = iprot.readString(); + struct.configuration.put(_key113, _val114); + } + } + struct.setConfigurationIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java new file mode 100644 index 0000000000000..266a3a661a478 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java @@ -0,0 +1,47 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + + +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public enum TSProtocolVersion implements org.apache.thrift.TEnum { + IOTDB_SERVICE_PROTOCOL_V1(0), + IOTDB_SERVICE_PROTOCOL_V2(1), + IOTDB_SERVICE_PROTOCOL_V3(2); + + private final int value; + + private TSProtocolVersion(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + @Override + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + @org.apache.thrift.annotation.Nullable + public static TSProtocolVersion findByValue(int value) { + switch (value) { + case 0: + return IOTDB_SERVICE_PROTOCOL_V1; + case 1: + return IOTDB_SERVICE_PROTOCOL_V2; + case 2: + return IOTDB_SERVICE_PROTOCOL_V3; + default: + return null; + } + } +} diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSPruneSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSPruneSchemaTemplateReq.java new file mode 100644 index 0000000000000..4bd55feb94cb5 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSPruneSchemaTemplateReq.java @@ -0,0 +1,579 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSPruneSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSPruneSchemaTemplateReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSPruneSchemaTemplateReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSPruneSchemaTemplateReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String name; // required + public @org.apache.thrift.annotation.Nullable java.lang.String path; // 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 { + SESSION_ID((short)1, "sessionId"), + NAME((short)2, "name"), + PATH((short)3, "path"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // NAME + return NAME; + case 3: // PATH + return PATH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSPruneSchemaTemplateReq.class, metaDataMap); + } + + public TSPruneSchemaTemplateReq() { + } + + public TSPruneSchemaTemplateReq( + long sessionId, + java.lang.String name, + java.lang.String path) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.name = name; + this.path = path; + } + + /** + * Performs a deep copy on other. + */ + public TSPruneSchemaTemplateReq(TSPruneSchemaTemplateReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetPath()) { + this.path = other.path; + } + } + + @Override + public TSPruneSchemaTemplateReq deepCopy() { + return new TSPruneSchemaTemplateReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.name = null; + this.path = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSPruneSchemaTemplateReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getName() { + return this.name; + } + + public TSPruneSchemaTemplateReq setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPath() { + return this.path; + } + + public TSPruneSchemaTemplateReq setPath(@org.apache.thrift.annotation.Nullable java.lang.String path) { + this.path = path; + return this; + } + + public void unsetPath() { + this.path = null; + } + + /** Returns true if field path is set (has been assigned a value) and false otherwise */ + public boolean isSetPath() { + return this.path != null; + } + + public void setPathIsSet(boolean value) { + if (!value) { + this.path = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((java.lang.String)value); + } + break; + + case PATH: + if (value == null) { + unsetPath(); + } else { + setPath((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case NAME: + return getName(); + + case PATH: + return getPath(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case NAME: + return isSetName(); + case PATH: + return isSetPath(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSPruneSchemaTemplateReq) + return this.equals((TSPruneSchemaTemplateReq)that); + return false; + } + + public boolean equals(TSPruneSchemaTemplateReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_path = true && this.isSetPath(); + boolean that_present_path = true && that.isSetPath(); + if (this_present_path || that_present_path) { + if (!(this_present_path && that_present_path)) + return false; + if (!this.path.equals(that.path)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); + if (isSetName()) + hashCode = hashCode * 8191 + name.hashCode(); + + hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287); + if (isSetPath()) + hashCode = hashCode * 8191 + path.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSPruneSchemaTemplateReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPath(), other.isSetPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSPruneSchemaTemplateReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("path:"); + if (this.path == null) { + sb.append("null"); + } else { + sb.append(this.path); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } + if (path == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'path' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSPruneSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSPruneSchemaTemplateReqStandardScheme getScheme() { + return new TSPruneSchemaTemplateReqStandardScheme(); + } + } + + private static class TSPruneSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSPruneSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSPruneSchemaTemplateReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.path != null) { + oprot.writeFieldBegin(PATH_FIELD_DESC); + oprot.writeString(struct.path); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSPruneSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSPruneSchemaTemplateReqTupleScheme getScheme() { + return new TSPruneSchemaTemplateReqTupleScheme(); + } + } + + private static class TSPruneSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSPruneSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.name); + oprot.writeString(struct.path); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSPruneSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.name = iprot.readString(); + struct.setNameIsSet(true); + struct.path = iprot.readString(); + struct.setPathIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java new file mode 100644 index 0000000000000..d9df17def3e8d --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java @@ -0,0 +1,696 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSQueryDataSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryDataSet"); + + private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField VALUE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valueList", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField BITMAP_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("bitmapList", org.apache.thrift.protocol.TType.LIST, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryDataSetStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryDataSetTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer time; // required + public @org.apache.thrift.annotation.Nullable java.util.List valueList; // required + public @org.apache.thrift.annotation.Nullable java.util.List bitmapList; // 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 { + TIME((short)1, "time"), + VALUE_LIST((short)2, "valueList"), + BITMAP_LIST((short)3, "bitmapList"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TIME + return TIME; + case 2: // VALUE_LIST + return VALUE_LIST; + case 3: // BITMAP_LIST + return BITMAP_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.VALUE_LIST, new org.apache.thrift.meta_data.FieldMetaData("valueList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.BITMAP_LIST, new org.apache.thrift.meta_data.FieldMetaData("bitmapList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryDataSet.class, metaDataMap); + } + + public TSQueryDataSet() { + } + + public TSQueryDataSet( + java.nio.ByteBuffer time, + java.util.List valueList, + java.util.List bitmapList) + { + this(); + this.time = org.apache.thrift.TBaseHelper.copyBinary(time); + this.valueList = valueList; + this.bitmapList = bitmapList; + } + + /** + * Performs a deep copy on other. + */ + public TSQueryDataSet(TSQueryDataSet other) { + if (other.isSetTime()) { + this.time = org.apache.thrift.TBaseHelper.copyBinary(other.time); + } + if (other.isSetValueList()) { + java.util.List __this__valueList = new java.util.ArrayList(other.valueList); + this.valueList = __this__valueList; + } + if (other.isSetBitmapList()) { + java.util.List __this__bitmapList = new java.util.ArrayList(other.bitmapList); + this.bitmapList = __this__bitmapList; + } + } + + @Override + public TSQueryDataSet deepCopy() { + return new TSQueryDataSet(this); + } + + @Override + public void clear() { + this.time = null; + this.valueList = null; + this.bitmapList = null; + } + + public byte[] getTime() { + setTime(org.apache.thrift.TBaseHelper.rightSize(time)); + return time == null ? null : time.array(); + } + + public java.nio.ByteBuffer bufferForTime() { + return org.apache.thrift.TBaseHelper.copyBinary(time); + } + + public TSQueryDataSet setTime(byte[] time) { + this.time = time == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(time.clone()); + return this; + } + + public TSQueryDataSet setTime(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer time) { + this.time = org.apache.thrift.TBaseHelper.copyBinary(time); + return this; + } + + public void unsetTime() { + this.time = null; + } + + /** Returns true if field time is set (has been assigned a value) and false otherwise */ + public boolean isSetTime() { + return this.time != null; + } + + public void setTimeIsSet(boolean value) { + if (!value) { + this.time = null; + } + } + + public int getValueListSize() { + return (this.valueList == null) ? 0 : this.valueList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getValueListIterator() { + return (this.valueList == null) ? null : this.valueList.iterator(); + } + + public void addToValueList(java.nio.ByteBuffer elem) { + if (this.valueList == null) { + this.valueList = new java.util.ArrayList(); + } + this.valueList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getValueList() { + return this.valueList; + } + + public TSQueryDataSet setValueList(@org.apache.thrift.annotation.Nullable java.util.List valueList) { + this.valueList = valueList; + return this; + } + + public void unsetValueList() { + this.valueList = null; + } + + /** Returns true if field valueList is set (has been assigned a value) and false otherwise */ + public boolean isSetValueList() { + return this.valueList != null; + } + + public void setValueListIsSet(boolean value) { + if (!value) { + this.valueList = null; + } + } + + public int getBitmapListSize() { + return (this.bitmapList == null) ? 0 : this.bitmapList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getBitmapListIterator() { + return (this.bitmapList == null) ? null : this.bitmapList.iterator(); + } + + public void addToBitmapList(java.nio.ByteBuffer elem) { + if (this.bitmapList == null) { + this.bitmapList = new java.util.ArrayList(); + } + this.bitmapList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getBitmapList() { + return this.bitmapList; + } + + public TSQueryDataSet setBitmapList(@org.apache.thrift.annotation.Nullable java.util.List bitmapList) { + this.bitmapList = bitmapList; + return this; + } + + public void unsetBitmapList() { + this.bitmapList = null; + } + + /** Returns true if field bitmapList is set (has been assigned a value) and false otherwise */ + public boolean isSetBitmapList() { + return this.bitmapList != null; + } + + public void setBitmapListIsSet(boolean value) { + if (!value) { + this.bitmapList = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case TIME: + if (value == null) { + unsetTime(); + } else { + if (value instanceof byte[]) { + setTime((byte[])value); + } else { + setTime((java.nio.ByteBuffer)value); + } + } + break; + + case VALUE_LIST: + if (value == null) { + unsetValueList(); + } else { + setValueList((java.util.List)value); + } + break; + + case BITMAP_LIST: + if (value == null) { + unsetBitmapList(); + } else { + setBitmapList((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case TIME: + return getTime(); + + case VALUE_LIST: + return getValueList(); + + case BITMAP_LIST: + return getBitmapList(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case TIME: + return isSetTime(); + case VALUE_LIST: + return isSetValueList(); + case BITMAP_LIST: + return isSetBitmapList(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSQueryDataSet) + return this.equals((TSQueryDataSet)that); + return false; + } + + public boolean equals(TSQueryDataSet that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_time = true && this.isSetTime(); + boolean that_present_time = true && that.isSetTime(); + if (this_present_time || that_present_time) { + if (!(this_present_time && that_present_time)) + return false; + if (!this.time.equals(that.time)) + return false; + } + + boolean this_present_valueList = true && this.isSetValueList(); + boolean that_present_valueList = true && that.isSetValueList(); + if (this_present_valueList || that_present_valueList) { + if (!(this_present_valueList && that_present_valueList)) + return false; + if (!this.valueList.equals(that.valueList)) + return false; + } + + boolean this_present_bitmapList = true && this.isSetBitmapList(); + boolean that_present_bitmapList = true && that.isSetBitmapList(); + if (this_present_bitmapList || that_present_bitmapList) { + if (!(this_present_bitmapList && that_present_bitmapList)) + return false; + if (!this.bitmapList.equals(that.bitmapList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetTime()) ? 131071 : 524287); + if (isSetTime()) + hashCode = hashCode * 8191 + time.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValueList()) ? 131071 : 524287); + if (isSetValueList()) + hashCode = hashCode * 8191 + valueList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetBitmapList()) ? 131071 : 524287); + if (isSetBitmapList()) + hashCode = hashCode * 8191 + bitmapList.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSQueryDataSet other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetTime(), other.isSetTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time, other.time); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValueList(), other.isSetValueList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValueList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueList, other.valueList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetBitmapList(), other.isSetBitmapList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBitmapList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitmapList, other.bitmapList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryDataSet("); + boolean first = true; + + sb.append("time:"); + if (this.time == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.time, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("valueList:"); + if (this.valueList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.valueList, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("bitmapList:"); + if (this.bitmapList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.bitmapList, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (time == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'time' was not present! Struct: " + toString()); + } + if (valueList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueList' was not present! Struct: " + toString()); + } + if (bitmapList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'bitmapList' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class TSQueryDataSetStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryDataSetStandardScheme getScheme() { + return new TSQueryDataSetStandardScheme(); + } + } + + private static class TSQueryDataSetStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TIME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.time = iprot.readBinary(); + struct.setTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // VALUE_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.valueList = new java.util.ArrayList(_list0.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem1; + for (int _i2 = 0; _i2 < _list0.size; ++_i2) + { + _elem1 = iprot.readBinary(); + struct.valueList.add(_elem1); + } + iprot.readListEnd(); + } + struct.setValueListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // BITMAP_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); + struct.bitmapList = new java.util.ArrayList(_list3.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem4; + for (int _i5 = 0; _i5 < _list3.size; ++_i5) + { + _elem4 = iprot.readBinary(); + struct.bitmapList.add(_elem4); + } + iprot.readListEnd(); + } + struct.setBitmapListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryDataSet struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.time != null) { + oprot.writeFieldBegin(TIME_FIELD_DESC); + oprot.writeBinary(struct.time); + oprot.writeFieldEnd(); + } + if (struct.valueList != null) { + oprot.writeFieldBegin(VALUE_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valueList.size())); + for (java.nio.ByteBuffer _iter6 : struct.valueList) + { + oprot.writeBinary(_iter6); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.bitmapList != null) { + oprot.writeFieldBegin(BITMAP_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.bitmapList.size())); + for (java.nio.ByteBuffer _iter7 : struct.bitmapList) + { + oprot.writeBinary(_iter7); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSQueryDataSetTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryDataSetTupleScheme getScheme() { + return new TSQueryDataSetTupleScheme(); + } + } + + private static class TSQueryDataSetTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeBinary(struct.time); + { + oprot.writeI32(struct.valueList.size()); + for (java.nio.ByteBuffer _iter8 : struct.valueList) + { + oprot.writeBinary(_iter8); + } + } + { + oprot.writeI32(struct.bitmapList.size()); + for (java.nio.ByteBuffer _iter9 : struct.bitmapList) + { + oprot.writeBinary(_iter9); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.time = iprot.readBinary(); + struct.setTimeIsSet(true); + { + org.apache.thrift.protocol.TList _list10 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.valueList = new java.util.ArrayList(_list10.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem11; + for (int _i12 = 0; _i12 < _list10.size; ++_i12) + { + _elem11 = iprot.readBinary(); + struct.valueList.add(_elem11); + } + } + struct.setValueListIsSet(true); + { + org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.bitmapList = new java.util.ArrayList(_list13.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem14; + for (int _i15 = 0; _i15 < _list13.size; ++_i15) + { + _elem14 = iprot.readBinary(); + struct.bitmapList.add(_elem14); + } + } + struct.setBitmapListIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java new file mode 100644 index 0000000000000..23f0149373b02 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java @@ -0,0 +1,582 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSQueryNonAlignDataSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryNonAlignDataSet"); + + private static final org.apache.thrift.protocol.TField TIME_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("timeList", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField VALUE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valueList", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryNonAlignDataSetStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryNonAlignDataSetTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.util.List timeList; // required + public @org.apache.thrift.annotation.Nullable java.util.List valueList; // 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 { + TIME_LIST((short)1, "timeList"), + VALUE_LIST((short)2, "valueList"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TIME_LIST + return TIME_LIST; + case 2: // VALUE_LIST + return VALUE_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.TIME_LIST, new org.apache.thrift.meta_data.FieldMetaData("timeList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.VALUE_LIST, new org.apache.thrift.meta_data.FieldMetaData("valueList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryNonAlignDataSet.class, metaDataMap); + } + + public TSQueryNonAlignDataSet() { + } + + public TSQueryNonAlignDataSet( + java.util.List timeList, + java.util.List valueList) + { + this(); + this.timeList = timeList; + this.valueList = valueList; + } + + /** + * Performs a deep copy on other. + */ + public TSQueryNonAlignDataSet(TSQueryNonAlignDataSet other) { + if (other.isSetTimeList()) { + java.util.List __this__timeList = new java.util.ArrayList(other.timeList); + this.timeList = __this__timeList; + } + if (other.isSetValueList()) { + java.util.List __this__valueList = new java.util.ArrayList(other.valueList); + this.valueList = __this__valueList; + } + } + + @Override + public TSQueryNonAlignDataSet deepCopy() { + return new TSQueryNonAlignDataSet(this); + } + + @Override + public void clear() { + this.timeList = null; + this.valueList = null; + } + + public int getTimeListSize() { + return (this.timeList == null) ? 0 : this.timeList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTimeListIterator() { + return (this.timeList == null) ? null : this.timeList.iterator(); + } + + public void addToTimeList(java.nio.ByteBuffer elem) { + if (this.timeList == null) { + this.timeList = new java.util.ArrayList(); + } + this.timeList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getTimeList() { + return this.timeList; + } + + public TSQueryNonAlignDataSet setTimeList(@org.apache.thrift.annotation.Nullable java.util.List timeList) { + this.timeList = timeList; + return this; + } + + public void unsetTimeList() { + this.timeList = null; + } + + /** Returns true if field timeList is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeList() { + return this.timeList != null; + } + + public void setTimeListIsSet(boolean value) { + if (!value) { + this.timeList = null; + } + } + + public int getValueListSize() { + return (this.valueList == null) ? 0 : this.valueList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getValueListIterator() { + return (this.valueList == null) ? null : this.valueList.iterator(); + } + + public void addToValueList(java.nio.ByteBuffer elem) { + if (this.valueList == null) { + this.valueList = new java.util.ArrayList(); + } + this.valueList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getValueList() { + return this.valueList; + } + + public TSQueryNonAlignDataSet setValueList(@org.apache.thrift.annotation.Nullable java.util.List valueList) { + this.valueList = valueList; + return this; + } + + public void unsetValueList() { + this.valueList = null; + } + + /** Returns true if field valueList is set (has been assigned a value) and false otherwise */ + public boolean isSetValueList() { + return this.valueList != null; + } + + public void setValueListIsSet(boolean value) { + if (!value) { + this.valueList = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case TIME_LIST: + if (value == null) { + unsetTimeList(); + } else { + setTimeList((java.util.List)value); + } + break; + + case VALUE_LIST: + if (value == null) { + unsetValueList(); + } else { + setValueList((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case TIME_LIST: + return getTimeList(); + + case VALUE_LIST: + return getValueList(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case TIME_LIST: + return isSetTimeList(); + case VALUE_LIST: + return isSetValueList(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSQueryNonAlignDataSet) + return this.equals((TSQueryNonAlignDataSet)that); + return false; + } + + public boolean equals(TSQueryNonAlignDataSet that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_timeList = true && this.isSetTimeList(); + boolean that_present_timeList = true && that.isSetTimeList(); + if (this_present_timeList || that_present_timeList) { + if (!(this_present_timeList && that_present_timeList)) + return false; + if (!this.timeList.equals(that.timeList)) + return false; + } + + boolean this_present_valueList = true && this.isSetValueList(); + boolean that_present_valueList = true && that.isSetValueList(); + if (this_present_valueList || that_present_valueList) { + if (!(this_present_valueList && that_present_valueList)) + return false; + if (!this.valueList.equals(that.valueList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetTimeList()) ? 131071 : 524287); + if (isSetTimeList()) + hashCode = hashCode * 8191 + timeList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValueList()) ? 131071 : 524287); + if (isSetValueList()) + hashCode = hashCode * 8191 + valueList.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSQueryNonAlignDataSet other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetTimeList(), other.isSetTimeList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeList, other.timeList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValueList(), other.isSetValueList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValueList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueList, other.valueList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryNonAlignDataSet("); + boolean first = true; + + sb.append("timeList:"); + if (this.timeList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.timeList, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("valueList:"); + if (this.valueList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.valueList, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (timeList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeList' was not present! Struct: " + toString()); + } + if (valueList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueList' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class TSQueryNonAlignDataSetStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryNonAlignDataSetStandardScheme getScheme() { + return new TSQueryNonAlignDataSetStandardScheme(); + } + } + + private static class TSQueryNonAlignDataSetStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TIME_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); + struct.timeList = new java.util.ArrayList(_list16.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem17; + for (int _i18 = 0; _i18 < _list16.size; ++_i18) + { + _elem17 = iprot.readBinary(); + struct.timeList.add(_elem17); + } + iprot.readListEnd(); + } + struct.setTimeListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // VALUE_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list19 = iprot.readListBegin(); + struct.valueList = new java.util.ArrayList(_list19.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem20; + for (int _i21 = 0; _i21 < _list19.size; ++_i21) + { + _elem20 = iprot.readBinary(); + struct.valueList.add(_elem20); + } + iprot.readListEnd(); + } + struct.setValueListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.timeList != null) { + oprot.writeFieldBegin(TIME_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.timeList.size())); + for (java.nio.ByteBuffer _iter22 : struct.timeList) + { + oprot.writeBinary(_iter22); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.valueList != null) { + oprot.writeFieldBegin(VALUE_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valueList.size())); + for (java.nio.ByteBuffer _iter23 : struct.valueList) + { + oprot.writeBinary(_iter23); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSQueryNonAlignDataSetTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryNonAlignDataSetTupleScheme getScheme() { + return new TSQueryNonAlignDataSetTupleScheme(); + } + } + + private static class TSQueryNonAlignDataSetTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + oprot.writeI32(struct.timeList.size()); + for (java.nio.ByteBuffer _iter24 : struct.timeList) + { + oprot.writeBinary(_iter24); + } + } + { + oprot.writeI32(struct.valueList.size()); + for (java.nio.ByteBuffer _iter25 : struct.valueList) + { + oprot.writeBinary(_iter25); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list26 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.timeList = new java.util.ArrayList(_list26.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem27; + for (int _i28 = 0; _i28 < _list26.size; ++_i28) + { + _elem27 = iprot.readBinary(); + struct.timeList.add(_elem27); + } + } + struct.setTimeListIsSet(true); + { + org.apache.thrift.protocol.TList _list29 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.valueList = new java.util.ArrayList(_list29.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem30; + for (int _i31 = 0; _i31 < _list29.size; ++_i31) + { + _elem30 = iprot.readBinary(); + struct.valueList.add(_elem30); + } + } + struct.setValueListIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateReq.java new file mode 100644 index 0000000000000..8ebdfc0ccdde9 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateReq.java @@ -0,0 +1,682 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSQueryTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryTemplateReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField QUERY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryType", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField MEASUREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("measurement", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryTemplateReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryTemplateReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String name; // required + public int queryType; // required + public @org.apache.thrift.annotation.Nullable java.lang.String measurement; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + NAME((short)2, "name"), + QUERY_TYPE((short)3, "queryType"), + MEASUREMENT((short)4, "measurement"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // NAME + return NAME; + case 3: // QUERY_TYPE + return QUERY_TYPE; + case 4: // MEASUREMENT + return MEASUREMENT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __QUERYTYPE_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.MEASUREMENT}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.QUERY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("queryType", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.MEASUREMENT, new org.apache.thrift.meta_data.FieldMetaData("measurement", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryTemplateReq.class, metaDataMap); + } + + public TSQueryTemplateReq() { + } + + public TSQueryTemplateReq( + long sessionId, + java.lang.String name, + int queryType) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.name = name; + this.queryType = queryType; + setQueryTypeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSQueryTemplateReq(TSQueryTemplateReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetName()) { + this.name = other.name; + } + this.queryType = other.queryType; + if (other.isSetMeasurement()) { + this.measurement = other.measurement; + } + } + + @Override + public TSQueryTemplateReq deepCopy() { + return new TSQueryTemplateReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.name = null; + setQueryTypeIsSet(false); + this.queryType = 0; + this.measurement = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSQueryTemplateReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getName() { + return this.name; + } + + public TSQueryTemplateReq setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public int getQueryType() { + return this.queryType; + } + + public TSQueryTemplateReq setQueryType(int queryType) { + this.queryType = queryType; + setQueryTypeIsSet(true); + return this; + } + + public void unsetQueryType() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYTYPE_ISSET_ID); + } + + /** Returns true if field queryType is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryType() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYTYPE_ISSET_ID); + } + + public void setQueryTypeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYTYPE_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getMeasurement() { + return this.measurement; + } + + public TSQueryTemplateReq setMeasurement(@org.apache.thrift.annotation.Nullable java.lang.String measurement) { + this.measurement = measurement; + return this; + } + + public void unsetMeasurement() { + this.measurement = null; + } + + /** Returns true if field measurement is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurement() { + return this.measurement != null; + } + + public void setMeasurementIsSet(boolean value) { + if (!value) { + this.measurement = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((java.lang.String)value); + } + break; + + case QUERY_TYPE: + if (value == null) { + unsetQueryType(); + } else { + setQueryType((java.lang.Integer)value); + } + break; + + case MEASUREMENT: + if (value == null) { + unsetMeasurement(); + } else { + setMeasurement((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case NAME: + return getName(); + + case QUERY_TYPE: + return getQueryType(); + + case MEASUREMENT: + return getMeasurement(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case NAME: + return isSetName(); + case QUERY_TYPE: + return isSetQueryType(); + case MEASUREMENT: + return isSetMeasurement(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSQueryTemplateReq) + return this.equals((TSQueryTemplateReq)that); + return false; + } + + public boolean equals(TSQueryTemplateReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_queryType = true; + boolean that_present_queryType = true; + if (this_present_queryType || that_present_queryType) { + if (!(this_present_queryType && that_present_queryType)) + return false; + if (this.queryType != that.queryType) + return false; + } + + boolean this_present_measurement = true && this.isSetMeasurement(); + boolean that_present_measurement = true && that.isSetMeasurement(); + if (this_present_measurement || that_present_measurement) { + if (!(this_present_measurement && that_present_measurement)) + return false; + if (!this.measurement.equals(that.measurement)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); + if (isSetName()) + hashCode = hashCode * 8191 + name.hashCode(); + + hashCode = hashCode * 8191 + queryType; + + hashCode = hashCode * 8191 + ((isSetMeasurement()) ? 131071 : 524287); + if (isSetMeasurement()) + hashCode = hashCode * 8191 + measurement.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSQueryTemplateReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryType(), other.isSetQueryType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryType, other.queryType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurement(), other.isSetMeasurement()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurement()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurement, other.measurement); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryTemplateReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("queryType:"); + sb.append(this.queryType); + first = false; + if (isSetMeasurement()) { + if (!first) sb.append(", "); + sb.append("measurement:"); + if (this.measurement == null) { + sb.append("null"); + } else { + sb.append(this.measurement); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } + // alas, we cannot check 'queryType' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSQueryTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryTemplateReqStandardScheme getScheme() { + return new TSQueryTemplateReqStandardScheme(); + } + } + + private static class TSQueryTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // QUERY_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.queryType = iprot.readI32(); + struct.setQueryTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MEASUREMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.measurement = iprot.readString(); + struct.setMeasurementIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetQueryType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryType' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryTemplateReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); + oprot.writeI32(struct.queryType); + oprot.writeFieldEnd(); + if (struct.measurement != null) { + if (struct.isSetMeasurement()) { + oprot.writeFieldBegin(MEASUREMENT_FIELD_DESC); + oprot.writeString(struct.measurement); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSQueryTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryTemplateReqTupleScheme getScheme() { + return new TSQueryTemplateReqTupleScheme(); + } + } + + private static class TSQueryTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.name); + oprot.writeI32(struct.queryType); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetMeasurement()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMeasurement()) { + oprot.writeString(struct.measurement); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.name = iprot.readString(); + struct.setNameIsSet(true); + struct.queryType = iprot.readI32(); + struct.setQueryTypeIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.measurement = iprot.readString(); + struct.setMeasurementIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateResp.java new file mode 100644 index 0000000000000..9eae67b19404d --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateResp.java @@ -0,0 +1,842 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSQueryTemplateResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryTemplateResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField QUERY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryType", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)5); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryTemplateRespStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryTemplateRespTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required + public int queryType; // required + public boolean result; // optional + public int count; // optional + public @org.apache.thrift.annotation.Nullable java.util.List measurements; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATUS((short)1, "status"), + QUERY_TYPE((short)2, "queryType"), + RESULT((short)3, "result"), + COUNT((short)4, "count"), + MEASUREMENTS((short)5, "measurements"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // QUERY_TYPE + return QUERY_TYPE; + case 3: // RESULT + return RESULT; + case 4: // COUNT + return COUNT; + case 5: // MEASUREMENTS + return MEASUREMENTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __QUERYTYPE_ISSET_ID = 0; + private static final int __RESULT_ISSET_ID = 1; + private static final int __COUNT_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.RESULT,_Fields.COUNT,_Fields.MEASUREMENTS}; + 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); + tmpMap.put(_Fields.QUERY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("queryType", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryTemplateResp.class, metaDataMap); + } + + public TSQueryTemplateResp() { + } + + public TSQueryTemplateResp( + org.apache.iotdb.common.rpc.thrift.TSStatus status, + int queryType) + { + this(); + this.status = status; + this.queryType = queryType; + setQueryTypeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSQueryTemplateResp(TSQueryTemplateResp other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetStatus()) { + this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); + } + this.queryType = other.queryType; + this.result = other.result; + this.count = other.count; + if (other.isSetMeasurements()) { + java.util.List __this__measurements = new java.util.ArrayList(other.measurements); + this.measurements = __this__measurements; + } + } + + @Override + public TSQueryTemplateResp deepCopy() { + return new TSQueryTemplateResp(this); + } + + @Override + public void clear() { + this.status = null; + setQueryTypeIsSet(false); + this.queryType = 0; + setResultIsSet(false); + this.result = false; + setCountIsSet(false); + this.count = 0; + this.measurements = null; + } + + @org.apache.thrift.annotation.Nullable + public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { + return this.status; + } + + public TSQueryTemplateResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { + this.status = status; + return this; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + public int getQueryType() { + return this.queryType; + } + + public TSQueryTemplateResp setQueryType(int queryType) { + this.queryType = queryType; + setQueryTypeIsSet(true); + return this; + } + + public void unsetQueryType() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYTYPE_ISSET_ID); + } + + /** Returns true if field queryType is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryType() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYTYPE_ISSET_ID); + } + + public void setQueryTypeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYTYPE_ISSET_ID, value); + } + + public boolean isResult() { + return this.result; + } + + public TSQueryTemplateResp setResult(boolean result) { + this.result = result; + setResultIsSet(true); + return this; + } + + public void unsetResult() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RESULT_ISSET_ID); + } + + /** Returns true if field result is set (has been assigned a value) and false otherwise */ + public boolean isSetResult() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RESULT_ISSET_ID); + } + + public void setResultIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESULT_ISSET_ID, value); + } + + public int getCount() { + return this.count; + } + + public TSQueryTemplateResp setCount(int count) { + this.count = count; + setCountIsSet(true); + return this; + } + + public void unsetCount() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID); + } + + /** Returns true if field count is set (has been assigned a value) and false otherwise */ + public boolean isSetCount() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID); + } + + public void setCountIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value); + } + + public int getMeasurementsSize() { + return (this.measurements == null) ? 0 : this.measurements.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getMeasurementsIterator() { + return (this.measurements == null) ? null : this.measurements.iterator(); + } + + public void addToMeasurements(java.lang.String elem) { + if (this.measurements == null) { + this.measurements = new java.util.ArrayList(); + } + this.measurements.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getMeasurements() { + return this.measurements; + } + + public TSQueryTemplateResp setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { + this.measurements = measurements; + return this; + } + + public void unsetMeasurements() { + this.measurements = null; + } + + /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ + public boolean isSetMeasurements() { + return this.measurements != null; + } + + public void setMeasurementsIsSet(boolean value) { + if (!value) { + this.measurements = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); + } + break; + + case QUERY_TYPE: + if (value == null) { + unsetQueryType(); + } else { + setQueryType((java.lang.Integer)value); + } + break; + + case RESULT: + if (value == null) { + unsetResult(); + } else { + setResult((java.lang.Boolean)value); + } + break; + + case COUNT: + if (value == null) { + unsetCount(); + } else { + setCount((java.lang.Integer)value); + } + break; + + case MEASUREMENTS: + if (value == null) { + unsetMeasurements(); + } else { + setMeasurements((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case QUERY_TYPE: + return getQueryType(); + + case RESULT: + return isResult(); + + case COUNT: + return getCount(); + + case MEASUREMENTS: + return getMeasurements(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case QUERY_TYPE: + return isSetQueryType(); + case RESULT: + return isSetResult(); + case COUNT: + return isSetCount(); + case MEASUREMENTS: + return isSetMeasurements(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSQueryTemplateResp) + return this.equals((TSQueryTemplateResp)that); + return false; + } + + public boolean equals(TSQueryTemplateResp that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_queryType = true; + boolean that_present_queryType = true; + if (this_present_queryType || that_present_queryType) { + if (!(this_present_queryType && that_present_queryType)) + return false; + if (this.queryType != that.queryType) + return false; + } + + boolean this_present_result = true && this.isSetResult(); + boolean that_present_result = true && that.isSetResult(); + if (this_present_result || that_present_result) { + if (!(this_present_result && that_present_result)) + return false; + if (this.result != that.result) + return false; + } + + boolean this_present_count = true && this.isSetCount(); + boolean that_present_count = true && that.isSetCount(); + if (this_present_count || that_present_count) { + if (!(this_present_count && that_present_count)) + return false; + if (this.count != that.count) + return false; + } + + boolean this_present_measurements = true && this.isSetMeasurements(); + boolean that_present_measurements = true && that.isSetMeasurements(); + if (this_present_measurements || that_present_measurements) { + if (!(this_present_measurements && that_present_measurements)) + return false; + if (!this.measurements.equals(that.measurements)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + queryType; + + hashCode = hashCode * 8191 + ((isSetResult()) ? 131071 : 524287); + if (isSetResult()) + hashCode = hashCode * 8191 + ((result) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetCount()) ? 131071 : 524287); + if (isSetCount()) + hashCode = hashCode * 8191 + count; + + hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); + if (isSetMeasurements()) + hashCode = hashCode * 8191 + measurements.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSQueryTemplateResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetQueryType(), other.isSetQueryType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryType, other.queryType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetResult(), other.isSetResult()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResult()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, other.result); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetCount(), other.isSetCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, other.count); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMeasurements()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryTemplateResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (!first) sb.append(", "); + sb.append("queryType:"); + sb.append(this.queryType); + first = false; + if (isSetResult()) { + if (!first) sb.append(", "); + sb.append("result:"); + sb.append(this.result); + first = false; + } + if (isSetCount()) { + if (!first) sb.append(", "); + sb.append("count:"); + sb.append(this.count); + first = false; + } + if (isSetMeasurements()) { + if (!first) sb.append(", "); + sb.append("measurements:"); + if (this.measurements == null) { + sb.append("null"); + } else { + sb.append(this.measurements); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); + } + // alas, we cannot check 'queryType' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + if (status != null) { + status.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSQueryTemplateRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryTemplateRespStandardScheme getScheme() { + return new TSQueryTemplateRespStandardScheme(); + } + } + + private static class TSQueryTemplateRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryTemplateResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // QUERY_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.queryType = iprot.readI32(); + struct.setQueryTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // RESULT + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.result = iprot.readBool(); + struct.setResultIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.count = iprot.readI32(); + struct.setCountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // MEASUREMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list726 = iprot.readListBegin(); + struct.measurements = new java.util.ArrayList(_list726.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem727; + for (int _i728 = 0; _i728 < _list726.size; ++_i728) + { + _elem727 = iprot.readString(); + struct.measurements.add(_elem727); + } + iprot.readListEnd(); + } + struct.setMeasurementsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetQueryType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryType' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryTemplateResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); + oprot.writeI32(struct.queryType); + oprot.writeFieldEnd(); + if (struct.isSetResult()) { + oprot.writeFieldBegin(RESULT_FIELD_DESC); + oprot.writeBool(struct.result); + oprot.writeFieldEnd(); + } + if (struct.isSetCount()) { + oprot.writeFieldBegin(COUNT_FIELD_DESC); + oprot.writeI32(struct.count); + oprot.writeFieldEnd(); + } + if (struct.measurements != null) { + if (struct.isSetMeasurements()) { + oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); + for (java.lang.String _iter729 : struct.measurements) + { + oprot.writeString(_iter729); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSQueryTemplateRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryTemplateRespTupleScheme getScheme() { + return new TSQueryTemplateRespTupleScheme(); + } + } + + private static class TSQueryTemplateRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryTemplateResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status.write(oprot); + oprot.writeI32(struct.queryType); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetResult()) { + optionals.set(0); + } + if (struct.isSetCount()) { + optionals.set(1); + } + if (struct.isSetMeasurements()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetResult()) { + oprot.writeBool(struct.result); + } + if (struct.isSetCount()) { + oprot.writeI32(struct.count); + } + if (struct.isSetMeasurements()) { + { + oprot.writeI32(struct.measurements.size()); + for (java.lang.String _iter730 : struct.measurements) + { + oprot.writeString(_iter730); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryTemplateResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + struct.queryType = iprot.readI32(); + struct.setQueryTypeIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.result = iprot.readBool(); + struct.setResultIsSet(true); + } + if (incoming.get(1)) { + struct.count = iprot.readI32(); + struct.setCountIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list731 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.measurements = new java.util.ArrayList(_list731.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem732; + for (int _i733 = 0; _i733 < _list731.size; ++_i733) + { + _elem732 = iprot.readString(); + struct.measurements.add(_elem732); + } + } + struct.setMeasurementsIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSRawDataQueryReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSRawDataQueryReq.java new file mode 100644 index 0000000000000..8c6be66ca7ccc --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSRawDataQueryReq.java @@ -0,0 +1,1306 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSRawDataQueryReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSRawDataQueryReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField ENABLE_REDIRECT_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("enableRedirectQuery", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField JDBC_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("jdbcQuery", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField LEGAL_PATH_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("legalPathNodes", org.apache.thrift.protocol.TType.BOOL, (short)10); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSRawDataQueryReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSRawDataQueryReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List paths; // required + public int fetchSize; // optional + public long startTime; // required + public long endTime; // required + public long statementId; // required + public boolean enableRedirectQuery; // optional + public boolean jdbcQuery; // optional + public long timeout; // optional + public boolean legalPathNodes; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SESSION_ID((short)1, "sessionId"), + PATHS((short)2, "paths"), + FETCH_SIZE((short)3, "fetchSize"), + START_TIME((short)4, "startTime"), + END_TIME((short)5, "endTime"), + STATEMENT_ID((short)6, "statementId"), + ENABLE_REDIRECT_QUERY((short)7, "enableRedirectQuery"), + JDBC_QUERY((short)8, "jdbcQuery"), + TIMEOUT((short)9, "timeout"), + LEGAL_PATH_NODES((short)10, "legalPathNodes"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PATHS + return PATHS; + case 3: // FETCH_SIZE + return FETCH_SIZE; + case 4: // START_TIME + return START_TIME; + case 5: // END_TIME + return END_TIME; + case 6: // STATEMENT_ID + return STATEMENT_ID; + case 7: // ENABLE_REDIRECT_QUERY + return ENABLE_REDIRECT_QUERY; + case 8: // JDBC_QUERY + return JDBC_QUERY; + case 9: // TIMEOUT + return TIMEOUT; + case 10: // LEGAL_PATH_NODES + return LEGAL_PATH_NODES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + private static final int __FETCHSIZE_ISSET_ID = 1; + private static final int __STARTTIME_ISSET_ID = 2; + private static final int __ENDTIME_ISSET_ID = 3; + private static final int __STATEMENTID_ISSET_ID = 4; + private static final int __ENABLEREDIRECTQUERY_ISSET_ID = 5; + private static final int __JDBCQUERY_ISSET_ID = 6; + private static final int __TIMEOUT_ISSET_ID = 7; + private static final int __LEGALPATHNODES_ISSET_ID = 8; + private short __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.FETCH_SIZE,_Fields.ENABLE_REDIRECT_QUERY,_Fields.JDBC_QUERY,_Fields.TIMEOUT,_Fields.LEGAL_PATH_NODES}; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ENABLE_REDIRECT_QUERY, new org.apache.thrift.meta_data.FieldMetaData("enableRedirectQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.JDBC_QUERY, new org.apache.thrift.meta_data.FieldMetaData("jdbcQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LEGAL_PATH_NODES, new org.apache.thrift.meta_data.FieldMetaData("legalPathNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSRawDataQueryReq.class, metaDataMap); + } + + public TSRawDataQueryReq() { + } + + public TSRawDataQueryReq( + long sessionId, + java.util.List paths, + long startTime, + long endTime, + long statementId) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.paths = paths; + this.startTime = startTime; + setStartTimeIsSet(true); + this.endTime = endTime; + setEndTimeIsSet(true); + this.statementId = statementId; + setStatementIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSRawDataQueryReq(TSRawDataQueryReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPaths()) { + java.util.List __this__paths = new java.util.ArrayList(other.paths); + this.paths = __this__paths; + } + this.fetchSize = other.fetchSize; + this.startTime = other.startTime; + this.endTime = other.endTime; + this.statementId = other.statementId; + this.enableRedirectQuery = other.enableRedirectQuery; + this.jdbcQuery = other.jdbcQuery; + this.timeout = other.timeout; + this.legalPathNodes = other.legalPathNodes; + } + + @Override + public TSRawDataQueryReq deepCopy() { + return new TSRawDataQueryReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.paths = null; + setFetchSizeIsSet(false); + this.fetchSize = 0; + setStartTimeIsSet(false); + this.startTime = 0; + setEndTimeIsSet(false); + this.endTime = 0; + setStatementIdIsSet(false); + this.statementId = 0; + setEnableRedirectQueryIsSet(false); + this.enableRedirectQuery = false; + setJdbcQueryIsSet(false); + this.jdbcQuery = false; + setTimeoutIsSet(false); + this.timeout = 0; + setLegalPathNodesIsSet(false); + this.legalPathNodes = false; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSRawDataQueryReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + public int getPathsSize() { + return (this.paths == null) ? 0 : this.paths.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPathsIterator() { + return (this.paths == null) ? null : this.paths.iterator(); + } + + public void addToPaths(java.lang.String elem) { + if (this.paths == null) { + this.paths = new java.util.ArrayList(); + } + this.paths.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getPaths() { + return this.paths; + } + + public TSRawDataQueryReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { + this.paths = paths; + return this; + } + + public void unsetPaths() { + this.paths = null; + } + + /** Returns true if field paths is set (has been assigned a value) and false otherwise */ + public boolean isSetPaths() { + return this.paths != null; + } + + public void setPathsIsSet(boolean value) { + if (!value) { + this.paths = null; + } + } + + public int getFetchSize() { + return this.fetchSize; + } + + public TSRawDataQueryReq setFetchSize(int fetchSize) { + this.fetchSize = fetchSize; + setFetchSizeIsSet(true); + return this; + } + + public void unsetFetchSize() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ + public boolean isSetFetchSize() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); + } + + public void setFetchSizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); + } + + public long getStartTime() { + return this.startTime; + } + + public TSRawDataQueryReq setStartTime(long startTime) { + this.startTime = startTime; + setStartTimeIsSet(true); + return this; + } + + public void unsetStartTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ + public boolean isSetStartTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + public void setStartTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); + } + + public long getEndTime() { + return this.endTime; + } + + public TSRawDataQueryReq setEndTime(long endTime) { + this.endTime = endTime; + setEndTimeIsSet(true); + return this; + } + + public void unsetEndTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ + public boolean isSetEndTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + public void setEndTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); + } + + public long getStatementId() { + return this.statementId; + } + + public TSRawDataQueryReq setStatementId(long statementId) { + this.statementId = statementId; + setStatementIdIsSet(true); + return this; + } + + public void unsetStatementId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ + public boolean isSetStatementId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); + } + + public void setStatementIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); + } + + public boolean isEnableRedirectQuery() { + return this.enableRedirectQuery; + } + + public TSRawDataQueryReq setEnableRedirectQuery(boolean enableRedirectQuery) { + this.enableRedirectQuery = enableRedirectQuery; + setEnableRedirectQueryIsSet(true); + return this; + } + + public void unsetEnableRedirectQuery() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); + } + + /** Returns true if field enableRedirectQuery is set (has been assigned a value) and false otherwise */ + public boolean isSetEnableRedirectQuery() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); + } + + public void setEnableRedirectQueryIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID, value); + } + + public boolean isJdbcQuery() { + return this.jdbcQuery; + } + + public TSRawDataQueryReq setJdbcQuery(boolean jdbcQuery) { + this.jdbcQuery = jdbcQuery; + setJdbcQueryIsSet(true); + return this; + } + + public void unsetJdbcQuery() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); + } + + /** Returns true if field jdbcQuery is set (has been assigned a value) and false otherwise */ + public boolean isSetJdbcQuery() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); + } + + public void setJdbcQueryIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JDBCQUERY_ISSET_ID, value); + } + + public long getTimeout() { + return this.timeout; + } + + public TSRawDataQueryReq setTimeout(long timeout) { + this.timeout = timeout; + setTimeoutIsSet(true); + return this; + } + + public void unsetTimeout() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeout() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + public void setTimeoutIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + } + + public boolean isLegalPathNodes() { + return this.legalPathNodes; + } + + public TSRawDataQueryReq setLegalPathNodes(boolean legalPathNodes) { + this.legalPathNodes = legalPathNodes; + setLegalPathNodesIsSet(true); + return this; + } + + public void unsetLegalPathNodes() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); + } + + /** Returns true if field legalPathNodes is set (has been assigned a value) and false otherwise */ + public boolean isSetLegalPathNodes() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); + } + + public void setLegalPathNodesIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PATHS: + if (value == null) { + unsetPaths(); + } else { + setPaths((java.util.List)value); + } + break; + + case FETCH_SIZE: + if (value == null) { + unsetFetchSize(); + } else { + setFetchSize((java.lang.Integer)value); + } + break; + + case START_TIME: + if (value == null) { + unsetStartTime(); + } else { + setStartTime((java.lang.Long)value); + } + break; + + case END_TIME: + if (value == null) { + unsetEndTime(); + } else { + setEndTime((java.lang.Long)value); + } + break; + + case STATEMENT_ID: + if (value == null) { + unsetStatementId(); + } else { + setStatementId((java.lang.Long)value); + } + break; + + case ENABLE_REDIRECT_QUERY: + if (value == null) { + unsetEnableRedirectQuery(); + } else { + setEnableRedirectQuery((java.lang.Boolean)value); + } + break; + + case JDBC_QUERY: + if (value == null) { + unsetJdbcQuery(); + } else { + setJdbcQuery((java.lang.Boolean)value); + } + break; + + case TIMEOUT: + if (value == null) { + unsetTimeout(); + } else { + setTimeout((java.lang.Long)value); + } + break; + + case LEGAL_PATH_NODES: + if (value == null) { + unsetLegalPathNodes(); + } else { + setLegalPathNodes((java.lang.Boolean)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PATHS: + return getPaths(); + + case FETCH_SIZE: + return getFetchSize(); + + case START_TIME: + return getStartTime(); + + case END_TIME: + return getEndTime(); + + case STATEMENT_ID: + return getStatementId(); + + case ENABLE_REDIRECT_QUERY: + return isEnableRedirectQuery(); + + case JDBC_QUERY: + return isJdbcQuery(); + + case TIMEOUT: + return getTimeout(); + + case LEGAL_PATH_NODES: + return isLegalPathNodes(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PATHS: + return isSetPaths(); + case FETCH_SIZE: + return isSetFetchSize(); + case START_TIME: + return isSetStartTime(); + case END_TIME: + return isSetEndTime(); + case STATEMENT_ID: + return isSetStatementId(); + case ENABLE_REDIRECT_QUERY: + return isSetEnableRedirectQuery(); + case JDBC_QUERY: + return isSetJdbcQuery(); + case TIMEOUT: + return isSetTimeout(); + case LEGAL_PATH_NODES: + return isSetLegalPathNodes(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSRawDataQueryReq) + return this.equals((TSRawDataQueryReq)that); + return false; + } + + public boolean equals(TSRawDataQueryReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_paths = true && this.isSetPaths(); + boolean that_present_paths = true && that.isSetPaths(); + if (this_present_paths || that_present_paths) { + if (!(this_present_paths && that_present_paths)) + return false; + if (!this.paths.equals(that.paths)) + return false; + } + + boolean this_present_fetchSize = true && this.isSetFetchSize(); + boolean that_present_fetchSize = true && that.isSetFetchSize(); + if (this_present_fetchSize || that_present_fetchSize) { + if (!(this_present_fetchSize && that_present_fetchSize)) + return false; + if (this.fetchSize != that.fetchSize) + return false; + } + + boolean this_present_startTime = true; + boolean that_present_startTime = true; + if (this_present_startTime || that_present_startTime) { + if (!(this_present_startTime && that_present_startTime)) + return false; + if (this.startTime != that.startTime) + return false; + } + + boolean this_present_endTime = true; + boolean that_present_endTime = true; + if (this_present_endTime || that_present_endTime) { + if (!(this_present_endTime && that_present_endTime)) + return false; + if (this.endTime != that.endTime) + return false; + } + + boolean this_present_statementId = true; + boolean that_present_statementId = true; + if (this_present_statementId || that_present_statementId) { + if (!(this_present_statementId && that_present_statementId)) + return false; + if (this.statementId != that.statementId) + return false; + } + + boolean this_present_enableRedirectQuery = true && this.isSetEnableRedirectQuery(); + boolean that_present_enableRedirectQuery = true && that.isSetEnableRedirectQuery(); + if (this_present_enableRedirectQuery || that_present_enableRedirectQuery) { + if (!(this_present_enableRedirectQuery && that_present_enableRedirectQuery)) + return false; + if (this.enableRedirectQuery != that.enableRedirectQuery) + return false; + } + + boolean this_present_jdbcQuery = true && this.isSetJdbcQuery(); + boolean that_present_jdbcQuery = true && that.isSetJdbcQuery(); + if (this_present_jdbcQuery || that_present_jdbcQuery) { + if (!(this_present_jdbcQuery && that_present_jdbcQuery)) + return false; + if (this.jdbcQuery != that.jdbcQuery) + return false; + } + + boolean this_present_timeout = true && this.isSetTimeout(); + boolean that_present_timeout = true && that.isSetTimeout(); + if (this_present_timeout || that_present_timeout) { + if (!(this_present_timeout && that_present_timeout)) + return false; + if (this.timeout != that.timeout) + return false; + } + + boolean this_present_legalPathNodes = true && this.isSetLegalPathNodes(); + boolean that_present_legalPathNodes = true && that.isSetLegalPathNodes(); + if (this_present_legalPathNodes || that_present_legalPathNodes) { + if (!(this_present_legalPathNodes && that_present_legalPathNodes)) + return false; + if (this.legalPathNodes != that.legalPathNodes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); + if (isSetPaths()) + hashCode = hashCode * 8191 + paths.hashCode(); + + hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); + if (isSetFetchSize()) + hashCode = hashCode * 8191 + fetchSize; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); + + hashCode = hashCode * 8191 + ((isSetEnableRedirectQuery()) ? 131071 : 524287); + if (isSetEnableRedirectQuery()) + hashCode = hashCode * 8191 + ((enableRedirectQuery) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetJdbcQuery()) ? 131071 : 524287); + if (isSetJdbcQuery()) + hashCode = hashCode * 8191 + ((jdbcQuery) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); + if (isSetTimeout()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); + + hashCode = hashCode * 8191 + ((isSetLegalPathNodes()) ? 131071 : 524287); + if (isSetLegalPathNodes()) + hashCode = hashCode * 8191 + ((legalPathNodes) ? 131071 : 524287); + + return hashCode; + } + + @Override + public int compareTo(TSRawDataQueryReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPaths()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFetchSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatementId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetEnableRedirectQuery(), other.isSetEnableRedirectQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnableRedirectQuery()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableRedirectQuery, other.enableRedirectQuery); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetJdbcQuery(), other.isSetJdbcQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetJdbcQuery()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jdbcQuery, other.jdbcQuery); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetLegalPathNodes(), other.isSetLegalPathNodes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLegalPathNodes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legalPathNodes, other.legalPathNodes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSRawDataQueryReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("paths:"); + if (this.paths == null) { + sb.append("null"); + } else { + sb.append(this.paths); + } + first = false; + if (isSetFetchSize()) { + if (!first) sb.append(", "); + sb.append("fetchSize:"); + sb.append(this.fetchSize); + first = false; + } + if (!first) sb.append(", "); + sb.append("startTime:"); + sb.append(this.startTime); + first = false; + if (!first) sb.append(", "); + sb.append("endTime:"); + sb.append(this.endTime); + first = false; + if (!first) sb.append(", "); + sb.append("statementId:"); + sb.append(this.statementId); + first = false; + if (isSetEnableRedirectQuery()) { + if (!first) sb.append(", "); + sb.append("enableRedirectQuery:"); + sb.append(this.enableRedirectQuery); + first = false; + } + if (isSetJdbcQuery()) { + if (!first) sb.append(", "); + sb.append("jdbcQuery:"); + sb.append(this.jdbcQuery); + first = false; + } + if (isSetTimeout()) { + if (!first) sb.append(", "); + sb.append("timeout:"); + sb.append(this.timeout); + first = false; + } + if (isSetLegalPathNodes()) { + if (!first) sb.append(", "); + sb.append("legalPathNodes:"); + sb.append(this.legalPathNodes); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (paths == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); + } + // alas, we cannot check 'startTime' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'endTime' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSRawDataQueryReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSRawDataQueryReqStandardScheme getScheme() { + return new TSRawDataQueryReqStandardScheme(); + } + } + + private static class TSRawDataQueryReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSRawDataQueryReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PATHS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list552 = iprot.readListBegin(); + struct.paths = new java.util.ArrayList(_list552.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem553; + for (int _i554 = 0; _i554 < _list552.size; ++_i554) + { + _elem553 = iprot.readString(); + struct.paths.add(_elem553); + } + iprot.readListEnd(); + } + struct.setPathsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FETCH_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // START_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // END_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // STATEMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // ENABLE_REDIRECT_QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.enableRedirectQuery = iprot.readBool(); + struct.setEnableRedirectQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // JDBC_QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.jdbcQuery = iprot.readBool(); + struct.setJdbcQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // LEGAL_PATH_NODES + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.legalPathNodes = iprot.readBool(); + struct.setLegalPathNodesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetStartTime()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'startTime' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetEndTime()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'endTime' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetStatementId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSRawDataQueryReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.paths != null) { + oprot.writeFieldBegin(PATHS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); + for (java.lang.String _iter555 : struct.paths) + { + oprot.writeString(_iter555); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetFetchSize()) { + oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); + oprot.writeI32(struct.fetchSize); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(START_TIME_FIELD_DESC); + oprot.writeI64(struct.startTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(END_TIME_FIELD_DESC); + oprot.writeI64(struct.endTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); + oprot.writeI64(struct.statementId); + oprot.writeFieldEnd(); + if (struct.isSetEnableRedirectQuery()) { + oprot.writeFieldBegin(ENABLE_REDIRECT_QUERY_FIELD_DESC); + oprot.writeBool(struct.enableRedirectQuery); + oprot.writeFieldEnd(); + } + if (struct.isSetJdbcQuery()) { + oprot.writeFieldBegin(JDBC_QUERY_FIELD_DESC); + oprot.writeBool(struct.jdbcQuery); + oprot.writeFieldEnd(); + } + if (struct.isSetTimeout()) { + oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); + oprot.writeI64(struct.timeout); + oprot.writeFieldEnd(); + } + if (struct.isSetLegalPathNodes()) { + oprot.writeFieldBegin(LEGAL_PATH_NODES_FIELD_DESC); + oprot.writeBool(struct.legalPathNodes); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSRawDataQueryReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSRawDataQueryReqTupleScheme getScheme() { + return new TSRawDataQueryReqTupleScheme(); + } + } + + private static class TSRawDataQueryReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSRawDataQueryReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + { + oprot.writeI32(struct.paths.size()); + for (java.lang.String _iter556 : struct.paths) + { + oprot.writeString(_iter556); + } + } + oprot.writeI64(struct.startTime); + oprot.writeI64(struct.endTime); + oprot.writeI64(struct.statementId); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetFetchSize()) { + optionals.set(0); + } + if (struct.isSetEnableRedirectQuery()) { + optionals.set(1); + } + if (struct.isSetJdbcQuery()) { + optionals.set(2); + } + if (struct.isSetTimeout()) { + optionals.set(3); + } + if (struct.isSetLegalPathNodes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetFetchSize()) { + oprot.writeI32(struct.fetchSize); + } + if (struct.isSetEnableRedirectQuery()) { + oprot.writeBool(struct.enableRedirectQuery); + } + if (struct.isSetJdbcQuery()) { + oprot.writeBool(struct.jdbcQuery); + } + if (struct.isSetTimeout()) { + oprot.writeI64(struct.timeout); + } + if (struct.isSetLegalPathNodes()) { + oprot.writeBool(struct.legalPathNodes); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSRawDataQueryReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + { + org.apache.thrift.protocol.TList _list557 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.paths = new java.util.ArrayList(_list557.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem558; + for (int _i559 = 0; _i559 < _list557.size; ++_i559) + { + _elem558 = iprot.readString(); + struct.paths.add(_elem558); + } + } + struct.setPathsIsSet(true); + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + struct.statementId = iprot.readI64(); + struct.setStatementIdIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.fetchSize = iprot.readI32(); + struct.setFetchSizeIsSet(true); + } + if (incoming.get(1)) { + struct.enableRedirectQuery = iprot.readBool(); + struct.setEnableRedirectQueryIsSet(true); + } + if (incoming.get(2)) { + struct.jdbcQuery = iprot.readBool(); + struct.setJdbcQueryIsSet(true); + } + if (incoming.get(3)) { + struct.timeout = iprot.readI64(); + struct.setTimeoutIsSet(true); + } + if (incoming.get(4)) { + struct.legalPathNodes = iprot.readBool(); + struct.setLegalPathNodesIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetSchemaTemplateReq.java new file mode 100644 index 0000000000000..c36ad8b6028cc --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetSchemaTemplateReq.java @@ -0,0 +1,579 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSSetSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSSetSchemaTemplateReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField TEMPLATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("templateName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSSetSchemaTemplateReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSSetSchemaTemplateReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String templateName; // required + public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // 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 { + SESSION_ID((short)1, "sessionId"), + TEMPLATE_NAME((short)2, "templateName"), + PREFIX_PATH((short)3, "prefixPath"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // TEMPLATE_NAME + return TEMPLATE_NAME; + case 3: // PREFIX_PATH + return PREFIX_PATH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TEMPLATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("templateName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSSetSchemaTemplateReq.class, metaDataMap); + } + + public TSSetSchemaTemplateReq() { + } + + public TSSetSchemaTemplateReq( + long sessionId, + java.lang.String templateName, + java.lang.String prefixPath) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.templateName = templateName; + this.prefixPath = prefixPath; + } + + /** + * Performs a deep copy on other. + */ + public TSSetSchemaTemplateReq(TSSetSchemaTemplateReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetTemplateName()) { + this.templateName = other.templateName; + } + if (other.isSetPrefixPath()) { + this.prefixPath = other.prefixPath; + } + } + + @Override + public TSSetSchemaTemplateReq deepCopy() { + return new TSSetSchemaTemplateReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.templateName = null; + this.prefixPath = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSSetSchemaTemplateReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getTemplateName() { + return this.templateName; + } + + public TSSetSchemaTemplateReq setTemplateName(@org.apache.thrift.annotation.Nullable java.lang.String templateName) { + this.templateName = templateName; + return this; + } + + public void unsetTemplateName() { + this.templateName = null; + } + + /** Returns true if field templateName is set (has been assigned a value) and false otherwise */ + public boolean isSetTemplateName() { + return this.templateName != null; + } + + public void setTemplateNameIsSet(boolean value) { + if (!value) { + this.templateName = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPrefixPath() { + return this.prefixPath; + } + + public TSSetSchemaTemplateReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { + this.prefixPath = prefixPath; + return this; + } + + public void unsetPrefixPath() { + this.prefixPath = null; + } + + /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPath() { + return this.prefixPath != null; + } + + public void setPrefixPathIsSet(boolean value) { + if (!value) { + this.prefixPath = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case TEMPLATE_NAME: + if (value == null) { + unsetTemplateName(); + } else { + setTemplateName((java.lang.String)value); + } + break; + + case PREFIX_PATH: + if (value == null) { + unsetPrefixPath(); + } else { + setPrefixPath((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case TEMPLATE_NAME: + return getTemplateName(); + + case PREFIX_PATH: + return getPrefixPath(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case TEMPLATE_NAME: + return isSetTemplateName(); + case PREFIX_PATH: + return isSetPrefixPath(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSSetSchemaTemplateReq) + return this.equals((TSSetSchemaTemplateReq)that); + return false; + } + + public boolean equals(TSSetSchemaTemplateReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_templateName = true && this.isSetTemplateName(); + boolean that_present_templateName = true && that.isSetTemplateName(); + if (this_present_templateName || that_present_templateName) { + if (!(this_present_templateName && that_present_templateName)) + return false; + if (!this.templateName.equals(that.templateName)) + return false; + } + + boolean this_present_prefixPath = true && this.isSetPrefixPath(); + boolean that_present_prefixPath = true && that.isSetPrefixPath(); + if (this_present_prefixPath || that_present_prefixPath) { + if (!(this_present_prefixPath && that_present_prefixPath)) + return false; + if (!this.prefixPath.equals(that.prefixPath)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetTemplateName()) ? 131071 : 524287); + if (isSetTemplateName()) + hashCode = hashCode * 8191 + templateName.hashCode(); + + hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); + if (isSetPrefixPath()) + hashCode = hashCode * 8191 + prefixPath.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSSetSchemaTemplateReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTemplateName(), other.isSetTemplateName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTemplateName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.templateName, other.templateName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSSetSchemaTemplateReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("templateName:"); + if (this.templateName == null) { + sb.append("null"); + } else { + sb.append(this.templateName); + } + first = false; + if (!first) sb.append(", "); + sb.append("prefixPath:"); + if (this.prefixPath == null) { + sb.append("null"); + } else { + sb.append(this.prefixPath); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (templateName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'templateName' was not present! Struct: " + toString()); + } + if (prefixPath == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSSetSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSSetSchemaTemplateReqStandardScheme getScheme() { + return new TSSetSchemaTemplateReqStandardScheme(); + } + } + + private static class TSSetSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSSetSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TEMPLATE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.templateName = iprot.readString(); + struct.setTemplateNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PREFIX_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSSetSchemaTemplateReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.templateName != null) { + oprot.writeFieldBegin(TEMPLATE_NAME_FIELD_DESC); + oprot.writeString(struct.templateName); + oprot.writeFieldEnd(); + } + if (struct.prefixPath != null) { + oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); + oprot.writeString(struct.prefixPath); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSSetSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSSetSchemaTemplateReqTupleScheme getScheme() { + return new TSSetSchemaTemplateReqTupleScheme(); + } + } + + private static class TSSetSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSSetSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.templateName); + oprot.writeString(struct.prefixPath); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSSetSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.templateName = iprot.readString(); + struct.setTemplateNameIsSet(true); + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetTimeZoneReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetTimeZoneReq.java new file mode 100644 index 0000000000000..3ade3edfc3883 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetTimeZoneReq.java @@ -0,0 +1,478 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSSetTimeZoneReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSSetTimeZoneReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField TIME_ZONE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeZone", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSSetTimeZoneReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSSetTimeZoneReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String timeZone; // 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 { + SESSION_ID((short)1, "sessionId"), + TIME_ZONE((short)2, "timeZone"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // TIME_ZONE + return TIME_ZONE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TIME_ZONE, new org.apache.thrift.meta_data.FieldMetaData("timeZone", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSSetTimeZoneReq.class, metaDataMap); + } + + public TSSetTimeZoneReq() { + } + + public TSSetTimeZoneReq( + long sessionId, + java.lang.String timeZone) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.timeZone = timeZone; + } + + /** + * Performs a deep copy on other. + */ + public TSSetTimeZoneReq(TSSetTimeZoneReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetTimeZone()) { + this.timeZone = other.timeZone; + } + } + + @Override + public TSSetTimeZoneReq deepCopy() { + return new TSSetTimeZoneReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.timeZone = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSSetTimeZoneReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getTimeZone() { + return this.timeZone; + } + + public TSSetTimeZoneReq setTimeZone(@org.apache.thrift.annotation.Nullable java.lang.String timeZone) { + this.timeZone = timeZone; + return this; + } + + public void unsetTimeZone() { + this.timeZone = null; + } + + /** Returns true if field timeZone is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeZone() { + return this.timeZone != null; + } + + public void setTimeZoneIsSet(boolean value) { + if (!value) { + this.timeZone = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case TIME_ZONE: + if (value == null) { + unsetTimeZone(); + } else { + setTimeZone((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case TIME_ZONE: + return getTimeZone(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case TIME_ZONE: + return isSetTimeZone(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSSetTimeZoneReq) + return this.equals((TSSetTimeZoneReq)that); + return false; + } + + public boolean equals(TSSetTimeZoneReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_timeZone = true && this.isSetTimeZone(); + boolean that_present_timeZone = true && that.isSetTimeZone(); + if (this_present_timeZone || that_present_timeZone) { + if (!(this_present_timeZone && that_present_timeZone)) + return false; + if (!this.timeZone.equals(that.timeZone)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetTimeZone()) ? 131071 : 524287); + if (isSetTimeZone()) + hashCode = hashCode * 8191 + timeZone.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSSetTimeZoneReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTimeZone(), other.isSetTimeZone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeZone()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeZone, other.timeZone); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSSetTimeZoneReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("timeZone:"); + if (this.timeZone == null) { + sb.append("null"); + } else { + sb.append(this.timeZone); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (timeZone == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeZone' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSSetTimeZoneReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSSetTimeZoneReqStandardScheme getScheme() { + return new TSSetTimeZoneReqStandardScheme(); + } + } + + private static class TSSetTimeZoneReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSSetTimeZoneReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TIME_ZONE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.timeZone = iprot.readString(); + struct.setTimeZoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSSetTimeZoneReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.timeZone != null) { + oprot.writeFieldBegin(TIME_ZONE_FIELD_DESC); + oprot.writeString(struct.timeZone); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSSetTimeZoneReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSSetTimeZoneReqTupleScheme getScheme() { + return new TSSetTimeZoneReqTupleScheme(); + } + } + + private static class TSSetTimeZoneReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSSetTimeZoneReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.timeZone); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSSetTimeZoneReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.timeZone = iprot.readString(); + struct.setTimeZoneIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java new file mode 100644 index 0000000000000..3f969d6d1e81a --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java @@ -0,0 +1,1481 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSTracingInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSTracingInfo"); + + private static final org.apache.thrift.protocol.TField ACTIVITY_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("activityList", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField ELAPSED_TIME_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsedTimeList", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField SERIES_PATH_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("seriesPathNum", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField SEQ_FILE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("seqFileNum", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField UN_SEQ_FILE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("unSeqFileNum", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField SEQUENCE_CHUNK_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("sequenceChunkNum", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField SEQUENCE_CHUNK_POINT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("sequenceChunkPointNum", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField UNSEQUENCE_CHUNK_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("unsequenceChunkNum", org.apache.thrift.protocol.TType.I32, (short)8); + private static final org.apache.thrift.protocol.TField UNSEQUENCE_CHUNK_POINT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("unsequenceChunkPointNum", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField TOTAL_PAGE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPageNum", org.apache.thrift.protocol.TType.I32, (short)10); + private static final org.apache.thrift.protocol.TField OVERLAPPED_PAGE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("overlappedPageNum", org.apache.thrift.protocol.TType.I32, (short)11); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSTracingInfoStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSTracingInfoTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.util.List activityList; // required + public @org.apache.thrift.annotation.Nullable java.util.List elapsedTimeList; // required + public int seriesPathNum; // optional + public int seqFileNum; // optional + public int unSeqFileNum; // optional + public int sequenceChunkNum; // optional + public long sequenceChunkPointNum; // optional + public int unsequenceChunkNum; // optional + public long unsequenceChunkPointNum; // optional + public int totalPageNum; // optional + public int overlappedPageNum; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ACTIVITY_LIST((short)1, "activityList"), + ELAPSED_TIME_LIST((short)2, "elapsedTimeList"), + SERIES_PATH_NUM((short)3, "seriesPathNum"), + SEQ_FILE_NUM((short)4, "seqFileNum"), + UN_SEQ_FILE_NUM((short)5, "unSeqFileNum"), + SEQUENCE_CHUNK_NUM((short)6, "sequenceChunkNum"), + SEQUENCE_CHUNK_POINT_NUM((short)7, "sequenceChunkPointNum"), + UNSEQUENCE_CHUNK_NUM((short)8, "unsequenceChunkNum"), + UNSEQUENCE_CHUNK_POINT_NUM((short)9, "unsequenceChunkPointNum"), + TOTAL_PAGE_NUM((short)10, "totalPageNum"), + OVERLAPPED_PAGE_NUM((short)11, "overlappedPageNum"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ACTIVITY_LIST + return ACTIVITY_LIST; + case 2: // ELAPSED_TIME_LIST + return ELAPSED_TIME_LIST; + case 3: // SERIES_PATH_NUM + return SERIES_PATH_NUM; + case 4: // SEQ_FILE_NUM + return SEQ_FILE_NUM; + case 5: // UN_SEQ_FILE_NUM + return UN_SEQ_FILE_NUM; + case 6: // SEQUENCE_CHUNK_NUM + return SEQUENCE_CHUNK_NUM; + case 7: // SEQUENCE_CHUNK_POINT_NUM + return SEQUENCE_CHUNK_POINT_NUM; + case 8: // UNSEQUENCE_CHUNK_NUM + return UNSEQUENCE_CHUNK_NUM; + case 9: // UNSEQUENCE_CHUNK_POINT_NUM + return UNSEQUENCE_CHUNK_POINT_NUM; + case 10: // TOTAL_PAGE_NUM + return TOTAL_PAGE_NUM; + case 11: // OVERLAPPED_PAGE_NUM + return OVERLAPPED_PAGE_NUM; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SERIESPATHNUM_ISSET_ID = 0; + private static final int __SEQFILENUM_ISSET_ID = 1; + private static final int __UNSEQFILENUM_ISSET_ID = 2; + private static final int __SEQUENCECHUNKNUM_ISSET_ID = 3; + private static final int __SEQUENCECHUNKPOINTNUM_ISSET_ID = 4; + private static final int __UNSEQUENCECHUNKNUM_ISSET_ID = 5; + private static final int __UNSEQUENCECHUNKPOINTNUM_ISSET_ID = 6; + private static final int __TOTALPAGENUM_ISSET_ID = 7; + private static final int __OVERLAPPEDPAGENUM_ISSET_ID = 8; + private short __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.SERIES_PATH_NUM,_Fields.SEQ_FILE_NUM,_Fields.UN_SEQ_FILE_NUM,_Fields.SEQUENCE_CHUNK_NUM,_Fields.SEQUENCE_CHUNK_POINT_NUM,_Fields.UNSEQUENCE_CHUNK_NUM,_Fields.UNSEQUENCE_CHUNK_POINT_NUM,_Fields.TOTAL_PAGE_NUM,_Fields.OVERLAPPED_PAGE_NUM}; + 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.ACTIVITY_LIST, new org.apache.thrift.meta_data.FieldMetaData("activityList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.ELAPSED_TIME_LIST, new org.apache.thrift.meta_data.FieldMetaData("elapsedTimeList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.SERIES_PATH_NUM, new org.apache.thrift.meta_data.FieldMetaData("seriesPathNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SEQ_FILE_NUM, new org.apache.thrift.meta_data.FieldMetaData("seqFileNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.UN_SEQ_FILE_NUM, new org.apache.thrift.meta_data.FieldMetaData("unSeqFileNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SEQUENCE_CHUNK_NUM, new org.apache.thrift.meta_data.FieldMetaData("sequenceChunkNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SEQUENCE_CHUNK_POINT_NUM, new org.apache.thrift.meta_data.FieldMetaData("sequenceChunkPointNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.UNSEQUENCE_CHUNK_NUM, new org.apache.thrift.meta_data.FieldMetaData("unsequenceChunkNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.UNSEQUENCE_CHUNK_POINT_NUM, new org.apache.thrift.meta_data.FieldMetaData("unsequenceChunkPointNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TOTAL_PAGE_NUM, new org.apache.thrift.meta_data.FieldMetaData("totalPageNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.OVERLAPPED_PAGE_NUM, new org.apache.thrift.meta_data.FieldMetaData("overlappedPageNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSTracingInfo.class, metaDataMap); + } + + public TSTracingInfo() { + } + + public TSTracingInfo( + java.util.List activityList, + java.util.List elapsedTimeList) + { + this(); + this.activityList = activityList; + this.elapsedTimeList = elapsedTimeList; + } + + /** + * Performs a deep copy on other. + */ + public TSTracingInfo(TSTracingInfo other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetActivityList()) { + java.util.List __this__activityList = new java.util.ArrayList(other.activityList); + this.activityList = __this__activityList; + } + if (other.isSetElapsedTimeList()) { + java.util.List __this__elapsedTimeList = new java.util.ArrayList(other.elapsedTimeList); + this.elapsedTimeList = __this__elapsedTimeList; + } + this.seriesPathNum = other.seriesPathNum; + this.seqFileNum = other.seqFileNum; + this.unSeqFileNum = other.unSeqFileNum; + this.sequenceChunkNum = other.sequenceChunkNum; + this.sequenceChunkPointNum = other.sequenceChunkPointNum; + this.unsequenceChunkNum = other.unsequenceChunkNum; + this.unsequenceChunkPointNum = other.unsequenceChunkPointNum; + this.totalPageNum = other.totalPageNum; + this.overlappedPageNum = other.overlappedPageNum; + } + + @Override + public TSTracingInfo deepCopy() { + return new TSTracingInfo(this); + } + + @Override + public void clear() { + this.activityList = null; + this.elapsedTimeList = null; + setSeriesPathNumIsSet(false); + this.seriesPathNum = 0; + setSeqFileNumIsSet(false); + this.seqFileNum = 0; + setUnSeqFileNumIsSet(false); + this.unSeqFileNum = 0; + setSequenceChunkNumIsSet(false); + this.sequenceChunkNum = 0; + setSequenceChunkPointNumIsSet(false); + this.sequenceChunkPointNum = 0; + setUnsequenceChunkNumIsSet(false); + this.unsequenceChunkNum = 0; + setUnsequenceChunkPointNumIsSet(false); + this.unsequenceChunkPointNum = 0; + setTotalPageNumIsSet(false); + this.totalPageNum = 0; + setOverlappedPageNumIsSet(false); + this.overlappedPageNum = 0; + } + + public int getActivityListSize() { + return (this.activityList == null) ? 0 : this.activityList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getActivityListIterator() { + return (this.activityList == null) ? null : this.activityList.iterator(); + } + + public void addToActivityList(java.lang.String elem) { + if (this.activityList == null) { + this.activityList = new java.util.ArrayList(); + } + this.activityList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getActivityList() { + return this.activityList; + } + + public TSTracingInfo setActivityList(@org.apache.thrift.annotation.Nullable java.util.List activityList) { + this.activityList = activityList; + return this; + } + + public void unsetActivityList() { + this.activityList = null; + } + + /** Returns true if field activityList is set (has been assigned a value) and false otherwise */ + public boolean isSetActivityList() { + return this.activityList != null; + } + + public void setActivityListIsSet(boolean value) { + if (!value) { + this.activityList = null; + } + } + + public int getElapsedTimeListSize() { + return (this.elapsedTimeList == null) ? 0 : this.elapsedTimeList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getElapsedTimeListIterator() { + return (this.elapsedTimeList == null) ? null : this.elapsedTimeList.iterator(); + } + + public void addToElapsedTimeList(long elem) { + if (this.elapsedTimeList == null) { + this.elapsedTimeList = new java.util.ArrayList(); + } + this.elapsedTimeList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getElapsedTimeList() { + return this.elapsedTimeList; + } + + public TSTracingInfo setElapsedTimeList(@org.apache.thrift.annotation.Nullable java.util.List elapsedTimeList) { + this.elapsedTimeList = elapsedTimeList; + return this; + } + + public void unsetElapsedTimeList() { + this.elapsedTimeList = null; + } + + /** Returns true if field elapsedTimeList is set (has been assigned a value) and false otherwise */ + public boolean isSetElapsedTimeList() { + return this.elapsedTimeList != null; + } + + public void setElapsedTimeListIsSet(boolean value) { + if (!value) { + this.elapsedTimeList = null; + } + } + + public int getSeriesPathNum() { + return this.seriesPathNum; + } + + public TSTracingInfo setSeriesPathNum(int seriesPathNum) { + this.seriesPathNum = seriesPathNum; + setSeriesPathNumIsSet(true); + return this; + } + + public void unsetSeriesPathNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SERIESPATHNUM_ISSET_ID); + } + + /** Returns true if field seriesPathNum is set (has been assigned a value) and false otherwise */ + public boolean isSetSeriesPathNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SERIESPATHNUM_ISSET_ID); + } + + public void setSeriesPathNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SERIESPATHNUM_ISSET_ID, value); + } + + public int getSeqFileNum() { + return this.seqFileNum; + } + + public TSTracingInfo setSeqFileNum(int seqFileNum) { + this.seqFileNum = seqFileNum; + setSeqFileNumIsSet(true); + return this; + } + + public void unsetSeqFileNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SEQFILENUM_ISSET_ID); + } + + /** Returns true if field seqFileNum is set (has been assigned a value) and false otherwise */ + public boolean isSetSeqFileNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SEQFILENUM_ISSET_ID); + } + + public void setSeqFileNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SEQFILENUM_ISSET_ID, value); + } + + public int getUnSeqFileNum() { + return this.unSeqFileNum; + } + + public TSTracingInfo setUnSeqFileNum(int unSeqFileNum) { + this.unSeqFileNum = unSeqFileNum; + setUnSeqFileNumIsSet(true); + return this; + } + + public void unsetUnSeqFileNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNSEQFILENUM_ISSET_ID); + } + + /** Returns true if field unSeqFileNum is set (has been assigned a value) and false otherwise */ + public boolean isSetUnSeqFileNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNSEQFILENUM_ISSET_ID); + } + + public void setUnSeqFileNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNSEQFILENUM_ISSET_ID, value); + } + + public int getSequenceChunkNum() { + return this.sequenceChunkNum; + } + + public TSTracingInfo setSequenceChunkNum(int sequenceChunkNum) { + this.sequenceChunkNum = sequenceChunkNum; + setSequenceChunkNumIsSet(true); + return this; + } + + public void unsetSequenceChunkNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SEQUENCECHUNKNUM_ISSET_ID); + } + + /** Returns true if field sequenceChunkNum is set (has been assigned a value) and false otherwise */ + public boolean isSetSequenceChunkNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SEQUENCECHUNKNUM_ISSET_ID); + } + + public void setSequenceChunkNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SEQUENCECHUNKNUM_ISSET_ID, value); + } + + public long getSequenceChunkPointNum() { + return this.sequenceChunkPointNum; + } + + public TSTracingInfo setSequenceChunkPointNum(long sequenceChunkPointNum) { + this.sequenceChunkPointNum = sequenceChunkPointNum; + setSequenceChunkPointNumIsSet(true); + return this; + } + + public void unsetSequenceChunkPointNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SEQUENCECHUNKPOINTNUM_ISSET_ID); + } + + /** Returns true if field sequenceChunkPointNum is set (has been assigned a value) and false otherwise */ + public boolean isSetSequenceChunkPointNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SEQUENCECHUNKPOINTNUM_ISSET_ID); + } + + public void setSequenceChunkPointNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SEQUENCECHUNKPOINTNUM_ISSET_ID, value); + } + + public int getUnsequenceChunkNum() { + return this.unsequenceChunkNum; + } + + public TSTracingInfo setUnsequenceChunkNum(int unsequenceChunkNum) { + this.unsequenceChunkNum = unsequenceChunkNum; + setUnsequenceChunkNumIsSet(true); + return this; + } + + public void unsetUnsequenceChunkNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNSEQUENCECHUNKNUM_ISSET_ID); + } + + /** Returns true if field unsequenceChunkNum is set (has been assigned a value) and false otherwise */ + public boolean isSetUnsequenceChunkNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNSEQUENCECHUNKNUM_ISSET_ID); + } + + public void setUnsequenceChunkNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNSEQUENCECHUNKNUM_ISSET_ID, value); + } + + public long getUnsequenceChunkPointNum() { + return this.unsequenceChunkPointNum; + } + + public TSTracingInfo setUnsequenceChunkPointNum(long unsequenceChunkPointNum) { + this.unsequenceChunkPointNum = unsequenceChunkPointNum; + setUnsequenceChunkPointNumIsSet(true); + return this; + } + + public void unsetUnsequenceChunkPointNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNSEQUENCECHUNKPOINTNUM_ISSET_ID); + } + + /** Returns true if field unsequenceChunkPointNum is set (has been assigned a value) and false otherwise */ + public boolean isSetUnsequenceChunkPointNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNSEQUENCECHUNKPOINTNUM_ISSET_ID); + } + + public void setUnsequenceChunkPointNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNSEQUENCECHUNKPOINTNUM_ISSET_ID, value); + } + + public int getTotalPageNum() { + return this.totalPageNum; + } + + public TSTracingInfo setTotalPageNum(int totalPageNum) { + this.totalPageNum = totalPageNum; + setTotalPageNumIsSet(true); + return this; + } + + public void unsetTotalPageNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTALPAGENUM_ISSET_ID); + } + + /** Returns true if field totalPageNum is set (has been assigned a value) and false otherwise */ + public boolean isSetTotalPageNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTALPAGENUM_ISSET_ID); + } + + public void setTotalPageNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTALPAGENUM_ISSET_ID, value); + } + + public int getOverlappedPageNum() { + return this.overlappedPageNum; + } + + public TSTracingInfo setOverlappedPageNum(int overlappedPageNum) { + this.overlappedPageNum = overlappedPageNum; + setOverlappedPageNumIsSet(true); + return this; + } + + public void unsetOverlappedPageNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OVERLAPPEDPAGENUM_ISSET_ID); + } + + /** Returns true if field overlappedPageNum is set (has been assigned a value) and false otherwise */ + public boolean isSetOverlappedPageNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OVERLAPPEDPAGENUM_ISSET_ID); + } + + public void setOverlappedPageNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OVERLAPPEDPAGENUM_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case ACTIVITY_LIST: + if (value == null) { + unsetActivityList(); + } else { + setActivityList((java.util.List)value); + } + break; + + case ELAPSED_TIME_LIST: + if (value == null) { + unsetElapsedTimeList(); + } else { + setElapsedTimeList((java.util.List)value); + } + break; + + case SERIES_PATH_NUM: + if (value == null) { + unsetSeriesPathNum(); + } else { + setSeriesPathNum((java.lang.Integer)value); + } + break; + + case SEQ_FILE_NUM: + if (value == null) { + unsetSeqFileNum(); + } else { + setSeqFileNum((java.lang.Integer)value); + } + break; + + case UN_SEQ_FILE_NUM: + if (value == null) { + unsetUnSeqFileNum(); + } else { + setUnSeqFileNum((java.lang.Integer)value); + } + break; + + case SEQUENCE_CHUNK_NUM: + if (value == null) { + unsetSequenceChunkNum(); + } else { + setSequenceChunkNum((java.lang.Integer)value); + } + break; + + case SEQUENCE_CHUNK_POINT_NUM: + if (value == null) { + unsetSequenceChunkPointNum(); + } else { + setSequenceChunkPointNum((java.lang.Long)value); + } + break; + + case UNSEQUENCE_CHUNK_NUM: + if (value == null) { + unsetUnsequenceChunkNum(); + } else { + setUnsequenceChunkNum((java.lang.Integer)value); + } + break; + + case UNSEQUENCE_CHUNK_POINT_NUM: + if (value == null) { + unsetUnsequenceChunkPointNum(); + } else { + setUnsequenceChunkPointNum((java.lang.Long)value); + } + break; + + case TOTAL_PAGE_NUM: + if (value == null) { + unsetTotalPageNum(); + } else { + setTotalPageNum((java.lang.Integer)value); + } + break; + + case OVERLAPPED_PAGE_NUM: + if (value == null) { + unsetOverlappedPageNum(); + } else { + setOverlappedPageNum((java.lang.Integer)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case ACTIVITY_LIST: + return getActivityList(); + + case ELAPSED_TIME_LIST: + return getElapsedTimeList(); + + case SERIES_PATH_NUM: + return getSeriesPathNum(); + + case SEQ_FILE_NUM: + return getSeqFileNum(); + + case UN_SEQ_FILE_NUM: + return getUnSeqFileNum(); + + case SEQUENCE_CHUNK_NUM: + return getSequenceChunkNum(); + + case SEQUENCE_CHUNK_POINT_NUM: + return getSequenceChunkPointNum(); + + case UNSEQUENCE_CHUNK_NUM: + return getUnsequenceChunkNum(); + + case UNSEQUENCE_CHUNK_POINT_NUM: + return getUnsequenceChunkPointNum(); + + case TOTAL_PAGE_NUM: + return getTotalPageNum(); + + case OVERLAPPED_PAGE_NUM: + return getOverlappedPageNum(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case ACTIVITY_LIST: + return isSetActivityList(); + case ELAPSED_TIME_LIST: + return isSetElapsedTimeList(); + case SERIES_PATH_NUM: + return isSetSeriesPathNum(); + case SEQ_FILE_NUM: + return isSetSeqFileNum(); + case UN_SEQ_FILE_NUM: + return isSetUnSeqFileNum(); + case SEQUENCE_CHUNK_NUM: + return isSetSequenceChunkNum(); + case SEQUENCE_CHUNK_POINT_NUM: + return isSetSequenceChunkPointNum(); + case UNSEQUENCE_CHUNK_NUM: + return isSetUnsequenceChunkNum(); + case UNSEQUENCE_CHUNK_POINT_NUM: + return isSetUnsequenceChunkPointNum(); + case TOTAL_PAGE_NUM: + return isSetTotalPageNum(); + case OVERLAPPED_PAGE_NUM: + return isSetOverlappedPageNum(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSTracingInfo) + return this.equals((TSTracingInfo)that); + return false; + } + + public boolean equals(TSTracingInfo that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_activityList = true && this.isSetActivityList(); + boolean that_present_activityList = true && that.isSetActivityList(); + if (this_present_activityList || that_present_activityList) { + if (!(this_present_activityList && that_present_activityList)) + return false; + if (!this.activityList.equals(that.activityList)) + return false; + } + + boolean this_present_elapsedTimeList = true && this.isSetElapsedTimeList(); + boolean that_present_elapsedTimeList = true && that.isSetElapsedTimeList(); + if (this_present_elapsedTimeList || that_present_elapsedTimeList) { + if (!(this_present_elapsedTimeList && that_present_elapsedTimeList)) + return false; + if (!this.elapsedTimeList.equals(that.elapsedTimeList)) + return false; + } + + boolean this_present_seriesPathNum = true && this.isSetSeriesPathNum(); + boolean that_present_seriesPathNum = true && that.isSetSeriesPathNum(); + if (this_present_seriesPathNum || that_present_seriesPathNum) { + if (!(this_present_seriesPathNum && that_present_seriesPathNum)) + return false; + if (this.seriesPathNum != that.seriesPathNum) + return false; + } + + boolean this_present_seqFileNum = true && this.isSetSeqFileNum(); + boolean that_present_seqFileNum = true && that.isSetSeqFileNum(); + if (this_present_seqFileNum || that_present_seqFileNum) { + if (!(this_present_seqFileNum && that_present_seqFileNum)) + return false; + if (this.seqFileNum != that.seqFileNum) + return false; + } + + boolean this_present_unSeqFileNum = true && this.isSetUnSeqFileNum(); + boolean that_present_unSeqFileNum = true && that.isSetUnSeqFileNum(); + if (this_present_unSeqFileNum || that_present_unSeqFileNum) { + if (!(this_present_unSeqFileNum && that_present_unSeqFileNum)) + return false; + if (this.unSeqFileNum != that.unSeqFileNum) + return false; + } + + boolean this_present_sequenceChunkNum = true && this.isSetSequenceChunkNum(); + boolean that_present_sequenceChunkNum = true && that.isSetSequenceChunkNum(); + if (this_present_sequenceChunkNum || that_present_sequenceChunkNum) { + if (!(this_present_sequenceChunkNum && that_present_sequenceChunkNum)) + return false; + if (this.sequenceChunkNum != that.sequenceChunkNum) + return false; + } + + boolean this_present_sequenceChunkPointNum = true && this.isSetSequenceChunkPointNum(); + boolean that_present_sequenceChunkPointNum = true && that.isSetSequenceChunkPointNum(); + if (this_present_sequenceChunkPointNum || that_present_sequenceChunkPointNum) { + if (!(this_present_sequenceChunkPointNum && that_present_sequenceChunkPointNum)) + return false; + if (this.sequenceChunkPointNum != that.sequenceChunkPointNum) + return false; + } + + boolean this_present_unsequenceChunkNum = true && this.isSetUnsequenceChunkNum(); + boolean that_present_unsequenceChunkNum = true && that.isSetUnsequenceChunkNum(); + if (this_present_unsequenceChunkNum || that_present_unsequenceChunkNum) { + if (!(this_present_unsequenceChunkNum && that_present_unsequenceChunkNum)) + return false; + if (this.unsequenceChunkNum != that.unsequenceChunkNum) + return false; + } + + boolean this_present_unsequenceChunkPointNum = true && this.isSetUnsequenceChunkPointNum(); + boolean that_present_unsequenceChunkPointNum = true && that.isSetUnsequenceChunkPointNum(); + if (this_present_unsequenceChunkPointNum || that_present_unsequenceChunkPointNum) { + if (!(this_present_unsequenceChunkPointNum && that_present_unsequenceChunkPointNum)) + return false; + if (this.unsequenceChunkPointNum != that.unsequenceChunkPointNum) + return false; + } + + boolean this_present_totalPageNum = true && this.isSetTotalPageNum(); + boolean that_present_totalPageNum = true && that.isSetTotalPageNum(); + if (this_present_totalPageNum || that_present_totalPageNum) { + if (!(this_present_totalPageNum && that_present_totalPageNum)) + return false; + if (this.totalPageNum != that.totalPageNum) + return false; + } + + boolean this_present_overlappedPageNum = true && this.isSetOverlappedPageNum(); + boolean that_present_overlappedPageNum = true && that.isSetOverlappedPageNum(); + if (this_present_overlappedPageNum || that_present_overlappedPageNum) { + if (!(this_present_overlappedPageNum && that_present_overlappedPageNum)) + return false; + if (this.overlappedPageNum != that.overlappedPageNum) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetActivityList()) ? 131071 : 524287); + if (isSetActivityList()) + hashCode = hashCode * 8191 + activityList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetElapsedTimeList()) ? 131071 : 524287); + if (isSetElapsedTimeList()) + hashCode = hashCode * 8191 + elapsedTimeList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetSeriesPathNum()) ? 131071 : 524287); + if (isSetSeriesPathNum()) + hashCode = hashCode * 8191 + seriesPathNum; + + hashCode = hashCode * 8191 + ((isSetSeqFileNum()) ? 131071 : 524287); + if (isSetSeqFileNum()) + hashCode = hashCode * 8191 + seqFileNum; + + hashCode = hashCode * 8191 + ((isSetUnSeqFileNum()) ? 131071 : 524287); + if (isSetUnSeqFileNum()) + hashCode = hashCode * 8191 + unSeqFileNum; + + hashCode = hashCode * 8191 + ((isSetSequenceChunkNum()) ? 131071 : 524287); + if (isSetSequenceChunkNum()) + hashCode = hashCode * 8191 + sequenceChunkNum; + + hashCode = hashCode * 8191 + ((isSetSequenceChunkPointNum()) ? 131071 : 524287); + if (isSetSequenceChunkPointNum()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sequenceChunkPointNum); + + hashCode = hashCode * 8191 + ((isSetUnsequenceChunkNum()) ? 131071 : 524287); + if (isSetUnsequenceChunkNum()) + hashCode = hashCode * 8191 + unsequenceChunkNum; + + hashCode = hashCode * 8191 + ((isSetUnsequenceChunkPointNum()) ? 131071 : 524287); + if (isSetUnsequenceChunkPointNum()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(unsequenceChunkPointNum); + + hashCode = hashCode * 8191 + ((isSetTotalPageNum()) ? 131071 : 524287); + if (isSetTotalPageNum()) + hashCode = hashCode * 8191 + totalPageNum; + + hashCode = hashCode * 8191 + ((isSetOverlappedPageNum()) ? 131071 : 524287); + if (isSetOverlappedPageNum()) + hashCode = hashCode * 8191 + overlappedPageNum; + + return hashCode; + } + + @Override + public int compareTo(TSTracingInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetActivityList(), other.isSetActivityList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetActivityList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityList, other.activityList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetElapsedTimeList(), other.isSetElapsedTimeList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetElapsedTimeList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsedTimeList, other.elapsedTimeList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSeriesPathNum(), other.isSetSeriesPathNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSeriesPathNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seriesPathNum, other.seriesPathNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSeqFileNum(), other.isSetSeqFileNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSeqFileNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seqFileNum, other.seqFileNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetUnSeqFileNum(), other.isSetUnSeqFileNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUnSeqFileNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unSeqFileNum, other.unSeqFileNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSequenceChunkNum(), other.isSetSequenceChunkNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSequenceChunkNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sequenceChunkNum, other.sequenceChunkNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSequenceChunkPointNum(), other.isSetSequenceChunkPointNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSequenceChunkPointNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sequenceChunkPointNum, other.sequenceChunkPointNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetUnsequenceChunkNum(), other.isSetUnsequenceChunkNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUnsequenceChunkNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unsequenceChunkNum, other.unsequenceChunkNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetUnsequenceChunkPointNum(), other.isSetUnsequenceChunkPointNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUnsequenceChunkPointNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unsequenceChunkPointNum, other.unsequenceChunkPointNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTotalPageNum(), other.isSetTotalPageNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTotalPageNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalPageNum, other.totalPageNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetOverlappedPageNum(), other.isSetOverlappedPageNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOverlappedPageNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overlappedPageNum, other.overlappedPageNum); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSTracingInfo("); + boolean first = true; + + sb.append("activityList:"); + if (this.activityList == null) { + sb.append("null"); + } else { + sb.append(this.activityList); + } + first = false; + if (!first) sb.append(", "); + sb.append("elapsedTimeList:"); + if (this.elapsedTimeList == null) { + sb.append("null"); + } else { + sb.append(this.elapsedTimeList); + } + first = false; + if (isSetSeriesPathNum()) { + if (!first) sb.append(", "); + sb.append("seriesPathNum:"); + sb.append(this.seriesPathNum); + first = false; + } + if (isSetSeqFileNum()) { + if (!first) sb.append(", "); + sb.append("seqFileNum:"); + sb.append(this.seqFileNum); + first = false; + } + if (isSetUnSeqFileNum()) { + if (!first) sb.append(", "); + sb.append("unSeqFileNum:"); + sb.append(this.unSeqFileNum); + first = false; + } + if (isSetSequenceChunkNum()) { + if (!first) sb.append(", "); + sb.append("sequenceChunkNum:"); + sb.append(this.sequenceChunkNum); + first = false; + } + if (isSetSequenceChunkPointNum()) { + if (!first) sb.append(", "); + sb.append("sequenceChunkPointNum:"); + sb.append(this.sequenceChunkPointNum); + first = false; + } + if (isSetUnsequenceChunkNum()) { + if (!first) sb.append(", "); + sb.append("unsequenceChunkNum:"); + sb.append(this.unsequenceChunkNum); + first = false; + } + if (isSetUnsequenceChunkPointNum()) { + if (!first) sb.append(", "); + sb.append("unsequenceChunkPointNum:"); + sb.append(this.unsequenceChunkPointNum); + first = false; + } + if (isSetTotalPageNum()) { + if (!first) sb.append(", "); + sb.append("totalPageNum:"); + sb.append(this.totalPageNum); + first = false; + } + if (isSetOverlappedPageNum()) { + if (!first) sb.append(", "); + sb.append("overlappedPageNum:"); + sb.append(this.overlappedPageNum); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (activityList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'activityList' was not present! Struct: " + toString()); + } + if (elapsedTimeList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'elapsedTimeList' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSTracingInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSTracingInfoStandardScheme getScheme() { + return new TSTracingInfoStandardScheme(); + } + } + + private static class TSTracingInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSTracingInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ACTIVITY_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); + struct.activityList = new java.util.ArrayList(_list32.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem33; + for (int _i34 = 0; _i34 < _list32.size; ++_i34) + { + _elem33 = iprot.readString(); + struct.activityList.add(_elem33); + } + iprot.readListEnd(); + } + struct.setActivityListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ELAPSED_TIME_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); + struct.elapsedTimeList = new java.util.ArrayList(_list35.size); + long _elem36; + for (int _i37 = 0; _i37 < _list35.size; ++_i37) + { + _elem36 = iprot.readI64(); + struct.elapsedTimeList.add(_elem36); + } + iprot.readListEnd(); + } + struct.setElapsedTimeListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SERIES_PATH_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.seriesPathNum = iprot.readI32(); + struct.setSeriesPathNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // SEQ_FILE_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.seqFileNum = iprot.readI32(); + struct.setSeqFileNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // UN_SEQ_FILE_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.unSeqFileNum = iprot.readI32(); + struct.setUnSeqFileNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // SEQUENCE_CHUNK_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.sequenceChunkNum = iprot.readI32(); + struct.setSequenceChunkNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SEQUENCE_CHUNK_POINT_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sequenceChunkPointNum = iprot.readI64(); + struct.setSequenceChunkPointNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // UNSEQUENCE_CHUNK_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.unsequenceChunkNum = iprot.readI32(); + struct.setUnsequenceChunkNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // UNSEQUENCE_CHUNK_POINT_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.unsequenceChunkPointNum = iprot.readI64(); + struct.setUnsequenceChunkPointNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // TOTAL_PAGE_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.totalPageNum = iprot.readI32(); + struct.setTotalPageNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // OVERLAPPED_PAGE_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.overlappedPageNum = iprot.readI32(); + struct.setOverlappedPageNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSTracingInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.activityList != null) { + oprot.writeFieldBegin(ACTIVITY_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.activityList.size())); + for (java.lang.String _iter38 : struct.activityList) + { + oprot.writeString(_iter38); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.elapsedTimeList != null) { + oprot.writeFieldBegin(ELAPSED_TIME_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.elapsedTimeList.size())); + for (long _iter39 : struct.elapsedTimeList) + { + oprot.writeI64(_iter39); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetSeriesPathNum()) { + oprot.writeFieldBegin(SERIES_PATH_NUM_FIELD_DESC); + oprot.writeI32(struct.seriesPathNum); + oprot.writeFieldEnd(); + } + if (struct.isSetSeqFileNum()) { + oprot.writeFieldBegin(SEQ_FILE_NUM_FIELD_DESC); + oprot.writeI32(struct.seqFileNum); + oprot.writeFieldEnd(); + } + if (struct.isSetUnSeqFileNum()) { + oprot.writeFieldBegin(UN_SEQ_FILE_NUM_FIELD_DESC); + oprot.writeI32(struct.unSeqFileNum); + oprot.writeFieldEnd(); + } + if (struct.isSetSequenceChunkNum()) { + oprot.writeFieldBegin(SEQUENCE_CHUNK_NUM_FIELD_DESC); + oprot.writeI32(struct.sequenceChunkNum); + oprot.writeFieldEnd(); + } + if (struct.isSetSequenceChunkPointNum()) { + oprot.writeFieldBegin(SEQUENCE_CHUNK_POINT_NUM_FIELD_DESC); + oprot.writeI64(struct.sequenceChunkPointNum); + oprot.writeFieldEnd(); + } + if (struct.isSetUnsequenceChunkNum()) { + oprot.writeFieldBegin(UNSEQUENCE_CHUNK_NUM_FIELD_DESC); + oprot.writeI32(struct.unsequenceChunkNum); + oprot.writeFieldEnd(); + } + if (struct.isSetUnsequenceChunkPointNum()) { + oprot.writeFieldBegin(UNSEQUENCE_CHUNK_POINT_NUM_FIELD_DESC); + oprot.writeI64(struct.unsequenceChunkPointNum); + oprot.writeFieldEnd(); + } + if (struct.isSetTotalPageNum()) { + oprot.writeFieldBegin(TOTAL_PAGE_NUM_FIELD_DESC); + oprot.writeI32(struct.totalPageNum); + oprot.writeFieldEnd(); + } + if (struct.isSetOverlappedPageNum()) { + oprot.writeFieldBegin(OVERLAPPED_PAGE_NUM_FIELD_DESC); + oprot.writeI32(struct.overlappedPageNum); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSTracingInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSTracingInfoTupleScheme getScheme() { + return new TSTracingInfoTupleScheme(); + } + } + + private static class TSTracingInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSTracingInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + oprot.writeI32(struct.activityList.size()); + for (java.lang.String _iter40 : struct.activityList) + { + oprot.writeString(_iter40); + } + } + { + oprot.writeI32(struct.elapsedTimeList.size()); + for (long _iter41 : struct.elapsedTimeList) + { + oprot.writeI64(_iter41); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSeriesPathNum()) { + optionals.set(0); + } + if (struct.isSetSeqFileNum()) { + optionals.set(1); + } + if (struct.isSetUnSeqFileNum()) { + optionals.set(2); + } + if (struct.isSetSequenceChunkNum()) { + optionals.set(3); + } + if (struct.isSetSequenceChunkPointNum()) { + optionals.set(4); + } + if (struct.isSetUnsequenceChunkNum()) { + optionals.set(5); + } + if (struct.isSetUnsequenceChunkPointNum()) { + optionals.set(6); + } + if (struct.isSetTotalPageNum()) { + optionals.set(7); + } + if (struct.isSetOverlappedPageNum()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetSeriesPathNum()) { + oprot.writeI32(struct.seriesPathNum); + } + if (struct.isSetSeqFileNum()) { + oprot.writeI32(struct.seqFileNum); + } + if (struct.isSetUnSeqFileNum()) { + oprot.writeI32(struct.unSeqFileNum); + } + if (struct.isSetSequenceChunkNum()) { + oprot.writeI32(struct.sequenceChunkNum); + } + if (struct.isSetSequenceChunkPointNum()) { + oprot.writeI64(struct.sequenceChunkPointNum); + } + if (struct.isSetUnsequenceChunkNum()) { + oprot.writeI32(struct.unsequenceChunkNum); + } + if (struct.isSetUnsequenceChunkPointNum()) { + oprot.writeI64(struct.unsequenceChunkPointNum); + } + if (struct.isSetTotalPageNum()) { + oprot.writeI32(struct.totalPageNum); + } + if (struct.isSetOverlappedPageNum()) { + oprot.writeI32(struct.overlappedPageNum); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSTracingInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.activityList = new java.util.ArrayList(_list42.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem43; + for (int _i44 = 0; _i44 < _list42.size; ++_i44) + { + _elem43 = iprot.readString(); + struct.activityList.add(_elem43); + } + } + struct.setActivityListIsSet(true); + { + org.apache.thrift.protocol.TList _list45 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); + struct.elapsedTimeList = new java.util.ArrayList(_list45.size); + long _elem46; + for (int _i47 = 0; _i47 < _list45.size; ++_i47) + { + _elem46 = iprot.readI64(); + struct.elapsedTimeList.add(_elem46); + } + } + struct.setElapsedTimeListIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(9); + if (incoming.get(0)) { + struct.seriesPathNum = iprot.readI32(); + struct.setSeriesPathNumIsSet(true); + } + if (incoming.get(1)) { + struct.seqFileNum = iprot.readI32(); + struct.setSeqFileNumIsSet(true); + } + if (incoming.get(2)) { + struct.unSeqFileNum = iprot.readI32(); + struct.setUnSeqFileNumIsSet(true); + } + if (incoming.get(3)) { + struct.sequenceChunkNum = iprot.readI32(); + struct.setSequenceChunkNumIsSet(true); + } + if (incoming.get(4)) { + struct.sequenceChunkPointNum = iprot.readI64(); + struct.setSequenceChunkPointNumIsSet(true); + } + if (incoming.get(5)) { + struct.unsequenceChunkNum = iprot.readI32(); + struct.setUnsequenceChunkNumIsSet(true); + } + if (incoming.get(6)) { + struct.unsequenceChunkPointNum = iprot.readI64(); + struct.setUnsequenceChunkPointNumIsSet(true); + } + if (incoming.get(7)) { + struct.totalPageNum = iprot.readI32(); + struct.setTotalPageNumIsSet(true); + } + if (incoming.get(8)) { + struct.overlappedPageNum = iprot.readI32(); + struct.setOverlappedPageNumIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSUnsetSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSUnsetSchemaTemplateReq.java new file mode 100644 index 0000000000000..2d0455755eaf6 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSUnsetSchemaTemplateReq.java @@ -0,0 +1,579 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSUnsetSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSUnsetSchemaTemplateReq"); + + private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TEMPLATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("templateName", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSUnsetSchemaTemplateReqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSUnsetSchemaTemplateReqTupleSchemeFactory(); + + public long sessionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required + public @org.apache.thrift.annotation.Nullable java.lang.String templateName; // 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 { + SESSION_ID((short)1, "sessionId"), + PREFIX_PATH((short)2, "prefixPath"), + TEMPLATE_NAME((short)3, "templateName"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_ID + return SESSION_ID; + case 2: // PREFIX_PATH + return PREFIX_PATH; + case 3: // TEMPLATE_NAME + return TEMPLATE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SESSIONID_ISSET_ID = 0; + 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TEMPLATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("templateName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSUnsetSchemaTemplateReq.class, metaDataMap); + } + + public TSUnsetSchemaTemplateReq() { + } + + public TSUnsetSchemaTemplateReq( + long sessionId, + java.lang.String prefixPath, + java.lang.String templateName) + { + this(); + this.sessionId = sessionId; + setSessionIdIsSet(true); + this.prefixPath = prefixPath; + this.templateName = templateName; + } + + /** + * Performs a deep copy on other. + */ + public TSUnsetSchemaTemplateReq(TSUnsetSchemaTemplateReq other) { + __isset_bitfield = other.__isset_bitfield; + this.sessionId = other.sessionId; + if (other.isSetPrefixPath()) { + this.prefixPath = other.prefixPath; + } + if (other.isSetTemplateName()) { + this.templateName = other.templateName; + } + } + + @Override + public TSUnsetSchemaTemplateReq deepCopy() { + return new TSUnsetSchemaTemplateReq(this); + } + + @Override + public void clear() { + setSessionIdIsSet(false); + this.sessionId = 0; + this.prefixPath = null; + this.templateName = null; + } + + public long getSessionId() { + return this.sessionId; + } + + public TSUnsetSchemaTemplateReq setSessionId(long sessionId) { + this.sessionId = sessionId; + setSessionIdIsSet(true); + return this; + } + + public void unsetSessionId() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionId() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); + } + + public void setSessionIdIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPrefixPath() { + return this.prefixPath; + } + + public TSUnsetSchemaTemplateReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { + this.prefixPath = prefixPath; + return this; + } + + public void unsetPrefixPath() { + this.prefixPath = null; + } + + /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ + public boolean isSetPrefixPath() { + return this.prefixPath != null; + } + + public void setPrefixPathIsSet(boolean value) { + if (!value) { + this.prefixPath = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getTemplateName() { + return this.templateName; + } + + public TSUnsetSchemaTemplateReq setTemplateName(@org.apache.thrift.annotation.Nullable java.lang.String templateName) { + this.templateName = templateName; + return this; + } + + public void unsetTemplateName() { + this.templateName = null; + } + + /** Returns true if field templateName is set (has been assigned a value) and false otherwise */ + public boolean isSetTemplateName() { + return this.templateName != null; + } + + public void setTemplateNameIsSet(boolean value) { + if (!value) { + this.templateName = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SESSION_ID: + if (value == null) { + unsetSessionId(); + } else { + setSessionId((java.lang.Long)value); + } + break; + + case PREFIX_PATH: + if (value == null) { + unsetPrefixPath(); + } else { + setPrefixPath((java.lang.String)value); + } + break; + + case TEMPLATE_NAME: + if (value == null) { + unsetTemplateName(); + } else { + setTemplateName((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_ID: + return getSessionId(); + + case PREFIX_PATH: + return getPrefixPath(); + + case TEMPLATE_NAME: + return getTemplateName(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SESSION_ID: + return isSetSessionId(); + case PREFIX_PATH: + return isSetPrefixPath(); + case TEMPLATE_NAME: + return isSetTemplateName(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSUnsetSchemaTemplateReq) + return this.equals((TSUnsetSchemaTemplateReq)that); + return false; + } + + public boolean equals(TSUnsetSchemaTemplateReq that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_sessionId = true; + boolean that_present_sessionId = true; + if (this_present_sessionId || that_present_sessionId) { + if (!(this_present_sessionId && that_present_sessionId)) + return false; + if (this.sessionId != that.sessionId) + return false; + } + + boolean this_present_prefixPath = true && this.isSetPrefixPath(); + boolean that_present_prefixPath = true && that.isSetPrefixPath(); + if (this_present_prefixPath || that_present_prefixPath) { + if (!(this_present_prefixPath && that_present_prefixPath)) + return false; + if (!this.prefixPath.equals(that.prefixPath)) + return false; + } + + boolean this_present_templateName = true && this.isSetTemplateName(); + boolean that_present_templateName = true && that.isSetTemplateName(); + if (this_present_templateName || that_present_templateName) { + if (!(this_present_templateName && that_present_templateName)) + return false; + if (!this.templateName.equals(that.templateName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); + + hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); + if (isSetPrefixPath()) + hashCode = hashCode * 8191 + prefixPath.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTemplateName()) ? 131071 : 524287); + if (isSetTemplateName()) + hashCode = hashCode * 8191 + templateName.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSUnsetSchemaTemplateReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrefixPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTemplateName(), other.isSetTemplateName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTemplateName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.templateName, other.templateName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSUnsetSchemaTemplateReq("); + boolean first = true; + + sb.append("sessionId:"); + sb.append(this.sessionId); + first = false; + if (!first) sb.append(", "); + sb.append("prefixPath:"); + if (this.prefixPath == null) { + sb.append("null"); + } else { + sb.append(this.prefixPath); + } + first = false; + if (!first) sb.append(", "); + sb.append("templateName:"); + if (this.templateName == null) { + sb.append("null"); + } else { + sb.append(this.templateName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. + if (prefixPath == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); + } + if (templateName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'templateName' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSUnsetSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSUnsetSchemaTemplateReqStandardScheme getScheme() { + return new TSUnsetSchemaTemplateReqStandardScheme(); + } + } + + private static class TSUnsetSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSUnsetSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PREFIX_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TEMPLATE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.templateName = iprot.readString(); + struct.setTemplateNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetSessionId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSUnsetSchemaTemplateReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(struct.sessionId); + oprot.writeFieldEnd(); + if (struct.prefixPath != null) { + oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); + oprot.writeString(struct.prefixPath); + oprot.writeFieldEnd(); + } + if (struct.templateName != null) { + oprot.writeFieldBegin(TEMPLATE_NAME_FIELD_DESC); + oprot.writeString(struct.templateName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSUnsetSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSUnsetSchemaTemplateReqTupleScheme getScheme() { + return new TSUnsetSchemaTemplateReqTupleScheme(); + } + } + + private static class TSUnsetSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSUnsetSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeI64(struct.sessionId); + oprot.writeString(struct.prefixPath); + oprot.writeString(struct.templateName); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSUnsetSchemaTemplateReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.sessionId = iprot.readI64(); + struct.setSessionIdIsSet(true); + struct.prefixPath = iprot.readString(); + struct.setPrefixPathIsSet(true); + struct.templateName = iprot.readString(); + struct.setTemplateNameIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncIdentityInfo.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncIdentityInfo.java new file mode 100644 index 0000000000000..7a8b8c284a425 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncIdentityInfo.java @@ -0,0 +1,680 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSyncIdentityInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSyncIdentityInfo"); + + private static final org.apache.thrift.protocol.TField PIPE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pipeName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSyncIdentityInfoStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSyncIdentityInfoTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.lang.String pipeName; // required + public long createTime; // required + public @org.apache.thrift.annotation.Nullable java.lang.String version; // required + public @org.apache.thrift.annotation.Nullable java.lang.String database; // 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 { + PIPE_NAME((short)1, "pipeName"), + CREATE_TIME((short)2, "createTime"), + VERSION((short)3, "version"), + DATABASE((short)4, "database"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PIPE_NAME + return PIPE_NAME; + case 2: // CREATE_TIME + return CREATE_TIME; + case 3: // VERSION + return VERSION; + case 4: // DATABASE + return DATABASE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + 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.PIPE_NAME, new org.apache.thrift.meta_data.FieldMetaData("pipeName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSyncIdentityInfo.class, metaDataMap); + } + + public TSyncIdentityInfo() { + } + + public TSyncIdentityInfo( + java.lang.String pipeName, + long createTime, + java.lang.String version, + java.lang.String database) + { + this(); + this.pipeName = pipeName; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.version = version; + this.database = database; + } + + /** + * Performs a deep copy on other. + */ + public TSyncIdentityInfo(TSyncIdentityInfo other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetPipeName()) { + this.pipeName = other.pipeName; + } + this.createTime = other.createTime; + if (other.isSetVersion()) { + this.version = other.version; + } + if (other.isSetDatabase()) { + this.database = other.database; + } + } + + @Override + public TSyncIdentityInfo deepCopy() { + return new TSyncIdentityInfo(this); + } + + @Override + public void clear() { + this.pipeName = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.version = null; + this.database = null; + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getPipeName() { + return this.pipeName; + } + + public TSyncIdentityInfo setPipeName(@org.apache.thrift.annotation.Nullable java.lang.String pipeName) { + this.pipeName = pipeName; + return this; + } + + public void unsetPipeName() { + this.pipeName = null; + } + + /** Returns true if field pipeName is set (has been assigned a value) and false otherwise */ + public boolean isSetPipeName() { + return this.pipeName != null; + } + + public void setPipeNameIsSet(boolean value) { + if (!value) { + this.pipeName = null; + } + } + + public long getCreateTime() { + return this.createTime; + } + + public TSyncIdentityInfo setCreateTime(long createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + return this; + } + + public void unsetCreateTime() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getVersion() { + return this.version; + } + + public TSyncIdentityInfo setVersion(@org.apache.thrift.annotation.Nullable java.lang.String version) { + this.version = version; + return this; + } + + public void unsetVersion() { + this.version = null; + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return this.version != null; + } + + public void setVersionIsSet(boolean value) { + if (!value) { + this.version = null; + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getDatabase() { + return this.database; + } + + public TSyncIdentityInfo setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) { + this.database = database; + return this; + } + + public void unsetDatabase() { + this.database = null; + } + + /** Returns true if field database is set (has been assigned a value) and false otherwise */ + public boolean isSetDatabase() { + return this.database != null; + } + + public void setDatabaseIsSet(boolean value) { + if (!value) { + this.database = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case PIPE_NAME: + if (value == null) { + unsetPipeName(); + } else { + setPipeName((java.lang.String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((java.lang.Long)value); + } + break; + + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((java.lang.String)value); + } + break; + + case DATABASE: + if (value == null) { + unsetDatabase(); + } else { + setDatabase((java.lang.String)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case PIPE_NAME: + return getPipeName(); + + case CREATE_TIME: + return getCreateTime(); + + case VERSION: + return getVersion(); + + case DATABASE: + return getDatabase(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case PIPE_NAME: + return isSetPipeName(); + case CREATE_TIME: + return isSetCreateTime(); + case VERSION: + return isSetVersion(); + case DATABASE: + return isSetDatabase(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSyncIdentityInfo) + return this.equals((TSyncIdentityInfo)that); + return false; + } + + public boolean equals(TSyncIdentityInfo that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_pipeName = true && this.isSetPipeName(); + boolean that_present_pipeName = true && that.isSetPipeName(); + if (this_present_pipeName || that_present_pipeName) { + if (!(this_present_pipeName && that_present_pipeName)) + return false; + if (!this.pipeName.equals(that.pipeName)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_version = true && this.isSetVersion(); + boolean that_present_version = true && that.isSetVersion(); + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (!this.version.equals(that.version)) + return false; + } + + boolean this_present_database = true && this.isSetDatabase(); + boolean that_present_database = true && that.isSetDatabase(); + if (this_present_database || that_present_database) { + if (!(this_present_database && that_present_database)) + return false; + if (!this.database.equals(that.database)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetPipeName()) ? 131071 : 524287); + if (isSetPipeName()) + hashCode = hashCode * 8191 + pipeName.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createTime); + + hashCode = hashCode * 8191 + ((isSetVersion()) ? 131071 : 524287); + if (isSetVersion()) + hashCode = hashCode * 8191 + version.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287); + if (isSetDatabase()) + hashCode = hashCode * 8191 + database.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSyncIdentityInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetPipeName(), other.isSetPipeName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPipeName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pipeName, other.pipeName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetDatabase(), other.isSetDatabase()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatabase()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSyncIdentityInfo("); + boolean first = true; + + sb.append("pipeName:"); + if (this.pipeName == null) { + sb.append("null"); + } else { + sb.append(this.pipeName); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("version:"); + if (this.version == null) { + sb.append("null"); + } else { + sb.append(this.version); + } + first = false; + if (!first) sb.append(", "); + sb.append("database:"); + if (this.database == null) { + sb.append("null"); + } else { + sb.append(this.database); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (pipeName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'pipeName' was not present! Struct: " + toString()); + } + // alas, we cannot check 'createTime' because it's a primitive and you chose the non-beans generator. + if (version == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not present! Struct: " + toString()); + } + if (database == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'database' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSyncIdentityInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSyncIdentityInfoStandardScheme getScheme() { + return new TSyncIdentityInfoStandardScheme(); + } + } + + private static class TSyncIdentityInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSyncIdentityInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PIPE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pipeName = iprot.readString(); + struct.setPipeNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DATABASE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.database = iprot.readString(); + struct.setDatabaseIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetCreateTime()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'createTime' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSyncIdentityInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.pipeName != null) { + oprot.writeFieldBegin(PIPE_NAME_FIELD_DESC); + oprot.writeString(struct.pipeName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI64(struct.createTime); + oprot.writeFieldEnd(); + if (struct.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(struct.version); + oprot.writeFieldEnd(); + } + if (struct.database != null) { + oprot.writeFieldBegin(DATABASE_FIELD_DESC); + oprot.writeString(struct.database); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSyncIdentityInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSyncIdentityInfoTupleScheme getScheme() { + return new TSyncIdentityInfoTupleScheme(); + } + } + + private static class TSyncIdentityInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSyncIdentityInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeString(struct.pipeName); + oprot.writeI64(struct.createTime); + oprot.writeString(struct.version); + oprot.writeString(struct.database); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSyncIdentityInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.pipeName = iprot.readString(); + struct.setPipeNameIsSet(true); + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + struct.database = iprot.readString(); + struct.setDatabaseIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncTransportMetaInfo.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncTransportMetaInfo.java new file mode 100644 index 0000000000000..4205f85b015e1 --- /dev/null +++ b/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncTransportMetaInfo.java @@ -0,0 +1,478 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSyncTransportMetaInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSyncTransportMetaInfo"); + + private static final org.apache.thrift.protocol.TField FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fileName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField START_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("startIndex", org.apache.thrift.protocol.TType.I64, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSyncTransportMetaInfoStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSyncTransportMetaInfoTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.lang.String fileName; // required + public long startIndex; // 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 { + FILE_NAME((short)1, "fileName"), + START_INDEX((short)2, "startIndex"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FILE_NAME + return FILE_NAME; + case 2: // START_INDEX + return START_INDEX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __STARTINDEX_ISSET_ID = 0; + 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.FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("fileName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.START_INDEX, new org.apache.thrift.meta_data.FieldMetaData("startIndex", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSyncTransportMetaInfo.class, metaDataMap); + } + + public TSyncTransportMetaInfo() { + } + + public TSyncTransportMetaInfo( + java.lang.String fileName, + long startIndex) + { + this(); + this.fileName = fileName; + this.startIndex = startIndex; + setStartIndexIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TSyncTransportMetaInfo(TSyncTransportMetaInfo other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetFileName()) { + this.fileName = other.fileName; + } + this.startIndex = other.startIndex; + } + + @Override + public TSyncTransportMetaInfo deepCopy() { + return new TSyncTransportMetaInfo(this); + } + + @Override + public void clear() { + this.fileName = null; + setStartIndexIsSet(false); + this.startIndex = 0; + } + + @org.apache.thrift.annotation.Nullable + public java.lang.String getFileName() { + return this.fileName; + } + + public TSyncTransportMetaInfo setFileName(@org.apache.thrift.annotation.Nullable java.lang.String fileName) { + this.fileName = fileName; + return this; + } + + public void unsetFileName() { + this.fileName = null; + } + + /** Returns true if field fileName is set (has been assigned a value) and false otherwise */ + public boolean isSetFileName() { + return this.fileName != null; + } + + public void setFileNameIsSet(boolean value) { + if (!value) { + this.fileName = null; + } + } + + public long getStartIndex() { + return this.startIndex; + } + + public TSyncTransportMetaInfo setStartIndex(long startIndex) { + this.startIndex = startIndex; + setStartIndexIsSet(true); + return this; + } + + public void unsetStartIndex() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTINDEX_ISSET_ID); + } + + /** Returns true if field startIndex is set (has been assigned a value) and false otherwise */ + public boolean isSetStartIndex() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTINDEX_ISSET_ID); + } + + public void setStartIndexIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTINDEX_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case FILE_NAME: + if (value == null) { + unsetFileName(); + } else { + setFileName((java.lang.String)value); + } + break; + + case START_INDEX: + if (value == null) { + unsetStartIndex(); + } else { + setStartIndex((java.lang.Long)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case FILE_NAME: + return getFileName(); + + case START_INDEX: + return getStartIndex(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case FILE_NAME: + return isSetFileName(); + case START_INDEX: + return isSetStartIndex(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSyncTransportMetaInfo) + return this.equals((TSyncTransportMetaInfo)that); + return false; + } + + public boolean equals(TSyncTransportMetaInfo that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_fileName = true && this.isSetFileName(); + boolean that_present_fileName = true && that.isSetFileName(); + if (this_present_fileName || that_present_fileName) { + if (!(this_present_fileName && that_present_fileName)) + return false; + if (!this.fileName.equals(that.fileName)) + return false; + } + + boolean this_present_startIndex = true; + boolean that_present_startIndex = true; + if (this_present_startIndex || that_present_startIndex) { + if (!(this_present_startIndex && that_present_startIndex)) + return false; + if (this.startIndex != that.startIndex) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetFileName()) ? 131071 : 524287); + if (isSetFileName()) + hashCode = hashCode * 8191 + fileName.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startIndex); + + return hashCode; + } + + @Override + public int compareTo(TSyncTransportMetaInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetFileName(), other.isSetFileName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFileName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileName, other.fileName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetStartIndex(), other.isSetStartIndex()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartIndex()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startIndex, other.startIndex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSyncTransportMetaInfo("); + boolean first = true; + + sb.append("fileName:"); + if (this.fileName == null) { + sb.append("null"); + } else { + sb.append(this.fileName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startIndex:"); + sb.append(this.startIndex); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (fileName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileName' was not present! Struct: " + toString()); + } + // alas, we cannot check 'startIndex' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSyncTransportMetaInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSyncTransportMetaInfoStandardScheme getScheme() { + return new TSyncTransportMetaInfoStandardScheme(); + } + } + + private static class TSyncTransportMetaInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSyncTransportMetaInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // FILE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.fileName = iprot.readString(); + struct.setFileNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // START_INDEX + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startIndex = iprot.readI64(); + struct.setStartIndexIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetStartIndex()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'startIndex' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSyncTransportMetaInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.fileName != null) { + oprot.writeFieldBegin(FILE_NAME_FIELD_DESC); + oprot.writeString(struct.fileName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(START_INDEX_FIELD_DESC); + oprot.writeI64(struct.startIndex); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSyncTransportMetaInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSyncTransportMetaInfoTupleScheme getScheme() { + return new TSyncTransportMetaInfoTupleScheme(); + } + } + + private static class TSyncTransportMetaInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSyncTransportMetaInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeString(struct.fileName); + oprot.writeI64(struct.startIndex); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSyncTransportMetaInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.fileName = iprot.readString(); + struct.setFileNameIsSet(true); + struct.startIndex = iprot.readI64(); + struct.setStartIndexIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/RleColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/RleColumnDecoder.java deleted file mode 100644 index a8c06b1f4180d..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/RleColumnDecoder.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.apache.iotdb.session; - -import org.apache.iotdb.session.compress.ColumnDecoder; -import org.apache.iotdb.session.compress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; - -import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.List; - -public class RleColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public RleColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.RLE); - } - - @Override - public List decode(ByteBuffer buffer, ColumnEntry columnEntry) { - int count = columnEntry.getSize(); - switch (dataType) { - case BOOLEAN: - { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readBoolean(buffer)); - } - return result; - } - case INT32: - case DATE: - { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readInt(buffer)); - } - return result; - } - case INT64: - case TIMESTAMP: - { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readLong(buffer)); - } - return result; - } - case FLOAT: - { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readFloat(buffer)); - } - return result; - } - case DOUBLE: - { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readDouble(buffer)); - } - return result; - } - case TEXT: - case STRING: - case BLOB: - { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - Binary binary = decoder.readBinary(buffer); - result.add(binary); - } - return result; - } - default: - throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); - } - } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return null; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index 0f6bd3d4a0c17..ad89bfcf3ebff 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -2983,8 +2983,15 @@ private TSInsertTabletReq genTSInsertTabletReq(Tablet tablet, boolean sorted, bo request.setPrefixPath(tablet.getDeviceId()); request.setIsAligned(isAligned); - // 新增编码逻辑 if (this.enableRPCCompression) { + request.setIsCompressed(true); + for (IMeasurementSchema measurementSchema : tablet.getSchemas()) { + if (measurementSchema.getMeasurementName() == null) { + throw new IllegalArgumentException("measurement should be non null value"); + } + request.addToEncodingTypes( + this.columnEncodersMap.get(measurementSchema.getType()).ordinal()); + } RpcEncoder rpcEncoder = new RpcEncoder(this.columnEncodersMap, this.compressionType); request.setTimestamps(rpcEncoder.encodeTimestamps(tablet)); request.setValues(rpcEncoder.encodeValues(tablet)); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java index 58d46d4b5a3b3..65a7e947e97c0 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java @@ -68,7 +68,6 @@ import org.apache.thrift.TException; import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.protocol.TCompactProtocol; import org.apache.thrift.transport.TTransport; import org.apache.thrift.transport.TTransportException; import org.apache.tsfile.utils.Pair; @@ -203,11 +202,7 @@ private void init(TEndPoint endPoint, boolean useSSL, String trustStore, String throw new IoTDBConnectionException(e); } - if (session.enableRPCCompression) { - client = new IClientRPCService.Client(new TCompactProtocol(transport)); - } else { - client = new IClientRPCService.Client(new TBinaryProtocol(transport)); - } + client = new IClientRPCService.Client(new TBinaryProtocol(transport)); client = RpcUtils.newSynchronizedClient(client); TSOpenSessionReq openReq = new TSOpenSessionReq(); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java index 18bfc4d14d57b..e2d51fbfc6aa1 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java @@ -269,9 +269,9 @@ public TableSessionBuilder isCompressed(Boolean isCompressed) { } /** - * 设置编码类型 + * Setting the encoding type * - * @param compressionType 压缩类型 + * @param compressionType Compression type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withCompressionType(CompressionType compressionType) { @@ -280,7 +280,7 @@ public TableSessionBuilder withCompressionType(CompressionType compressionType) } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withTimeStampEncoding(TSEncoding tsEncoding) { @@ -289,7 +289,7 @@ public TableSessionBuilder withTimeStampEncoding(TSEncoding tsEncoding) { } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withBooleanEncoding(TSEncoding tsEncoding) { @@ -298,7 +298,7 @@ public TableSessionBuilder withBooleanEncoding(TSEncoding tsEncoding) { } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withInt32Encoding(TSEncoding tsEncoding) { @@ -307,7 +307,7 @@ public TableSessionBuilder withInt32Encoding(TSEncoding tsEncoding) { } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withInt64Encoding(TSEncoding tsEncoding) { @@ -316,7 +316,7 @@ public TableSessionBuilder withInt64Encoding(TSEncoding tsEncoding) { } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withFloatEncoding(TSEncoding tsEncoding) { @@ -325,7 +325,7 @@ public TableSessionBuilder withFloatEncoding(TSEncoding tsEncoding) { } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withDoubleEncoding(TSEncoding tsEncoding) { @@ -334,7 +334,7 @@ public TableSessionBuilder withDoubleEncoding(TSEncoding tsEncoding) { } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withStringEncoding(TSEncoding tsEncoding) { @@ -343,7 +343,7 @@ public TableSessionBuilder withStringEncoding(TSEncoding tsEncoding) { } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withTextEncoding(TSEncoding tsEncoding) { @@ -352,7 +352,7 @@ public TableSessionBuilder withTextEncoding(TSEncoding tsEncoding) { } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withBlobEncoding(TSEncoding tsEncoding) { @@ -361,7 +361,7 @@ public TableSessionBuilder withBlobEncoding(TSEncoding tsEncoding) { } /** - * @param tsEncoding 编码类型 + * @param tsEncoding Encoding type * @return the current {@link TableSessionBuilder} instance. */ public TableSessionBuilder withDateEncoding(TSEncoding tsEncoding) { @@ -382,7 +382,7 @@ public ITableSession build() throws IoTDBConnectionException { } this.sqlDialect = TABLE; Session newSession = new Session(this); - newSession.open(enableCompression, connectionTimeoutInMs); + newSession.open(isCompressed, connectionTimeoutInMs); return new TableSession(newSession); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java index 28d9ea438c2fd..9b273e1b8f80e 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.encoding.decoder.Decoder; @@ -5,11 +23,10 @@ import org.apache.tsfile.file.metadata.enums.TSEncoding; import java.nio.ByteBuffer; -import java.util.List; public interface ColumnDecoder { - List decode(ByteBuffer buffer, ColumnEntry columnEntry); + Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); Decoder getDecoder(TSDataType type, TSEncoding encodingType); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java index d897decee14ec..3a9528c4c43ef 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.encoding.encoder.Encoder; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java index 05bf8cffd5d61..f67eca65b306c 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.enums.TSDataType; @@ -14,7 +32,7 @@ public class ColumnEntry implements Serializable { private Integer unCompressedSize; private TSDataType dataType; private TSEncoding encodingType; - private Integer size; // 列条目的总大小 + private Integer size; public ColumnEntry() { updateSize(); @@ -39,23 +57,10 @@ public ColumnEntry( */ public void updateSize() { int totalSize = 0; - - if (compressedSize != null) { - totalSize += 4; - } - - if (unCompressedSize != null) { - totalSize += 4; - } - - if (dataType != null) { - totalSize += 1; - } - - if (encodingType != null) { - totalSize += 1; - } - + totalSize += 4; + totalSize += 4; + totalSize += 1; + totalSize += 1; this.size = totalSize; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java index 935071b456ccf..3f48d7bf691a0 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import java.io.Serializable; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java index 33977391055ae..32a672dd4826b 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.encoding.decoder.Decoder; @@ -7,11 +25,7 @@ import org.apache.tsfile.utils.Binary; import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.List; -// TODO 看看之前的方法能不能和 Plain 放到一起 -// TODO Decoder 封装的很好,感觉 decode方法可以多个解码器公用 public class PlainColumnDecoder implements ColumnDecoder { private final Decoder decoder; private final TSDataType dataType; @@ -22,48 +36,47 @@ public PlainColumnDecoder(TSDataType dataType) { } @Override - public List decode(ByteBuffer buffer, ColumnEntry columnEntry) { - int count = columnEntry.getSize(); + public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { switch (dataType) { case BOOLEAN: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readBoolean(buffer)); + boolean[] result = new boolean[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBoolean(buffer); } return result; } case INT32: case DATE: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readInt(buffer)); + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); } return result; } case INT64: case TIMESTAMP: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readLong(buffer)); + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); } return result; } case FLOAT: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readFloat(buffer)); + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); } return result; } case DOUBLE: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readDouble(buffer)); + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); } return result; } @@ -71,10 +84,9 @@ public List decode(ByteBuffer buffer, ColumnEntry columnEntry) { case STRING: case BLOB: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - Binary binary = decoder.readBinary(buffer); - result.add(binary); + Binary[] result = new Binary[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBinary(buffer); } return result; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java index 2c34b64e341d1..df1618d6d0c92 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.encoding.encoder.Encoder; @@ -62,7 +80,7 @@ public byte[] encode(List data) { } } - PublicBAOS outputStream = new PublicBAOS(); + PublicBAOS outputStream = new PublicBAOS(originalSize); try { switch (dataType) { case BOOLEAN: @@ -120,12 +138,11 @@ public byte[] encode(List data) { } encoder.flush(outputStream); byte[] encodedData = outputStream.toByteArray(); - - ColumnEntry entry = new ColumnEntry(); - entry.setCompressedSize(encodedData.length); - entry.setUnCompressedSize(originalSize); - entry.setDataType(dataType); - entry.setEncodingType(TSEncoding.PLAIN); + columnEntry = new ColumnEntry(); + columnEntry.setCompressedSize(encodedData.length); + columnEntry.setUnCompressedSize(originalSize); + columnEntry.setDataType(dataType); + columnEntry.setEncodingType(TSEncoding.PLAIN); return encodedData; } catch (IOException e) { diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnDecoder.java new file mode 100644 index 0000000000000..4f061df90fbf0 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnDecoder.java @@ -0,0 +1,101 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.session.compress; + +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; + +import java.nio.ByteBuffer; + +public class RleColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public RleColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.RLE); + } + + @Override + public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + switch (dataType) { + case BOOLEAN: + { + boolean[] result = new boolean[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBoolean(buffer); + } + return result; + } + case INT32: + case DATE: + { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; + } + case INT64: + case TIMESTAMP: + { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; + } + case FLOAT: + { + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); + } + return result; + } + case DOUBLE: + { + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); + } + return result; + } + case TEXT: + case STRING: + case BLOB: + { + Binary[] result = new Binary[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBinary(buffer); + } + return result; + } + default: + throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); + } + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return null; + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java index f305f0e445537..0259dc652d9d0 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.encoding.encoder.Encoder; @@ -65,7 +83,6 @@ public byte[] encode(List data) { } encoder.flush(outputStream); byte[] encodedData = outputStream.toByteArray(); - // 计算 ColumnEntry 的信息 columnEntry.setUnCompressedSize(getUnCompressedSize(data)); columnEntry.setCompressedSize(encodedData.length); columnEntry.setEncodingType(TSEncoding.RLE); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java index 1fcfda4b63958..24a4e0c565a4c 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.compress.ICompressor; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java index c42f844646fb8..07ddc261bc025 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java @@ -1,53 +1,91 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; -import org.apache.iotdb.session.RleColumnDecoder; - import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.List; public class RpcDecoder { private MetaHead metaHead = new MetaHead(); + private MetaHead metaHeadForTimeStamp = new MetaHead(); private Integer MetaHeaderLength = 0; + private Integer MetaHeaderForTimeStampLength = 0; public void readMetaHead(ByteBuffer buffer) { this.MetaHeaderLength = buffer.getInt(buffer.limit() - Integer.BYTES); byte[] metaBytes = new byte[MetaHeaderLength]; - buffer.position(MetaHeaderLength); + buffer.position(buffer.limit() - Integer.BYTES - MetaHeaderLength); buffer.get(metaBytes); this.metaHead = MetaHead.fromBytes(metaBytes); } - public void decodeTimestamps(ByteBuffer buffer) { - List timestampList = (List) decodeColumn(0, buffer); - long[] timestamps = new long[timestampList.size()]; - for (int i = 0; i < timestampList.size(); i++) { - timestamps[i] = timestampList.get(i); - } + public void readMetaHeadForTimeStamp(ByteBuffer buffer) { + this.MetaHeaderForTimeStampLength = buffer.getInt(buffer.limit() - Integer.BYTES); + byte[] metaBytes = new byte[MetaHeaderForTimeStampLength]; + buffer.position(buffer.limit() - Integer.BYTES - MetaHeaderForTimeStampLength); + buffer.get(metaBytes); + this.metaHeadForTimeStamp = MetaHead.fromBytes(metaBytes); + } + + public long[] readTimesFromBuffer(ByteBuffer buffer, int size) { + return decodeTimestamps(buffer, size); + } + + public long[] decodeTimestamps(ByteBuffer buffer, int size) { + int savePosition = buffer.position(); + readMetaHeadForTimeStamp(buffer); + buffer.position(savePosition); + long[] timestamps = (long[]) decodeColumnForTimeStamp(buffer, size); + return timestamps; } - public void decodeValues(ByteBuffer buffer) { + public Object[] decodeValues(ByteBuffer buffer, int rowCount) { + int savePosition = buffer.position(); readMetaHead(buffer); + buffer.position(savePosition); int columnNum = metaHead.getColumnEntries().size(); - List> result = new ArrayList<>(); + Object[] values = new Object[columnNum]; for (int i = 0; i < columnNum; i++) { - List value = decodeColumn(i, buffer); - result.add((List) value); + Object value = decodeColumn(i, buffer, rowCount); + values[i] = value; } + return values; } - public List decodeColumn(int columnIndex, ByteBuffer buffer) { + public Object decodeColumn(int columnIndex, ByteBuffer buffer, int rowCount) { ColumnEntry columnEntry = metaHead.getColumnEntries().get(columnIndex); TSDataType dataType = columnEntry.getDataType(); TSEncoding encodingType = columnEntry.getEncodingType(); + ColumnDecoder columnDecoder = createDecoder(dataType, encodingType); + + return columnDecoder.decode(buffer, columnEntry, rowCount); + } + public Object decodeColumnForTimeStamp(ByteBuffer buffer, int rowCount) { + ColumnEntry columnEntry = metaHeadForTimeStamp.getColumnEntries().get(0); + TSDataType dataType = columnEntry.getDataType(); + TSEncoding encodingType = columnEntry.getEncodingType(); ColumnDecoder columnDecoder = createDecoder(dataType, encodingType); - List value = columnDecoder.decode(buffer, columnEntry); - return value; + return columnDecoder.decode(buffer, columnEntry, rowCount); } private ColumnDecoder createDecoder(TSDataType dataType, TSEncoding encodingType) { diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java index 2c78628b6f524..84a937389c867 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.enums.TSDataType; @@ -14,71 +32,77 @@ public class RpcEncoder { private final MetaHead metaHead; + private final MetaHead metaHeadForTimeStamp; private final Map columnEncodersMap; private final CompressionType compressionType; - private List encodedData; public RpcEncoder( Map columnEncodersMap, CompressionType compressionType) { this.columnEncodersMap = columnEncodersMap; this.compressionType = compressionType; this.metaHead = new MetaHead(); - this.encodedData = new ArrayList<>(); + this.metaHeadForTimeStamp = new MetaHead(); } /** - * 获取 tablet 中的时间戳列,然后编码放入 encodedData1 中 + * Get the timestamp column in tablet * - * @param tablet 数据 - * @throws IOException 如果编码过程中发生IO错误 + * @param tablet data + * @throws IOException An IO exception occurs */ public ByteBuffer encodeTimestamps(Tablet tablet) { - TSEncoding encoding = columnEncodersMap.getOrDefault(TSDataType.INT64, TSEncoding.PLAIN); - ColumnEncoder encoder = createEncoder(TSDataType.INT64, encoding); - // 1.获取时间戳数据 + // 1.Get timestamp data long[] timestamps = tablet.getTimestamps(); List timestampsList = new ArrayList<>(); - // 2.转 List + // 2.transform List for (int i = 0; i < timestamps.length; i++) { timestampsList.add(timestamps[i]); } - // 3.编码 - byte[] encoded = encoder.encode(timestampsList); - ByteBuffer timeBuffer = ByteBuffer.wrap(encoded); - // 4.调整 ByteBuffer 的 limit 为实际写入的数据长度 + // 3.encoder + byte[] encoded = encodeTimeStampColumn(TSDataType.INT64, timestampsList); + // 4. Serializing MetaHead + byte[] metaHeadEncoder = getMetaHeadForTimeStamp().toBytes(); + + ByteBuffer timeBuffer = ByteBuffer.allocate(encoded.length + metaHeadEncoder.length + 4); + timeBuffer.put(encoded); + timeBuffer.put(metaHeadEncoder); + // 5. metaHead size + timeBuffer.putInt(metaHeadEncoder.length); + System.out.println("metaHead size: " + metaHeadEncoder.length); + // 6.Adjust the ByteBuffer limit to the actual length of the data written timeBuffer.flip(); return timeBuffer; } - /** 获取 tablet 中的值列,然后编码放入 encodedData2 中 TODO 还有很多考虑 */ + /** Get the value columns from the tablet and encode them into encodedValues */ public ByteBuffer encodeValues(Tablet tablet) { - // 1. 预估最大空间(假设每列最大为 rowSize * 16 字节) + // 1. Estimated maximum space (assuming each column is at most rowSize * 16 bytes) int estimatedSize = tablet.getRowSize() * 16 * tablet.getSchemas().size(); ByteBuffer valueBuffer = ByteBuffer.allocate(estimatedSize); - // 2. 编码每一列 + // 2. Encode each column for (int i = 0; i < tablet.getSchemas().size(); i++) { IMeasurementSchema schema = tablet.getSchemas().get(i); byte[] encoded = encodeColumn(schema.getType(), tablet, i); valueBuffer.put(encoded); } - // 3. 序列化 + // 3. Serializing MetaHead byte[] metaHeadEncoder = getMetaHead().toBytes(); valueBuffer.put(metaHeadEncoder); - // 4. metaHead 长度 + // 4. metaHead size valueBuffer.putInt(metaHeadEncoder.length); - // 5. 调整 ByteBuffer 的 limit 为实际写入的数据长度 + // 5. Adjust the ByteBuffer limit to the actual length of the data written valueBuffer.flip(); return valueBuffer; } public byte[] encodeColumn(TSDataType dataType, Tablet tablet, int columnIndex) { - // 1.获取编码类型 + // 1.Get the encoding type TSEncoding encoding = columnEncodersMap.getOrDefault(dataType, TSEncoding.PLAIN); ColumnEncoder encoder = createEncoder(dataType, encoding); - // 2.获取该列的数据并转换为 List + // 2.Get the data of the column and convert it into a Lis Object columnValues = tablet.getValues()[columnIndex]; List valueList; switch (dataType) { @@ -112,6 +136,7 @@ public byte[] encodeColumn(TSDataType dataType, Tablet tablet, int columnIndex) for (boolean v : boolArray) boolList.add(v); valueList = boolList; break; + case STRING: case TEXT: Object[] textArray = (Object[]) columnValues; List textList = new ArrayList<>(textArray.length); @@ -119,25 +144,35 @@ public byte[] encodeColumn(TSDataType dataType, Tablet tablet, int columnIndex) valueList = textList; break; default: - throw new UnsupportedOperationException("不支持的数据类型: " + dataType); + throw new UnsupportedOperationException("Unsupported data types: " + dataType); } - // 3.编码 + // 3.encoder byte[] encoded = encoder.encode(valueList); - // 4.获取 ColumnEntry 内容并添加到 metaHead + // 4.Get ColumnEntry content and add to metaHead metaHead.addColumnEntry(encoder.getColumnEntry()); - // 5.将编码后的数据添加到 encodedData - encodedData.add(encoded); - // 6.返回编码后的数据 + // 5.Returns the encoded data + return encoded; + } + + public byte[] encodeTimeStampColumn(TSDataType dataType, List timestamps) { + // 1.Get the encoding type + TSEncoding encoding = columnEncodersMap.getOrDefault(dataType, TSEncoding.PLAIN); + ColumnEncoder encoder = createEncoder(dataType, encoding); + // 2.encoder + byte[] encoded = encoder.encode(timestamps); + // 3.Get ColumnEntry content and add to metaHead + metaHeadForTimeStamp.addColumnEntry(encoder.getColumnEntry()); + // 4.Returns the encoded data return encoded; } /** - * 根据数据类型和编码类型创建对应的编码器 + * Create the corresponding encoder based on the data type and encoding type * - * @param dataType 数据类型 - * @param encodingType 编码类型 - * @return 列编码器 + * @param dataType data type + * @param encodingType encoding Type + * @return columnEncoder */ private ColumnEncoder createEncoder(TSDataType dataType, TSEncoding encodingType) { switch (encodingType) { @@ -153,20 +188,15 @@ private ColumnEncoder createEncoder(TSDataType dataType, TSEncoding encodingType } /** - * 获取编码后的数据 + * Get metadata header * - * @return 编码后的数据列表 - */ - public List getEncodedData() { - return encodedData; - } - - /** - * 获取元数据头 - * - * @return 元数据头 + * @return metaHeader */ public MetaHead getMetaHead() { return metaHead; } + + public MetaHead getMetaHeadForTimeStamp() { + return metaHeadForTimeStamp; + } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java index 21ddd677bf1db..1218221a4baf9 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.compress.IUnCompressor; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java index 48341d6cbde65..0d208e8b66373 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.encoding.decoder.Decoder; @@ -6,8 +24,6 @@ import org.apache.tsfile.utils.Binary; import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.List; public class Ts2DiffColumnDecoder implements ColumnDecoder { private final Decoder decoder; @@ -19,48 +35,47 @@ public Ts2DiffColumnDecoder(TSDataType dataType) { } @Override - public List decode(ByteBuffer buffer, ColumnEntry columnEntry) { - int count = columnEntry.getSize(); + public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { switch (dataType) { case BOOLEAN: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readBoolean(buffer)); + boolean[] result = new boolean[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBoolean(buffer); } return result; } case INT32: case DATE: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readInt(buffer)); + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); } return result; } case INT64: case TIMESTAMP: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readLong(buffer)); + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); } return result; } case FLOAT: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readFloat(buffer)); + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); } return result; } case DOUBLE: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - result.add(decoder.readDouble(buffer)); + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); } return result; } @@ -68,10 +83,12 @@ public List decode(ByteBuffer buffer, ColumnEntry columnEntry) { case STRING: case BLOB: { - List result = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - Binary binary = decoder.readBinary(buffer); - result.add(binary); + Binary[] result = new Binary[rowCount]; + for (int i = 0; i < rowCount; i++) { + int binarySize = buffer.getInt(); + byte[] binaryValue = new byte[binarySize]; + buffer.get(binaryValue); + result[i] = decoder.readBinary(buffer); } return result; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java index d3f0c0cba04a8..af4d2df915cd7 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.compress; import org.apache.tsfile.encoding.encoder.Encoder; diff --git a/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java new file mode 100644 index 0000000000000..1601dbb7d3a41 --- /dev/null +++ b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java @@ -0,0 +1,146 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.iotdb.session; + +import org.apache.iotdb.isession.ITableSession; +import org.apache.iotdb.rpc.IoTDBConnectionException; +import org.apache.iotdb.rpc.StatementExecutionException; + +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.CompressionType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.BitMap; +import org.apache.tsfile.write.record.Tablet; +import org.apache.tsfile.write.schema.IMeasurementSchema; +import org.apache.tsfile.write.schema.MeasurementSchema; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class RpcCompressedTest { + + @Mock private ITableSession session; + + @Mock private SessionConnection sessionConnection; + + @Before + public void setUp() throws IoTDBConnectionException, StatementExecutionException { + MockitoAnnotations.initMocks(this); + List nodeUrls = Arrays.asList("127.0.0.1:6667"); + session = + new TableSessionBuilder() + .nodeUrls(nodeUrls) + .username("root") + .password("root") + .enableCompression(false) + .enableRedirection(true) + .enableAutoFetch(false) + .isCompressed(true) + .withCompressionType(CompressionType.SNAPPY) + .withBooleanEncoding(TSEncoding.PLAIN) + .withInt32Encoding(TSEncoding.PLAIN) + .withInt64Encoding(TSEncoding.PLAIN) + .withFloatEncoding(TSEncoding.PLAIN) + .withDoubleEncoding(TSEncoding.PLAIN) + .withBlobEncoding(TSEncoding.PLAIN) + .withStringEncoding(TSEncoding.PLAIN) + .withTextEncoding(TSEncoding.PLAIN) + .withDateEncoding(TSEncoding.PLAIN) + .withTimeStampEncoding(TSEncoding.PLAIN) + .build(); + } + + @After + public void tearDown() throws IoTDBConnectionException { + // Close the session pool after each test + if (null != session) { + session.close(); + } + } + + @Test + public void testRpcDecode() throws IoTDBConnectionException, StatementExecutionException { + List schemas = new ArrayList<>(); + MeasurementSchema schema = new MeasurementSchema(); + schema.setMeasurementName("pressure0"); + schema.setDataType(TSDataType.INT32); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure1"); + schema.setDataType(TSDataType.INT64); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure2"); + schema.setDataType(TSDataType.FLOAT); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure3"); + schema.setDataType(TSDataType.DOUBLE); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure4"); + schema.setDataType(TSDataType.TEXT); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure5"); + schema.setDataType(TSDataType.BOOLEAN); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + + long[] timestamp = new long[] {1L, 2L}; + Object[] values = new Object[6]; + values[0] = new int[] {1, 2}; + values[1] = new long[] {1L, 2L}; + values[2] = new float[] {1.1f, 1.2f}; + values[3] = new double[] {0.707, 0.708}; + values[4] = + new Binary[] {new Binary(new byte[] {(byte) 8}), new Binary(new byte[] {(byte) 16})}; + values[5] = new boolean[] {true, false}; + BitMap[] partBitMap = new BitMap[6]; + Tablet tablet = new Tablet("device1", schemas, timestamp, values, partBitMap, 2); + + long[] temp = tablet.getTimestamps(); + for (int i = 0; i < temp.length; i++) { + System.out.print(temp[i] + " "); + } + System.out.println(); + + session.executeNonQueryStatement("use table_0"); + session.insert(tablet); + } +} diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java index bc3ac2d198ba5..754676ba511bb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java @@ -2177,8 +2177,6 @@ public TSStatus insertTablets(TSInsertTabletsReq req) { if (!SESSION_MANAGER.checkLogin(clientSession)) { return getNotLoggedInStatus(); } - // TODO 完成解码 - req.setMeasurementsList( PathUtils.checkIsLegalSingleMeasurementListsAndUpdate(req.getMeasurementsList())); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java index 9467d2b016b46..982a213b678f6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java @@ -91,6 +91,7 @@ import org.apache.iotdb.service.rpc.thrift.TSRawDataQueryReq; import org.apache.iotdb.service.rpc.thrift.TSSetSchemaTemplateReq; import org.apache.iotdb.service.rpc.thrift.TSUnsetSchemaTemplateReq; +import org.apache.iotdb.session.compress.RpcDecoder; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; @@ -332,22 +333,36 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl insertStatement.setDevicePath( DEVICE_PATH_CACHE.getPartialPath(insertTabletReq.getPrefixPath())); insertStatement.setMeasurements(insertTabletReq.getMeasurements().toArray(new String[0])); - long[] timestamps = - QueryDataSetUtils.readTimesFromBuffer(insertTabletReq.timestamps, insertTabletReq.size); + long[] timestamps; + if (insertTabletReq.isIsCompressed()) { + RpcDecoder rpcDecoder = new RpcDecoder(); + timestamps = rpcDecoder.readTimesFromBuffer(insertTabletReq.timestamps, insertTabletReq.size); + } else { + timestamps = + QueryDataSetUtils.readTimesFromBuffer(insertTabletReq.timestamps, insertTabletReq.size); + } + if (timestamps.length != 0) { TimestampPrecisionUtils.checkTimestampPrecision(timestamps[timestamps.length - 1]); } insertStatement.setTimes(timestamps); - insertStatement.setColumns( - QueryDataSetUtils.readTabletValuesFromBuffer( - insertTabletReq.values, - insertTabletReq.types, - insertTabletReq.types.size(), - insertTabletReq.size)); - insertStatement.setBitMaps( - QueryDataSetUtils.readBitMapsFromBuffer( - insertTabletReq.values, insertTabletReq.types.size(), insertTabletReq.size) - .orElse(null)); + if (insertTabletReq.isIsCompressed()) { + RpcDecoder rpcDecoder = new RpcDecoder(); + insertStatement.setColumns( + rpcDecoder.decodeValues(insertTabletReq.values, insertTabletReq.size)); + } else { + insertStatement.setColumns( + QueryDataSetUtils.readTabletValuesFromBuffer( + insertTabletReq.values, + insertTabletReq.types, + insertTabletReq.types.size(), + insertTabletReq.size)); + insertStatement.setBitMaps( + QueryDataSetUtils.readBitMapsFromBuffer( + insertTabletReq.values, insertTabletReq.types.size(), insertTabletReq.size) + .orElse(null)); + } + insertStatement.setRowCount(insertTabletReq.size); TSDataType[] dataTypes = new TSDataType[insertTabletReq.types.size()]; for (int i = 0; i < insertTabletReq.types.size(); i++) { diff --git a/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java new file mode 100644 index 0000000000000..eb4607a26472d --- /dev/null +++ b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java @@ -0,0 +1,50 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + + +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public enum TSConnectionType implements org.apache.thrift.TEnum { + THRIFT_BASED(0), + MQTT_BASED(1), + INTERNAL(2), + REST_BASED(3); + + private final int value; + + private TSConnectionType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + @Override + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + @org.apache.thrift.annotation.Nullable + public static TSConnectionType findByValue(int value) { + switch (value) { + case 0: + return THRIFT_BASED; + case 1: + return MQTT_BASED; + case 2: + return INTERNAL; + case 3: + return REST_BASED; + default: + return null; + } + } +} diff --git a/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java new file mode 100644 index 0000000000000..266a3a661a478 --- /dev/null +++ b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java @@ -0,0 +1,47 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + + +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public enum TSProtocolVersion implements org.apache.thrift.TEnum { + IOTDB_SERVICE_PROTOCOL_V1(0), + IOTDB_SERVICE_PROTOCOL_V2(1), + IOTDB_SERVICE_PROTOCOL_V3(2); + + private final int value; + + private TSProtocolVersion(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + @Override + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + @org.apache.thrift.annotation.Nullable + public static TSProtocolVersion findByValue(int value) { + switch (value) { + case 0: + return IOTDB_SERVICE_PROTOCOL_V1; + case 1: + return IOTDB_SERVICE_PROTOCOL_V2; + case 2: + return IOTDB_SERVICE_PROTOCOL_V3; + default: + return null; + } + } +} diff --git a/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java new file mode 100644 index 0000000000000..d9df17def3e8d --- /dev/null +++ b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java @@ -0,0 +1,696 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSQueryDataSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryDataSet"); + + private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField VALUE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valueList", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField BITMAP_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("bitmapList", org.apache.thrift.protocol.TType.LIST, (short)3); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryDataSetStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryDataSetTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer time; // required + public @org.apache.thrift.annotation.Nullable java.util.List valueList; // required + public @org.apache.thrift.annotation.Nullable java.util.List bitmapList; // 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 { + TIME((short)1, "time"), + VALUE_LIST((short)2, "valueList"), + BITMAP_LIST((short)3, "bitmapList"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TIME + return TIME; + case 2: // VALUE_LIST + return VALUE_LIST; + case 3: // BITMAP_LIST + return BITMAP_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.VALUE_LIST, new org.apache.thrift.meta_data.FieldMetaData("valueList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.BITMAP_LIST, new org.apache.thrift.meta_data.FieldMetaData("bitmapList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryDataSet.class, metaDataMap); + } + + public TSQueryDataSet() { + } + + public TSQueryDataSet( + java.nio.ByteBuffer time, + java.util.List valueList, + java.util.List bitmapList) + { + this(); + this.time = org.apache.thrift.TBaseHelper.copyBinary(time); + this.valueList = valueList; + this.bitmapList = bitmapList; + } + + /** + * Performs a deep copy on other. + */ + public TSQueryDataSet(TSQueryDataSet other) { + if (other.isSetTime()) { + this.time = org.apache.thrift.TBaseHelper.copyBinary(other.time); + } + if (other.isSetValueList()) { + java.util.List __this__valueList = new java.util.ArrayList(other.valueList); + this.valueList = __this__valueList; + } + if (other.isSetBitmapList()) { + java.util.List __this__bitmapList = new java.util.ArrayList(other.bitmapList); + this.bitmapList = __this__bitmapList; + } + } + + @Override + public TSQueryDataSet deepCopy() { + return new TSQueryDataSet(this); + } + + @Override + public void clear() { + this.time = null; + this.valueList = null; + this.bitmapList = null; + } + + public byte[] getTime() { + setTime(org.apache.thrift.TBaseHelper.rightSize(time)); + return time == null ? null : time.array(); + } + + public java.nio.ByteBuffer bufferForTime() { + return org.apache.thrift.TBaseHelper.copyBinary(time); + } + + public TSQueryDataSet setTime(byte[] time) { + this.time = time == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(time.clone()); + return this; + } + + public TSQueryDataSet setTime(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer time) { + this.time = org.apache.thrift.TBaseHelper.copyBinary(time); + return this; + } + + public void unsetTime() { + this.time = null; + } + + /** Returns true if field time is set (has been assigned a value) and false otherwise */ + public boolean isSetTime() { + return this.time != null; + } + + public void setTimeIsSet(boolean value) { + if (!value) { + this.time = null; + } + } + + public int getValueListSize() { + return (this.valueList == null) ? 0 : this.valueList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getValueListIterator() { + return (this.valueList == null) ? null : this.valueList.iterator(); + } + + public void addToValueList(java.nio.ByteBuffer elem) { + if (this.valueList == null) { + this.valueList = new java.util.ArrayList(); + } + this.valueList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getValueList() { + return this.valueList; + } + + public TSQueryDataSet setValueList(@org.apache.thrift.annotation.Nullable java.util.List valueList) { + this.valueList = valueList; + return this; + } + + public void unsetValueList() { + this.valueList = null; + } + + /** Returns true if field valueList is set (has been assigned a value) and false otherwise */ + public boolean isSetValueList() { + return this.valueList != null; + } + + public void setValueListIsSet(boolean value) { + if (!value) { + this.valueList = null; + } + } + + public int getBitmapListSize() { + return (this.bitmapList == null) ? 0 : this.bitmapList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getBitmapListIterator() { + return (this.bitmapList == null) ? null : this.bitmapList.iterator(); + } + + public void addToBitmapList(java.nio.ByteBuffer elem) { + if (this.bitmapList == null) { + this.bitmapList = new java.util.ArrayList(); + } + this.bitmapList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getBitmapList() { + return this.bitmapList; + } + + public TSQueryDataSet setBitmapList(@org.apache.thrift.annotation.Nullable java.util.List bitmapList) { + this.bitmapList = bitmapList; + return this; + } + + public void unsetBitmapList() { + this.bitmapList = null; + } + + /** Returns true if field bitmapList is set (has been assigned a value) and false otherwise */ + public boolean isSetBitmapList() { + return this.bitmapList != null; + } + + public void setBitmapListIsSet(boolean value) { + if (!value) { + this.bitmapList = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case TIME: + if (value == null) { + unsetTime(); + } else { + if (value instanceof byte[]) { + setTime((byte[])value); + } else { + setTime((java.nio.ByteBuffer)value); + } + } + break; + + case VALUE_LIST: + if (value == null) { + unsetValueList(); + } else { + setValueList((java.util.List)value); + } + break; + + case BITMAP_LIST: + if (value == null) { + unsetBitmapList(); + } else { + setBitmapList((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case TIME: + return getTime(); + + case VALUE_LIST: + return getValueList(); + + case BITMAP_LIST: + return getBitmapList(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case TIME: + return isSetTime(); + case VALUE_LIST: + return isSetValueList(); + case BITMAP_LIST: + return isSetBitmapList(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSQueryDataSet) + return this.equals((TSQueryDataSet)that); + return false; + } + + public boolean equals(TSQueryDataSet that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_time = true && this.isSetTime(); + boolean that_present_time = true && that.isSetTime(); + if (this_present_time || that_present_time) { + if (!(this_present_time && that_present_time)) + return false; + if (!this.time.equals(that.time)) + return false; + } + + boolean this_present_valueList = true && this.isSetValueList(); + boolean that_present_valueList = true && that.isSetValueList(); + if (this_present_valueList || that_present_valueList) { + if (!(this_present_valueList && that_present_valueList)) + return false; + if (!this.valueList.equals(that.valueList)) + return false; + } + + boolean this_present_bitmapList = true && this.isSetBitmapList(); + boolean that_present_bitmapList = true && that.isSetBitmapList(); + if (this_present_bitmapList || that_present_bitmapList) { + if (!(this_present_bitmapList && that_present_bitmapList)) + return false; + if (!this.bitmapList.equals(that.bitmapList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetTime()) ? 131071 : 524287); + if (isSetTime()) + hashCode = hashCode * 8191 + time.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValueList()) ? 131071 : 524287); + if (isSetValueList()) + hashCode = hashCode * 8191 + valueList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetBitmapList()) ? 131071 : 524287); + if (isSetBitmapList()) + hashCode = hashCode * 8191 + bitmapList.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSQueryDataSet other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetTime(), other.isSetTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time, other.time); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValueList(), other.isSetValueList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValueList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueList, other.valueList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetBitmapList(), other.isSetBitmapList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBitmapList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitmapList, other.bitmapList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryDataSet("); + boolean first = true; + + sb.append("time:"); + if (this.time == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.time, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("valueList:"); + if (this.valueList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.valueList, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("bitmapList:"); + if (this.bitmapList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.bitmapList, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (time == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'time' was not present! Struct: " + toString()); + } + if (valueList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueList' was not present! Struct: " + toString()); + } + if (bitmapList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'bitmapList' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class TSQueryDataSetStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryDataSetStandardScheme getScheme() { + return new TSQueryDataSetStandardScheme(); + } + } + + private static class TSQueryDataSetStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TIME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.time = iprot.readBinary(); + struct.setTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // VALUE_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.valueList = new java.util.ArrayList(_list0.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem1; + for (int _i2 = 0; _i2 < _list0.size; ++_i2) + { + _elem1 = iprot.readBinary(); + struct.valueList.add(_elem1); + } + iprot.readListEnd(); + } + struct.setValueListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // BITMAP_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); + struct.bitmapList = new java.util.ArrayList(_list3.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem4; + for (int _i5 = 0; _i5 < _list3.size; ++_i5) + { + _elem4 = iprot.readBinary(); + struct.bitmapList.add(_elem4); + } + iprot.readListEnd(); + } + struct.setBitmapListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryDataSet struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.time != null) { + oprot.writeFieldBegin(TIME_FIELD_DESC); + oprot.writeBinary(struct.time); + oprot.writeFieldEnd(); + } + if (struct.valueList != null) { + oprot.writeFieldBegin(VALUE_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valueList.size())); + for (java.nio.ByteBuffer _iter6 : struct.valueList) + { + oprot.writeBinary(_iter6); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.bitmapList != null) { + oprot.writeFieldBegin(BITMAP_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.bitmapList.size())); + for (java.nio.ByteBuffer _iter7 : struct.bitmapList) + { + oprot.writeBinary(_iter7); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSQueryDataSetTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryDataSetTupleScheme getScheme() { + return new TSQueryDataSetTupleScheme(); + } + } + + private static class TSQueryDataSetTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeBinary(struct.time); + { + oprot.writeI32(struct.valueList.size()); + for (java.nio.ByteBuffer _iter8 : struct.valueList) + { + oprot.writeBinary(_iter8); + } + } + { + oprot.writeI32(struct.bitmapList.size()); + for (java.nio.ByteBuffer _iter9 : struct.bitmapList) + { + oprot.writeBinary(_iter9); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.time = iprot.readBinary(); + struct.setTimeIsSet(true); + { + org.apache.thrift.protocol.TList _list10 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.valueList = new java.util.ArrayList(_list10.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem11; + for (int _i12 = 0; _i12 < _list10.size; ++_i12) + { + _elem11 = iprot.readBinary(); + struct.valueList.add(_elem11); + } + } + struct.setValueListIsSet(true); + { + org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.bitmapList = new java.util.ArrayList(_list13.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem14; + for (int _i15 = 0; _i15 < _list13.size; ++_i15) + { + _elem14 = iprot.readBinary(); + struct.bitmapList.add(_elem14); + } + } + struct.setBitmapListIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java new file mode 100644 index 0000000000000..23f0149373b02 --- /dev/null +++ b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java @@ -0,0 +1,582 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSQueryNonAlignDataSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryNonAlignDataSet"); + + private static final org.apache.thrift.protocol.TField TIME_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("timeList", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField VALUE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valueList", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryNonAlignDataSetStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryNonAlignDataSetTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.util.List timeList; // required + public @org.apache.thrift.annotation.Nullable java.util.List valueList; // 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 { + TIME_LIST((short)1, "timeList"), + VALUE_LIST((short)2, "valueList"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TIME_LIST + return TIME_LIST; + case 2: // VALUE_LIST + return VALUE_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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.TIME_LIST, new org.apache.thrift.meta_data.FieldMetaData("timeList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.VALUE_LIST, new org.apache.thrift.meta_data.FieldMetaData("valueList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryNonAlignDataSet.class, metaDataMap); + } + + public TSQueryNonAlignDataSet() { + } + + public TSQueryNonAlignDataSet( + java.util.List timeList, + java.util.List valueList) + { + this(); + this.timeList = timeList; + this.valueList = valueList; + } + + /** + * Performs a deep copy on other. + */ + public TSQueryNonAlignDataSet(TSQueryNonAlignDataSet other) { + if (other.isSetTimeList()) { + java.util.List __this__timeList = new java.util.ArrayList(other.timeList); + this.timeList = __this__timeList; + } + if (other.isSetValueList()) { + java.util.List __this__valueList = new java.util.ArrayList(other.valueList); + this.valueList = __this__valueList; + } + } + + @Override + public TSQueryNonAlignDataSet deepCopy() { + return new TSQueryNonAlignDataSet(this); + } + + @Override + public void clear() { + this.timeList = null; + this.valueList = null; + } + + public int getTimeListSize() { + return (this.timeList == null) ? 0 : this.timeList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTimeListIterator() { + return (this.timeList == null) ? null : this.timeList.iterator(); + } + + public void addToTimeList(java.nio.ByteBuffer elem) { + if (this.timeList == null) { + this.timeList = new java.util.ArrayList(); + } + this.timeList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getTimeList() { + return this.timeList; + } + + public TSQueryNonAlignDataSet setTimeList(@org.apache.thrift.annotation.Nullable java.util.List timeList) { + this.timeList = timeList; + return this; + } + + public void unsetTimeList() { + this.timeList = null; + } + + /** Returns true if field timeList is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeList() { + return this.timeList != null; + } + + public void setTimeListIsSet(boolean value) { + if (!value) { + this.timeList = null; + } + } + + public int getValueListSize() { + return (this.valueList == null) ? 0 : this.valueList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getValueListIterator() { + return (this.valueList == null) ? null : this.valueList.iterator(); + } + + public void addToValueList(java.nio.ByteBuffer elem) { + if (this.valueList == null) { + this.valueList = new java.util.ArrayList(); + } + this.valueList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getValueList() { + return this.valueList; + } + + public TSQueryNonAlignDataSet setValueList(@org.apache.thrift.annotation.Nullable java.util.List valueList) { + this.valueList = valueList; + return this; + } + + public void unsetValueList() { + this.valueList = null; + } + + /** Returns true if field valueList is set (has been assigned a value) and false otherwise */ + public boolean isSetValueList() { + return this.valueList != null; + } + + public void setValueListIsSet(boolean value) { + if (!value) { + this.valueList = null; + } + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case TIME_LIST: + if (value == null) { + unsetTimeList(); + } else { + setTimeList((java.util.List)value); + } + break; + + case VALUE_LIST: + if (value == null) { + unsetValueList(); + } else { + setValueList((java.util.List)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case TIME_LIST: + return getTimeList(); + + case VALUE_LIST: + return getValueList(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case TIME_LIST: + return isSetTimeList(); + case VALUE_LIST: + return isSetValueList(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSQueryNonAlignDataSet) + return this.equals((TSQueryNonAlignDataSet)that); + return false; + } + + public boolean equals(TSQueryNonAlignDataSet that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_timeList = true && this.isSetTimeList(); + boolean that_present_timeList = true && that.isSetTimeList(); + if (this_present_timeList || that_present_timeList) { + if (!(this_present_timeList && that_present_timeList)) + return false; + if (!this.timeList.equals(that.timeList)) + return false; + } + + boolean this_present_valueList = true && this.isSetValueList(); + boolean that_present_valueList = true && that.isSetValueList(); + if (this_present_valueList || that_present_valueList) { + if (!(this_present_valueList && that_present_valueList)) + return false; + if (!this.valueList.equals(that.valueList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetTimeList()) ? 131071 : 524287); + if (isSetTimeList()) + hashCode = hashCode * 8191 + timeList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetValueList()) ? 131071 : 524287); + if (isSetValueList()) + hashCode = hashCode * 8191 + valueList.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(TSQueryNonAlignDataSet other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetTimeList(), other.isSetTimeList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeList, other.timeList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetValueList(), other.isSetValueList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValueList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueList, other.valueList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryNonAlignDataSet("); + boolean first = true; + + sb.append("timeList:"); + if (this.timeList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.timeList, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("valueList:"); + if (this.valueList == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.valueList, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (timeList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeList' was not present! Struct: " + toString()); + } + if (valueList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueList' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); + } + } + + private static class TSQueryNonAlignDataSetStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryNonAlignDataSetStandardScheme getScheme() { + return new TSQueryNonAlignDataSetStandardScheme(); + } + } + + private static class TSQueryNonAlignDataSetStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TIME_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); + struct.timeList = new java.util.ArrayList(_list16.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem17; + for (int _i18 = 0; _i18 < _list16.size; ++_i18) + { + _elem17 = iprot.readBinary(); + struct.timeList.add(_elem17); + } + iprot.readListEnd(); + } + struct.setTimeListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // VALUE_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list19 = iprot.readListBegin(); + struct.valueList = new java.util.ArrayList(_list19.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem20; + for (int _i21 = 0; _i21 < _list19.size; ++_i21) + { + _elem20 = iprot.readBinary(); + struct.valueList.add(_elem20); + } + iprot.readListEnd(); + } + struct.setValueListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.timeList != null) { + oprot.writeFieldBegin(TIME_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.timeList.size())); + for (java.nio.ByteBuffer _iter22 : struct.timeList) + { + oprot.writeBinary(_iter22); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.valueList != null) { + oprot.writeFieldBegin(VALUE_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valueList.size())); + for (java.nio.ByteBuffer _iter23 : struct.valueList) + { + oprot.writeBinary(_iter23); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSQueryNonAlignDataSetTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSQueryNonAlignDataSetTupleScheme getScheme() { + return new TSQueryNonAlignDataSetTupleScheme(); + } + } + + private static class TSQueryNonAlignDataSetTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + oprot.writeI32(struct.timeList.size()); + for (java.nio.ByteBuffer _iter24 : struct.timeList) + { + oprot.writeBinary(_iter24); + } + } + { + oprot.writeI32(struct.valueList.size()); + for (java.nio.ByteBuffer _iter25 : struct.valueList) + { + oprot.writeBinary(_iter25); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list26 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.timeList = new java.util.ArrayList(_list26.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem27; + for (int _i28 = 0; _i28 < _list26.size; ++_i28) + { + _elem27 = iprot.readBinary(); + struct.timeList.add(_elem27); + } + } + struct.setTimeListIsSet(true); + { + org.apache.thrift.protocol.TList _list29 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.valueList = new java.util.ArrayList(_list29.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem30; + for (int _i31 = 0; _i31 < _list29.size; ++_i31) + { + _elem30 = iprot.readBinary(); + struct.valueList.add(_elem30); + } + } + struct.setValueListIsSet(true); + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java new file mode 100644 index 0000000000000..3f969d6d1e81a --- /dev/null +++ b/iotdb-protocol/thrift-datanode/src/main/thrift/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java @@ -0,0 +1,1481 @@ +/** + * Autogenerated by Thrift Compiler (0.20.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.iotdb.service.rpc.thrift; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") +public class TSTracingInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSTracingInfo"); + + private static final org.apache.thrift.protocol.TField ACTIVITY_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("activityList", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField ELAPSED_TIME_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsedTimeList", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField SERIES_PATH_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("seriesPathNum", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField SEQ_FILE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("seqFileNum", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField UN_SEQ_FILE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("unSeqFileNum", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField SEQUENCE_CHUNK_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("sequenceChunkNum", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField SEQUENCE_CHUNK_POINT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("sequenceChunkPointNum", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField UNSEQUENCE_CHUNK_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("unsequenceChunkNum", org.apache.thrift.protocol.TType.I32, (short)8); + private static final org.apache.thrift.protocol.TField UNSEQUENCE_CHUNK_POINT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("unsequenceChunkPointNum", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField TOTAL_PAGE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPageNum", org.apache.thrift.protocol.TType.I32, (short)10); + private static final org.apache.thrift.protocol.TField OVERLAPPED_PAGE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("overlappedPageNum", org.apache.thrift.protocol.TType.I32, (short)11); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSTracingInfoStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSTracingInfoTupleSchemeFactory(); + + public @org.apache.thrift.annotation.Nullable java.util.List activityList; // required + public @org.apache.thrift.annotation.Nullable java.util.List elapsedTimeList; // required + public int seriesPathNum; // optional + public int seqFileNum; // optional + public int unSeqFileNum; // optional + public int sequenceChunkNum; // optional + public long sequenceChunkPointNum; // optional + public int unsequenceChunkNum; // optional + public long unsequenceChunkPointNum; // optional + public int totalPageNum; // optional + public int overlappedPageNum; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ACTIVITY_LIST((short)1, "activityList"), + ELAPSED_TIME_LIST((short)2, "elapsedTimeList"), + SERIES_PATH_NUM((short)3, "seriesPathNum"), + SEQ_FILE_NUM((short)4, "seqFileNum"), + UN_SEQ_FILE_NUM((short)5, "unSeqFileNum"), + SEQUENCE_CHUNK_NUM((short)6, "sequenceChunkNum"), + SEQUENCE_CHUNK_POINT_NUM((short)7, "sequenceChunkPointNum"), + UNSEQUENCE_CHUNK_NUM((short)8, "unsequenceChunkNum"), + UNSEQUENCE_CHUNK_POINT_NUM((short)9, "unsequenceChunkPointNum"), + TOTAL_PAGE_NUM((short)10, "totalPageNum"), + OVERLAPPED_PAGE_NUM((short)11, "overlappedPageNum"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ACTIVITY_LIST + return ACTIVITY_LIST; + case 2: // ELAPSED_TIME_LIST + return ELAPSED_TIME_LIST; + case 3: // SERIES_PATH_NUM + return SERIES_PATH_NUM; + case 4: // SEQ_FILE_NUM + return SEQ_FILE_NUM; + case 5: // UN_SEQ_FILE_NUM + return UN_SEQ_FILE_NUM; + case 6: // SEQUENCE_CHUNK_NUM + return SEQUENCE_CHUNK_NUM; + case 7: // SEQUENCE_CHUNK_POINT_NUM + return SEQUENCE_CHUNK_POINT_NUM; + case 8: // UNSEQUENCE_CHUNK_NUM + return UNSEQUENCE_CHUNK_NUM; + case 9: // UNSEQUENCE_CHUNK_POINT_NUM + return UNSEQUENCE_CHUNK_POINT_NUM; + case 10: // TOTAL_PAGE_NUM + return TOTAL_PAGE_NUM; + case 11: // OVERLAPPED_PAGE_NUM + return OVERLAPPED_PAGE_NUM; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + @Override + public short getThriftFieldId() { + return _thriftId; + } + + @Override + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SERIESPATHNUM_ISSET_ID = 0; + private static final int __SEQFILENUM_ISSET_ID = 1; + private static final int __UNSEQFILENUM_ISSET_ID = 2; + private static final int __SEQUENCECHUNKNUM_ISSET_ID = 3; + private static final int __SEQUENCECHUNKPOINTNUM_ISSET_ID = 4; + private static final int __UNSEQUENCECHUNKNUM_ISSET_ID = 5; + private static final int __UNSEQUENCECHUNKPOINTNUM_ISSET_ID = 6; + private static final int __TOTALPAGENUM_ISSET_ID = 7; + private static final int __OVERLAPPEDPAGENUM_ISSET_ID = 8; + private short __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.SERIES_PATH_NUM,_Fields.SEQ_FILE_NUM,_Fields.UN_SEQ_FILE_NUM,_Fields.SEQUENCE_CHUNK_NUM,_Fields.SEQUENCE_CHUNK_POINT_NUM,_Fields.UNSEQUENCE_CHUNK_NUM,_Fields.UNSEQUENCE_CHUNK_POINT_NUM,_Fields.TOTAL_PAGE_NUM,_Fields.OVERLAPPED_PAGE_NUM}; + 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.ACTIVITY_LIST, new org.apache.thrift.meta_data.FieldMetaData("activityList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.ELAPSED_TIME_LIST, new org.apache.thrift.meta_data.FieldMetaData("elapsedTimeList", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.SERIES_PATH_NUM, new org.apache.thrift.meta_data.FieldMetaData("seriesPathNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SEQ_FILE_NUM, new org.apache.thrift.meta_data.FieldMetaData("seqFileNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.UN_SEQ_FILE_NUM, new org.apache.thrift.meta_data.FieldMetaData("unSeqFileNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SEQUENCE_CHUNK_NUM, new org.apache.thrift.meta_data.FieldMetaData("sequenceChunkNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SEQUENCE_CHUNK_POINT_NUM, new org.apache.thrift.meta_data.FieldMetaData("sequenceChunkPointNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.UNSEQUENCE_CHUNK_NUM, new org.apache.thrift.meta_data.FieldMetaData("unsequenceChunkNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.UNSEQUENCE_CHUNK_POINT_NUM, new org.apache.thrift.meta_data.FieldMetaData("unsequenceChunkPointNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TOTAL_PAGE_NUM, new org.apache.thrift.meta_data.FieldMetaData("totalPageNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.OVERLAPPED_PAGE_NUM, new org.apache.thrift.meta_data.FieldMetaData("overlappedPageNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSTracingInfo.class, metaDataMap); + } + + public TSTracingInfo() { + } + + public TSTracingInfo( + java.util.List activityList, + java.util.List elapsedTimeList) + { + this(); + this.activityList = activityList; + this.elapsedTimeList = elapsedTimeList; + } + + /** + * Performs a deep copy on other. + */ + public TSTracingInfo(TSTracingInfo other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetActivityList()) { + java.util.List __this__activityList = new java.util.ArrayList(other.activityList); + this.activityList = __this__activityList; + } + if (other.isSetElapsedTimeList()) { + java.util.List __this__elapsedTimeList = new java.util.ArrayList(other.elapsedTimeList); + this.elapsedTimeList = __this__elapsedTimeList; + } + this.seriesPathNum = other.seriesPathNum; + this.seqFileNum = other.seqFileNum; + this.unSeqFileNum = other.unSeqFileNum; + this.sequenceChunkNum = other.sequenceChunkNum; + this.sequenceChunkPointNum = other.sequenceChunkPointNum; + this.unsequenceChunkNum = other.unsequenceChunkNum; + this.unsequenceChunkPointNum = other.unsequenceChunkPointNum; + this.totalPageNum = other.totalPageNum; + this.overlappedPageNum = other.overlappedPageNum; + } + + @Override + public TSTracingInfo deepCopy() { + return new TSTracingInfo(this); + } + + @Override + public void clear() { + this.activityList = null; + this.elapsedTimeList = null; + setSeriesPathNumIsSet(false); + this.seriesPathNum = 0; + setSeqFileNumIsSet(false); + this.seqFileNum = 0; + setUnSeqFileNumIsSet(false); + this.unSeqFileNum = 0; + setSequenceChunkNumIsSet(false); + this.sequenceChunkNum = 0; + setSequenceChunkPointNumIsSet(false); + this.sequenceChunkPointNum = 0; + setUnsequenceChunkNumIsSet(false); + this.unsequenceChunkNum = 0; + setUnsequenceChunkPointNumIsSet(false); + this.unsequenceChunkPointNum = 0; + setTotalPageNumIsSet(false); + this.totalPageNum = 0; + setOverlappedPageNumIsSet(false); + this.overlappedPageNum = 0; + } + + public int getActivityListSize() { + return (this.activityList == null) ? 0 : this.activityList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getActivityListIterator() { + return (this.activityList == null) ? null : this.activityList.iterator(); + } + + public void addToActivityList(java.lang.String elem) { + if (this.activityList == null) { + this.activityList = new java.util.ArrayList(); + } + this.activityList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getActivityList() { + return this.activityList; + } + + public TSTracingInfo setActivityList(@org.apache.thrift.annotation.Nullable java.util.List activityList) { + this.activityList = activityList; + return this; + } + + public void unsetActivityList() { + this.activityList = null; + } + + /** Returns true if field activityList is set (has been assigned a value) and false otherwise */ + public boolean isSetActivityList() { + return this.activityList != null; + } + + public void setActivityListIsSet(boolean value) { + if (!value) { + this.activityList = null; + } + } + + public int getElapsedTimeListSize() { + return (this.elapsedTimeList == null) ? 0 : this.elapsedTimeList.size(); + } + + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getElapsedTimeListIterator() { + return (this.elapsedTimeList == null) ? null : this.elapsedTimeList.iterator(); + } + + public void addToElapsedTimeList(long elem) { + if (this.elapsedTimeList == null) { + this.elapsedTimeList = new java.util.ArrayList(); + } + this.elapsedTimeList.add(elem); + } + + @org.apache.thrift.annotation.Nullable + public java.util.List getElapsedTimeList() { + return this.elapsedTimeList; + } + + public TSTracingInfo setElapsedTimeList(@org.apache.thrift.annotation.Nullable java.util.List elapsedTimeList) { + this.elapsedTimeList = elapsedTimeList; + return this; + } + + public void unsetElapsedTimeList() { + this.elapsedTimeList = null; + } + + /** Returns true if field elapsedTimeList is set (has been assigned a value) and false otherwise */ + public boolean isSetElapsedTimeList() { + return this.elapsedTimeList != null; + } + + public void setElapsedTimeListIsSet(boolean value) { + if (!value) { + this.elapsedTimeList = null; + } + } + + public int getSeriesPathNum() { + return this.seriesPathNum; + } + + public TSTracingInfo setSeriesPathNum(int seriesPathNum) { + this.seriesPathNum = seriesPathNum; + setSeriesPathNumIsSet(true); + return this; + } + + public void unsetSeriesPathNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SERIESPATHNUM_ISSET_ID); + } + + /** Returns true if field seriesPathNum is set (has been assigned a value) and false otherwise */ + public boolean isSetSeriesPathNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SERIESPATHNUM_ISSET_ID); + } + + public void setSeriesPathNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SERIESPATHNUM_ISSET_ID, value); + } + + public int getSeqFileNum() { + return this.seqFileNum; + } + + public TSTracingInfo setSeqFileNum(int seqFileNum) { + this.seqFileNum = seqFileNum; + setSeqFileNumIsSet(true); + return this; + } + + public void unsetSeqFileNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SEQFILENUM_ISSET_ID); + } + + /** Returns true if field seqFileNum is set (has been assigned a value) and false otherwise */ + public boolean isSetSeqFileNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SEQFILENUM_ISSET_ID); + } + + public void setSeqFileNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SEQFILENUM_ISSET_ID, value); + } + + public int getUnSeqFileNum() { + return this.unSeqFileNum; + } + + public TSTracingInfo setUnSeqFileNum(int unSeqFileNum) { + this.unSeqFileNum = unSeqFileNum; + setUnSeqFileNumIsSet(true); + return this; + } + + public void unsetUnSeqFileNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNSEQFILENUM_ISSET_ID); + } + + /** Returns true if field unSeqFileNum is set (has been assigned a value) and false otherwise */ + public boolean isSetUnSeqFileNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNSEQFILENUM_ISSET_ID); + } + + public void setUnSeqFileNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNSEQFILENUM_ISSET_ID, value); + } + + public int getSequenceChunkNum() { + return this.sequenceChunkNum; + } + + public TSTracingInfo setSequenceChunkNum(int sequenceChunkNum) { + this.sequenceChunkNum = sequenceChunkNum; + setSequenceChunkNumIsSet(true); + return this; + } + + public void unsetSequenceChunkNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SEQUENCECHUNKNUM_ISSET_ID); + } + + /** Returns true if field sequenceChunkNum is set (has been assigned a value) and false otherwise */ + public boolean isSetSequenceChunkNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SEQUENCECHUNKNUM_ISSET_ID); + } + + public void setSequenceChunkNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SEQUENCECHUNKNUM_ISSET_ID, value); + } + + public long getSequenceChunkPointNum() { + return this.sequenceChunkPointNum; + } + + public TSTracingInfo setSequenceChunkPointNum(long sequenceChunkPointNum) { + this.sequenceChunkPointNum = sequenceChunkPointNum; + setSequenceChunkPointNumIsSet(true); + return this; + } + + public void unsetSequenceChunkPointNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SEQUENCECHUNKPOINTNUM_ISSET_ID); + } + + /** Returns true if field sequenceChunkPointNum is set (has been assigned a value) and false otherwise */ + public boolean isSetSequenceChunkPointNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SEQUENCECHUNKPOINTNUM_ISSET_ID); + } + + public void setSequenceChunkPointNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SEQUENCECHUNKPOINTNUM_ISSET_ID, value); + } + + public int getUnsequenceChunkNum() { + return this.unsequenceChunkNum; + } + + public TSTracingInfo setUnsequenceChunkNum(int unsequenceChunkNum) { + this.unsequenceChunkNum = unsequenceChunkNum; + setUnsequenceChunkNumIsSet(true); + return this; + } + + public void unsetUnsequenceChunkNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNSEQUENCECHUNKNUM_ISSET_ID); + } + + /** Returns true if field unsequenceChunkNum is set (has been assigned a value) and false otherwise */ + public boolean isSetUnsequenceChunkNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNSEQUENCECHUNKNUM_ISSET_ID); + } + + public void setUnsequenceChunkNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNSEQUENCECHUNKNUM_ISSET_ID, value); + } + + public long getUnsequenceChunkPointNum() { + return this.unsequenceChunkPointNum; + } + + public TSTracingInfo setUnsequenceChunkPointNum(long unsequenceChunkPointNum) { + this.unsequenceChunkPointNum = unsequenceChunkPointNum; + setUnsequenceChunkPointNumIsSet(true); + return this; + } + + public void unsetUnsequenceChunkPointNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNSEQUENCECHUNKPOINTNUM_ISSET_ID); + } + + /** Returns true if field unsequenceChunkPointNum is set (has been assigned a value) and false otherwise */ + public boolean isSetUnsequenceChunkPointNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNSEQUENCECHUNKPOINTNUM_ISSET_ID); + } + + public void setUnsequenceChunkPointNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNSEQUENCECHUNKPOINTNUM_ISSET_ID, value); + } + + public int getTotalPageNum() { + return this.totalPageNum; + } + + public TSTracingInfo setTotalPageNum(int totalPageNum) { + this.totalPageNum = totalPageNum; + setTotalPageNumIsSet(true); + return this; + } + + public void unsetTotalPageNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTALPAGENUM_ISSET_ID); + } + + /** Returns true if field totalPageNum is set (has been assigned a value) and false otherwise */ + public boolean isSetTotalPageNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTALPAGENUM_ISSET_ID); + } + + public void setTotalPageNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTALPAGENUM_ISSET_ID, value); + } + + public int getOverlappedPageNum() { + return this.overlappedPageNum; + } + + public TSTracingInfo setOverlappedPageNum(int overlappedPageNum) { + this.overlappedPageNum = overlappedPageNum; + setOverlappedPageNumIsSet(true); + return this; + } + + public void unsetOverlappedPageNum() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OVERLAPPEDPAGENUM_ISSET_ID); + } + + /** Returns true if field overlappedPageNum is set (has been assigned a value) and false otherwise */ + public boolean isSetOverlappedPageNum() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OVERLAPPEDPAGENUM_ISSET_ID); + } + + public void setOverlappedPageNumIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OVERLAPPEDPAGENUM_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case ACTIVITY_LIST: + if (value == null) { + unsetActivityList(); + } else { + setActivityList((java.util.List)value); + } + break; + + case ELAPSED_TIME_LIST: + if (value == null) { + unsetElapsedTimeList(); + } else { + setElapsedTimeList((java.util.List)value); + } + break; + + case SERIES_PATH_NUM: + if (value == null) { + unsetSeriesPathNum(); + } else { + setSeriesPathNum((java.lang.Integer)value); + } + break; + + case SEQ_FILE_NUM: + if (value == null) { + unsetSeqFileNum(); + } else { + setSeqFileNum((java.lang.Integer)value); + } + break; + + case UN_SEQ_FILE_NUM: + if (value == null) { + unsetUnSeqFileNum(); + } else { + setUnSeqFileNum((java.lang.Integer)value); + } + break; + + case SEQUENCE_CHUNK_NUM: + if (value == null) { + unsetSequenceChunkNum(); + } else { + setSequenceChunkNum((java.lang.Integer)value); + } + break; + + case SEQUENCE_CHUNK_POINT_NUM: + if (value == null) { + unsetSequenceChunkPointNum(); + } else { + setSequenceChunkPointNum((java.lang.Long)value); + } + break; + + case UNSEQUENCE_CHUNK_NUM: + if (value == null) { + unsetUnsequenceChunkNum(); + } else { + setUnsequenceChunkNum((java.lang.Integer)value); + } + break; + + case UNSEQUENCE_CHUNK_POINT_NUM: + if (value == null) { + unsetUnsequenceChunkPointNum(); + } else { + setUnsequenceChunkPointNum((java.lang.Long)value); + } + break; + + case TOTAL_PAGE_NUM: + if (value == null) { + unsetTotalPageNum(); + } else { + setTotalPageNum((java.lang.Integer)value); + } + break; + + case OVERLAPPED_PAGE_NUM: + if (value == null) { + unsetOverlappedPageNum(); + } else { + setOverlappedPageNum((java.lang.Integer)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case ACTIVITY_LIST: + return getActivityList(); + + case ELAPSED_TIME_LIST: + return getElapsedTimeList(); + + case SERIES_PATH_NUM: + return getSeriesPathNum(); + + case SEQ_FILE_NUM: + return getSeqFileNum(); + + case UN_SEQ_FILE_NUM: + return getUnSeqFileNum(); + + case SEQUENCE_CHUNK_NUM: + return getSequenceChunkNum(); + + case SEQUENCE_CHUNK_POINT_NUM: + return getSequenceChunkPointNum(); + + case UNSEQUENCE_CHUNK_NUM: + return getUnsequenceChunkNum(); + + case UNSEQUENCE_CHUNK_POINT_NUM: + return getUnsequenceChunkPointNum(); + + case TOTAL_PAGE_NUM: + return getTotalPageNum(); + + case OVERLAPPED_PAGE_NUM: + return getOverlappedPageNum(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case ACTIVITY_LIST: + return isSetActivityList(); + case ELAPSED_TIME_LIST: + return isSetElapsedTimeList(); + case SERIES_PATH_NUM: + return isSetSeriesPathNum(); + case SEQ_FILE_NUM: + return isSetSeqFileNum(); + case UN_SEQ_FILE_NUM: + return isSetUnSeqFileNum(); + case SEQUENCE_CHUNK_NUM: + return isSetSequenceChunkNum(); + case SEQUENCE_CHUNK_POINT_NUM: + return isSetSequenceChunkPointNum(); + case UNSEQUENCE_CHUNK_NUM: + return isSetUnsequenceChunkNum(); + case UNSEQUENCE_CHUNK_POINT_NUM: + return isSetUnsequenceChunkPointNum(); + case TOTAL_PAGE_NUM: + return isSetTotalPageNum(); + case OVERLAPPED_PAGE_NUM: + return isSetOverlappedPageNum(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that instanceof TSTracingInfo) + return this.equals((TSTracingInfo)that); + return false; + } + + public boolean equals(TSTracingInfo that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_activityList = true && this.isSetActivityList(); + boolean that_present_activityList = true && that.isSetActivityList(); + if (this_present_activityList || that_present_activityList) { + if (!(this_present_activityList && that_present_activityList)) + return false; + if (!this.activityList.equals(that.activityList)) + return false; + } + + boolean this_present_elapsedTimeList = true && this.isSetElapsedTimeList(); + boolean that_present_elapsedTimeList = true && that.isSetElapsedTimeList(); + if (this_present_elapsedTimeList || that_present_elapsedTimeList) { + if (!(this_present_elapsedTimeList && that_present_elapsedTimeList)) + return false; + if (!this.elapsedTimeList.equals(that.elapsedTimeList)) + return false; + } + + boolean this_present_seriesPathNum = true && this.isSetSeriesPathNum(); + boolean that_present_seriesPathNum = true && that.isSetSeriesPathNum(); + if (this_present_seriesPathNum || that_present_seriesPathNum) { + if (!(this_present_seriesPathNum && that_present_seriesPathNum)) + return false; + if (this.seriesPathNum != that.seriesPathNum) + return false; + } + + boolean this_present_seqFileNum = true && this.isSetSeqFileNum(); + boolean that_present_seqFileNum = true && that.isSetSeqFileNum(); + if (this_present_seqFileNum || that_present_seqFileNum) { + if (!(this_present_seqFileNum && that_present_seqFileNum)) + return false; + if (this.seqFileNum != that.seqFileNum) + return false; + } + + boolean this_present_unSeqFileNum = true && this.isSetUnSeqFileNum(); + boolean that_present_unSeqFileNum = true && that.isSetUnSeqFileNum(); + if (this_present_unSeqFileNum || that_present_unSeqFileNum) { + if (!(this_present_unSeqFileNum && that_present_unSeqFileNum)) + return false; + if (this.unSeqFileNum != that.unSeqFileNum) + return false; + } + + boolean this_present_sequenceChunkNum = true && this.isSetSequenceChunkNum(); + boolean that_present_sequenceChunkNum = true && that.isSetSequenceChunkNum(); + if (this_present_sequenceChunkNum || that_present_sequenceChunkNum) { + if (!(this_present_sequenceChunkNum && that_present_sequenceChunkNum)) + return false; + if (this.sequenceChunkNum != that.sequenceChunkNum) + return false; + } + + boolean this_present_sequenceChunkPointNum = true && this.isSetSequenceChunkPointNum(); + boolean that_present_sequenceChunkPointNum = true && that.isSetSequenceChunkPointNum(); + if (this_present_sequenceChunkPointNum || that_present_sequenceChunkPointNum) { + if (!(this_present_sequenceChunkPointNum && that_present_sequenceChunkPointNum)) + return false; + if (this.sequenceChunkPointNum != that.sequenceChunkPointNum) + return false; + } + + boolean this_present_unsequenceChunkNum = true && this.isSetUnsequenceChunkNum(); + boolean that_present_unsequenceChunkNum = true && that.isSetUnsequenceChunkNum(); + if (this_present_unsequenceChunkNum || that_present_unsequenceChunkNum) { + if (!(this_present_unsequenceChunkNum && that_present_unsequenceChunkNum)) + return false; + if (this.unsequenceChunkNum != that.unsequenceChunkNum) + return false; + } + + boolean this_present_unsequenceChunkPointNum = true && this.isSetUnsequenceChunkPointNum(); + boolean that_present_unsequenceChunkPointNum = true && that.isSetUnsequenceChunkPointNum(); + if (this_present_unsequenceChunkPointNum || that_present_unsequenceChunkPointNum) { + if (!(this_present_unsequenceChunkPointNum && that_present_unsequenceChunkPointNum)) + return false; + if (this.unsequenceChunkPointNum != that.unsequenceChunkPointNum) + return false; + } + + boolean this_present_totalPageNum = true && this.isSetTotalPageNum(); + boolean that_present_totalPageNum = true && that.isSetTotalPageNum(); + if (this_present_totalPageNum || that_present_totalPageNum) { + if (!(this_present_totalPageNum && that_present_totalPageNum)) + return false; + if (this.totalPageNum != that.totalPageNum) + return false; + } + + boolean this_present_overlappedPageNum = true && this.isSetOverlappedPageNum(); + boolean that_present_overlappedPageNum = true && that.isSetOverlappedPageNum(); + if (this_present_overlappedPageNum || that_present_overlappedPageNum) { + if (!(this_present_overlappedPageNum && that_present_overlappedPageNum)) + return false; + if (this.overlappedPageNum != that.overlappedPageNum) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetActivityList()) ? 131071 : 524287); + if (isSetActivityList()) + hashCode = hashCode * 8191 + activityList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetElapsedTimeList()) ? 131071 : 524287); + if (isSetElapsedTimeList()) + hashCode = hashCode * 8191 + elapsedTimeList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetSeriesPathNum()) ? 131071 : 524287); + if (isSetSeriesPathNum()) + hashCode = hashCode * 8191 + seriesPathNum; + + hashCode = hashCode * 8191 + ((isSetSeqFileNum()) ? 131071 : 524287); + if (isSetSeqFileNum()) + hashCode = hashCode * 8191 + seqFileNum; + + hashCode = hashCode * 8191 + ((isSetUnSeqFileNum()) ? 131071 : 524287); + if (isSetUnSeqFileNum()) + hashCode = hashCode * 8191 + unSeqFileNum; + + hashCode = hashCode * 8191 + ((isSetSequenceChunkNum()) ? 131071 : 524287); + if (isSetSequenceChunkNum()) + hashCode = hashCode * 8191 + sequenceChunkNum; + + hashCode = hashCode * 8191 + ((isSetSequenceChunkPointNum()) ? 131071 : 524287); + if (isSetSequenceChunkPointNum()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sequenceChunkPointNum); + + hashCode = hashCode * 8191 + ((isSetUnsequenceChunkNum()) ? 131071 : 524287); + if (isSetUnsequenceChunkNum()) + hashCode = hashCode * 8191 + unsequenceChunkNum; + + hashCode = hashCode * 8191 + ((isSetUnsequenceChunkPointNum()) ? 131071 : 524287); + if (isSetUnsequenceChunkPointNum()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(unsequenceChunkPointNum); + + hashCode = hashCode * 8191 + ((isSetTotalPageNum()) ? 131071 : 524287); + if (isSetTotalPageNum()) + hashCode = hashCode * 8191 + totalPageNum; + + hashCode = hashCode * 8191 + ((isSetOverlappedPageNum()) ? 131071 : 524287); + if (isSetOverlappedPageNum()) + hashCode = hashCode * 8191 + overlappedPageNum; + + return hashCode; + } + + @Override + public int compareTo(TSTracingInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.compare(isSetActivityList(), other.isSetActivityList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetActivityList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityList, other.activityList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetElapsedTimeList(), other.isSetElapsedTimeList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetElapsedTimeList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsedTimeList, other.elapsedTimeList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSeriesPathNum(), other.isSetSeriesPathNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSeriesPathNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seriesPathNum, other.seriesPathNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSeqFileNum(), other.isSetSeqFileNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSeqFileNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seqFileNum, other.seqFileNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetUnSeqFileNum(), other.isSetUnSeqFileNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUnSeqFileNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unSeqFileNum, other.unSeqFileNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSequenceChunkNum(), other.isSetSequenceChunkNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSequenceChunkNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sequenceChunkNum, other.sequenceChunkNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetSequenceChunkPointNum(), other.isSetSequenceChunkPointNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSequenceChunkPointNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sequenceChunkPointNum, other.sequenceChunkPointNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetUnsequenceChunkNum(), other.isSetUnsequenceChunkNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUnsequenceChunkNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unsequenceChunkNum, other.unsequenceChunkNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetUnsequenceChunkPointNum(), other.isSetUnsequenceChunkPointNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUnsequenceChunkPointNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unsequenceChunkPointNum, other.unsequenceChunkPointNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetTotalPageNum(), other.isSetTotalPageNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTotalPageNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalPageNum, other.totalPageNum); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetOverlappedPageNum(), other.isSetOverlappedPageNum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOverlappedPageNum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overlappedPageNum, other.overlappedPageNum); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + @Override + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TSTracingInfo("); + boolean first = true; + + sb.append("activityList:"); + if (this.activityList == null) { + sb.append("null"); + } else { + sb.append(this.activityList); + } + first = false; + if (!first) sb.append(", "); + sb.append("elapsedTimeList:"); + if (this.elapsedTimeList == null) { + sb.append("null"); + } else { + sb.append(this.elapsedTimeList); + } + first = false; + if (isSetSeriesPathNum()) { + if (!first) sb.append(", "); + sb.append("seriesPathNum:"); + sb.append(this.seriesPathNum); + first = false; + } + if (isSetSeqFileNum()) { + if (!first) sb.append(", "); + sb.append("seqFileNum:"); + sb.append(this.seqFileNum); + first = false; + } + if (isSetUnSeqFileNum()) { + if (!first) sb.append(", "); + sb.append("unSeqFileNum:"); + sb.append(this.unSeqFileNum); + first = false; + } + if (isSetSequenceChunkNum()) { + if (!first) sb.append(", "); + sb.append("sequenceChunkNum:"); + sb.append(this.sequenceChunkNum); + first = false; + } + if (isSetSequenceChunkPointNum()) { + if (!first) sb.append(", "); + sb.append("sequenceChunkPointNum:"); + sb.append(this.sequenceChunkPointNum); + first = false; + } + if (isSetUnsequenceChunkNum()) { + if (!first) sb.append(", "); + sb.append("unsequenceChunkNum:"); + sb.append(this.unsequenceChunkNum); + first = false; + } + if (isSetUnsequenceChunkPointNum()) { + if (!first) sb.append(", "); + sb.append("unsequenceChunkPointNum:"); + sb.append(this.unsequenceChunkPointNum); + first = false; + } + if (isSetTotalPageNum()) { + if (!first) sb.append(", "); + sb.append("totalPageNum:"); + sb.append(this.totalPageNum); + first = false; + } + if (isSetOverlappedPageNum()) { + if (!first) sb.append(", "); + sb.append("overlappedPageNum:"); + sb.append(this.overlappedPageNum); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (activityList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'activityList' was not present! Struct: " + toString()); + } + if (elapsedTimeList == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'elapsedTimeList' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + 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); + } + } + + private static class TSTracingInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSTracingInfoStandardScheme getScheme() { + return new TSTracingInfoStandardScheme(); + } + } + + private static class TSTracingInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + @Override + public void read(org.apache.thrift.protocol.TProtocol iprot, TSTracingInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ACTIVITY_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); + struct.activityList = new java.util.ArrayList(_list32.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem33; + for (int _i34 = 0; _i34 < _list32.size; ++_i34) + { + _elem33 = iprot.readString(); + struct.activityList.add(_elem33); + } + iprot.readListEnd(); + } + struct.setActivityListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ELAPSED_TIME_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); + struct.elapsedTimeList = new java.util.ArrayList(_list35.size); + long _elem36; + for (int _i37 = 0; _i37 < _list35.size; ++_i37) + { + _elem36 = iprot.readI64(); + struct.elapsedTimeList.add(_elem36); + } + iprot.readListEnd(); + } + struct.setElapsedTimeListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SERIES_PATH_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.seriesPathNum = iprot.readI32(); + struct.setSeriesPathNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // SEQ_FILE_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.seqFileNum = iprot.readI32(); + struct.setSeqFileNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // UN_SEQ_FILE_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.unSeqFileNum = iprot.readI32(); + struct.setUnSeqFileNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // SEQUENCE_CHUNK_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.sequenceChunkNum = iprot.readI32(); + struct.setSequenceChunkNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SEQUENCE_CHUNK_POINT_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sequenceChunkPointNum = iprot.readI64(); + struct.setSequenceChunkPointNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // UNSEQUENCE_CHUNK_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.unsequenceChunkNum = iprot.readI32(); + struct.setUnsequenceChunkNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // UNSEQUENCE_CHUNK_POINT_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.unsequenceChunkPointNum = iprot.readI64(); + struct.setUnsequenceChunkPointNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // TOTAL_PAGE_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.totalPageNum = iprot.readI32(); + struct.setTotalPageNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // OVERLAPPED_PAGE_NUM + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.overlappedPageNum = iprot.readI32(); + struct.setOverlappedPageNumIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + @Override + public void write(org.apache.thrift.protocol.TProtocol oprot, TSTracingInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.activityList != null) { + oprot.writeFieldBegin(ACTIVITY_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.activityList.size())); + for (java.lang.String _iter38 : struct.activityList) + { + oprot.writeString(_iter38); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.elapsedTimeList != null) { + oprot.writeFieldBegin(ELAPSED_TIME_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.elapsedTimeList.size())); + for (long _iter39 : struct.elapsedTimeList) + { + oprot.writeI64(_iter39); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetSeriesPathNum()) { + oprot.writeFieldBegin(SERIES_PATH_NUM_FIELD_DESC); + oprot.writeI32(struct.seriesPathNum); + oprot.writeFieldEnd(); + } + if (struct.isSetSeqFileNum()) { + oprot.writeFieldBegin(SEQ_FILE_NUM_FIELD_DESC); + oprot.writeI32(struct.seqFileNum); + oprot.writeFieldEnd(); + } + if (struct.isSetUnSeqFileNum()) { + oprot.writeFieldBegin(UN_SEQ_FILE_NUM_FIELD_DESC); + oprot.writeI32(struct.unSeqFileNum); + oprot.writeFieldEnd(); + } + if (struct.isSetSequenceChunkNum()) { + oprot.writeFieldBegin(SEQUENCE_CHUNK_NUM_FIELD_DESC); + oprot.writeI32(struct.sequenceChunkNum); + oprot.writeFieldEnd(); + } + if (struct.isSetSequenceChunkPointNum()) { + oprot.writeFieldBegin(SEQUENCE_CHUNK_POINT_NUM_FIELD_DESC); + oprot.writeI64(struct.sequenceChunkPointNum); + oprot.writeFieldEnd(); + } + if (struct.isSetUnsequenceChunkNum()) { + oprot.writeFieldBegin(UNSEQUENCE_CHUNK_NUM_FIELD_DESC); + oprot.writeI32(struct.unsequenceChunkNum); + oprot.writeFieldEnd(); + } + if (struct.isSetUnsequenceChunkPointNum()) { + oprot.writeFieldBegin(UNSEQUENCE_CHUNK_POINT_NUM_FIELD_DESC); + oprot.writeI64(struct.unsequenceChunkPointNum); + oprot.writeFieldEnd(); + } + if (struct.isSetTotalPageNum()) { + oprot.writeFieldBegin(TOTAL_PAGE_NUM_FIELD_DESC); + oprot.writeI32(struct.totalPageNum); + oprot.writeFieldEnd(); + } + if (struct.isSetOverlappedPageNum()) { + oprot.writeFieldBegin(OVERLAPPED_PAGE_NUM_FIELD_DESC); + oprot.writeI32(struct.overlappedPageNum); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TSTracingInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override + public TSTracingInfoTupleScheme getScheme() { + return new TSTracingInfoTupleScheme(); + } + } + + private static class TSTracingInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TSTracingInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + oprot.writeI32(struct.activityList.size()); + for (java.lang.String _iter40 : struct.activityList) + { + oprot.writeString(_iter40); + } + } + { + oprot.writeI32(struct.elapsedTimeList.size()); + for (long _iter41 : struct.elapsedTimeList) + { + oprot.writeI64(_iter41); + } + } + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSeriesPathNum()) { + optionals.set(0); + } + if (struct.isSetSeqFileNum()) { + optionals.set(1); + } + if (struct.isSetUnSeqFileNum()) { + optionals.set(2); + } + if (struct.isSetSequenceChunkNum()) { + optionals.set(3); + } + if (struct.isSetSequenceChunkPointNum()) { + optionals.set(4); + } + if (struct.isSetUnsequenceChunkNum()) { + optionals.set(5); + } + if (struct.isSetUnsequenceChunkPointNum()) { + optionals.set(6); + } + if (struct.isSetTotalPageNum()) { + optionals.set(7); + } + if (struct.isSetOverlappedPageNum()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetSeriesPathNum()) { + oprot.writeI32(struct.seriesPathNum); + } + if (struct.isSetSeqFileNum()) { + oprot.writeI32(struct.seqFileNum); + } + if (struct.isSetUnSeqFileNum()) { + oprot.writeI32(struct.unSeqFileNum); + } + if (struct.isSetSequenceChunkNum()) { + oprot.writeI32(struct.sequenceChunkNum); + } + if (struct.isSetSequenceChunkPointNum()) { + oprot.writeI64(struct.sequenceChunkPointNum); + } + if (struct.isSetUnsequenceChunkNum()) { + oprot.writeI32(struct.unsequenceChunkNum); + } + if (struct.isSetUnsequenceChunkPointNum()) { + oprot.writeI64(struct.unsequenceChunkPointNum); + } + if (struct.isSetTotalPageNum()) { + oprot.writeI32(struct.totalPageNum); + } + if (struct.isSetOverlappedPageNum()) { + oprot.writeI32(struct.overlappedPageNum); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TSTracingInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.activityList = new java.util.ArrayList(_list42.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem43; + for (int _i44 = 0; _i44 < _list42.size; ++_i44) + { + _elem43 = iprot.readString(); + struct.activityList.add(_elem43); + } + } + struct.setActivityListIsSet(true); + { + org.apache.thrift.protocol.TList _list45 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); + struct.elapsedTimeList = new java.util.ArrayList(_list45.size); + long _elem46; + for (int _i47 = 0; _i47 < _list45.size; ++_i47) + { + _elem46 = iprot.readI64(); + struct.elapsedTimeList.add(_elem46); + } + } + struct.setElapsedTimeListIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(9); + if (incoming.get(0)) { + struct.seriesPathNum = iprot.readI32(); + struct.setSeriesPathNumIsSet(true); + } + if (incoming.get(1)) { + struct.seqFileNum = iprot.readI32(); + struct.setSeqFileNumIsSet(true); + } + if (incoming.get(2)) { + struct.unSeqFileNum = iprot.readI32(); + struct.setUnSeqFileNumIsSet(true); + } + if (incoming.get(3)) { + struct.sequenceChunkNum = iprot.readI32(); + struct.setSequenceChunkNumIsSet(true); + } + if (incoming.get(4)) { + struct.sequenceChunkPointNum = iprot.readI64(); + struct.setSequenceChunkPointNumIsSet(true); + } + if (incoming.get(5)) { + struct.unsequenceChunkNum = iprot.readI32(); + struct.setUnsequenceChunkNumIsSet(true); + } + if (incoming.get(6)) { + struct.unsequenceChunkPointNum = iprot.readI64(); + struct.setUnsequenceChunkPointNumIsSet(true); + } + if (incoming.get(7)) { + struct.totalPageNum = iprot.readI32(); + struct.setTotalPageNumIsSet(true); + } + if (incoming.get(8)) { + struct.overlappedPageNum = iprot.readI32(); + struct.setOverlappedPageNumIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + From f1797d24821bbdd8a78cbdc4ff5d2be887bbeaf5 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Mon, 19 May 2025 19:54:37 +0800 Subject: [PATCH 05/25] Implement the initial full-data compression logic for RPC. --- .../org/apache/iotdb/session/Session.java | 11 +- .../session/compress/PlainColumnEncoder.java | 177 ----------- .../session/compress/RleColumnEncoder.java | 165 ---------- .../ColumnEntry.java | 9 +- .../EncodingTypeNotSupportedException.java} | 17 +- .../{compress => rpccompress}/MetaHead.java | 15 +- .../RpcCompressor.java | 30 +- .../RpcUncompressor.java | 23 +- .../rpccompress/decoder/ColumnDecoder.java | 47 +++ .../decoder}/PlainColumnDecoder.java | 58 +++- .../decoder}/RleColumnDecoder.java | 58 +++- .../decoder}/RpcDecoder.java | 86 +++--- .../decoder}/Ts2DiffColumnDecoder.java | 4 +- .../encoder}/ColumnEncoder.java | 34 +- .../encoder/PlainColumnEncoder.java | 290 ++++++++++++++++++ .../rpccompress/encoder/RleColumnEncoder.java | 266 ++++++++++++++++ .../encoder}/RpcEncoder.java | 184 ++++++----- .../encoder}/Ts2DiffColumnEncoder.java | 4 +- .../plan/parser/StatementGenerator.java | 16 +- 19 files changed, 968 insertions(+), 526 deletions(-) delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress}/ColumnEntry.java (96%) rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress/ColumnDecoder.java => rpccompress/EncodingTypeNotSupportedException.java} (67%) rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress}/MetaHead.java (92%) rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress}/RpcCompressor.java (72%) rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress}/RpcUncompressor.java (75%) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress/decoder}/PlainColumnDecoder.java (64%) rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress/decoder}/RleColumnDecoder.java (64%) rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress/decoder}/RpcDecoder.java (62%) rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress/decoder}/Ts2DiffColumnDecoder.java (96%) rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress/encoder}/ColumnEncoder.java (67%) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress/encoder}/RpcEncoder.java (60%) rename iotdb-client/session/src/main/java/org/apache/iotdb/session/{compress => rpccompress/encoder}/Ts2DiffColumnEncoder.java (93%) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index ad89bfcf3ebff..968e758d83788 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -56,7 +56,8 @@ import org.apache.iotdb.service.rpc.thrift.TSQueryTemplateResp; import org.apache.iotdb.service.rpc.thrift.TSSetSchemaTemplateReq; import org.apache.iotdb.service.rpc.thrift.TSUnsetSchemaTemplateReq; -import org.apache.iotdb.session.compress.RpcEncoder; +import org.apache.iotdb.session.rpccompress.RpcCompressor; +import org.apache.iotdb.session.rpccompress.encoder.RpcEncoder; import org.apache.iotdb.session.template.MeasurementNode; import org.apache.iotdb.session.template.TemplateQueryType; import org.apache.iotdb.session.util.SessionUtils; @@ -2993,14 +2994,14 @@ private TSInsertTabletReq genTSInsertTabletReq(Tablet tablet, boolean sorted, bo this.columnEncodersMap.get(measurementSchema.getType()).ordinal()); } RpcEncoder rpcEncoder = new RpcEncoder(this.columnEncodersMap, this.compressionType); - request.setTimestamps(rpcEncoder.encodeTimestamps(tablet)); - request.setValues(rpcEncoder.encodeValues(tablet)); - request.setSize(tablet.getRowSize()); + RpcCompressor rpcCompressor = new RpcCompressor(this.compressionType); + request.setTimestamps(rpcCompressor.compress(rpcEncoder.encodeTimestamps(tablet))); + request.setValues(rpcCompressor.compress(rpcEncoder.encodeValues(tablet))); } else { request.setTimestamps(SessionUtils.getTimeBuffer(tablet)); request.setValues(SessionUtils.getValueBuffer(tablet)); - request.setSize(tablet.getRowSize()); } + request.setSize(tablet.getRowSize()); return request; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java deleted file mode 100644 index df1618d6d0c92..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnEncoder.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.compress; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.PlainEncoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; - -import java.io.IOException; -import java.util.List; - -public class PlainColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - private static final int DEFAULT_MAX_STRING_LENGTH = 128; - - public PlainColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = new PlainEncoder(dataType, DEFAULT_MAX_STRING_LENGTH); - } - - @Override - public byte[] encode(List data) { - if (data == null || data.isEmpty()) { - return new byte[0]; - } - - // Calculate the original data size - int originalSize = 0; - for (Object value : data) { - if (value != null) { - switch (dataType) { - case BOOLEAN: - originalSize += 1; // boolean 占用 1 字节 - break; - case INT32: - case DATE: - originalSize += 4; // int32 占用 4 字节 - break; - case INT64: - case TIMESTAMP: - originalSize += 8; // int64 占用 8 字节 - break; - case FLOAT: - originalSize += 4; // float 占用 4 字节 - break; - case DOUBLE: - originalSize += 8; // double 占用 8 字节 - break; - case TEXT: - case STRING: - case BLOB: - if (value instanceof String) { - originalSize += ((String) value).getBytes().length; - } else if (value instanceof Binary) { - originalSize += ((Binary) value).getLength(); - } - break; - } - } - } - - PublicBAOS outputStream = new PublicBAOS(originalSize); - try { - switch (dataType) { - case BOOLEAN: - for (Object value : data) { - if (value != null) { - encoder.encode((Boolean) value, outputStream); - } - } - break; - case INT32: - case DATE: - for (Object value : data) { - if (value != null) { - encoder.encode((Integer) value, outputStream); - } - } - break; - case INT64: - case TIMESTAMP: - for (Object value : data) { - if (value != null) { - encoder.encode((Long) value, outputStream); - } - } - break; - case FLOAT: - for (Object value : data) { - if (value != null) { - encoder.encode((Float) value, outputStream); - } - } - break; - case DOUBLE: - for (Object value : data) { - if (value != null) { - encoder.encode((Double) value, outputStream); - } - } - break; - case TEXT: - case STRING: - case BLOB: - for (Object value : data) { - if (value != null) { - if (value instanceof String) { - encoder.encode(new Binary((byte[]) value), outputStream); - } else if (value instanceof Binary) { - encoder.encode((Binary) value, outputStream); - } - } - } - break; - default: - throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); - } - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - columnEntry = new ColumnEntry(); - columnEntry.setCompressedSize(encodedData.length); - columnEntry.setUnCompressedSize(originalSize); - columnEntry.setDataType(dataType); - columnEntry.setEncodingType(TSEncoding.PLAIN); - - return encodedData; - } catch (IOException e) { - throw new RuntimeException(e); - } finally { - try { - outputStream.close(); - } catch (IOException e) { - } - } - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.PLAIN; - } - - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return new PlainEncoder(type, DEFAULT_MAX_STRING_LENGTH); - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java deleted file mode 100644 index 0259dc652d9d0..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnEncoder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.compress; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; - -import java.io.IOException; -import java.util.List; - -public class RleColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - - public RleColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.RLE); - columnEntry = new ColumnEntry(); - } - - @Override - public byte[] encode(List data) { - if (data == null || data.isEmpty()) { - return new byte[0]; - } - PublicBAOS outputStream = new PublicBAOS(); - try { - switch (dataType) { - case INT32: - case DATE: - case BOOLEAN: - for (Object value : data) { - if (value != null) { - encoder.encode((Integer) value, outputStream); - } - } - break; - case INT64: - case TIMESTAMP: - for (Object value : data) { - if (value != null) { - encoder.encode((long) value, outputStream); - } - } - break; - case FLOAT: - for (Object value : data) { - if (value != null) { - encoder.encode((float) value, outputStream); - } - } - break; - case DOUBLE: - for (Object value : data) { - if (value != null) { - encoder.encode((double) value, outputStream); - } - } - break; - default: - throw new UnsupportedOperationException("RLE doesn't support data type: " + dataType); - } - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - columnEntry.setUnCompressedSize(getUnCompressedSize(data)); - columnEntry.setCompressedSize(encodedData.length); - columnEntry.setEncodingType(TSEncoding.RLE); - columnEntry.setDataType(dataType); - columnEntry.updateSize(); - return encodedData; - } catch (IOException e) { - throw new RuntimeException(e); - } finally { - try { - outputStream.close(); - } catch (IOException e) { - } - } - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.RLE; - } - - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } - - /** - * The logic in this part is universal and is used to calculate the original data size. You can - * check whether there is such a method elsewhere. - * - * @param data - * @return - */ - public Integer getUnCompressedSize(List data) { - int unCompressedSize = 0; - for (Object value : data) { - if (value != null) { - switch (dataType) { - case BOOLEAN: - unCompressedSize += 1; // boolean 占用 1 字节 - break; - case INT32: - case DATE: - unCompressedSize += 4; // int32 占用 4 字节 - break; - case INT64: - case TIMESTAMP: - unCompressedSize += 8; // int64 占用 8 字节 - break; - case FLOAT: - unCompressedSize += 4; // float 占用 4 字节 - break; - case DOUBLE: - unCompressedSize += 8; // double 占用 8 字节 - break; - case TEXT: - case STRING: - case BLOB: - if (value instanceof String) { - unCompressedSize += ((String) value).getBytes().length; - } else if (value instanceof Binary) { - unCompressedSize += ((Binary) value).getLength(); - } - break; - } - } - } - return unCompressedSize; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/ColumnEntry.java similarity index 96% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/ColumnEntry.java index f67eca65b306c..c3824f53303ea 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEntry.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/ColumnEntry.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; @@ -26,12 +26,12 @@ public class ColumnEntry implements Serializable { - /** Used to specify the size when applying for memory */ private Integer compressedSize; - private Integer unCompressedSize; private TSDataType dataType; private TSEncoding encodingType; + + /** The number of bytes occupied by ColumnEntry */ private Integer size; public ColumnEntry() { @@ -42,8 +42,7 @@ public ColumnEntry( Integer compressedSize, Integer unCompressedSize, TSDataType dataType, - TSEncoding encodingType, - Integer offset) { + TSEncoding encodingType) { this.compressedSize = compressedSize; this.unCompressedSize = unCompressedSize; this.dataType = dataType; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/EncodingTypeNotSupportedException.java similarity index 67% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/EncodingTypeNotSupportedException.java index 9b273e1b8f80e..bb17816c0f14c 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/EncodingTypeNotSupportedException.java @@ -16,17 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress; -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; +/** Encoding type not supported exception */ +public class EncodingTypeNotSupportedException extends RuntimeException { -import java.nio.ByteBuffer; - -public interface ColumnDecoder { - - Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); - - Decoder getDecoder(TSDataType type, TSEncoding encodingType); + public EncodingTypeNotSupportedException(String message) { + super("Encoding type " + message + " is not supported."); + } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/MetaHead.java similarity index 92% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/MetaHead.java index 3f48d7bf691a0..c66ff9afe21cc 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/MetaHead.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/MetaHead.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress; import java.io.Serializable; import java.nio.ByteBuffer; @@ -25,8 +25,13 @@ public class MetaHead implements Serializable { + /** Number of columns in the compressed file. */ private Integer numberOfColumns; + + /** The size of the metadata header. */ private Integer size; + + /** ColumnEntry list */ private List columnEntries; public MetaHead() { @@ -34,7 +39,6 @@ public MetaHead() { updateSize(); } - // TODO-RPC 大小后续要更新,先初始化一次 public MetaHead(Integer numberOfColumns, List columnEntries) { this.numberOfColumns = numberOfColumns; this.columnEntries = columnEntries; @@ -56,7 +60,7 @@ public List getColumnEntries() { /** * Append ColumnEntry * - * @param entry + * @param entry ColumnEntry */ public void addColumnEntry(ColumnEntry entry) { if (columnEntries == null) { @@ -72,8 +76,8 @@ public void addColumnEntry(ColumnEntry entry) { * size of all ColumnEntry. MetaHead header size = numberOfColumns (4 bytes) + size (4 bytes). */ private void updateSize() { - // MetaHead header size - int totalSize = 8; // numberOfColumns(4字节) + size(4字节) + // MetaHead header size, numberOfColumns(4 byte) + size(4 byte) + int totalSize = 8; // Accumulate the size of all ColumnEntry if (columnEntries != null) { @@ -83,7 +87,6 @@ private void updateSize() { } } } - this.size = totalSize; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java similarity index 72% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java index 24a4e0c565a4c..45c0149a97a58 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcCompressor.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress; import org.apache.tsfile.compress.ICompressor; import org.apache.tsfile.file.metadata.enums.CompressionType; @@ -32,6 +32,34 @@ public RpcCompressor(CompressionType name) { compressor = ICompressor.getCompressor(name); } + public ByteBuffer compress(ByteBuffer input) { + byte[] src; + int offset, length; + + if (input.hasArray()) { + offset = input.arrayOffset() + input.position(); + length = input.remaining(); + if (offset == 0 && length == input.array().length) { + src = input.array(); + } else { + src = new byte[length]; + System.arraycopy(input.array(), offset, src, 0, length); + } + } else { + length = input.remaining(); + src = new byte[length]; + input.slice().get(src); + } + + byte[] compressed = null; + try { + compressed = compress(src); + } catch (IOException e) { + throw new RuntimeException(e); + } + return ByteBuffer.wrap(compressed); + } + public byte[] compress(byte[] data) throws IOException { return compressor.compress(data); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java similarity index 75% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java index 1218221a4baf9..b3241bbe326df 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcUncompressor.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress; import org.apache.tsfile.compress.IUnCompressor; import org.apache.tsfile.file.metadata.enums.CompressionType; @@ -31,6 +31,27 @@ public RpcUncompressor(CompressionType name) { unCompressor = IUnCompressor.getUnCompressor(name); } + public ByteBuffer uncompress(ByteBuffer byteArray) { + byte[] bytes; + int length = byteArray.remaining(); + + if (byteArray.hasArray()) { + bytes = byteArray.array(); + int offset = byteArray.arrayOffset() + byteArray.position(); + bytes = java.util.Arrays.copyOfRange(bytes, offset, offset + length); + } else { + bytes = new byte[length]; + byteArray.get(bytes); + } + byte[] decompressedBytes = null; + try { + decompressedBytes = unCompressor.uncompress(bytes); + } catch (IOException e) { + throw new RuntimeException(e); + } + return ByteBuffer.wrap(decompressedBytes); + } + public int getUncompressedLength(byte[] array, int offset, int length) throws IOException { return unCompressor.getUncompressedLength(array, offset, length); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java new file mode 100644 index 0000000000000..3bd627d65642f --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; + +import java.nio.ByteBuffer; + +public interface ColumnDecoder { + + Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); + + boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); + + int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); + + long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); + + float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); + + double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); + + Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); + + Decoder getDecoder(TSDataType type, TSEncoding encodingType); +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java similarity index 64% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java index 32a672dd4826b..8ec1cc43722e5 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/PlainColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.decoder.Decoder; import org.apache.tsfile.encoding.decoder.PlainDecoder; @@ -95,6 +97,60 @@ public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { } } + @Override + public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + boolean[] result = new boolean[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBoolean(buffer); + } + return result; + } + + @Override + public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; + } + + @Override + public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; + } + + @Override + public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); + } + return result; + } + + @Override + public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); + } + return result; + } + + @Override + public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + Binary[] result = new Binary[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBinary(buffer); + } + return result; + } + @Override public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { return new PlainDecoder(); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java similarity index 64% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnDecoder.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java index 4f061df90fbf0..762f97ad5e339 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RleColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.decoder.Decoder; import org.apache.tsfile.enums.TSDataType; @@ -94,6 +96,60 @@ public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { } } + @Override + public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + boolean[] result = new boolean[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBoolean(buffer); + } + return result; + } + + @Override + public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; + } + + @Override + public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; + } + + @Override + public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); + } + return result; + } + + @Override + public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); + } + return result; + } + + @Override + public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + Binary[] result = new Binary[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBinary(buffer); + } + return result; + } + @Override public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { return null; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java similarity index 62% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java index 07ddc261bc025..1fa606ab7d5d3 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java @@ -16,71 +16,81 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; +import org.apache.iotdb.session.rpccompress.EncodingTypeNotSupportedException; +import org.apache.iotdb.session.rpccompress.MetaHead; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import java.nio.ByteBuffer; +import java.util.function.Consumer; public class RpcDecoder { - private MetaHead metaHead = new MetaHead(); - private MetaHead metaHeadForTimeStamp = new MetaHead(); - private Integer MetaHeaderLength = 0; - private Integer MetaHeaderForTimeStampLength = 0; + private MetaHead timeMeta = new MetaHead(); + private MetaHead valueMeta = new MetaHead(); - public void readMetaHead(ByteBuffer buffer) { - this.MetaHeaderLength = buffer.getInt(buffer.limit() - Integer.BYTES); - byte[] metaBytes = new byte[MetaHeaderLength]; - buffer.position(buffer.limit() - Integer.BYTES - MetaHeaderLength); - buffer.get(metaBytes); - this.metaHead = MetaHead.fromBytes(metaBytes); + private Integer timeMetaLen = 0; + private Integer valueMetaLen = 0; + + /** + * read timestamps + * + * @param buffer ByteBuffer + * @param size Number of rows + */ + public long[] readTimesFromBuffer(ByteBuffer buffer, int size) { + int savePosition = buffer.position(); + readMetaHeadForTimeStamp(buffer); + buffer.position(savePosition); + return decodeColumnForTimeStamp(buffer, size); } public void readMetaHeadForTimeStamp(ByteBuffer buffer) { - this.MetaHeaderForTimeStampLength = buffer.getInt(buffer.limit() - Integer.BYTES); - byte[] metaBytes = new byte[MetaHeaderForTimeStampLength]; - buffer.position(buffer.limit() - Integer.BYTES - MetaHeaderForTimeStampLength); - buffer.get(metaBytes); - this.metaHeadForTimeStamp = MetaHead.fromBytes(metaBytes); + this.timeMeta = readMetaHead(buffer, length -> this.timeMetaLen = length); } - public long[] readTimesFromBuffer(ByteBuffer buffer, int size) { - return decodeTimestamps(buffer, size); + public void readMetaHeadForValues(ByteBuffer buffer) { + this.valueMeta = readMetaHead(buffer, length -> this.valueMetaLen = length); } - public long[] decodeTimestamps(ByteBuffer buffer, int size) { - int savePosition = buffer.position(); - readMetaHeadForTimeStamp(buffer); - buffer.position(savePosition); - long[] timestamps = (long[]) decodeColumnForTimeStamp(buffer, size); - return timestamps; + public MetaHead readMetaHead(ByteBuffer buffer, Consumer length) { + // 1. read metaHeader length + int MetaHeaderLength = buffer.getInt(buffer.limit() - Integer.BYTES); + length.accept(MetaHeaderLength); + // 2. read metaHeader + byte[] metaBytes = new byte[MetaHeaderLength]; + buffer.position(buffer.limit() - Integer.BYTES - MetaHeaderLength); + buffer.get(metaBytes); + // 3. Deserialize metaHeader + return MetaHead.fromBytes(metaBytes); + } + + public long[] decodeColumnForTimeStamp(ByteBuffer buffer, int rowCount) { + ColumnEntry columnEntry = timeMeta.getColumnEntries().get(0); + TSDataType dataType = columnEntry.getDataType(); + TSEncoding encodingType = columnEntry.getEncodingType(); + ColumnDecoder columnDecoder = createDecoder(dataType, encodingType); + + return columnDecoder.decodeLongColumn(buffer, columnEntry, rowCount); } public Object[] decodeValues(ByteBuffer buffer, int rowCount) { int savePosition = buffer.position(); - readMetaHead(buffer); + readMetaHeadForValues(buffer); buffer.position(savePosition); - int columnNum = metaHead.getColumnEntries().size(); + int columnNum = valueMeta.getColumnEntries().size(); Object[] values = new Object[columnNum]; for (int i = 0; i < columnNum; i++) { - Object value = decodeColumn(i, buffer, rowCount); - values[i] = value; + values[i] = decodeColumn(i, buffer, rowCount); } return values; } public Object decodeColumn(int columnIndex, ByteBuffer buffer, int rowCount) { - ColumnEntry columnEntry = metaHead.getColumnEntries().get(columnIndex); - TSDataType dataType = columnEntry.getDataType(); - TSEncoding encodingType = columnEntry.getEncodingType(); - ColumnDecoder columnDecoder = createDecoder(dataType, encodingType); - - return columnDecoder.decode(buffer, columnEntry, rowCount); - } - - public Object decodeColumnForTimeStamp(ByteBuffer buffer, int rowCount) { - ColumnEntry columnEntry = metaHeadForTimeStamp.getColumnEntries().get(0); + ColumnEntry columnEntry = valueMeta.getColumnEntries().get(columnIndex); TSDataType dataType = columnEntry.getDataType(); TSEncoding encodingType = columnEntry.getEncodingType(); ColumnDecoder columnDecoder = createDecoder(dataType, encodingType); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java similarity index 96% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java index 0d208e8b66373..dc898eb2c5f1a 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.decoder.Decoder; import org.apache.tsfile.enums.TSDataType; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java similarity index 67% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java index 3a9528c4c43ef..b1062f902476b 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/ColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java @@ -16,24 +16,33 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; -import java.util.List; +import java.io.ByteArrayOutputStream; /** Column encoder interface, which defines the encoding and decoding operations of column data */ public interface ColumnEncoder { - /** - * Encode a column of data - * - * @param data The data column to be encoded - * @return Encoded data - */ - byte[] encode(List data); + void encode(boolean[] values, ByteArrayOutputStream out); + + void encode(short[] values, ByteArrayOutputStream out); + + void encode(int[] values, ByteArrayOutputStream out); + + void encode(long[] values, ByteArrayOutputStream out); + + void encode(float[] values, ByteArrayOutputStream out); + + void encode(double[] values, ByteArrayOutputStream out); + + void encode(Binary[] values, ByteArrayOutputStream out); TSDataType getDataType(); @@ -43,10 +52,3 @@ public interface ColumnEncoder { ColumnEntry getColumnEntry(); } - -/** Encoding type not supported exception */ -class EncodingTypeNotSupportedException extends RuntimeException { - public EncodingTypeNotSupportedException(String message) { - super("Encoding type " + message + " is not supported."); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java new file mode 100644 index 0000000000000..9ba131b21ea72 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java @@ -0,0 +1,290 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.PlainEncoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +public class PlainColumnEncoder implements ColumnEncoder { + /** The encoder used to encode the data */ + private final Encoder encoder; + + private final TSDataType dataType; + + /** ColumnEntry stores metadata for a column's encoded data */ + private ColumnEntry columnEntry; + + private static final int DEFAULT_MAX_STRING_LENGTH = 0xffff; + + public PlainColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = new PlainEncoder(dataType, DEFAULT_MAX_STRING_LENGTH); + } + + /** + * Encodes a column of data using the PLAIN encoding algorithm. + * + * @param values + * @param out + */ + @Override + public void encode(boolean[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (boolean value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(short[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (short value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + // TODO 这种复制效率不高,可以将 getUncompressedDataSize 提到上一级,此函数取消临时 PublicBAOS outputStream + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(int[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (int value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(long[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (long value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(float[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (float value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(double[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (double value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(Binary[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length, values); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (Binary value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private int getUncompressedDataSize(int len) { + return getUncompressedDataSize(len, null); + } + + /** + * Calculates the uncompressed size in bytes for a column of data, based on the data type and + * number of entries. + * + * @param len the length of arrayList + * @return + */ + private int getUncompressedDataSize(int len, Binary[] values) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } + + /** + * Set column entry metadata + * + * @param compressedSize + * @param unCompressedSize + */ + private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.PLAIN; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return new PlainEncoder(type, DEFAULT_MAX_STRING_LENGTH); + } + + @Override + public ColumnEntry getColumnEntry() { + return columnEntry; + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java new file mode 100644 index 0000000000000..9269c7d481afd --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java @@ -0,0 +1,266 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +public class RleColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + private ColumnEntry columnEntry; + + public RleColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = getEncoder(dataType, TSEncoding.RLE); + columnEntry = new ColumnEntry(); + } + + @Override + public void encode(boolean[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (boolean value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(short[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (short value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + // TODO 这种复制效率不高,可以将 getUncompressedDataSize 提到上一级,此函数取消临时 PublicBAOS outputStream + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(int[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (int value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(long[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (long value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(float[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (float value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(double[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (double value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(Binary[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length, values); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (Binary value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.RLE; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); + } + + @Override + public ColumnEntry getColumnEntry() { + return columnEntry; + } + + private int getUncompressedDataSize(int len) { + return getUncompressedDataSize(len, null); + } + + private int getUncompressedDataSize(int len, Binary[] values) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java similarity index 60% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java index 84a937389c867..0f7b966e6dfc7 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/RpcEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java @@ -16,31 +16,48 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.EncodingTypeNotSupportedException; +import org.apache.iotdb.session.rpccompress.MetaHead; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.CompressionType; import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; import org.apache.tsfile.write.record.Tablet; import org.apache.tsfile.write.schema.IMeasurementSchema; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.List; import java.util.Map; public class RpcEncoder { - private final MetaHead metaHead; + /** MetaHead for values */ + private final MetaHead metaHeadForValues; + + /** MetaHead for timestamps */ private final MetaHead metaHeadForTimeStamp; + + /** + * User-specified encoding configurations for time series columns. Can be modified to apply + * different encoding strategies per data type. + */ private final Map columnEncodersMap; + + /** Compression type */ private final CompressionType compressionType; + /** Store the length of the MetaHead using a 4-byte integer. */ + private final int metaHeadLengthInBytes = 4; + public RpcEncoder( Map columnEncodersMap, CompressionType compressionType) { this.columnEncodersMap = columnEncodersMap; this.compressionType = compressionType; - this.metaHead = new MetaHead(); + this.metaHeadForValues = new MetaHead(); this.metaHeadForTimeStamp = new MetaHead(); } @@ -52,139 +69,118 @@ public RpcEncoder( */ public ByteBuffer encodeTimestamps(Tablet tablet) { - // 1.Get timestamp data + // 1. Get timestamp data long[] timestamps = tablet.getTimestamps(); - List timestampsList = new ArrayList<>(); - // 2.transform List - for (int i = 0; i < timestamps.length; i++) { - timestampsList.add(timestamps[i]); - } - // 3.encoder - byte[] encoded = encodeTimeStampColumn(TSDataType.INT64, timestampsList); - // 4. Serializing MetaHead + // 2. encoder + PublicBAOS publicBAOS = new PublicBAOS(); + encodeTimeStampColumn(TSDataType.INT64, timestamps, publicBAOS); + byte[] encoded = publicBAOS.getBuf(); + int len = publicBAOS.size(); + // 3. Serializing MetaHead byte[] metaHeadEncoder = getMetaHeadForTimeStamp().toBytes(); - ByteBuffer timeBuffer = ByteBuffer.allocate(encoded.length + metaHeadEncoder.length + 4); - timeBuffer.put(encoded); + ByteBuffer timeBuffer = + ByteBuffer.allocate(len + metaHeadEncoder.length + metaHeadLengthInBytes); + timeBuffer.put(encoded, 0, len); timeBuffer.put(metaHeadEncoder); - // 5. metaHead size + // 4. metaHead size timeBuffer.putInt(metaHeadEncoder.length); - System.out.println("metaHead size: " + metaHeadEncoder.length); - // 6.Adjust the ByteBuffer limit to the actual length of the data written + // 5. Adjust the ByteBuffer limit to the actual length of the data written timeBuffer.flip(); return timeBuffer; } + public void encodeTimeStampColumn( + TSDataType dataType, long[] timestamps, ByteArrayOutputStream out) { + // 1.Get the encoding type + TSEncoding encoding = columnEncodersMap.getOrDefault(dataType, TSEncoding.PLAIN); + ColumnEncoder encoder = createEncoder(dataType, encoding); + // 2.encoder + encoder.encode(timestamps, out); + // 3.Get ColumnEntry content and add to metaHead + metaHeadForTimeStamp.addColumnEntry(encoder.getColumnEntry()); + } + + /** + * Create the corresponding encoder based on the data type and encoding type + * + * @param dataType data type + * @param encodingType encoding Type + * @return columnEncoder + */ + private ColumnEncoder createEncoder(TSDataType dataType, TSEncoding encodingType) { + switch (encodingType) { + case PLAIN: + return new PlainColumnEncoder(dataType); + case RLE: + return new RleColumnEncoder(dataType); + case TS_2DIFF: + return new Ts2DiffColumnEncoder(dataType); + default: + throw new EncodingTypeNotSupportedException(encodingType.name()); + } + } + /** Get the value columns from the tablet and encode them into encodedValues */ public ByteBuffer encodeValues(Tablet tablet) { - // 1. Estimated maximum space (assuming each column is at most rowSize * 16 bytes) - int estimatedSize = tablet.getRowSize() * 16 * tablet.getSchemas().size(); - ByteBuffer valueBuffer = ByteBuffer.allocate(estimatedSize); - - // 2. Encode each column + // 1. Encode each column + PublicBAOS out = new PublicBAOS(); for (int i = 0; i < tablet.getSchemas().size(); i++) { IMeasurementSchema schema = tablet.getSchemas().get(i); - byte[] encoded = encodeColumn(schema.getType(), tablet, i); - valueBuffer.put(encoded); + encodeColumn(schema.getType(), tablet, i, out); } - // 3. Serializing MetaHead + // 2. Serializing MetaHead byte[] metaHeadEncoder = getMetaHead().toBytes(); + + ByteBuffer valueBuffer = + ByteBuffer.allocate(out.size() + metaHeadEncoder.length + metaHeadLengthInBytes); + valueBuffer.put(out.getBuf(), 0, out.size()); valueBuffer.put(metaHeadEncoder); - // 4. metaHead size + // 3. metaHead size valueBuffer.putInt(metaHeadEncoder.length); - // 5. Adjust the ByteBuffer limit to the actual length of the data written + // 4. Adjust the ByteBuffer limit to the actual length of the data written valueBuffer.flip(); return valueBuffer; } - public byte[] encodeColumn(TSDataType dataType, Tablet tablet, int columnIndex) { + public void encodeColumn( + TSDataType dataType, Tablet tablet, int columnIndex, ByteArrayOutputStream out) { // 1.Get the encoding type TSEncoding encoding = columnEncodersMap.getOrDefault(dataType, TSEncoding.PLAIN); ColumnEncoder encoder = createEncoder(dataType, encoding); - // 2.Get the data of the column and convert it into a Lis + + // 2.Get the data of the column Object columnValues = tablet.getValues()[columnIndex]; - List valueList; + + // 3.encode switch (dataType) { case INT32: - int[] intArray = (int[]) columnValues; - List intList = new ArrayList<>(intArray.length); - for (int v : intArray) intList.add(v); - valueList = intList; + encoder.encode((int[]) columnValues, out); break; case INT64: - long[] longArray = (long[]) columnValues; - List longList = new ArrayList<>(longArray.length); - for (long v : longArray) longList.add(v); - valueList = longList; + encoder.encode((long[]) columnValues, out); break; case FLOAT: - float[] floatArray = (float[]) columnValues; - List floatList = new ArrayList<>(floatArray.length); - for (float v : floatArray) floatList.add(v); - valueList = floatList; + encoder.encode((float[]) columnValues, out); break; case DOUBLE: - double[] doubleArray = (double[]) columnValues; - List doubleList = new ArrayList<>(doubleArray.length); - for (double v : doubleArray) doubleList.add(v); - valueList = doubleList; + encoder.encode((double[]) columnValues, out); break; case BOOLEAN: - boolean[] boolArray = (boolean[]) columnValues; - List boolList = new ArrayList<>(boolArray.length); - for (boolean v : boolArray) boolList.add(v); - valueList = boolList; + encoder.encode((boolean[]) columnValues, out); break; case STRING: + case BLOB: case TEXT: - Object[] textArray = (Object[]) columnValues; - List textList = new ArrayList<>(textArray.length); - for (Object v : textArray) textList.add(v); - valueList = textList; + encoder.encode((Binary[]) columnValues, out); break; default: throw new UnsupportedOperationException("Unsupported data types: " + dataType); } - // 3.encoder - byte[] encoded = encoder.encode(valueList); // 4.Get ColumnEntry content and add to metaHead - metaHead.addColumnEntry(encoder.getColumnEntry()); - // 5.Returns the encoded data - return encoded; - } - - public byte[] encodeTimeStampColumn(TSDataType dataType, List timestamps) { - // 1.Get the encoding type - TSEncoding encoding = columnEncodersMap.getOrDefault(dataType, TSEncoding.PLAIN); - ColumnEncoder encoder = createEncoder(dataType, encoding); - // 2.encoder - byte[] encoded = encoder.encode(timestamps); - // 3.Get ColumnEntry content and add to metaHead - metaHeadForTimeStamp.addColumnEntry(encoder.getColumnEntry()); - // 4.Returns the encoded data - return encoded; - } - - /** - * Create the corresponding encoder based on the data type and encoding type - * - * @param dataType data type - * @param encodingType encoding Type - * @return columnEncoder - */ - private ColumnEncoder createEncoder(TSDataType dataType, TSEncoding encodingType) { - switch (encodingType) { - case PLAIN: - return new PlainColumnEncoder(dataType); - case RLE: - return new RleColumnEncoder(dataType); - case TS_2DIFF: - return new Ts2DiffColumnEncoder(dataType); - default: - throw new EncodingTypeNotSupportedException(encodingType.name()); - } + metaHeadForValues.addColumnEntry(encoder.getColumnEntry()); } /** @@ -193,7 +189,7 @@ private ColumnEncoder createEncoder(TSDataType dataType, TSEncoding encodingType * @return metaHeader */ public MetaHead getMetaHead() { - return metaHead; + return metaHeadForValues; } public MetaHead getMetaHeadForTimeStamp() { diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java similarity index 93% rename from iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java rename to iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java index af4d2df915cd7..5037160e27d34 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/compress/Ts2DiffColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java @@ -16,7 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.iotdb.session.compress; +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; import org.apache.tsfile.enums.TSDataType; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java index 982a213b678f6..2c320670f4555 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java @@ -91,7 +91,8 @@ import org.apache.iotdb.service.rpc.thrift.TSRawDataQueryReq; import org.apache.iotdb.service.rpc.thrift.TSSetSchemaTemplateReq; import org.apache.iotdb.service.rpc.thrift.TSUnsetSchemaTemplateReq; -import org.apache.iotdb.session.compress.RpcDecoder; +import org.apache.iotdb.session.rpccompress.RpcUncompressor; +import org.apache.iotdb.session.rpccompress.decoder.RpcDecoder; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; @@ -336,7 +337,12 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl long[] timestamps; if (insertTabletReq.isIsCompressed()) { RpcDecoder rpcDecoder = new RpcDecoder(); - timestamps = rpcDecoder.readTimesFromBuffer(insertTabletReq.timestamps, insertTabletReq.size); + RpcUncompressor rpcUncompressor = + new RpcUncompressor( + CompressionType.deserialize((byte) insertTabletReq.getCompressType())); + timestamps = + rpcDecoder.readTimesFromBuffer( + rpcUncompressor.uncompress(insertTabletReq.timestamps), insertTabletReq.size); } else { timestamps = QueryDataSetUtils.readTimesFromBuffer(insertTabletReq.timestamps, insertTabletReq.size); @@ -348,8 +354,12 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl insertStatement.setTimes(timestamps); if (insertTabletReq.isIsCompressed()) { RpcDecoder rpcDecoder = new RpcDecoder(); + RpcUncompressor rpcUncompressor = + new RpcUncompressor( + CompressionType.deserialize((byte) insertTabletReq.getCompressType())); insertStatement.setColumns( - rpcDecoder.decodeValues(insertTabletReq.values, insertTabletReq.size)); + rpcDecoder.decodeValues( + rpcUncompressor.uncompress(insertTabletReq.values), insertTabletReq.size)); } else { insertStatement.setColumns( QueryDataSetUtils.readTabletValuesFromBuffer( From 732d0fb82cdabd9422917f08f666208ed3eefa2f Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Mon, 19 May 2025 22:42:16 +0800 Subject: [PATCH 06/25] Refine RPC compression logic --- .../org/apache/iotdb/session/Session.java | 3 +- .../session/rpccompress/RpcCompressor.java | 29 ++------ .../session/rpccompress/RpcUncompressor.java | 21 ++---- .../rpccompress/encoder/RpcEncoder.java | 73 ++++++------------- .../plan/parser/StatementGenerator.java | 2 + 5 files changed, 40 insertions(+), 88 deletions(-) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index 968e758d83788..3a4e1af94b0e5 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -2984,6 +2984,7 @@ private TSInsertTabletReq genTSInsertTabletReq(Tablet tablet, boolean sorted, bo request.setPrefixPath(tablet.getDeviceId()); request.setIsAligned(isAligned); + if (this.enableRPCCompression) { request.setIsCompressed(true); for (IMeasurementSchema measurementSchema : tablet.getSchemas()) { @@ -2993,7 +2994,7 @@ private TSInsertTabletReq genTSInsertTabletReq(Tablet tablet, boolean sorted, bo request.addToEncodingTypes( this.columnEncodersMap.get(measurementSchema.getType()).ordinal()); } - RpcEncoder rpcEncoder = new RpcEncoder(this.columnEncodersMap, this.compressionType); + RpcEncoder rpcEncoder = new RpcEncoder(this.columnEncodersMap); RpcCompressor rpcCompressor = new RpcCompressor(this.compressionType); request.setTimestamps(rpcCompressor.compress(rpcEncoder.encodeTimestamps(tablet))); request.setValues(rpcCompressor.compress(rpcEncoder.encodeValues(tablet))); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java index 45c0149a97a58..fa445bacd6ad1 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java @@ -21,6 +21,7 @@ import org.apache.tsfile.compress.ICompressor; import org.apache.tsfile.file.metadata.enums.CompressionType; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.ByteBuffer; @@ -32,32 +33,14 @@ public RpcCompressor(CompressionType name) { compressor = ICompressor.getCompressor(name); } - public ByteBuffer compress(ByteBuffer input) { - byte[] src; - int offset, length; - - if (input.hasArray()) { - offset = input.arrayOffset() + input.position(); - length = input.remaining(); - if (offset == 0 && length == input.array().length) { - src = input.array(); - } else { - src = new byte[length]; - System.arraycopy(input.array(), offset, src, 0, length); - } - } else { - length = input.remaining(); - src = new byte[length]; - input.slice().get(src); - } - - byte[] compressed = null; + public ByteBuffer compress(ByteArrayOutputStream input) { try { - compressed = compress(src); + byte[] data = input.toByteArray(); + byte[] compressed = compress(data); + return ByteBuffer.wrap(compressed); } catch (IOException e) { - throw new RuntimeException(e); + throw new RuntimeException("Compression failed", e); } - return ByteBuffer.wrap(compressed); } public byte[] compress(byte[] data) throws IOException { diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java index b3241bbe326df..475d348c1c042 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java @@ -32,24 +32,15 @@ public RpcUncompressor(CompressionType name) { } public ByteBuffer uncompress(ByteBuffer byteArray) { - byte[] bytes; - int length = byteArray.remaining(); - - if (byteArray.hasArray()) { - bytes = byteArray.array(); - int offset = byteArray.arrayOffset() + byteArray.position(); - bytes = java.util.Arrays.copyOfRange(bytes, offset, offset + length); - } else { - bytes = new byte[length]; - byteArray.get(bytes); - } - byte[] decompressedBytes = null; try { - decompressedBytes = unCompressor.uncompress(bytes); + int uncompressedLength = unCompressor.getUncompressedLength(byteArray.duplicate()); + ByteBuffer output = ByteBuffer.allocate(uncompressedLength); + unCompressor.uncompress(byteArray.duplicate(), output); + output.flip(); + return output; } catch (IOException e) { - throw new RuntimeException(e); + throw new RuntimeException("Failed to decompress buffer", e); } - return ByteBuffer.wrap(decompressedBytes); } public int getUncompressedLength(byte[] array, int offset, int length) throws IOException { diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java index 0f7b966e6dfc7..1b386a479751f 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java @@ -22,7 +22,6 @@ import org.apache.iotdb.session.rpccompress.MetaHead; import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.CompressionType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.PublicBAOS; @@ -31,7 +30,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.nio.ByteBuffer; import java.util.Map; public class RpcEncoder { @@ -47,16 +45,11 @@ public class RpcEncoder { */ private final Map columnEncodersMap; - /** Compression type */ - private final CompressionType compressionType; - /** Store the length of the MetaHead using a 4-byte integer. */ private final int metaHeadLengthInBytes = 4; - public RpcEncoder( - Map columnEncodersMap, CompressionType compressionType) { + public RpcEncoder(Map columnEncodersMap) { this.columnEncodersMap = columnEncodersMap; - this.compressionType = compressionType; this.metaHeadForValues = new MetaHead(); this.metaHeadForTimeStamp = new MetaHead(); } @@ -67,38 +60,25 @@ public RpcEncoder( * @param tablet data * @throws IOException An IO exception occurs */ - public ByteBuffer encodeTimestamps(Tablet tablet) { - - // 1. Get timestamp data - long[] timestamps = tablet.getTimestamps(); - // 2. encoder + public ByteArrayOutputStream encodeTimestamps(Tablet tablet) { + // 1.encoder PublicBAOS publicBAOS = new PublicBAOS(); - encodeTimeStampColumn(TSDataType.INT64, timestamps, publicBAOS); - byte[] encoded = publicBAOS.getBuf(); - int len = publicBAOS.size(); - // 3. Serializing MetaHead - byte[] metaHeadEncoder = getMetaHeadForTimeStamp().toBytes(); - - ByteBuffer timeBuffer = - ByteBuffer.allocate(len + metaHeadEncoder.length + metaHeadLengthInBytes); - timeBuffer.put(encoded, 0, len); - timeBuffer.put(metaHeadEncoder); - // 4. metaHead size - timeBuffer.putInt(metaHeadEncoder.length); - // 5. Adjust the ByteBuffer limit to the actual length of the data written - timeBuffer.flip(); - return timeBuffer; - } + ColumnEncoder encoder = + createEncoder( + TSDataType.INT64, columnEncodersMap.getOrDefault(TSDataType.INT64, TSEncoding.PLAIN)); + long[] timestamps = tablet.getTimestamps(); + encoder.encode(timestamps, publicBAOS); - public void encodeTimeStampColumn( - TSDataType dataType, long[] timestamps, ByteArrayOutputStream out) { - // 1.Get the encoding type - TSEncoding encoding = columnEncodersMap.getOrDefault(dataType, TSEncoding.PLAIN); - ColumnEncoder encoder = createEncoder(dataType, encoding); - // 2.encoder - encoder.encode(timestamps, out); - // 3.Get ColumnEntry content and add to metaHead + // 2.Get ColumnEntry content and add to metaHead metaHeadForTimeStamp.addColumnEntry(encoder.getColumnEntry()); + + // 3.Serialize metaHead and append it to the output stream + byte[] metaHeadEncoder = getMetaHeadForTimeStamp().toBytes(); + publicBAOS.write(metaHeadEncoder, 0, metaHeadEncoder.length); + // 4.Write the length of the serialized metaHead as a 4-byte big-endian integer + publicBAOS.write(metaHeadEncoder.length); + + return publicBAOS; } /** @@ -122,26 +102,21 @@ private ColumnEncoder createEncoder(TSDataType dataType, TSEncoding encodingType } /** Get the value columns from the tablet and encode them into encodedValues */ - public ByteBuffer encodeValues(Tablet tablet) { - // 1. Encode each column + public ByteArrayOutputStream encodeValues(Tablet tablet) { + // 1.Encode each column PublicBAOS out = new PublicBAOS(); for (int i = 0; i < tablet.getSchemas().size(); i++) { IMeasurementSchema schema = tablet.getSchemas().get(i); encodeColumn(schema.getType(), tablet, i, out); } - // 2. Serializing MetaHead + // 2.Serializing MetaHead and append it to the output stream byte[] metaHeadEncoder = getMetaHead().toBytes(); + out.write(metaHeadEncoder, 0, metaHeadEncoder.length); + // 3.Write the length of the serialized metaHead as a 4-byte big-endian integer + out.write(metaHeadEncoder.length); - ByteBuffer valueBuffer = - ByteBuffer.allocate(out.size() + metaHeadEncoder.length + metaHeadLengthInBytes); - valueBuffer.put(out.getBuf(), 0, out.size()); - valueBuffer.put(metaHeadEncoder); - // 3. metaHead size - valueBuffer.putInt(metaHeadEncoder.length); - // 4. Adjust the ByteBuffer limit to the actual length of the data written - valueBuffer.flip(); - return valueBuffer; + return out; } public void encodeColumn( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java index 2c320670f4555..919f9f9d87d38 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java @@ -335,6 +335,7 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl DEVICE_PATH_CACHE.getPartialPath(insertTabletReq.getPrefixPath())); insertStatement.setMeasurements(insertTabletReq.getMeasurements().toArray(new String[0])); long[] timestamps; + // decode timestamps if (insertTabletReq.isIsCompressed()) { RpcDecoder rpcDecoder = new RpcDecoder(); RpcUncompressor rpcUncompressor = @@ -352,6 +353,7 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl TimestampPrecisionUtils.checkTimestampPrecision(timestamps[timestamps.length - 1]); } insertStatement.setTimes(timestamps); + // decode values if (insertTabletReq.isIsCompressed()) { RpcDecoder rpcDecoder = new RpcDecoder(); RpcUncompressor rpcUncompressor = From 0179ed62b5472792d5dcd851b63a6a4fb23b27ea Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 20 May 2025 16:15:05 +0800 Subject: [PATCH 07/25] Fix the BufferUnderflowException in ByteBuffer usage. --- .../org/apache/iotdb/session/Session.java | 1 + .../session/rpccompress/RpcCompressor.java | 7 ++- .../session/rpccompress/RpcUncompressor.java | 7 ++- .../decoder/Ts2DiffColumnDecoder.java | 30 ++++++++++++ .../rpccompress/encoder/RpcEncoder.java | 48 +++++++++++++------ .../encoder/Ts2DiffColumnEncoder.java | 25 ++++++++-- .../iotdb/session/RpcCompressedTest.java | 13 ++--- 7 files changed, 100 insertions(+), 31 deletions(-) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index 3a4e1af94b0e5..4843c69eebd79 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -2820,6 +2820,7 @@ private void insertRelationalTabletOnce(Map relationa SessionConnection connection = entry.getKey(); Tablet tablet = entry.getValue(); TSInsertTabletReq request = genTSInsertTabletReq(tablet, false, false); + request.setCompressType(this.compressionType.ordinal()); request.setWriteToTable(true); request.setColumnCategories( tablet.getColumnTypes().stream().map(t -> (byte) t.ordinal()).collect(Collectors.toList())); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java index fa445bacd6ad1..356a2cb84a519 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java @@ -36,8 +36,13 @@ public RpcCompressor(CompressionType name) { public ByteBuffer compress(ByteArrayOutputStream input) { try { byte[] data = input.toByteArray(); + int length = data.length; + byte[] compressed = compress(data); - return ByteBuffer.wrap(compressed); + ByteBuffer buffer = ByteBuffer.allocate(compressed.length + Integer.BYTES); + buffer.put(compressed).putInt(length); + buffer.flip(); + return buffer; } catch (IOException e) { throw new RuntimeException("Compression failed", e); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java index 475d348c1c042..e38cf6c27f9e0 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java @@ -33,9 +33,12 @@ public RpcUncompressor(CompressionType name) { public ByteBuffer uncompress(ByteBuffer byteArray) { try { - int uncompressedLength = unCompressor.getUncompressedLength(byteArray.duplicate()); + int uncompressedLength = byteArray.getInt(byteArray.limit() - 4); ByteBuffer output = ByteBuffer.allocate(uncompressedLength); - unCompressor.uncompress(byteArray.duplicate(), output); + byte[] compressedData = new byte[byteArray.remaining() - 4]; + byteArray.slice().get(compressedData); + byte[] uncompressedData = unCompressor.uncompress(compressedData); + output.put(uncompressedData); output.flip(); return output; } catch (IOException e) { diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java index dc898eb2c5f1a..647ee1bd6c81d 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java @@ -99,6 +99,36 @@ public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { } } + @Override + public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + return new boolean[0]; + } + + @Override + public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + return new int[0]; + } + + @Override + public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + return new long[0]; + } + + @Override + public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + return new float[0]; + } + + @Override + public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + return new double[0]; + } + + @Override + public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + return new Binary[0]; + } + @Override public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { return null; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java index 1b386a479751f..8b686f664b6c0 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java @@ -66,18 +66,24 @@ public ByteArrayOutputStream encodeTimestamps(Tablet tablet) { ColumnEncoder encoder = createEncoder( TSDataType.INT64, columnEncodersMap.getOrDefault(TSDataType.INT64, TSEncoding.PLAIN)); - long[] timestamps = tablet.getTimestamps(); - encoder.encode(timestamps, publicBAOS); + try { + long[] timestamps = tablet.getTimestamps(); + encoder.encode(timestamps, publicBAOS); - // 2.Get ColumnEntry content and add to metaHead - metaHeadForTimeStamp.addColumnEntry(encoder.getColumnEntry()); + // 2.Get ColumnEntry content and add to metaHead + metaHeadForTimeStamp.addColumnEntry(encoder.getColumnEntry()); - // 3.Serialize metaHead and append it to the output stream - byte[] metaHeadEncoder = getMetaHeadForTimeStamp().toBytes(); - publicBAOS.write(metaHeadEncoder, 0, metaHeadEncoder.length); - // 4.Write the length of the serialized metaHead as a 4-byte big-endian integer - publicBAOS.write(metaHeadEncoder.length); + // 3.Serialize metaHead and append it to the output stream + byte[] metaHeadEncoder = getMetaHeadForTimeStamp().toBytes(); + publicBAOS.write(metaHeadEncoder); + + // 4.Write the length of the serialized metaHead as a 4-byte big-endian integer + publicBAOS.write(intToBytes(metaHeadEncoder.length)); + + } catch (IOException e) { + throw new RuntimeException(e); + } return publicBAOS; } @@ -110,12 +116,15 @@ public ByteArrayOutputStream encodeValues(Tablet tablet) { encodeColumn(schema.getType(), tablet, i, out); } - // 2.Serializing MetaHead and append it to the output stream - byte[] metaHeadEncoder = getMetaHead().toBytes(); - out.write(metaHeadEncoder, 0, metaHeadEncoder.length); - // 3.Write the length of the serialized metaHead as a 4-byte big-endian integer - out.write(metaHeadEncoder.length); - + try { + // 2.Serializing MetaHead and append it to the output stream + byte[] metaHeadEncoder = getMetaHead().toBytes(); + out.write(metaHeadEncoder); + // 3.Write the length of the serialized metaHead as a 4-byte big-endian integer + out.write(intToBytes(metaHeadEncoder.length)); + } catch (IOException e) { + throw new RuntimeException(e); + } return out; } @@ -158,6 +167,15 @@ public void encodeColumn( metaHeadForValues.addColumnEntry(encoder.getColumnEntry()); } + public static byte[] intToBytes(int value) { + return new byte[] { + (byte) ((value >>> 24) & 0xFF), + (byte) ((value >>> 16) & 0xFF), + (byte) ((value >>> 8) & 0xFF), + (byte) (value & 0xFF) + }; + } + /** * Get metadata header * diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java index 5037160e27d34..81558f32c6b1f 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java @@ -23,8 +23,9 @@ import org.apache.tsfile.encoding.encoder.Encoder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; -import java.util.List; +import java.io.ByteArrayOutputStream; public class Ts2DiffColumnEncoder implements ColumnEncoder { private final Encoder encoder; @@ -36,9 +37,25 @@ public Ts2DiffColumnEncoder(TSDataType dataType) { } @Override - public byte[] encode(List data) { - return new byte[0]; - } + public void encode(boolean[] values, ByteArrayOutputStream out) {} + + @Override + public void encode(short[] values, ByteArrayOutputStream out) {} + + @Override + public void encode(int[] values, ByteArrayOutputStream out) {} + + @Override + public void encode(long[] values, ByteArrayOutputStream out) {} + + @Override + public void encode(float[] values, ByteArrayOutputStream out) {} + + @Override + public void encode(double[] values, ByteArrayOutputStream out) {} + + @Override + public void encode(Binary[] values, ByteArrayOutputStream out) {} @Override public TSDataType getDataType() { diff --git a/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java index 1601dbb7d3a41..868c9ee06bc17 100644 --- a/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java +++ b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java @@ -129,18 +129,13 @@ public void testRpcDecode() throws IoTDBConnectionException, StatementExecutionE values[2] = new float[] {1.1f, 1.2f}; values[3] = new double[] {0.707, 0.708}; values[4] = - new Binary[] {new Binary(new byte[] {(byte) 8}), new Binary(new byte[] {(byte) 16})}; + new Binary[] {new Binary(new byte[] {(byte) 32}), new Binary(new byte[] {(byte) 16})}; values[5] = new boolean[] {true, false}; BitMap[] partBitMap = new BitMap[6]; - Tablet tablet = new Tablet("device1", schemas, timestamp, values, partBitMap, 2); + Tablet tablet = new Tablet("Table_0", schemas, timestamp, values, partBitMap, 2); - long[] temp = tablet.getTimestamps(); - for (int i = 0; i < temp.length; i++) { - System.out.print(temp[i] + " "); - } - System.out.println(); - - session.executeNonQueryStatement("use table_0"); + session.executeNonQueryStatement("create database IF NOT EXISTS db_0"); + session.executeNonQueryStatement("use db_0"); session.insert(tablet); } } From 791fd2ceb33d4ff32e1094858e7cf2143c1c78d4 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 27 May 2025 13:22:05 +0800 Subject: [PATCH 08/25] add Corilla columnar encoding/decoding logic --- .../decoder/GorillaColumnDecoder.java | 90 +++++++ .../decoder/PlainColumnDecoder.java | 2 +- .../rpccompress/decoder/RleColumnDecoder.java | 80 +++--- .../encoder/GorillaColumnEncoder.java | 247 ++++++++++++++++++ .../encoder/PlainColumnEncoder.java | 1 - .../rpccompress/encoder/RleColumnEncoder.java | 1 - 6 files changed, 375 insertions(+), 46 deletions(-) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java new file mode 100644 index 0000000000000..31ddb7a1abcd4 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java @@ -0,0 +1,90 @@ +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; +import org.apache.tsfile.encoding.decoder.*; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.exception.encoding.TsFileDecodingException; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; + +import java.nio.ByteBuffer; + +public class GorillaColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public GorillaColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.GORILLA); + } + + @Override + public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + switch (dataType) { + case FLOAT: + return decodeFloatColumn(buffer, columnEntry, rowCount); + case DOUBLE: + return decodeDoubleColumn(buffer, columnEntry, rowCount); + case INT32: + case DATE: + return decodeIntColumn(buffer, columnEntry, rowCount); + case INT64: + case VECTOR: + case TIMESTAMP: + return decodeLongColumn(buffer, columnEntry, rowCount); + default: + throw new UnsupportedOperationException("Gorilla doesn't support data type: " + dataType); + } + } + + @Override + public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnsupportedOperationException("Gorilla doesn't support data type: " + dataType); + } + + @Override + public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; + } + + @Override + public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; + } + + @Override + public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); + } + return result; + } + + @Override + public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); + } + return result; + } + + @Override + public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnsupportedOperationException("Gorilla doesn't support data type: " + dataType); + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return Decoder.getDecoderByType(encodingType, type); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java index 8ec1cc43722e5..b1fd07de41931 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java @@ -153,6 +153,6 @@ public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, i @Override public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return new PlainDecoder(); + return Decoder.getDecoderByType(encodingType, type); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java index 762f97ad5e339..d5c86e7ad4e40 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java @@ -39,58 +39,52 @@ public RleColumnDecoder(TSDataType dataType) { @Override public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { switch (dataType) { - case BOOLEAN: - { - boolean[] result = new boolean[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBoolean(buffer); - } - return result; + case BOOLEAN: { + boolean[] result = new boolean[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBoolean(buffer); } + return result; + } case INT32: - case DATE: - { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; + case DATE: { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); } + return result; + } case INT64: - case TIMESTAMP: - { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; + case TIMESTAMP: { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); } - case FLOAT: - { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; + return result; + } + case FLOAT: { + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); } - case DOUBLE: - { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; + return result; + } + case DOUBLE: { + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); } + return result; + } case TEXT: case STRING: - case BLOB: - { - Binary[] result = new Binary[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBinary(buffer); - } - return result; + case BLOB: { + Binary[] result = new Binary[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBinary(buffer); } + return result; + } default: throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); } @@ -152,6 +146,6 @@ public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, i @Override public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return null; + return Decoder.getDecoderByType(encodingType, type); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java new file mode 100644 index 0000000000000..781d98b5b3dc9 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java @@ -0,0 +1,247 @@ +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +public class GorillaColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + private ColumnEntry columnEntry; + + public GorillaColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = getEncoder(dataType, TSEncoding.GORILLA); + columnEntry = new ColumnEntry(); + } + + + @Override + public void encode(boolean[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (boolean value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(short[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (short value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(int[] values, ByteArrayOutputStream out) { +// 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (int value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(long[] values, ByteArrayOutputStream out) { +// 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (long value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(float[] values, ByteArrayOutputStream out) { +// 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (float value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(double[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (double value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(Binary[] values, ByteArrayOutputStream out) { +// 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length, values); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (Binary value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.GORILLA; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); + } + + @Override + public ColumnEntry getColumnEntry() { + return null; + } + + private int getUncompressedDataSize(int len) { + return getUncompressedDataSize(len, null); + } + + private int getUncompressedDataSize(int len, Binary[] values) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } + + private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java index 9ba131b21ea72..7960f2444ca9e 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java @@ -90,7 +90,6 @@ public void encode(short[] values, ByteArrayOutputStream out) { byte[] encodedData = outputStream.toByteArray(); // 4. Set column entry metadata setColumnEntry(encodedData.length, unCompressedSize); - // TODO 这种复制效率不高,可以将 getUncompressedDataSize 提到上一级,此函数取消临时 PublicBAOS outputStream if (out != null) { out.write(encodedData); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java index 9269c7d481afd..9b38238d1d9dc 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java @@ -79,7 +79,6 @@ public void encode(short[] values, ByteArrayOutputStream out) { byte[] encodedData = outputStream.toByteArray(); // 4. Set column entry metadata setColumnEntry(encodedData.length, unCompressedSize); - // TODO 这种复制效率不高,可以将 getUncompressedDataSize 提到上一级,此函数取消临时 PublicBAOS outputStream if (out != null) { out.write(encodedData); } From 91748e917de30147a543b4958795c421abb7e830 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 27 May 2025 13:57:26 +0800 Subject: [PATCH 09/25] add chimp columnar encoding/decoding logic --- .../decoder/ChimpColumnDecoder.java | 90 ++++++++ .../decoder/GorillaColumnDecoder.java | 2 +- .../decoder/PlainColumnDecoder.java | 1 - .../rpccompress/decoder/RleColumnDecoder.java | 78 +++---- .../encoder/ChimpColumnEncoder.java | 194 ++++++++++++++++++ .../encoder/GorillaColumnEncoder.java | 10 +- 6 files changed, 332 insertions(+), 43 deletions(-) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java new file mode 100644 index 0000000000000..ec673ccbd88f4 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java @@ -0,0 +1,90 @@ +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.write.UnSupportedDataTypeException; + +import java.nio.ByteBuffer; + +public class ChimpColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public ChimpColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.CHIMP); + } + + @Override + public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + switch (dataType) { + case FLOAT: + return decodeFloatColumn(buffer, columnEntry, rowCount); + case DOUBLE: + return decodeDoubleColumn(buffer, columnEntry, rowCount); + case INT32: + case DATE: + return decodeIntColumn(buffer, columnEntry, rowCount); + case INT64: + case TIMESTAMP: + return decodeLongColumn(buffer, columnEntry, rowCount); + default: + throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); + } + } + + @Override + public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); + } + + @Override + public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; + } + + @Override + public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; + } + + @Override + public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); + } + return result; + } + + @Override + public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); + } + return result; + } + + @Override + public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return Decoder.getDecoderByType(encodingType, type); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java index 31ddb7a1abcd4..6c6287e337fcc 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java @@ -1,9 +1,9 @@ package org.apache.iotdb.session.rpccompress.decoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; + import org.apache.tsfile.encoding.decoder.*; import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.exception.encoding.TsFileDecodingException; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java index b1fd07de41931..2a005ed7d2c22 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java @@ -21,7 +21,6 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.encoding.decoder.PlainDecoder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java index d5c86e7ad4e40..555dfcdaa5e86 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java @@ -39,52 +39,58 @@ public RleColumnDecoder(TSDataType dataType) { @Override public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { switch (dataType) { - case BOOLEAN: { - boolean[] result = new boolean[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBoolean(buffer); + case BOOLEAN: + { + boolean[] result = new boolean[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBoolean(buffer); + } + return result; } - return result; - } case INT32: - case DATE: { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); + case DATE: + { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; } - return result; - } case INT64: - case TIMESTAMP: { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); + case TIMESTAMP: + { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; } - return result; - } - case FLOAT: { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); + case FLOAT: + { + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); + } + return result; } - return result; - } - case DOUBLE: { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); + case DOUBLE: + { + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); + } + return result; } - return result; - } case TEXT: case STRING: - case BLOB: { - Binary[] result = new Binary[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBinary(buffer); + case BLOB: + { + Binary[] result = new Binary[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBinary(buffer); + } + return result; } - return result; - } default: throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java new file mode 100644 index 0000000000000..333937de10318 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java @@ -0,0 +1,194 @@ +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; +import org.apache.tsfile.write.UnSupportedDataTypeException; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +public class ChimpColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + private ColumnEntry columnEntry; + + public ChimpColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = getEncoder(dataType, TSEncoding.CHIMP); + columnEntry = new ColumnEntry(); + } + + @Override + public void encode(boolean[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); + } + + @Override + public void encode(short[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); + } + + @Override + public void encode(int[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (int value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(long[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (long value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(float[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (float value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(double[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (double value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(Binary[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); + } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.CHIMP; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); + } + + @Override + public ColumnEntry getColumnEntry() { + return columnEntry; + } + + private int getUncompressedDataSize(int len) { + return getUncompressedDataSize(len, null); + } + + private int getUncompressedDataSize(int len, Binary[] values) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } + + private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java index 781d98b5b3dc9..b4db00c28309a 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java @@ -1,6 +1,7 @@ package org.apache.iotdb.session.rpccompress.encoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; + import org.apache.tsfile.encoding.encoder.Encoder; import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; @@ -22,7 +23,6 @@ public GorillaColumnEncoder(TSDataType dataType) { columnEntry = new ColumnEntry(); } - @Override public void encode(boolean[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. @@ -71,7 +71,7 @@ public void encode(short[] values, ByteArrayOutputStream out) { @Override public void encode(int[] values, ByteArrayOutputStream out) { -// 1. Calculate the uncompressed size in bytes for the column of data. + // 1. Calculate the uncompressed size in bytes for the column of data. int unCompressedSize = getUncompressedDataSize(values.length); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { @@ -94,7 +94,7 @@ public void encode(int[] values, ByteArrayOutputStream out) { @Override public void encode(long[] values, ByteArrayOutputStream out) { -// 1. Calculate the uncompressed size in bytes for the column of data. + // 1. Calculate the uncompressed size in bytes for the column of data. int unCompressedSize = getUncompressedDataSize(values.length); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { @@ -117,7 +117,7 @@ public void encode(long[] values, ByteArrayOutputStream out) { @Override public void encode(float[] values, ByteArrayOutputStream out) { -// 1. Calculate the uncompressed size in bytes for the column of data. + // 1. Calculate the uncompressed size in bytes for the column of data. int unCompressedSize = getUncompressedDataSize(values.length); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { @@ -163,7 +163,7 @@ public void encode(double[] values, ByteArrayOutputStream out) { @Override public void encode(Binary[] values, ByteArrayOutputStream out) { -// 1. Calculate the uncompressed size in bytes for the column of data. + // 1. Calculate the uncompressed size in bytes for the column of data. int unCompressedSize = getUncompressedDataSize(values.length, values); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { From cc1eae60501f9afae57eb90f3c1579ad38b3fe34 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 27 May 2025 14:20:57 +0800 Subject: [PATCH 10/25] add Zigzag columnar encoding/decoding logic --- .../decoder/ZigzagColumnDecoder.java | 83 +++++++++ .../encoder/GorillaColumnEncoder.java | 2 +- .../encoder/ZigzagColumnEncoder.java | 157 ++++++++++++++++++ 3 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java new file mode 100644 index 0000000000000..ae98f6c6bc079 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java @@ -0,0 +1,83 @@ +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.exception.encoding.TsFileDecodingException; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; + +import java.nio.ByteBuffer; + +public class ZigzagColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public ZigzagColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.ZIGZAG); + } + + @Override + public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + switch (dataType) { + case INT32: + case DATE: + return decodeIntColumn(buffer, columnEntry, rowCount); + case INT64: + case TIMESTAMP: + return decodeLongColumn(buffer, columnEntry, rowCount); + default: + throw new TsFileDecodingException( + String.format("Zigzag doesn't support data type: " + dataType)); + } + } + + @Override + public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new TsFileDecodingException( + String.format("Zigzag doesn't support data type: " + dataType)); + } + + @Override + public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; + } + + @Override + public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; + } + + @Override + public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new TsFileDecodingException( + String.format("Zigzag doesn't support data type: " + dataType)); + } + + @Override + public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new TsFileDecodingException( + String.format("Zigzag doesn't support data type: " + dataType)); + } + + @Override + public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new TsFileDecodingException( + String.format("Zigzag doesn't support data type: " + dataType)); + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return Decoder.getDecoderByType(encodingType, type); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java index b4db00c28309a..bc0ee1df86de5 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java @@ -201,7 +201,7 @@ public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { @Override public ColumnEntry getColumnEntry() { - return null; + return columnEntry; } private int getUncompressedDataSize(int len) { diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java new file mode 100644 index 0000000000000..1baf446470712 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java @@ -0,0 +1,157 @@ +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +public class ZigzagColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + private ColumnEntry columnEntry; + + public ZigzagColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = getEncoder(dataType, TSEncoding.ZIGZAG); + columnEntry = new ColumnEntry(); + } + + @Override + public void encode(boolean[] values, ByteArrayOutputStream out) { + throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); + } + + @Override + public void encode(short[] values, ByteArrayOutputStream out) { + throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); + } + + @Override + public void encode(int[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (int value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(long[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (long value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(float[] values, ByteArrayOutputStream out) { + throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); + } + + @Override + public void encode(double[] values, ByteArrayOutputStream out) { + throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); + } + + @Override + public void encode(Binary[] values, ByteArrayOutputStream out) { + throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); + } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.ZIGZAG; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); + } + + @Override + public ColumnEntry getColumnEntry() { + return columnEntry; + } + + private int getUncompressedDataSize(int len) { + return getUncompressedDataSize(len, null); + } + + private int getUncompressedDataSize(int len, Binary[] values) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } + + private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + } +} From 6ed1cdbb3f42c7ef106e79a755af1ac92dd18f15 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 27 May 2025 14:32:14 +0800 Subject: [PATCH 11/25] add Sprintz columnar encoding/decoding logic --- .../decoder/SprintzColumnDecoder.java | 91 ++++++++ .../encoder/SprintzColumnEncoder.java | 195 ++++++++++++++++++ 2 files changed, 286 insertions(+) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java new file mode 100644 index 0000000000000..dd383d9c2d2af --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java @@ -0,0 +1,91 @@ +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.decoder.*; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.exception.encoding.TsFileDecodingException; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.write.UnSupportedDataTypeException; + +import java.nio.ByteBuffer; + +public class SprintzColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public SprintzColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.SPRINTZ); + } + + @Override + public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + switch (dataType) { + case INT32: + case DATE: + return decodeIntColumn(buffer, columnEntry, rowCount); + case INT64: + case TIMESTAMP: + return decodeLongColumn(buffer, columnEntry, rowCount); + case FLOAT: + return decodeFloatColumn(buffer, columnEntry, rowCount); + case DOUBLE: + return decodeDoubleColumn(buffer, columnEntry, rowCount); + default: + throw new TsFileDecodingException("Sprintz doesn't support data type: " + dataType); + } + } + + @Override + public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); + } + + @Override + public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; + } + + @Override + public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; + } + + @Override + public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); + } + return result; + } + + @Override + public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); + } + return result; + } + + @Override + public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return Decoder.getDecoderByType(encodingType, type); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java new file mode 100644 index 0000000000000..2a01303461055 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java @@ -0,0 +1,195 @@ +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; +import org.apache.tsfile.write.UnSupportedDataTypeException; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +public class SprintzColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + private ColumnEntry columnEntry; + + public SprintzColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = getEncoder(dataType, TSEncoding.SPRINTZ); + columnEntry = new ColumnEntry(); + } + + @Override + public void encode(boolean[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); + } + + @Override + public void encode(short[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); + } + + @Override + public void encode(int[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (int value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(long[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (long value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(float[] values, ByteArrayOutputStream out) { + + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (float value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(double[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (double value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(Binary[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); + } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.SPRINTZ; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); + } + + @Override + public ColumnEntry getColumnEntry() { + return columnEntry; + } + + private int getUncompressedDataSize(int len) { + return getUncompressedDataSize(len, null); + } + + private int getUncompressedDataSize(int len, Binary[] values) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } + + private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + } +} From 6fd85661914df528ec753fe3df16bf576ec8a5b3 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 27 May 2025 14:56:32 +0800 Subject: [PATCH 12/25] add RLBE columnar encoding/decoding logic --- .../decoder/ChimpColumnDecoder.java | 18 ++ .../decoder/GorillaColumnDecoder.java | 18 ++ .../decoder/RlbeColumnDecoder.java | 109 +++++++++ .../decoder/SprintzColumnDecoder.java | 18 ++ .../decoder/ZigzagColumnDecoder.java | 18 ++ .../encoder/ChimpColumnEncoder.java | 18 ++ .../encoder/GorillaColumnEncoder.java | 18 ++ .../encoder/RlbeColumnEncoder.java | 212 ++++++++++++++++++ .../encoder/SprintzColumnEncoder.java | 19 +- .../encoder/ZigzagColumnEncoder.java | 18 ++ 10 files changed, 465 insertions(+), 1 deletion(-) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java index ec673ccbd88f4..e275788de944e 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.rpccompress.decoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java index 6c6287e337fcc..53715223380c1 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.rpccompress.decoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java new file mode 100644 index 0000000000000..0a5f3115a6c0a --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java @@ -0,0 +1,109 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.decoder.*; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.exception.encoding.TsFileDecodingException; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; + +import java.nio.ByteBuffer; + +public class RlbeColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public RlbeColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.RLBE); + } + + @Override + public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + switch (dataType) { + case INT32: + case DATE: + return decodeIntColumn(buffer, columnEntry, rowCount); + case INT64: + case TIMESTAMP: + return decodeLongColumn(buffer, columnEntry, rowCount); + case FLOAT: + return decodeFloatColumn(buffer, columnEntry, rowCount); + case DOUBLE: + return decodeDoubleColumn(buffer, columnEntry, rowCount); + default: + throw new TsFileDecodingException( + String.format("RLBE doesn't support data type: " + dataType)); + } + } + + @Override + public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new TsFileDecodingException(String.format("RLBE doesn't support data type: " + dataType)); + } + + @Override + public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; + } + + @Override + public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; + } + + @Override + public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); + } + return result; + } + + @Override + public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + double[] result = new double[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readDouble(buffer); + } + return result; + } + + @Override + public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new TsFileDecodingException(String.format("RLBE doesn't support data type: " + dataType)); + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return Decoder.getDecoderByType(encodingType, type); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java index dd383d9c2d2af..ac1ddf6342e28 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.rpccompress.decoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java index ae98f6c6bc079..7a16ad1238a06 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.rpccompress.decoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java index 333937de10318..c7037bce3b01a 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.rpccompress.encoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java index bc0ee1df86de5..6572124ff3176 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.rpccompress.encoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java new file mode 100644 index 0000000000000..f638472799241 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java @@ -0,0 +1,212 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; +import org.apache.tsfile.write.UnSupportedDataTypeException; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +public class RlbeColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + private ColumnEntry columnEntry; + + public RlbeColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = getEncoder(dataType, TSEncoding.RLBE); + columnEntry = new ColumnEntry(); + } + + @Override + public void encode(boolean[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("RLBE doesn't support data type: " + dataType); + } + + @Override + public void encode(short[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("RLBE doesn't support data type: " + dataType); + } + + @Override + public void encode(int[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (int value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(long[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (long value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(float[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (float value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(double[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (double value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public void encode(Binary[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("RLBE doesn't support data type: " + dataType); + } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.RLBE; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); + } + + @Override + public ColumnEntry getColumnEntry() { + return columnEntry; + } + + private int getUncompressedDataSize(int len) { + return getUncompressedDataSize(len, null); + } + + private int getUncompressedDataSize(int len, Binary[] values) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } + + private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java index 2a01303461055..a59f7eb01319b 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.rpccompress.encoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; @@ -82,7 +100,6 @@ public void encode(long[] values, ByteArrayOutputStream out) { @Override public void encode(float[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. int unCompressedSize = getUncompressedDataSize(values.length); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java index 1baf446470712..eae92ac78073a 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.iotdb.session.rpccompress.encoder; import org.apache.iotdb.session.rpccompress.ColumnEntry; From 2f9fa1f0d02736a15c4871555a56b569ed6aa9a6 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 27 May 2025 15:13:43 +0800 Subject: [PATCH 13/25] add Dictionary columnar encoding/decoding logic --- .../decoder/DictionaryColumnDecoder.java | 83 ++++++++++ .../encoder/DictionaryColumnEncoder.java | 154 ++++++++++++++++++ 2 files changed, 237 insertions(+) create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java new file mode 100644 index 0000000000000..d860f3b79b35b --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.session.rpccompress.decoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.write.UnSupportedDataTypeException; + +import java.nio.ByteBuffer; + +public class DictionaryColumnDecoder implements ColumnDecoder { + private final Decoder decoder; + private final TSDataType dataType; + + public DictionaryColumnDecoder(TSDataType dataType) { + this.dataType = dataType; + this.decoder = getDecoder(dataType, TSEncoding.DICTIONARY); + } + + @Override + public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + return decodeBinaryColumn(buffer, columnEntry, rowCount); + } + + @Override + public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { + Binary[] result = new Binary[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readBinary(buffer); + } + return result; + } + + @Override + public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return Decoder.getDecoderByType(encodingType, type); + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java new file mode 100644 index 0000000000000..34893ba71b9c2 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java @@ -0,0 +1,154 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.session.rpccompress.encoder; + +import org.apache.iotdb.session.rpccompress.ColumnEntry; + +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; +import org.apache.tsfile.write.UnSupportedDataTypeException; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +public class DictionaryColumnEncoder implements ColumnEncoder { + private final Encoder encoder; + private final TSDataType dataType; + private ColumnEntry columnEntry; + + public DictionaryColumnEncoder(TSDataType dataType) { + this.dataType = dataType; + this.encoder = getEncoder(dataType, TSEncoding.SPRINTZ); + columnEntry = new ColumnEntry(); + } + + @Override + public void encode(boolean[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public void encode(short[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public void encode(int[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public void encode(long[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public void encode(float[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public void encode(double[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); + } + + @Override + public void encode(Binary[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length, values); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (Binary value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public TSDataType getDataType() { + return dataType; + } + + @Override + public TSEncoding getEncodingType() { + return TSEncoding.DICTIONARY; + } + + @Override + public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); + } + + @Override + public ColumnEntry getColumnEntry() { + return columnEntry; + } + + private int getUncompressedDataSize(int len, Binary[] values) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } + + private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + } +} From f9847ac6bae8c2c56b71005aef907eb60ae9d31f Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 27 May 2025 15:32:05 +0800 Subject: [PATCH 14/25] add TS_2DIFF columnar encoding/decoding logic --- .../decoder/Ts2DiffColumnDecoder.java | 81 +++------- .../encoder/Ts2DiffColumnEncoder.java | 141 ++++++++++++++++-- 2 files changed, 153 insertions(+), 69 deletions(-) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java index 647ee1bd6c81d..4354f45f447f5 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java @@ -24,6 +24,7 @@ import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.write.UnSupportedDataTypeException; import java.nio.ByteBuffer; @@ -39,98 +40,64 @@ public Ts2DiffColumnDecoder(TSDataType dataType) { @Override public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { switch (dataType) { - case BOOLEAN: - { - boolean[] result = new boolean[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBoolean(buffer); - } - return result; - } case INT32: case DATE: - { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } + return decodeIntColumn(buffer, columnEntry, rowCount); case INT64: case TIMESTAMP: - { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } + return decodeLongColumn(buffer, columnEntry, rowCount); case FLOAT: - { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } case DOUBLE: - { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; - } - case TEXT: - case STRING: - case BLOB: - { - Binary[] result = new Binary[rowCount]; - for (int i = 0; i < rowCount; i++) { - int binarySize = buffer.getInt(); - byte[] binaryValue = new byte[binarySize]; - buffer.get(binaryValue); - result[i] = decoder.readBinary(buffer); - } - return result; - } + return decodeFloatColumn(buffer, columnEntry, rowCount); default: - throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); + throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); } } @Override public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - return new boolean[0]; + throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); } @Override public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - return new int[0]; + int[] result = new int[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readInt(buffer); + } + return result; } @Override public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - return new long[0]; + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; } @Override public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - return new float[0]; + float[] result = new float[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readFloat(buffer); + } + return result; } @Override public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - return new double[0]; + throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); } @Override public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - return new Binary[0]; + throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); } @Override public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return null; + return Decoder.getDecoderByType(encodingType, type); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java index 81558f32c6b1f..7e6e21149b934 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java @@ -21,59 +21,176 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.PublicBAOS; +import org.apache.tsfile.write.UnSupportedDataTypeException; import java.io.ByteArrayOutputStream; +import java.io.IOException; public class Ts2DiffColumnEncoder implements ColumnEncoder { private final Encoder encoder; private final TSDataType dataType; + private ColumnEntry columnEntry; public Ts2DiffColumnEncoder(TSDataType dataType) { this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.RLE); + this.encoder = getEncoder(dataType, TSEncoding.TS_2DIFF); + columnEntry = new ColumnEntry(); } @Override - public void encode(boolean[] values, ByteArrayOutputStream out) {} + public void encode(boolean[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); + } @Override - public void encode(short[] values, ByteArrayOutputStream out) {} + public void encode(short[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); + } @Override - public void encode(int[] values, ByteArrayOutputStream out) {} + public void encode( + int[] values, + ByteArrayOutputStream + out) { // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (int value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } @Override - public void encode(long[] values, ByteArrayOutputStream out) {} + public void encode(long[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (long value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } @Override - public void encode(float[] values, ByteArrayOutputStream out) {} + public void encode(float[] values, ByteArrayOutputStream out) { + // 1. Calculate the uncompressed size in bytes for the column of data. + int unCompressedSize = getUncompressedDataSize(values.length); + PublicBAOS outputStream = new PublicBAOS(unCompressedSize); + try { + // 2. Encodes the input array using the corresponding encoder from TsFile. + for (float value : values) { + encoder.encode(value, outputStream); + } + // 3.Flushes any buffered encoding data into the outputStream. + encoder.flush(outputStream); + byte[] encodedData = outputStream.toByteArray(); + // 4. Set column entry metadata + setColumnEntry(encodedData.length, unCompressedSize); + if (out != null) { + out.write(encodedData); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } @Override - public void encode(double[] values, ByteArrayOutputStream out) {} + public void encode(double[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); + } @Override - public void encode(Binary[] values, ByteArrayOutputStream out) {} + public void encode(Binary[] values, ByteArrayOutputStream out) { + throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); + } @Override public TSDataType getDataType() { - return null; + return dataType; } @Override public TSEncoding getEncodingType() { - return null; + return TSEncoding.TS_2DIFF; } @Override public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return null; + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); } @Override public ColumnEntry getColumnEntry() { - return null; + return columnEntry; + } + + private int getUncompressedDataSize(int len) { + return getUncompressedDataSize(len, null); + } + + private int getUncompressedDataSize(int len, Binary[] values) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } + + private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); } } From 0f51c31c98760ba6ac56d7339d92803797766db5 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 27 May 2025 15:48:32 +0800 Subject: [PATCH 15/25] add RPC columnar decompression and decoding for monitoring data --- .../org/apache/iotdb/session/Session.java | 13 +- .../rpccompress/decoder/RpcDecoder.java | 13 ++ .../rpccompress/encoder/RpcEncoder.java | 12 ++ .../RPCServiceThriftHandlerMetrics.java | 132 ++++++++++++++++++ .../plan/parser/StatementGenerator.java | 94 +++++++------ .../commons/service/metric/enums/Metric.java | 1 + 6 files changed, 222 insertions(+), 43 deletions(-) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index 4843c69eebd79..4c552bb86f15a 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -2995,10 +2995,15 @@ private TSInsertTabletReq genTSInsertTabletReq(Tablet tablet, boolean sorted, bo request.addToEncodingTypes( this.columnEncodersMap.get(measurementSchema.getType()).ordinal()); } - RpcEncoder rpcEncoder = new RpcEncoder(this.columnEncodersMap); - RpcCompressor rpcCompressor = new RpcCompressor(this.compressionType); - request.setTimestamps(rpcCompressor.compress(rpcEncoder.encodeTimestamps(tablet))); - request.setValues(rpcCompressor.compress(rpcEncoder.encodeValues(tablet))); + final long startTime = System.nanoTime(); + try { + RpcEncoder rpcEncoder = new RpcEncoder(this.columnEncodersMap); + RpcCompressor rpcCompressor = new RpcCompressor(this.compressionType); + request.setTimestamps(rpcCompressor.compress(rpcEncoder.encodeTimestamps(tablet))); + request.setValues(rpcCompressor.compress(rpcEncoder.encodeValues(tablet))); + } finally { + System.out.println(System.nanoTime() - startTime); + } } else { request.setTimestamps(SessionUtils.getTimeBuffer(tablet)); request.setValues(SessionUtils.getValueBuffer(tablet)); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java index 1fa606ab7d5d3..ee27c170be6e9 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java @@ -21,6 +21,7 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.iotdb.session.rpccompress.EncodingTypeNotSupportedException; import org.apache.iotdb.session.rpccompress.MetaHead; +import org.apache.iotdb.session.rpccompress.encoder.*; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; @@ -106,6 +107,18 @@ private ColumnDecoder createDecoder(TSDataType dataType, TSEncoding encodingType return new RleColumnDecoder(dataType); case TS_2DIFF: return new Ts2DiffColumnDecoder(dataType); + case GORILLA: + return new GorillaColumnDecoder(dataType); + case ZIGZAG: + return new ZigzagColumnDecoder(dataType); + case CHIMP: + return new ChimpColumnDecoder(dataType); + case SPRINTZ: + return new SprintzColumnDecoder(dataType); + case RLBE: + return new RlbeColumnDecoder(dataType); + case DICTIONARY: + return new DictionaryColumnDecoder(dataType); default: throw new EncodingTypeNotSupportedException(encodingType.name()); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java index 8b686f664b6c0..8f244ec3022f8 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java @@ -102,6 +102,18 @@ private ColumnEncoder createEncoder(TSDataType dataType, TSEncoding encodingType return new RleColumnEncoder(dataType); case TS_2DIFF: return new Ts2DiffColumnEncoder(dataType); + case GORILLA: + return new GorillaColumnEncoder(dataType); + case ZIGZAG: + return new ZigzagColumnEncoder(dataType); + case CHIMP: + return new ChimpColumnEncoder(dataType); + case SPRINTZ: + return new SprintzColumnEncoder(dataType); + case RLBE: + return new RlbeColumnEncoder(dataType); + case DICTIONARY: + return new DictionaryColumnEncoder(dataType); default: throw new EncodingTypeNotSupportedException(encodingType.name()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java index 21ba285eb2db3..07520d9302b53 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java @@ -20,22 +20,63 @@ import org.apache.iotdb.commons.service.metric.enums.Metric; import org.apache.iotdb.commons.service.metric.enums.Tag; import org.apache.iotdb.metrics.AbstractMetricService; +import org.apache.iotdb.metrics.impl.DoNothingMetricManager; import org.apache.iotdb.metrics.metricsets.IMetricSet; +import org.apache.iotdb.metrics.type.Timer; import org.apache.iotdb.metrics.utils.MetricLevel; import org.apache.iotdb.metrics.utils.MetricType; import java.util.Objects; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; public class RPCServiceThriftHandlerMetrics implements IMetricSet { + private static final RPCServiceThriftHandlerMetrics INSTANCE = + new RPCServiceThriftHandlerMetrics(new AtomicLong(0)); private AtomicLong thriftConnectionNumber; + // region begin + private Timer compressionRatioTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + private Timer timeConsumedOfRPCTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + private Timer encodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + private Timer decodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + private Timer compressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + private Timer decompressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + + // end + public RPCServiceThriftHandlerMetrics(AtomicLong thriftConnectionNumber) { this.thriftConnectionNumber = thriftConnectionNumber; } + public void recordCompressionRatioTimer(final long costTimeInNanos) { + compressionRatioTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); + } + + public void recordTimeConsumedOfRPC(final long costTimeInNanos) { + timeConsumedOfRPCTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); + } + + public void recordEncodeLatencyTimer(final long costTimeInNanos) { + encodeLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); + } + + public void recordDecodeLatencyTimer(final long costTimeInNanos) { + decodeLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); + } + + public void recordCompressLatencyTimer(final long costTimeInNanos) { + compressLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); + } + + public void recordDecompressLatencyTimer(final long costTimeInNanos) { + decompressLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); + } + @Override public void bindTo(AbstractMetricService metricService) { + bindToTimer(metricService); + metricService.createAutoGauge( Metric.THRIFT_CONNECTIONS.toString(), MetricLevel.CORE, @@ -45,6 +86,50 @@ public void bindTo(AbstractMetricService metricService) { "ClientRPC"); } + private void bindToTimer(final AbstractMetricService metricService) { + compressionRatioTimer = + metricService.getOrCreateTimer( + Metric.THRIFT_RPC_COMPRESS.toString(), + MetricLevel.IMPORTANT, + Tag.NAME.toString(), + "compressionRatio"); + + timeConsumedOfRPCTimer = + metricService.getOrCreateTimer( + Metric.THRIFT_RPC_COMPRESS.toString(), + MetricLevel.IMPORTANT, + Tag.NAME.toString(), + "timeConsumedOfRPC"); + + encodeLatencyTimer = + metricService.getOrCreateTimer( + Metric.THRIFT_RPC_COMPRESS.toString(), + MetricLevel.IMPORTANT, + Tag.NAME.toString(), + "encodeLatency"); + + decodeLatencyTimer = + metricService.getOrCreateTimer( + Metric.THRIFT_RPC_COMPRESS.toString(), + MetricLevel.IMPORTANT, + Tag.NAME.toString(), + "decodeLatency"); + + compressLatencyTimer = + metricService.getOrCreateTimer( + Metric.THRIFT_RPC_COMPRESS.toString(), + MetricLevel.IMPORTANT, + Tag.NAME.toString(), + "compressLatency"); + + decompressLatencyTimer = + metricService.getOrCreateTimer( + Metric.THRIFT_RPC_COMPRESS.toString(), + MetricLevel.IMPORTANT, + Tag.NAME.toString(), + "decompressLatency"); + } + @Override public void unbindFrom(AbstractMetricService metricService) { metricService.remove( @@ -52,6 +137,49 @@ public void unbindFrom(AbstractMetricService metricService) { Metric.THRIFT_CONNECTIONS.toString(), Tag.NAME.toString(), "ClientRPC"); + + compressionRatioTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + timeConsumedOfRPCTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + encodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + decodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + compressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + decompressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + + metricService.remove( + MetricType.TIMER, + Metric.THRIFT_RPC_COMPRESS.toString(), + Tag.NAME.toString(), + "compressionRatio"); + + metricService.remove( + MetricType.TIMER, + Metric.THRIFT_RPC_COMPRESS.toString(), + Tag.NAME.toString(), + "timeConsumedOfRPC"); + + metricService.remove( + MetricType.TIMER, + Metric.THRIFT_RPC_COMPRESS.toString(), + Tag.NAME.toString(), + "encodeLatency"); + + metricService.remove( + MetricType.TIMER, + Metric.THRIFT_RPC_COMPRESS.toString(), + Tag.NAME.toString(), + "decodeLatency"); + + metricService.remove( + MetricType.TIMER, + Metric.THRIFT_RPC_COMPRESS.toString(), + Tag.NAME.toString(), + "compressLatency"); + + metricService.remove( + MetricType.TIMER, + Metric.THRIFT_RPC_COMPRESS.toString(), + Tag.NAME.toString(), + "decompressLatency"); } @Override @@ -70,4 +198,8 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash(thriftConnectionNumber); } + + public static RPCServiceThriftHandlerMetrics getInstance() { + return INSTANCE; + } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java index 919f9f9d87d38..42285e6bf87b1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; import org.apache.iotdb.commons.service.metric.PerformanceOverviewMetrics; import org.apache.iotdb.db.exception.query.QueryProcessException; +import org.apache.iotdb.db.protocol.thrift.handler.RPCServiceThriftHandlerMetrics; import org.apache.iotdb.db.qp.sql.IoTDBSqlParser; import org.apache.iotdb.db.qp.sql.SqlLexer; import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.DataNodeDevicePathCache; @@ -335,46 +336,61 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl DEVICE_PATH_CACHE.getPartialPath(insertTabletReq.getPrefixPath())); insertStatement.setMeasurements(insertTabletReq.getMeasurements().toArray(new String[0])); long[] timestamps; - // decode timestamps - if (insertTabletReq.isIsCompressed()) { - RpcDecoder rpcDecoder = new RpcDecoder(); - RpcUncompressor rpcUncompressor = - new RpcUncompressor( - CompressionType.deserialize((byte) insertTabletReq.getCompressType())); - timestamps = - rpcDecoder.readTimesFromBuffer( - rpcUncompressor.uncompress(insertTabletReq.timestamps), insertTabletReq.size); - } else { - timestamps = - QueryDataSetUtils.readTimesFromBuffer(insertTabletReq.timestamps, insertTabletReq.size); - } - - if (timestamps.length != 0) { - TimestampPrecisionUtils.checkTimestampPrecision(timestamps[timestamps.length - 1]); - } - insertStatement.setTimes(timestamps); - // decode values - if (insertTabletReq.isIsCompressed()) { - RpcDecoder rpcDecoder = new RpcDecoder(); - RpcUncompressor rpcUncompressor = - new RpcUncompressor( - CompressionType.deserialize((byte) insertTabletReq.getCompressType())); - insertStatement.setColumns( - rpcDecoder.decodeValues( - rpcUncompressor.uncompress(insertTabletReq.values), insertTabletReq.size)); - } else { - insertStatement.setColumns( - QueryDataSetUtils.readTabletValuesFromBuffer( - insertTabletReq.values, - insertTabletReq.types, - insertTabletReq.types.size(), - insertTabletReq.size)); - insertStatement.setBitMaps( - QueryDataSetUtils.readBitMapsFromBuffer( - insertTabletReq.values, insertTabletReq.types.size(), insertTabletReq.size) - .orElse(null)); - } + long startTimeForDeCompressedTimes = 0L; + long endTimeForDeCompressedTimes = 0L; + long startTimeForDeCompressedValues = 0L; + try { + // decode timestamps + if (insertTabletReq.isIsCompressed()) { + startTimeForDeCompressedTimes = System.nanoTime(); + RpcDecoder rpcDecoder = new RpcDecoder(); + RpcUncompressor rpcUncompressor = + new RpcUncompressor( + CompressionType.deserialize((byte) insertTabletReq.getCompressType())); + timestamps = + rpcDecoder.readTimesFromBuffer( + rpcUncompressor.uncompress(insertTabletReq.timestamps), insertTabletReq.size); + endTimeForDeCompressedTimes = System.nanoTime(); + } else { + timestamps = + QueryDataSetUtils.readTimesFromBuffer(insertTabletReq.timestamps, insertTabletReq.size); + } + + if (timestamps.length != 0) { + TimestampPrecisionUtils.checkTimestampPrecision(timestamps[timestamps.length - 1]); + } + insertStatement.setTimes(timestamps); + // decode values + if (insertTabletReq.isIsCompressed()) { + startTimeForDeCompressedValues = System.nanoTime(); + RpcDecoder rpcDecoder = new RpcDecoder(); + RpcUncompressor rpcUncompressor = + new RpcUncompressor( + CompressionType.deserialize((byte) insertTabletReq.getCompressType())); + insertStatement.setColumns( + rpcDecoder.decodeValues( + rpcUncompressor.uncompress(insertTabletReq.values), insertTabletReq.size)); + } else { + insertStatement.setColumns( + QueryDataSetUtils.readTabletValuesFromBuffer( + insertTabletReq.values, + insertTabletReq.types, + insertTabletReq.types.size(), + insertTabletReq.size)); + insertStatement.setBitMaps( + QueryDataSetUtils.readBitMapsFromBuffer( + insertTabletReq.values, insertTabletReq.types.size(), insertTabletReq.size) + .orElse(null)); + } + } finally { + RPCServiceThriftHandlerMetrics.getInstance() + .recordDecompressLatencyTimer( + System.nanoTime() + - startTimeForDeCompressedValues + + endTimeForDeCompressedTimes + - startTimeForDeCompressedTimes); + } insertStatement.setRowCount(insertTabletReq.size); TSDataType[] dataTypes = new TSDataType[insertTabletReq.types.size()]; for (int i = 0; i < insertTabletReq.types.size(); i++) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java index 755ad8187df2c..2337b2de032f1 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java @@ -50,6 +50,7 @@ public enum Metric { THRIFT_CONNECTIONS("thrift_connections"), THRIFT_ACTIVE_THREADS("thrift_active_threads"), CLIENT_MANAGER("client_manager"), + THRIFT_RPC_COMPRESS("thrift_rpc_compress"), // consensus related STAGE("stage"), IOT_CONSENSUS("iot_consensus"), From cb2d7a23eae95b56632c43c0601a5beb07e2d5b3 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 3 Jun 2025 20:33:47 +0800 Subject: [PATCH 16/25] Refactor the encoding and compression structure. --- .../org/apache/iotdb/session/Session.java | 3 +- .../decoder/ChimpColumnDecoder.java | 5 - .../rpccompress/decoder/ColumnDecoder.java | 4 +- .../decoder/DictionaryColumnDecoder.java | 5 - .../decoder/GorillaColumnDecoder.java | 7 +- .../decoder/PlainColumnDecoder.java | 5 - .../decoder/RlbeColumnDecoder.java | 7 +- .../rpccompress/decoder/RleColumnDecoder.java | 60 ++------- .../rpccompress/decoder/RpcDecoder.java | 1 - .../decoder/SprintzColumnDecoder.java | 7 +- .../decoder/Ts2DiffColumnDecoder.java | 5 - .../decoder/ZigzagColumnDecoder.java | 5 - .../encoder/ChimpColumnEncoder.java | 50 +------- .../rpccompress/encoder/ColumnEncoder.java | 49 +++++++- .../encoder/DictionaryColumnEncoder.java | 49 +------- .../encoder/GorillaColumnEncoder.java | 117 ++---------------- .../encoder/PlainColumnEncoder.java | 84 +------------ .../encoder/RlbeColumnEncoder.java | 58 +-------- .../rpccompress/encoder/RleColumnEncoder.java | 99 ++------------- .../encoder/SprintzColumnEncoder.java | 58 +-------- .../encoder/Ts2DiffColumnEncoder.java | 56 +-------- .../encoder/ZigzagColumnEncoder.java | 54 +------- .../plan/parser/StatementGenerator.java | 59 ++++++--- 23 files changed, 148 insertions(+), 699 deletions(-) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index 4c552bb86f15a..f53e4a2e5f392 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -2820,7 +2820,6 @@ private void insertRelationalTabletOnce(Map relationa SessionConnection connection = entry.getKey(); Tablet tablet = entry.getValue(); TSInsertTabletReq request = genTSInsertTabletReq(tablet, false, false); - request.setCompressType(this.compressionType.ordinal()); request.setWriteToTable(true); request.setColumnCategories( tablet.getColumnTypes().stream().map(t -> (byte) t.ordinal()).collect(Collectors.toList())); @@ -2999,10 +2998,10 @@ private TSInsertTabletReq genTSInsertTabletReq(Tablet tablet, boolean sorted, bo try { RpcEncoder rpcEncoder = new RpcEncoder(this.columnEncodersMap); RpcCompressor rpcCompressor = new RpcCompressor(this.compressionType); + request.setCompressType(this.compressionType.serialize()); request.setTimestamps(rpcCompressor.compress(rpcEncoder.encodeTimestamps(tablet))); request.setValues(rpcCompressor.compress(rpcEncoder.encodeValues(tablet))); } finally { - System.out.println(System.nanoTime() - startTime); } } else { request.setTimestamps(SessionUtils.getTimeBuffer(tablet)); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java index e275788de944e..e2720a37dd6ab 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java @@ -100,9 +100,4 @@ public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, i public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); - } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java index 3bd627d65642f..aaae5e2e17387 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java @@ -43,5 +43,7 @@ public interface ColumnDecoder { Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); - Decoder getDecoder(TSDataType type, TSEncoding encodingType); + default Decoder getDecoder(TSDataType type, TSEncoding encodingType) { + return Decoder.getDecoderByType(encodingType, type); + } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java index d860f3b79b35b..098540817afc4 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java @@ -75,9 +75,4 @@ public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, i } return result; } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); - } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java index 53715223380c1..877d4f0fe8794 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java @@ -20,7 +20,7 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; -import org.apache.tsfile.encoding.decoder.*; +import org.apache.tsfile.encoding.decoder.Decoder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; @@ -100,9 +100,4 @@ public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, i public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { throw new UnsupportedOperationException("Gorilla doesn't support data type: " + dataType); } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); - } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java index 2a005ed7d2c22..941638cb83a4f 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java @@ -149,9 +149,4 @@ public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, i } return result; } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); - } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java index 0a5f3115a6c0a..cb89d478a005b 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java @@ -20,7 +20,7 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; -import org.apache.tsfile.encoding.decoder.*; +import org.apache.tsfile.encoding.decoder.Decoder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.exception.encoding.TsFileDecodingException; import org.apache.tsfile.file.metadata.enums.TSEncoding; @@ -101,9 +101,4 @@ public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, i public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { throw new TsFileDecodingException(String.format("RLBE doesn't support data type: " + dataType)); } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); - } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java index 555dfcdaa5e86..8e1cb7d489d80 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java @@ -24,6 +24,7 @@ import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.write.UnSupportedDataTypeException; import java.nio.ByteBuffer; @@ -40,57 +41,21 @@ public RleColumnDecoder(TSDataType dataType) { public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { switch (dataType) { case BOOLEAN: - { - boolean[] result = new boolean[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBoolean(buffer); - } - return result; - } + return decoder.readBoolean(buffer); case INT32: case DATE: - { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } + return decoder.readInt(buffer); case INT64: case TIMESTAMP: - { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } + return decoder.readLong(buffer); case FLOAT: - { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } + return decoder.readFloat(buffer); case DOUBLE: - { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; - } + return decoder.readDouble(buffer); case TEXT: case STRING: case BLOB: - { - Binary[] result = new Binary[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBinary(buffer); - } - return result; - } + return decoder.readBinary(buffer); default: throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); } @@ -143,15 +108,6 @@ public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, i @Override public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - Binary[] result = new Binary[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBinary(buffer); - } - return result; - } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); + throw new UnSupportedDataTypeException("RLE doesn't support data type: " + dataType); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java index ee27c170be6e9..151d84522074e 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java @@ -21,7 +21,6 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.iotdb.session.rpccompress.EncodingTypeNotSupportedException; import org.apache.iotdb.session.rpccompress.MetaHead; -import org.apache.iotdb.session.rpccompress.encoder.*; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java index ac1ddf6342e28..5785ed3cd914d 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java @@ -20,7 +20,7 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; -import org.apache.tsfile.encoding.decoder.*; +import org.apache.tsfile.encoding.decoder.Decoder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.exception.encoding.TsFileDecodingException; import org.apache.tsfile.file.metadata.enums.TSEncoding; @@ -101,9 +101,4 @@ public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, i public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); - } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java index 4354f45f447f5..56efc54f7e006 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java @@ -95,9 +95,4 @@ public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, i public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); - } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java index 7a16ad1238a06..b11473ccda712 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java @@ -93,9 +93,4 @@ public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, i throw new TsFileDecodingException( String.format("Zigzag doesn't support data type: " + dataType)); } - - @Override - public Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); - } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java index c7037bce3b01a..98cb490871372 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java @@ -21,7 +21,6 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; @@ -47,15 +46,10 @@ public void encode(boolean[] values, ByteArrayOutputStream out) { throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); } - @Override - public void encode(short[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); - } - @Override public void encode(int[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -159,54 +153,16 @@ public TSEncoding getEncodingType() { return TSEncoding.CHIMP; } - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } - @Override public ColumnEntry getColumnEntry() { return columnEntry; } private int getUncompressedDataSize(int len) { - return getUncompressedDataSize(len, null); - } - - private int getUncompressedDataSize(int len, Binary[] values) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; + return getUncompressedDataSize(len, null, dataType); } private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.CHIMP); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java index b1062f902476b..22bc4d5613d08 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java @@ -21,6 +21,7 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; @@ -32,8 +33,6 @@ public interface ColumnEncoder { void encode(boolean[] values, ByteArrayOutputStream out); - void encode(short[] values, ByteArrayOutputStream out); - void encode(int[] values, ByteArrayOutputStream out); void encode(long[] values, ByteArrayOutputStream out); @@ -48,7 +47,49 @@ public interface ColumnEncoder { TSEncoding getEncodingType(); - Encoder getEncoder(TSDataType type, TSEncoding encodingType); - ColumnEntry getColumnEntry(); + + /** + * Calculates the uncompressed size in bytes for a column of data, based on the data type and + * number of entries. + * + * @param len the length of arrayList + * @return + */ + default int getUncompressedDataSize(int len, Binary[] values, TSDataType dataType) { + int unCompressedSize = 0; + switch (dataType) { + case BOOLEAN: + unCompressedSize = 1 * len; + break; + case INT32: + case DATE: + unCompressedSize = 4 * len; + break; + case INT64: + case TIMESTAMP: + unCompressedSize = 8 * len; + break; + case FLOAT: + unCompressedSize = 4 * len; + break; + case DOUBLE: + unCompressedSize = 8 * len; + break; + case TEXT: + case STRING: + case BLOB: + for (Binary binary : values) { + unCompressedSize += binary.getLength(); + } + break; + default: + throw new UnsupportedOperationException("Doesn't support data type: " + dataType); + } + return unCompressedSize; + } + + default Encoder getEncoder(TSDataType type, TSEncoding encodingType) { + return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); + } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java index 34893ba71b9c2..6fd8c4ab10c3e 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java @@ -21,7 +21,6 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; @@ -47,11 +46,6 @@ public void encode(boolean[] values, ByteArrayOutputStream out) { throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); } - @Override - public void encode(short[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - @Override public void encode(int[] values, ByteArrayOutputStream out) { throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); @@ -75,7 +69,7 @@ public void encode(double[] values, ByteArrayOutputStream out) { @Override public void encode(Binary[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, values); + int unCompressedSize = getUncompressedDataSize(values.length, values, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -105,50 +99,13 @@ public TSEncoding getEncodingType() { return TSEncoding.DICTIONARY; } - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } - @Override public ColumnEntry getColumnEntry() { return columnEntry; } - private int getUncompressedDataSize(int len, Binary[] values) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; - } - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + columnEntry = + new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.DICTIONARY); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java index 6572124ff3176..c32f8c770c18e 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java @@ -21,11 +21,11 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.PublicBAOS; +import org.apache.tsfile.write.UnSupportedDataTypeException; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -43,54 +43,13 @@ public GorillaColumnEncoder(TSDataType dataType) { @Override public void encode(boolean[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (boolean value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(short[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (short value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } + throw new UnSupportedDataTypeException("Gorilla doesn't support data type: " + dataType); } @Override public void encode(int[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -113,7 +72,7 @@ public void encode(int[] values, ByteArrayOutputStream out) { @Override public void encode(long[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -136,7 +95,7 @@ public void encode(long[] values, ByteArrayOutputStream out) { @Override public void encode(float[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -159,7 +118,7 @@ public void encode(float[] values, ByteArrayOutputStream out) { @Override public void encode(double[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -181,25 +140,7 @@ public void encode(double[] values, ByteArrayOutputStream out) { @Override public void encode(Binary[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, values); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (Binary value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } + throw new UnSupportedDataTypeException("Gorilla doesn't support data type: " + dataType); } @Override @@ -212,54 +153,12 @@ public TSEncoding getEncodingType() { return TSEncoding.GORILLA; } - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } - @Override public ColumnEntry getColumnEntry() { return columnEntry; } - private int getUncompressedDataSize(int len) { - return getUncompressedDataSize(len, null); - } - - private int getUncompressedDataSize(int len, Binary[] values) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; - } - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.GORILLA); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java index 7960f2444ca9e..c96039c45a409 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java @@ -55,7 +55,7 @@ public PlainColumnEncoder(TSDataType dataType) { @Override public void encode(boolean[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -75,33 +75,10 @@ public void encode(boolean[] values, ByteArrayOutputStream out) { } } - @Override - public void encode(short[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (short value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - @Override public void encode(int[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -124,7 +101,7 @@ public void encode(int[] values, ByteArrayOutputStream out) { @Override public void encode(long[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -147,7 +124,7 @@ public void encode(long[] values, ByteArrayOutputStream out) { @Override public void encode(float[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -170,7 +147,7 @@ public void encode(float[] values, ByteArrayOutputStream out) { @Override public void encode(double[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -193,7 +170,7 @@ public void encode(double[] values, ByteArrayOutputStream out) { @Override public void encode(Binary[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, values); + int unCompressedSize = getUncompressedDataSize(values.length, values, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -213,50 +190,6 @@ public void encode(Binary[] values, ByteArrayOutputStream out) { } } - private int getUncompressedDataSize(int len) { - return getUncompressedDataSize(len, null); - } - - /** - * Calculates the uncompressed size in bytes for a column of data, based on the data type and - * number of entries. - * - * @param len the length of arrayList - * @return - */ - private int getUncompressedDataSize(int len, Binary[] values) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; - } - /** * Set column entry metadata * @@ -277,11 +210,6 @@ public TSEncoding getEncodingType() { return TSEncoding.PLAIN; } - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return new PlainEncoder(type, DEFAULT_MAX_STRING_LENGTH); - } - @Override public ColumnEntry getColumnEntry() { return columnEntry; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java index f638472799241..a3f3a48779e39 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java @@ -21,7 +21,6 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; @@ -47,15 +46,10 @@ public void encode(boolean[] values, ByteArrayOutputStream out) { throw new UnSupportedDataTypeException("RLBE doesn't support data type: " + dataType); } - @Override - public void encode(short[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("RLBE doesn't support data type: " + dataType); - } - @Override public void encode(int[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -78,7 +72,7 @@ public void encode(int[] values, ByteArrayOutputStream out) { @Override public void encode(long[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -101,7 +95,7 @@ public void encode(long[] values, ByteArrayOutputStream out) { @Override public void encode(float[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -124,7 +118,7 @@ public void encode(float[] values, ByteArrayOutputStream out) { @Override public void encode(double[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -159,54 +153,12 @@ public TSEncoding getEncodingType() { return TSEncoding.RLBE; } - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } - @Override public ColumnEntry getColumnEntry() { return columnEntry; } - private int getUncompressedDataSize(int len) { - return getUncompressedDataSize(len, null); - } - - private int getUncompressedDataSize(int len, Binary[] values) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; - } - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.RLBE); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java index 9b38238d1d9dc..7fc2fdf7ac994 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java @@ -21,11 +21,11 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.PublicBAOS; +import org.apache.tsfile.write.UnSupportedDataTypeException; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -44,7 +44,7 @@ public RleColumnEncoder(TSDataType dataType) { @Override public void encode(boolean[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -64,33 +64,10 @@ public void encode(boolean[] values, ByteArrayOutputStream out) { } } - @Override - public void encode(short[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (short value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - @Override public void encode(int[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -113,7 +90,7 @@ public void encode(int[] values, ByteArrayOutputStream out) { @Override public void encode(long[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -136,7 +113,7 @@ public void encode(long[] values, ByteArrayOutputStream out) { @Override public void encode(float[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -159,7 +136,7 @@ public void encode(float[] values, ByteArrayOutputStream out) { @Override public void encode(double[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -181,29 +158,11 @@ public void encode(double[] values, ByteArrayOutputStream out) { @Override public void encode(Binary[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, values); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (Binary value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } + throw new UnSupportedDataTypeException("RLE doesn't support data type: " + dataType); } private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.RLE); } @Override @@ -216,50 +175,8 @@ public TSEncoding getEncodingType() { return TSEncoding.RLE; } - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } - @Override public ColumnEntry getColumnEntry() { return columnEntry; } - - private int getUncompressedDataSize(int len) { - return getUncompressedDataSize(len, null); - } - - private int getUncompressedDataSize(int len, Binary[] values) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; - } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java index a59f7eb01319b..228af3388c96d 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java @@ -21,7 +21,6 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; @@ -47,15 +46,10 @@ public void encode(boolean[] values, ByteArrayOutputStream out) { throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); } - @Override - public void encode(short[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); - } - @Override public void encode(int[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -78,7 +72,7 @@ public void encode(int[] values, ByteArrayOutputStream out) { @Override public void encode(long[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -101,7 +95,7 @@ public void encode(long[] values, ByteArrayOutputStream out) { @Override public void encode(float[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -124,7 +118,7 @@ public void encode(float[] values, ByteArrayOutputStream out) { @Override public void encode(double[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -159,54 +153,12 @@ public TSEncoding getEncodingType() { return TSEncoding.SPRINTZ; } - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } - @Override public ColumnEntry getColumnEntry() { return columnEntry; } - private int getUncompressedDataSize(int len) { - return getUncompressedDataSize(len, null); - } - - private int getUncompressedDataSize(int len, Binary[] values) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; - } - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.SPRINTZ); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java index 7e6e21149b934..11f5444767267 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java @@ -21,7 +21,6 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; @@ -47,17 +46,12 @@ public void encode(boolean[] values, ByteArrayOutputStream out) { throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); } - @Override - public void encode(short[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); - } - @Override public void encode( int[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -80,7 +74,7 @@ public void encode( @Override public void encode(long[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -103,7 +97,7 @@ public void encode(long[] values, ByteArrayOutputStream out) { @Override public void encode(float[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -143,54 +137,12 @@ public TSEncoding getEncodingType() { return TSEncoding.TS_2DIFF; } - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } - @Override public ColumnEntry getColumnEntry() { return columnEntry; } - private int getUncompressedDataSize(int len) { - return getUncompressedDataSize(len, null); - } - - private int getUncompressedDataSize(int len, Binary[] values) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; - } - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.TS_2DIFF); } } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java index eae92ac78073a..301f9db8b6471 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java @@ -21,7 +21,6 @@ import org.apache.iotdb.session.rpccompress.ColumnEntry; import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; import org.apache.tsfile.utils.Binary; @@ -46,15 +45,10 @@ public void encode(boolean[] values, ByteArrayOutputStream out) { throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); } - @Override - public void encode(short[] values, ByteArrayOutputStream out) { - throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); - } - @Override public void encode(int[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -77,7 +71,7 @@ public void encode(int[] values, ByteArrayOutputStream out) { @Override public void encode(long[] values, ByteArrayOutputStream out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); + int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); PublicBAOS outputStream = new PublicBAOS(unCompressedSize); try { // 2. Encodes the input array using the corresponding encoder from TsFile. @@ -122,54 +116,12 @@ public TSEncoding getEncodingType() { return TSEncoding.ZIGZAG; } - @Override - public Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } - @Override public ColumnEntry getColumnEntry() { return columnEntry; } - private int getUncompressedDataSize(int len) { - return getUncompressedDataSize(len, null); - } - - private int getUncompressedDataSize(int len, Binary[] values) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; - } - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); + columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.ZIGZAG); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java index 42285e6bf87b1..e2fb4b2a640c2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java @@ -337,21 +337,33 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl insertStatement.setMeasurements(insertTabletReq.getMeasurements().toArray(new String[0])); long[] timestamps; - long startTimeForDeCompressedTimes = 0L; - long endTimeForDeCompressedTimes = 0L; - long startTimeForDeCompressedValues = 0L; + long startDeCompressedTimes = 0L; + long endDeCompressedTimes = 0L; + long startDecodeTime = 0L; + long endDecodeTime = 0L; + + long startDeCompressedValue = 0L; + long endDeCompressedValue = 0L; + long startDecodeValue = 0L; + long endDecodeValue = 0L; + + int uncompressedTimestampsSize = 0; + int uncompressedValuesSize = 0; + try { - // decode timestamps if (insertTabletReq.isIsCompressed()) { - startTimeForDeCompressedTimes = System.nanoTime(); + startDeCompressedTimes = System.nanoTime(); RpcDecoder rpcDecoder = new RpcDecoder(); RpcUncompressor rpcUncompressor = new RpcUncompressor( CompressionType.deserialize((byte) insertTabletReq.getCompressType())); - timestamps = - rpcDecoder.readTimesFromBuffer( - rpcUncompressor.uncompress(insertTabletReq.timestamps), insertTabletReq.size); - endTimeForDeCompressedTimes = System.nanoTime(); + ByteBuffer uncompressedTimestamps = rpcUncompressor.uncompress(insertTabletReq.timestamps); + uncompressedTimestampsSize = uncompressedTimestamps.remaining(); + endDeCompressedTimes = System.nanoTime(); + + startDecodeTime = System.nanoTime(); + timestamps = rpcDecoder.readTimesFromBuffer(uncompressedTimestamps, insertTabletReq.size); + endDecodeTime = System.nanoTime(); } else { timestamps = QueryDataSetUtils.readTimesFromBuffer(insertTabletReq.timestamps, insertTabletReq.size); @@ -363,14 +375,19 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl insertStatement.setTimes(timestamps); // decode values if (insertTabletReq.isIsCompressed()) { - startTimeForDeCompressedValues = System.nanoTime(); + startDeCompressedValue = System.nanoTime(); RpcDecoder rpcDecoder = new RpcDecoder(); RpcUncompressor rpcUncompressor = new RpcUncompressor( CompressionType.deserialize((byte) insertTabletReq.getCompressType())); + ByteBuffer uncompressedValues = rpcUncompressor.uncompress(insertTabletReq.values); + uncompressedValuesSize = uncompressedValues.remaining(); + endDeCompressedValue = System.nanoTime(); + + startDecodeValue = System.nanoTime(); insertStatement.setColumns( - rpcDecoder.decodeValues( - rpcUncompressor.uncompress(insertTabletReq.values), insertTabletReq.size)); + rpcDecoder.decodeValues(uncompressedValues, insertTabletReq.size)); + endDecodeValue = System.nanoTime(); } else { insertStatement.setColumns( QueryDataSetUtils.readTabletValuesFromBuffer( @@ -386,10 +403,20 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl } finally { RPCServiceThriftHandlerMetrics.getInstance() .recordDecompressLatencyTimer( - System.nanoTime() - - startTimeForDeCompressedValues - + endTimeForDeCompressedTimes - - startTimeForDeCompressedTimes); + endDeCompressedValue + - startDeCompressedValue + + endDeCompressedTimes + - startDeCompressedTimes); + RPCServiceThriftHandlerMetrics.getInstance() + .recordDecodeLatencyTimer( + endDecodeValue - startDecodeValue + endDecodeTime - startDecodeTime); + if (insertTabletReq.isIsCompressed()) { + RPCServiceThriftHandlerMetrics.getInstance() + .recordCompressionRatioTimer( + (uncompressedTimestampsSize + uncompressedValuesSize) + / (insertTabletReq.timestamps.remaining() + + insertTabletReq.values.remaining())); + } } insertStatement.setRowCount(insertTabletReq.size); TSDataType[] dataTypes = new TSDataType[insertTabletReq.types.size()]; From 51f68be401bc7b5a62b4cffcf7185991fa27930c Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 3 Jun 2025 22:44:25 +0800 Subject: [PATCH 17/25] Add RPC test cases --- .../iotdb/session/RpcCompressedTest.java | 224 ++++++++++++++++-- 1 file changed, 200 insertions(+), 24 deletions(-) diff --git a/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java index 868c9ee06bc17..c766232747080 100644 --- a/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java +++ b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java @@ -20,18 +20,21 @@ package org.apache.iotdb.session; import org.apache.iotdb.isession.ITableSession; +import org.apache.iotdb.isession.SessionDataSet; import org.apache.iotdb.rpc.IoTDBConnectionException; import org.apache.iotdb.rpc.StatementExecutionException; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.CompressionType; import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.read.common.RowRecord; import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.BitMap; import org.apache.tsfile.write.record.Tablet; import org.apache.tsfile.write.schema.IMeasurementSchema; import org.apache.tsfile.write.schema.MeasurementSchema; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; @@ -43,15 +46,16 @@ public class RpcCompressedTest { - @Mock private ITableSession session; - - @Mock private SessionConnection sessionConnection; + @Mock private ITableSession session1; + @Mock private ITableSession session2; + @Mock private ITableSession session3; + @Mock private ITableSession session4; @Before public void setUp() throws IoTDBConnectionException, StatementExecutionException { MockitoAnnotations.initMocks(this); List nodeUrls = Arrays.asList("127.0.0.1:6667"); - session = + session1 = new TableSessionBuilder() .nodeUrls(nodeUrls) .username("root") @@ -62,28 +66,100 @@ public void setUp() throws IoTDBConnectionException, StatementExecutionException .isCompressed(true) .withCompressionType(CompressionType.SNAPPY) .withBooleanEncoding(TSEncoding.PLAIN) - .withInt32Encoding(TSEncoding.PLAIN) - .withInt64Encoding(TSEncoding.PLAIN) - .withFloatEncoding(TSEncoding.PLAIN) - .withDoubleEncoding(TSEncoding.PLAIN) + .withInt32Encoding(TSEncoding.CHIMP) + .withInt64Encoding(TSEncoding.CHIMP) + .withFloatEncoding(TSEncoding.CHIMP) + .withDoubleEncoding(TSEncoding.CHIMP) .withBlobEncoding(TSEncoding.PLAIN) .withStringEncoding(TSEncoding.PLAIN) .withTextEncoding(TSEncoding.PLAIN) .withDateEncoding(TSEncoding.PLAIN) .withTimeStampEncoding(TSEncoding.PLAIN) .build(); + session2 = + new TableSessionBuilder() + .nodeUrls(nodeUrls) + .username("root") + .password("root") + .enableCompression(false) + .enableRedirection(true) + .enableAutoFetch(false) + .isCompressed(true) + .withCompressionType(CompressionType.SNAPPY) + .withBooleanEncoding(TSEncoding.PLAIN) + .withInt32Encoding(TSEncoding.SPRINTZ) + .withInt64Encoding(TSEncoding.SPRINTZ) + .withFloatEncoding(TSEncoding.RLBE) + .withDoubleEncoding(TSEncoding.RLBE) + .withBlobEncoding(TSEncoding.PLAIN) + .withStringEncoding(TSEncoding.PLAIN) + .withTextEncoding(TSEncoding.PLAIN) + .withDateEncoding(TSEncoding.PLAIN) + .withTimeStampEncoding(TSEncoding.SPRINTZ) + .build(); + session3 = + new TableSessionBuilder() + .nodeUrls(nodeUrls) + .username("root") + .password("root") + .enableCompression(false) + .enableRedirection(true) + .enableAutoFetch(false) + .isCompressed(true) + .withCompressionType(CompressionType.GZIP) + .withBooleanEncoding(TSEncoding.RLE) + .withInt32Encoding(TSEncoding.TS_2DIFF) + .withInt64Encoding(TSEncoding.RLE) + .withFloatEncoding(TSEncoding.TS_2DIFF) + .withDoubleEncoding(TSEncoding.RLE) + .withBlobEncoding(TSEncoding.PLAIN) + .withStringEncoding(TSEncoding.PLAIN) + .withTextEncoding(TSEncoding.PLAIN) + .withDateEncoding(TSEncoding.RLE) + .withTimeStampEncoding(TSEncoding.RLE) + .build(); + session4 = + new TableSessionBuilder() + .nodeUrls(nodeUrls) + .username("root") + .password("root") + .enableCompression(false) + .enableRedirection(true) + .enableAutoFetch(false) + .isCompressed(true) + .withCompressionType(CompressionType.LZMA2) + .withBooleanEncoding(TSEncoding.PLAIN) + .withInt32Encoding(TSEncoding.GORILLA) + .withInt64Encoding(TSEncoding.ZIGZAG) + .withFloatEncoding(TSEncoding.GORILLA) + .withDoubleEncoding(TSEncoding.GORILLA) + .withBlobEncoding(TSEncoding.PLAIN) + .withStringEncoding(TSEncoding.PLAIN) + .withTextEncoding(TSEncoding.PLAIN) + .withDateEncoding(TSEncoding.RLE) + .withTimeStampEncoding(TSEncoding.ZIGZAG) + .build(); } @After public void tearDown() throws IoTDBConnectionException { // Close the session pool after each test - if (null != session) { - session.close(); + if (null != session1) { + session1.close(); + } + if (null != session2) { + session2.close(); + } + if (null != session3) { + session3.close(); + } + if (null != session4) { + session4.close(); } } @Test - public void testRpcDecode() throws IoTDBConnectionException, StatementExecutionException { + public void testRpcCompressed() throws IoTDBConnectionException, StatementExecutionException { List schemas = new ArrayList<>(); MeasurementSchema schema = new MeasurementSchema(); schema.setMeasurementName("pressure0"); @@ -121,21 +197,121 @@ public void testRpcDecode() throws IoTDBConnectionException, StatementExecutionE schema.setCompressionType(CompressionType.SNAPPY); schema.setEncoding(TSEncoding.PLAIN); schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure6"); + schema.setDataType(TSDataType.STRING); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure7"); + schema.setDataType(TSDataType.BLOB); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); - long[] timestamp = new long[] {1L, 2L}; - Object[] values = new Object[6]; - values[0] = new int[] {1, 2}; - values[1] = new long[] {1L, 2L}; - values[2] = new float[] {1.1f, 1.2f}; - values[3] = new double[] {0.707, 0.708}; + long[] timestamp = new long[] {3L, 4L, 5L, 6L}; + Object[] values = new Object[8]; + values[0] = new int[] {1, 2, 8, 15}; + values[1] = new long[] {1L, 2L, 8L, 15L}; + values[2] = new float[] {1.1f, 1.2f, 8.8f, 15.5f}; + values[3] = new double[] {0.707, 0.708, 8.8, 15.5}; values[4] = - new Binary[] {new Binary(new byte[] {(byte) 32}), new Binary(new byte[] {(byte) 16})}; - values[5] = new boolean[] {true, false}; - BitMap[] partBitMap = new BitMap[6]; - Tablet tablet = new Tablet("Table_0", schemas, timestamp, values, partBitMap, 2); + new Binary[] { + new Binary(new byte[] {(byte) 32}), + new Binary(new byte[] {(byte) 16}), + new Binary(new byte[] {(byte) 1}), + new Binary(new byte[] {(byte) 56}) + }; + values[5] = new boolean[] {true, false, true, false}; + values[6] = + new Binary[] { + new Binary(new byte[] {(byte) 32}), + new Binary(new byte[] {(byte) 16}), + new Binary(new byte[] {(byte) 1}), + new Binary(new byte[] {(byte) 56}) + }; + values[7] = + new Binary[] { + new Binary(new byte[] {(byte) 32}), + new Binary(new byte[] {(byte) 16}), + new Binary(new byte[] {(byte) 1}), + new Binary(new byte[] {(byte) 56}) + }; + BitMap[] partBitMap = new BitMap[8]; + + String tableName = "table_10"; + Tablet tablet = new Tablet(tableName, schemas, timestamp, values, partBitMap, 4); - session.executeNonQueryStatement("create database IF NOT EXISTS db_0"); - session.executeNonQueryStatement("use db_0"); - session.insert(tablet); + session1.executeNonQueryStatement("create database IF NOT EXISTS dbTest_0"); + session1.executeNonQueryStatement("use dbTest_0"); + session2.executeNonQueryStatement("use dbTest_0"); + session3.executeNonQueryStatement("use dbTest_0"); + session4.executeNonQueryStatement("use dbTest_0"); + + // 1. insert + session1.insert(tablet); + session2.insert(tablet); + session3.insert(tablet); + session4.insert(tablet); + + // 2. assert + SessionDataSet sessionDataSet1 = + session1.executeQueryStatement("select * from dbTest_0." + tableName); + SessionDataSet sessionDataSet2 = + session2.executeQueryStatement("select * from dbTest_0." + tableName); + SessionDataSet sessionDataSet3 = + session3.executeQueryStatement("select * from dbTest_0." + tableName); + SessionDataSet sessionDataSet4 = + session4.executeQueryStatement("select * from dbTest_0." + tableName); + + if (sessionDataSet1.hasNext()) { + RowRecord next = sessionDataSet1.next(); + Assert.assertEquals(3L, next.getFields().get(0).getLongV()); + Assert.assertEquals(1, next.getFields().get(1).getIntV()); + Assert.assertEquals(1L, next.getFields().get(2).getLongV()); + Assert.assertEquals(1.1f, next.getFields().get(3).getFloatV(), 0.01); + Assert.assertEquals(0.707, next.getFields().get(4).getDoubleV(), 0.01); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(5).getBinaryV()); + Assert.assertEquals(true, next.getFields().get(6).getBoolV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(7).getBinaryV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(8).getBinaryV()); + } + if (sessionDataSet2.hasNext()) { + RowRecord next = sessionDataSet2.next(); + Assert.assertEquals(3L, next.getFields().get(0).getLongV()); + Assert.assertEquals(1, next.getFields().get(1).getIntV()); + Assert.assertEquals(1L, next.getFields().get(2).getLongV()); + Assert.assertEquals(1.1f, next.getFields().get(3).getFloatV(), 0.01); + Assert.assertEquals(0.707, next.getFields().get(4).getDoubleV(), 0.01); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(5).getBinaryV()); + Assert.assertEquals(true, next.getFields().get(6).getBoolV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(7).getBinaryV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(8).getBinaryV()); + } + if (sessionDataSet3.hasNext()) { + RowRecord next = sessionDataSet3.next(); + Assert.assertEquals(3L, next.getFields().get(0).getLongV()); + Assert.assertEquals(1, next.getFields().get(1).getIntV()); + Assert.assertEquals(1L, next.getFields().get(2).getLongV()); + Assert.assertEquals(1.1f, next.getFields().get(3).getFloatV(), 0.01); + Assert.assertEquals(0.707, next.getFields().get(4).getDoubleV(), 0.01); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(5).getBinaryV()); + Assert.assertEquals(true, next.getFields().get(6).getBoolV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(7).getBinaryV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(8).getBinaryV()); + } + if (sessionDataSet4.hasNext()) { + RowRecord next = sessionDataSet4.next(); + Assert.assertEquals(3L, next.getFields().get(0).getLongV()); + Assert.assertEquals(1, next.getFields().get(1).getIntV()); + Assert.assertEquals(1L, next.getFields().get(2).getLongV()); + Assert.assertEquals(1.1f, next.getFields().get(3).getFloatV(), 0.01); + Assert.assertEquals(0.707, next.getFields().get(4).getDoubleV(), 0.01); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(5).getBinaryV()); + Assert.assertEquals(true, next.getFields().get(6).getBoolV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(7).getBinaryV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(8).getBinaryV()); + } } } From b081963921058414e176b6ce715a5b7fe92e78db Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Tue, 3 Jun 2025 22:45:20 +0800 Subject: [PATCH 18/25] Fix code structure --- .../org/apache/iotdb/session/Session.java | 7 +--- .../rpccompress/decoder/RleColumnDecoder.java | 11 +++-- .../decoder/ZigzagColumnDecoder.java | 3 +- .../rpccompress/encoder/ColumnEncoder.java | 1 - .../encoder/PlainColumnEncoder.java | 8 ++-- .../RPCServiceThriftHandlerMetrics.java | 41 +------------------ .../plan/parser/StatementGenerator.java | 2 +- 7 files changed, 13 insertions(+), 60 deletions(-) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index f53e4a2e5f392..a127c55b3ae79 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -1774,12 +1774,7 @@ private boolean filterNullValueAndMeasurement( return false; } - /** - * Filter the null object of list。 - * - * @param prefixPaths devices path。 - * @return true:all values of valuesList are null;false:Not all values of valuesList are null. - */ + /** Filter the null object of list。 */ private void filterNullValueAndMeasurementWithStringType( List prefixPaths, List times, diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java index 8e1cb7d489d80..bbaa5cb3c7362 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java @@ -41,21 +41,20 @@ public RleColumnDecoder(TSDataType dataType) { public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { switch (dataType) { case BOOLEAN: - return decoder.readBoolean(buffer); + return decodeBooleanColumn(buffer, columnEntry, rowCount); case INT32: case DATE: - return decoder.readInt(buffer); + return decodeIntColumn(buffer, columnEntry, rowCount); case INT64: case TIMESTAMP: - return decoder.readLong(buffer); + return decodeLongColumn(buffer, columnEntry, rowCount); case FLOAT: - return decoder.readFloat(buffer); + return decodeFloatColumn(buffer, columnEntry, rowCount); case DOUBLE: - return decoder.readDouble(buffer); + return decodeDoubleColumn(buffer, columnEntry, rowCount); case TEXT: case STRING: case BLOB: - return decoder.readBinary(buffer); default: throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java index b11473ccda712..a87bae6669c1e 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java @@ -54,8 +54,7 @@ public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { @Override public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new TsFileDecodingException( - String.format("Zigzag doesn't support data type: " + dataType)); + throw new TsFileDecodingException("Zigzag doesn't support data type: " + dataType); } @Override diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java index 22bc4d5613d08..4651c28b78fa3 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java @@ -54,7 +54,6 @@ public interface ColumnEncoder { * number of entries. * * @param len the length of arrayList - * @return */ default int getUncompressedDataSize(int len, Binary[] values, TSDataType dataType) { int unCompressedSize = 0; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java index c96039c45a409..f04928073335a 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java @@ -49,8 +49,8 @@ public PlainColumnEncoder(TSDataType dataType) { /** * Encodes a column of data using the PLAIN encoding algorithm. * - * @param values - * @param out + * @param values values the input boolean array to be encoded + * @param out out the output stream to write the encoded binary data */ @Override public void encode(boolean[] values, ByteArrayOutputStream out) { @@ -193,8 +193,8 @@ public void encode(Binary[] values, ByteArrayOutputStream out) { /** * Set column entry metadata * - * @param compressedSize - * @param unCompressedSize + * @param compressedSize the size of the encoded data in bytes after compression + * @param unCompressedSize the original size of the data in bytes before compression */ private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java index 07520d9302b53..a2b33c3a5d86e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java @@ -37,14 +37,11 @@ public class RPCServiceThriftHandlerMetrics implements IMetricSet { // region begin private Timer compressionRatioTimer = DoNothingMetricManager.DO_NOTHING_TIMER; - private Timer timeConsumedOfRPCTimer = DoNothingMetricManager.DO_NOTHING_TIMER; - private Timer encodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; private Timer decodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; - private Timer compressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; private Timer decompressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; // end - + // 内存占用 public RPCServiceThriftHandlerMetrics(AtomicLong thriftConnectionNumber) { this.thriftConnectionNumber = thriftConnectionNumber; } @@ -53,22 +50,10 @@ public void recordCompressionRatioTimer(final long costTimeInNanos) { compressionRatioTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); } - public void recordTimeConsumedOfRPC(final long costTimeInNanos) { - timeConsumedOfRPCTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); - } - - public void recordEncodeLatencyTimer(final long costTimeInNanos) { - encodeLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); - } - public void recordDecodeLatencyTimer(final long costTimeInNanos) { decodeLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); } - public void recordCompressLatencyTimer(final long costTimeInNanos) { - compressLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); - } - public void recordDecompressLatencyTimer(final long costTimeInNanos) { decompressLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); } @@ -94,20 +79,6 @@ private void bindToTimer(final AbstractMetricService metricService) { Tag.NAME.toString(), "compressionRatio"); - timeConsumedOfRPCTimer = - metricService.getOrCreateTimer( - Metric.THRIFT_RPC_COMPRESS.toString(), - MetricLevel.IMPORTANT, - Tag.NAME.toString(), - "timeConsumedOfRPC"); - - encodeLatencyTimer = - metricService.getOrCreateTimer( - Metric.THRIFT_RPC_COMPRESS.toString(), - MetricLevel.IMPORTANT, - Tag.NAME.toString(), - "encodeLatency"); - decodeLatencyTimer = metricService.getOrCreateTimer( Metric.THRIFT_RPC_COMPRESS.toString(), @@ -115,13 +86,6 @@ private void bindToTimer(final AbstractMetricService metricService) { Tag.NAME.toString(), "decodeLatency"); - compressLatencyTimer = - metricService.getOrCreateTimer( - Metric.THRIFT_RPC_COMPRESS.toString(), - MetricLevel.IMPORTANT, - Tag.NAME.toString(), - "compressLatency"); - decompressLatencyTimer = metricService.getOrCreateTimer( Metric.THRIFT_RPC_COMPRESS.toString(), @@ -139,10 +103,7 @@ public void unbindFrom(AbstractMetricService metricService) { "ClientRPC"); compressionRatioTimer = DoNothingMetricManager.DO_NOTHING_TIMER; - timeConsumedOfRPCTimer = DoNothingMetricManager.DO_NOTHING_TIMER; - encodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; decodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; - compressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; decompressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; metricService.remove( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java index e2fb4b2a640c2..3f670218ff33c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java @@ -549,7 +549,7 @@ public static InsertRowsOfOneDeviceStatement createStatement(TSInsertRecordsOfOn insertStatement.setDevicePath(DEVICE_PATH_CACHE.getPartialPath(req.prefixPath)); List insertRowStatementList = new ArrayList<>(); // req.timestamps sorted on session side - if (req.timestamps.size() != 0) { + if (!req.timestamps.isEmpty()) { TimestampPrecisionUtils.checkTimestampPrecision( req.timestamps.get(req.timestamps.size() - 1)); } From bb3dc16dff234365030310274e4729cf9e8e85ba Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Wed, 11 Jun 2025 23:53:05 +0800 Subject: [PATCH 19/25] Fix the metric collection issue for RPC compression. --- .../iotdb/session/RpcCompressedTest.java | 2 +- .../RPCServiceThriftHandlerMetrics.java | 84 +++++++++++-------- .../plan/parser/StatementGenerator.java | 36 ++++++-- .../metrics/DataNodeMetricsHelper.java | 2 + .../commons/service/metric/enums/Metric.java | 6 +- 5 files changed, 84 insertions(+), 46 deletions(-) diff --git a/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java index c766232747080..157271317a2f3 100644 --- a/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java +++ b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java @@ -240,7 +240,7 @@ public void testRpcCompressed() throws IoTDBConnectionException, StatementExecut }; BitMap[] partBitMap = new BitMap[8]; - String tableName = "table_10"; + String tableName = "table_13"; Tablet tablet = new Tablet(tableName, schemas, timestamp, values, partBitMap, 4); session1.executeNonQueryStatement("create database IF NOT EXISTS dbTest_0"); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java index a2b33c3a5d86e..1b1f6fb62a840 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/handler/RPCServiceThriftHandlerMetrics.java @@ -22,12 +22,12 @@ import org.apache.iotdb.metrics.AbstractMetricService; import org.apache.iotdb.metrics.impl.DoNothingMetricManager; import org.apache.iotdb.metrics.metricsets.IMetricSet; +import org.apache.iotdb.metrics.type.Gauge; import org.apache.iotdb.metrics.type.Timer; import org.apache.iotdb.metrics.utils.MetricLevel; import org.apache.iotdb.metrics.utils.MetricType; import java.util.Objects; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; public class RPCServiceThriftHandlerMetrics implements IMetricSet { @@ -36,32 +36,40 @@ public class RPCServiceThriftHandlerMetrics implements IMetricSet { private AtomicLong thriftConnectionNumber; // region begin - private Timer compressionRatioTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + private Gauge unCompressionSizeTimer = DoNothingMetricManager.DO_NOTHING_GAUGE; + private Gauge compressionSizeTimer = DoNothingMetricManager.DO_NOTHING_GAUGE; private Timer decodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; private Timer decompressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; + private Gauge memoryUsageGauge = DoNothingMetricManager.DO_NOTHING_GAUGE; + // end - // 内存占用 public RPCServiceThriftHandlerMetrics(AtomicLong thriftConnectionNumber) { this.thriftConnectionNumber = thriftConnectionNumber; } - public void recordCompressionRatioTimer(final long costTimeInNanos) { - compressionRatioTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); + public void recordUnCompressionSizeTimer(final long size) { + unCompressionSizeTimer.set(size); + } + + public void recordCompressionSizeTimer(final long size) { + compressionSizeTimer.set(size); } public void recordDecodeLatencyTimer(final long costTimeInNanos) { - decodeLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); + decodeLatencyTimer.updateNanos(costTimeInNanos); } public void recordDecompressLatencyTimer(final long costTimeInNanos) { - decompressLatencyTimer.update(costTimeInNanos, TimeUnit.NANOSECONDS); + decompressLatencyTimer.updateNanos(costTimeInNanos); + } + + public void recordMemoryUsage(final long memoryUsage) { + memoryUsageGauge.set(memoryUsage); } @Override public void bindTo(AbstractMetricService metricService) { - bindToTimer(metricService); - metricService.createAutoGauge( Metric.THRIFT_CONNECTIONS.toString(), MetricLevel.CORE, @@ -69,29 +77,41 @@ public void bindTo(AbstractMetricService metricService) { AtomicLong::get, Tag.NAME.toString(), "ClientRPC"); - } - private void bindToTimer(final AbstractMetricService metricService) { - compressionRatioTimer = - metricService.getOrCreateTimer( - Metric.THRIFT_RPC_COMPRESS.toString(), + unCompressionSizeTimer = + metricService.getOrCreateGauge( + Metric.THRIFT_RPC_UNCOMPRESS_SIZE.toString(), + MetricLevel.IMPORTANT, + Tag.NAME.toString(), + "unCompressionSize"); + + compressionSizeTimer = + metricService.getOrCreateGauge( + Metric.THRIFT_RPC_COMPRESS_SIZE.toString(), MetricLevel.IMPORTANT, Tag.NAME.toString(), - "compressionRatio"); + "compressionSize"); decodeLatencyTimer = metricService.getOrCreateTimer( - Metric.THRIFT_RPC_COMPRESS.toString(), + Metric.THRIFT_RPC_DECODE.toString(), MetricLevel.IMPORTANT, Tag.NAME.toString(), "decodeLatency"); decompressLatencyTimer = metricService.getOrCreateTimer( - Metric.THRIFT_RPC_COMPRESS.toString(), + Metric.THRIFT_RPC_UNCOMPRESS.toString(), MetricLevel.IMPORTANT, Tag.NAME.toString(), "decompressLatency"); + + memoryUsageGauge = + metricService.getOrCreateGauge( + Metric.THRIFT_RPC_MEMORY_USAGE.toString(), + MetricLevel.IMPORTANT, + Tag.NAME.toString(), + "memoryUsage"); } @Override @@ -102,45 +122,35 @@ public void unbindFrom(AbstractMetricService metricService) { Tag.NAME.toString(), "ClientRPC"); - compressionRatioTimer = DoNothingMetricManager.DO_NOTHING_TIMER; - decodeLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; - decompressLatencyTimer = DoNothingMetricManager.DO_NOTHING_TIMER; - metricService.remove( MetricType.TIMER, - Metric.THRIFT_RPC_COMPRESS.toString(), + Metric.THRIFT_RPC_UNCOMPRESS_SIZE.toString(), Tag.NAME.toString(), - "compressionRatio"); + "unCompressionSize"); metricService.remove( MetricType.TIMER, - Metric.THRIFT_RPC_COMPRESS.toString(), + Metric.THRIFT_RPC_COMPRESS_SIZE.toString(), Tag.NAME.toString(), - "timeConsumedOfRPC"); + "compressionSize"); metricService.remove( MetricType.TIMER, - Metric.THRIFT_RPC_COMPRESS.toString(), - Tag.NAME.toString(), - "encodeLatency"); - - metricService.remove( - MetricType.TIMER, - Metric.THRIFT_RPC_COMPRESS.toString(), + Metric.THRIFT_RPC_DECODE.toString(), Tag.NAME.toString(), "decodeLatency"); metricService.remove( MetricType.TIMER, - Metric.THRIFT_RPC_COMPRESS.toString(), + Metric.THRIFT_RPC_UNCOMPRESS.toString(), Tag.NAME.toString(), - "compressLatency"); + "decompressLatency"); metricService.remove( - MetricType.TIMER, - Metric.THRIFT_RPC_COMPRESS.toString(), + MetricType.GAUGE, + Metric.THRIFT_RPC_MEMORY_USAGE.toString(), Tag.NAME.toString(), - "decompressLatency"); + "memoryUsage"); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java index 3f670218ff33c..8087a3f94f9f6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java @@ -401,22 +401,44 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl .orElse(null)); } } finally { + System.out.println("YYM"); RPCServiceThriftHandlerMetrics.getInstance() .recordDecompressLatencyTimer( - endDeCompressedValue + (endDeCompressedValue - startDeCompressedValue + endDeCompressedTimes - - startDeCompressedTimes); + - startDeCompressedTimes)); + RPCServiceThriftHandlerMetrics.getInstance() .recordDecodeLatencyTimer( - endDecodeValue - startDecodeValue + endDecodeTime - startDecodeTime); + (endDecodeValue - startDecodeValue + endDecodeTime - startDecodeTime)); + if (insertTabletReq.isIsCompressed()) { RPCServiceThriftHandlerMetrics.getInstance() - .recordCompressionRatioTimer( - (uncompressedTimestampsSize + uncompressedValuesSize) - / (insertTabletReq.timestamps.remaining() - + insertTabletReq.values.remaining())); + .recordUnCompressionSizeTimer((uncompressedTimestampsSize + uncompressedValuesSize)); + + long memoryUsage = + uncompressedTimestampsSize + + uncompressedValuesSize + + insertTabletReq.timestamps.remaining() + + insertTabletReq.values.remaining(); + System.out.println(memoryUsage); + RPCServiceThriftHandlerMetrics.getInstance().recordMemoryUsage(memoryUsage); + } else { + RPCServiceThriftHandlerMetrics.getInstance() + .recordUnCompressionSizeTimer( + (insertTabletReq.timestamps.remaining() + insertTabletReq.values.remaining())); + + long memoryUsage = + insertTabletReq.timestamps.remaining() + insertTabletReq.values.remaining(); + RPCServiceThriftHandlerMetrics.getInstance().recordMemoryUsage(memoryUsage); } + + RPCServiceThriftHandlerMetrics.getInstance() + .recordCompressionSizeTimer( + (insertTabletReq.timestamps.remaining() + insertTabletReq.values.remaining())); + System.out.println( + insertTabletReq.timestamps.remaining() + insertTabletReq.values.remaining()); } insertStatement.setRowCount(insertTabletReq.size); TSDataType[] dataTypes = new TSDataType[insertTabletReq.types.size()]; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java index 8ac2fa1fde4ef..2a99261f57d83 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.service.metric.cpu.CpuUsageMetrics; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.pipe.metric.PipeDataNodeMetrics; +import org.apache.iotdb.db.protocol.thrift.handler.RPCServiceThriftHandlerMetrics; import org.apache.iotdb.db.queryengine.metric.DataExchangeCostMetricSet; import org.apache.iotdb.db.queryengine.metric.DataExchangeCountMetricSet; import org.apache.iotdb.db.queryengine.metric.DriverSchedulerMetricSet; @@ -70,6 +71,7 @@ public static void bind() { metricService.addMetricSet(new DiskMetrics(IoTDBConstant.DN_ROLE)); metricService.addMetricSet(new NetMetrics(IoTDBConstant.DN_ROLE)); metricService.addMetricSet(ClientManagerMetrics.getInstance()); + metricService.addMetricSet(RPCServiceThriftHandlerMetrics.getInstance()); initCpuMetrics(metricService); initSystemMetrics(metricService); metricService.addMetricSet(WritingMetrics.getInstance()); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java index 2337b2de032f1..0e6727688b261 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java @@ -50,7 +50,11 @@ public enum Metric { THRIFT_CONNECTIONS("thrift_connections"), THRIFT_ACTIVE_THREADS("thrift_active_threads"), CLIENT_MANAGER("client_manager"), - THRIFT_RPC_COMPRESS("thrift_rpc_compress"), + THRIFT_RPC_UNCOMPRESS_SIZE("thrift_rpc_uncompress_size"), + THRIFT_RPC_COMPRESS_SIZE("thrift_rpc_compress_size"), + THRIFT_RPC_UNCOMPRESS("thrift_rpc_uncompress"), + THRIFT_RPC_DECODE("thrift_rpc_decode"), + THRIFT_RPC_MEMORY_USAGE("thrift_rpc_memory_usage"), // consensus related STAGE("stage"), IOT_CONSENSUS("iot_consensus"), From 45f35540d9d1d498a13e9f396ae05c075010b8a9 Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Fri, 13 Jun 2025 01:13:40 +0800 Subject: [PATCH 20/25] remove gen-java code. --- .../service/rpc/thrift/IClientRPCService.java | 61162 ---------------- .../service/rpc/thrift/ServerProperties.java | 1149 - ...reateTimeseriesUsingSchemaTemplateReq.java | 528 - .../service/rpc/thrift/TPipeSubscribeReq.java | 594 - .../rpc/thrift/TPipeSubscribeResp.java | 737 - .../service/rpc/thrift/TPipeTransferReq.java | 584 - .../service/rpc/thrift/TPipeTransferResp.java | 510 - .../rpc/thrift/TSAggregationQueryReq.java | 1478 - .../rpc/thrift/TSAppendSchemaTemplateReq.java | 1175 - .../rpc/thrift/TSBackupConfigurationResp.java | 699 - .../rpc/thrift/TSCancelOperationReq.java | 470 - .../rpc/thrift/TSCloseOperationReq.java | 579 - .../service/rpc/thrift/TSCloseSessionReq.java | 377 - .../service/rpc/thrift/TSConnectionInfo.java | 696 - .../rpc/thrift/TSConnectionInfoResp.java | 436 - .../service/rpc/thrift/TSConnectionType.java | 50 - .../thrift/TSCreateAlignedTimeseriesReq.java | 1645 - .../thrift/TSCreateMultiTimeseriesReq.java | 1745 - .../rpc/thrift/TSCreateSchemaTemplateReq.java | 592 - .../rpc/thrift/TSCreateTimeseriesReq.java | 1345 - .../service/rpc/thrift/TSDeleteDataReq.java | 714 - .../rpc/thrift/TSDropSchemaTemplateReq.java | 478 - .../thrift/TSExecuteBatchStatementReq.java | 528 - .../rpc/thrift/TSExecuteStatementReq.java | 971 - .../rpc/thrift/TSExecuteStatementResp.java | 2441 - .../TSFastLastDataQueryForOneDeviceReq.java | 1322 - .../rpc/thrift/TSFetchMetadataReq.java | 589 - .../rpc/thrift/TSFetchMetadataResp.java | 761 - .../service/rpc/thrift/TSFetchResultsReq.java | 959 - .../rpc/thrift/TSFetchResultsResp.java | 1060 - .../rpc/thrift/TSGetOperationStatusReq.java | 470 - .../service/rpc/thrift/TSGetTimeZoneResp.java | 487 - .../rpc/thrift/TSGroupByQueryIntervalReq.java | 1488 - .../service/rpc/thrift/TSInsertRecordReq.java | 1195 - .../thrift/TSInsertRecordsOfOneDeviceReq.java | 1071 - .../rpc/thrift/TSInsertRecordsReq.java | 1121 - .../rpc/thrift/TSInsertStringRecordReq.java | 1075 - .../TSInsertStringRecordsOfOneDeviceReq.java | 1108 - .../rpc/thrift/TSInsertStringRecordsReq.java | 1158 - .../service/rpc/thrift/TSInsertTabletReq.java | 1815 - .../rpc/thrift/TSInsertTabletsReq.java | 1460 - .../rpc/thrift/TSLastDataQueryReq.java | 1213 - .../service/rpc/thrift/TSOpenSessionReq.java | 872 - .../service/rpc/thrift/TSOpenSessionResp.java | 772 - .../service/rpc/thrift/TSProtocolVersion.java | 47 - .../rpc/thrift/TSPruneSchemaTemplateReq.java | 579 - .../service/rpc/thrift/TSQueryDataSet.java | 696 - .../rpc/thrift/TSQueryNonAlignDataSet.java | 582 - .../rpc/thrift/TSQueryTemplateReq.java | 682 - .../rpc/thrift/TSQueryTemplateResp.java | 842 - .../service/rpc/thrift/TSRawDataQueryReq.java | 1306 - .../rpc/thrift/TSSetSchemaTemplateReq.java | 579 - .../service/rpc/thrift/TSSetTimeZoneReq.java | 478 - .../service/rpc/thrift/TSTracingInfo.java | 1481 - .../rpc/thrift/TSUnsetSchemaTemplateReq.java | 579 - .../service/rpc/thrift/TSyncIdentityInfo.java | 680 - .../rpc/thrift/TSyncTransportMetaInfo.java | 478 - 57 files changed, 110688 deletions(-) delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/IClientRPCService.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/ServerProperties.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TCreateTimeseriesUsingSchemaTemplateReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSAggregationQueryReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSAppendSchemaTemplateReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSBackupConfigurationResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCancelOperationReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseOperationReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseSessionReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfo.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfoResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateAlignedTimeseriesReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateMultiTimeseriesReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateSchemaTemplateReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateTimeseriesReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSDeleteDataReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSDropSchemaTemplateReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteBatchStatementReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFastLastDataQueryForOneDeviceReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSGetOperationStatusReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSGetTimeZoneResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSGroupByQueryIntervalReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsOfOneDeviceReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsOfOneDeviceReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletsReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSLastDataQueryReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSPruneSchemaTemplateReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateResp.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSRawDataQueryReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSSetSchemaTemplateReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSSetTimeZoneReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSUnsetSchemaTemplateReq.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSyncIdentityInfo.java delete mode 100644 gen-java/org/apache/iotdb/service/rpc/thrift/TSyncTransportMetaInfo.java diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/IClientRPCService.java b/gen-java/org/apache/iotdb/service/rpc/thrift/IClientRPCService.java deleted file mode 100644 index b47c71f31cc3e..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/IClientRPCService.java +++ /dev/null @@ -1,61162 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -public class IClientRPCService { - - public interface Iface { - - public TSExecuteStatementResp executeQueryStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeUpdateStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeRawDataQueryV2(TSRawDataQueryReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeLastDataQueryV2(TSLastDataQueryReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeAggregationQueryV2(TSAggregationQueryReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req) throws org.apache.thrift.TException; - - public TSFetchResultsResp fetchResultsV2(TSFetchResultsReq req) throws org.apache.thrift.TException; - - public TSOpenSessionResp openSession(TSOpenSessionReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus closeSession(TSCloseSessionReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus executeBatchStatement(TSExecuteBatchStatementReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeQueryStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeUpdateStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException; - - public TSFetchResultsResp fetchResults(TSFetchResultsReq req) throws org.apache.thrift.TException; - - public TSFetchMetadataResp fetchMetadata(TSFetchMetadataReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus cancelOperation(TSCancelOperationReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus closeOperation(TSCloseOperationReq req) throws org.apache.thrift.TException; - - public TSGetTimeZoneResp getTimeZone(long sessionId) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus setTimeZone(TSSetTimeZoneReq req) throws org.apache.thrift.TException; - - public ServerProperties getProperties() throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus setStorageGroup(long sessionId, java.lang.String storageGroup) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus createTimeseries(TSCreateTimeseriesReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus createAlignedTimeseries(TSCreateAlignedTimeseriesReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus createMultiTimeseries(TSCreateMultiTimeseriesReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus deleteTimeseries(long sessionId, java.util.List path) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus deleteStorageGroups(long sessionId, java.util.List storageGroup) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus insertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus insertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus deleteData(TSDeleteDataReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeRawDataQuery(TSRawDataQueryReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeLastDataQuery(TSLastDataQueryReq req) throws org.apache.thrift.TException; - - public TSExecuteStatementResp executeAggregationQuery(TSAggregationQueryReq req) throws org.apache.thrift.TException; - - public long requestStatementId(long sessionId) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus createSchemaTemplate(TSCreateSchemaTemplateReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus appendSchemaTemplate(TSAppendSchemaTemplateReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus pruneSchemaTemplate(TSPruneSchemaTemplateReq req) throws org.apache.thrift.TException; - - public TSQueryTemplateResp querySchemaTemplate(TSQueryTemplateReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp showConfigurationTemplate() throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp showConfiguration(int nodeId) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus setSchemaTemplate(TSSetSchemaTemplateReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus unsetSchemaTemplate(TSUnsetSchemaTemplateReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus dropSchemaTemplate(TSDropSchemaTemplateReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus handshake(TSyncIdentityInfo info) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus sendPipeData(java.nio.ByteBuffer buff) throws org.apache.thrift.TException; - - public org.apache.iotdb.common.rpc.thrift.TSStatus sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff) throws org.apache.thrift.TException; - - public TPipeTransferResp pipeTransfer(TPipeTransferReq req) throws org.apache.thrift.TException; - - public TPipeSubscribeResp pipeSubscribe(TPipeSubscribeReq req) throws org.apache.thrift.TException; - - public TSBackupConfigurationResp getBackupConfiguration() throws org.apache.thrift.TException; - - public TSConnectionInfoResp fetchAllConnectionsInfo() throws org.apache.thrift.TException; - - /** - * For other node's call - */ - public org.apache.iotdb.common.rpc.thrift.TSStatus testConnectionEmptyRPC() throws org.apache.thrift.TException; - - } - - public interface AsyncIface { - - public void executeQueryStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeUpdateStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeRawDataQueryV2(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeLastDataQueryV2(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeAggregationQueryV2(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void fetchResultsV2(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void openSession(TSOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void closeSession(TSCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeBatchStatement(TSExecuteBatchStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeQueryStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeUpdateStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void fetchResults(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void fetchMetadata(TSFetchMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void cancelOperation(TSCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void closeOperation(TSCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getTimeZone(long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void setTimeZone(TSSetTimeZoneReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getProperties(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void setStorageGroup(long sessionId, java.lang.String storageGroup, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void createTimeseries(TSCreateTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void createAlignedTimeseries(TSCreateAlignedTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void createMultiTimeseries(TSCreateMultiTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void deleteTimeseries(long sessionId, java.util.List path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void deleteStorageGroups(long sessionId, java.util.List storageGroup, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void insertRecord(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void insertStringRecord(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void insertTablet(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void insertTablets(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void insertRecords(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void insertStringRecords(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void testInsertTablet(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void testInsertTablets(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void testInsertRecord(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void testInsertStringRecord(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void testInsertRecords(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void testInsertStringRecords(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void deleteData(TSDeleteDataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeRawDataQuery(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeLastDataQuery(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void executeAggregationQuery(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void requestStatementId(long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void createSchemaTemplate(TSCreateSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void appendSchemaTemplate(TSAppendSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void pruneSchemaTemplate(TSPruneSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void querySchemaTemplate(TSQueryTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void showConfigurationTemplate(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void showConfiguration(int nodeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void setSchemaTemplate(TSSetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void unsetSchemaTemplate(TSUnsetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void dropSchemaTemplate(TSDropSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void handshake(TSyncIdentityInfo info, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void sendPipeData(java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void pipeTransfer(TPipeTransferReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void pipeSubscribe(TPipeSubscribeReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getBackupConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void fetchAllConnectionsInfo(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void testConnectionEmptyRPC(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - } - - public static class Client extends org.apache.thrift.TServiceClient implements Iface { - public static class Factory implements org.apache.thrift.TServiceClientFactory { - public Factory() {} - @Override - public Client getClient(org.apache.thrift.protocol.TProtocol prot) { - return new Client(prot); - } - @Override - public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - return new Client(iprot, oprot); - } - } - - public Client(org.apache.thrift.protocol.TProtocol prot) - { - super(prot, prot); - } - - public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - super(iprot, oprot); - } - - @Override - public TSExecuteStatementResp executeQueryStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - send_executeQueryStatementV2(req); - return recv_executeQueryStatementV2(); - } - - public void send_executeQueryStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - executeQueryStatementV2_args args = new executeQueryStatementV2_args(); - args.setReq(req); - sendBase("executeQueryStatementV2", args); - } - - public TSExecuteStatementResp recv_executeQueryStatementV2() throws org.apache.thrift.TException - { - executeQueryStatementV2_result result = new executeQueryStatementV2_result(); - receiveBase(result, "executeQueryStatementV2"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeQueryStatementV2 failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeUpdateStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - send_executeUpdateStatementV2(req); - return recv_executeUpdateStatementV2(); - } - - public void send_executeUpdateStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - executeUpdateStatementV2_args args = new executeUpdateStatementV2_args(); - args.setReq(req); - sendBase("executeUpdateStatementV2", args); - } - - public TSExecuteStatementResp recv_executeUpdateStatementV2() throws org.apache.thrift.TException - { - executeUpdateStatementV2_result result = new executeUpdateStatementV2_result(); - receiveBase(result, "executeUpdateStatementV2"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeUpdateStatementV2 failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - send_executeStatementV2(req); - return recv_executeStatementV2(); - } - - public void send_executeStatementV2(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - executeStatementV2_args args = new executeStatementV2_args(); - args.setReq(req); - sendBase("executeStatementV2", args); - } - - public TSExecuteStatementResp recv_executeStatementV2() throws org.apache.thrift.TException - { - executeStatementV2_result result = new executeStatementV2_result(); - receiveBase(result, "executeStatementV2"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeStatementV2 failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeRawDataQueryV2(TSRawDataQueryReq req) throws org.apache.thrift.TException - { - send_executeRawDataQueryV2(req); - return recv_executeRawDataQueryV2(); - } - - public void send_executeRawDataQueryV2(TSRawDataQueryReq req) throws org.apache.thrift.TException - { - executeRawDataQueryV2_args args = new executeRawDataQueryV2_args(); - args.setReq(req); - sendBase("executeRawDataQueryV2", args); - } - - public TSExecuteStatementResp recv_executeRawDataQueryV2() throws org.apache.thrift.TException - { - executeRawDataQueryV2_result result = new executeRawDataQueryV2_result(); - receiveBase(result, "executeRawDataQueryV2"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeRawDataQueryV2 failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeLastDataQueryV2(TSLastDataQueryReq req) throws org.apache.thrift.TException - { - send_executeLastDataQueryV2(req); - return recv_executeLastDataQueryV2(); - } - - public void send_executeLastDataQueryV2(TSLastDataQueryReq req) throws org.apache.thrift.TException - { - executeLastDataQueryV2_args args = new executeLastDataQueryV2_args(); - args.setReq(req); - sendBase("executeLastDataQueryV2", args); - } - - public TSExecuteStatementResp recv_executeLastDataQueryV2() throws org.apache.thrift.TException - { - executeLastDataQueryV2_result result = new executeLastDataQueryV2_result(); - receiveBase(result, "executeLastDataQueryV2"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeLastDataQueryV2 failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req) throws org.apache.thrift.TException - { - send_executeFastLastDataQueryForOneDeviceV2(req); - return recv_executeFastLastDataQueryForOneDeviceV2(); - } - - public void send_executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req) throws org.apache.thrift.TException - { - executeFastLastDataQueryForOneDeviceV2_args args = new executeFastLastDataQueryForOneDeviceV2_args(); - args.setReq(req); - sendBase("executeFastLastDataQueryForOneDeviceV2", args); - } - - public TSExecuteStatementResp recv_executeFastLastDataQueryForOneDeviceV2() throws org.apache.thrift.TException - { - executeFastLastDataQueryForOneDeviceV2_result result = new executeFastLastDataQueryForOneDeviceV2_result(); - receiveBase(result, "executeFastLastDataQueryForOneDeviceV2"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeFastLastDataQueryForOneDeviceV2 failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeAggregationQueryV2(TSAggregationQueryReq req) throws org.apache.thrift.TException - { - send_executeAggregationQueryV2(req); - return recv_executeAggregationQueryV2(); - } - - public void send_executeAggregationQueryV2(TSAggregationQueryReq req) throws org.apache.thrift.TException - { - executeAggregationQueryV2_args args = new executeAggregationQueryV2_args(); - args.setReq(req); - sendBase("executeAggregationQueryV2", args); - } - - public TSExecuteStatementResp recv_executeAggregationQueryV2() throws org.apache.thrift.TException - { - executeAggregationQueryV2_result result = new executeAggregationQueryV2_result(); - receiveBase(result, "executeAggregationQueryV2"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeAggregationQueryV2 failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req) throws org.apache.thrift.TException - { - send_executeGroupByQueryIntervalQuery(req); - return recv_executeGroupByQueryIntervalQuery(); - } - - public void send_executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req) throws org.apache.thrift.TException - { - executeGroupByQueryIntervalQuery_args args = new executeGroupByQueryIntervalQuery_args(); - args.setReq(req); - sendBase("executeGroupByQueryIntervalQuery", args); - } - - public TSExecuteStatementResp recv_executeGroupByQueryIntervalQuery() throws org.apache.thrift.TException - { - executeGroupByQueryIntervalQuery_result result = new executeGroupByQueryIntervalQuery_result(); - receiveBase(result, "executeGroupByQueryIntervalQuery"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeGroupByQueryIntervalQuery failed: unknown result"); - } - - @Override - public TSFetchResultsResp fetchResultsV2(TSFetchResultsReq req) throws org.apache.thrift.TException - { - send_fetchResultsV2(req); - return recv_fetchResultsV2(); - } - - public void send_fetchResultsV2(TSFetchResultsReq req) throws org.apache.thrift.TException - { - fetchResultsV2_args args = new fetchResultsV2_args(); - args.setReq(req); - sendBase("fetchResultsV2", args); - } - - public TSFetchResultsResp recv_fetchResultsV2() throws org.apache.thrift.TException - { - fetchResultsV2_result result = new fetchResultsV2_result(); - receiveBase(result, "fetchResultsV2"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchResultsV2 failed: unknown result"); - } - - @Override - public TSOpenSessionResp openSession(TSOpenSessionReq req) throws org.apache.thrift.TException - { - send_openSession(req); - return recv_openSession(); - } - - public void send_openSession(TSOpenSessionReq req) throws org.apache.thrift.TException - { - openSession_args args = new openSession_args(); - args.setReq(req); - sendBase("openSession", args); - } - - public TSOpenSessionResp recv_openSession() throws org.apache.thrift.TException - { - openSession_result result = new openSession_result(); - receiveBase(result, "openSession"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "openSession failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus closeSession(TSCloseSessionReq req) throws org.apache.thrift.TException - { - send_closeSession(req); - return recv_closeSession(); - } - - public void send_closeSession(TSCloseSessionReq req) throws org.apache.thrift.TException - { - closeSession_args args = new closeSession_args(); - args.setReq(req); - sendBase("closeSession", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_closeSession() throws org.apache.thrift.TException - { - closeSession_result result = new closeSession_result(); - receiveBase(result, "closeSession"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closeSession failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - send_executeStatement(req); - return recv_executeStatement(); - } - - public void send_executeStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - executeStatement_args args = new executeStatement_args(); - args.setReq(req); - sendBase("executeStatement", args); - } - - public TSExecuteStatementResp recv_executeStatement() throws org.apache.thrift.TException - { - executeStatement_result result = new executeStatement_result(); - receiveBase(result, "executeStatement"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeStatement failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus executeBatchStatement(TSExecuteBatchStatementReq req) throws org.apache.thrift.TException - { - send_executeBatchStatement(req); - return recv_executeBatchStatement(); - } - - public void send_executeBatchStatement(TSExecuteBatchStatementReq req) throws org.apache.thrift.TException - { - executeBatchStatement_args args = new executeBatchStatement_args(); - args.setReq(req); - sendBase("executeBatchStatement", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_executeBatchStatement() throws org.apache.thrift.TException - { - executeBatchStatement_result result = new executeBatchStatement_result(); - receiveBase(result, "executeBatchStatement"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeBatchStatement failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeQueryStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - send_executeQueryStatement(req); - return recv_executeQueryStatement(); - } - - public void send_executeQueryStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - executeQueryStatement_args args = new executeQueryStatement_args(); - args.setReq(req); - sendBase("executeQueryStatement", args); - } - - public TSExecuteStatementResp recv_executeQueryStatement() throws org.apache.thrift.TException - { - executeQueryStatement_result result = new executeQueryStatement_result(); - receiveBase(result, "executeQueryStatement"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeQueryStatement failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeUpdateStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - send_executeUpdateStatement(req); - return recv_executeUpdateStatement(); - } - - public void send_executeUpdateStatement(TSExecuteStatementReq req) throws org.apache.thrift.TException - { - executeUpdateStatement_args args = new executeUpdateStatement_args(); - args.setReq(req); - sendBase("executeUpdateStatement", args); - } - - public TSExecuteStatementResp recv_executeUpdateStatement() throws org.apache.thrift.TException - { - executeUpdateStatement_result result = new executeUpdateStatement_result(); - receiveBase(result, "executeUpdateStatement"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeUpdateStatement failed: unknown result"); - } - - @Override - public TSFetchResultsResp fetchResults(TSFetchResultsReq req) throws org.apache.thrift.TException - { - send_fetchResults(req); - return recv_fetchResults(); - } - - public void send_fetchResults(TSFetchResultsReq req) throws org.apache.thrift.TException - { - fetchResults_args args = new fetchResults_args(); - args.setReq(req); - sendBase("fetchResults", args); - } - - public TSFetchResultsResp recv_fetchResults() throws org.apache.thrift.TException - { - fetchResults_result result = new fetchResults_result(); - receiveBase(result, "fetchResults"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchResults failed: unknown result"); - } - - @Override - public TSFetchMetadataResp fetchMetadata(TSFetchMetadataReq req) throws org.apache.thrift.TException - { - send_fetchMetadata(req); - return recv_fetchMetadata(); - } - - public void send_fetchMetadata(TSFetchMetadataReq req) throws org.apache.thrift.TException - { - fetchMetadata_args args = new fetchMetadata_args(); - args.setReq(req); - sendBase("fetchMetadata", args); - } - - public TSFetchMetadataResp recv_fetchMetadata() throws org.apache.thrift.TException - { - fetchMetadata_result result = new fetchMetadata_result(); - receiveBase(result, "fetchMetadata"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchMetadata failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus cancelOperation(TSCancelOperationReq req) throws org.apache.thrift.TException - { - send_cancelOperation(req); - return recv_cancelOperation(); - } - - public void send_cancelOperation(TSCancelOperationReq req) throws org.apache.thrift.TException - { - cancelOperation_args args = new cancelOperation_args(); - args.setReq(req); - sendBase("cancelOperation", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_cancelOperation() throws org.apache.thrift.TException - { - cancelOperation_result result = new cancelOperation_result(); - receiveBase(result, "cancelOperation"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelOperation failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus closeOperation(TSCloseOperationReq req) throws org.apache.thrift.TException - { - send_closeOperation(req); - return recv_closeOperation(); - } - - public void send_closeOperation(TSCloseOperationReq req) throws org.apache.thrift.TException - { - closeOperation_args args = new closeOperation_args(); - args.setReq(req); - sendBase("closeOperation", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_closeOperation() throws org.apache.thrift.TException - { - closeOperation_result result = new closeOperation_result(); - receiveBase(result, "closeOperation"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closeOperation failed: unknown result"); - } - - @Override - public TSGetTimeZoneResp getTimeZone(long sessionId) throws org.apache.thrift.TException - { - send_getTimeZone(sessionId); - return recv_getTimeZone(); - } - - public void send_getTimeZone(long sessionId) throws org.apache.thrift.TException - { - getTimeZone_args args = new getTimeZone_args(); - args.setSessionId(sessionId); - sendBase("getTimeZone", args); - } - - public TSGetTimeZoneResp recv_getTimeZone() throws org.apache.thrift.TException - { - getTimeZone_result result = new getTimeZone_result(); - receiveBase(result, "getTimeZone"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTimeZone failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus setTimeZone(TSSetTimeZoneReq req) throws org.apache.thrift.TException - { - send_setTimeZone(req); - return recv_setTimeZone(); - } - - public void send_setTimeZone(TSSetTimeZoneReq req) throws org.apache.thrift.TException - { - setTimeZone_args args = new setTimeZone_args(); - args.setReq(req); - sendBase("setTimeZone", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_setTimeZone() throws org.apache.thrift.TException - { - setTimeZone_result result = new setTimeZone_result(); - receiveBase(result, "setTimeZone"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setTimeZone failed: unknown result"); - } - - @Override - public ServerProperties getProperties() throws org.apache.thrift.TException - { - send_getProperties(); - return recv_getProperties(); - } - - public void send_getProperties() throws org.apache.thrift.TException - { - getProperties_args args = new getProperties_args(); - sendBase("getProperties", args); - } - - public ServerProperties recv_getProperties() throws org.apache.thrift.TException - { - getProperties_result result = new getProperties_result(); - receiveBase(result, "getProperties"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getProperties failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus setStorageGroup(long sessionId, java.lang.String storageGroup) throws org.apache.thrift.TException - { - send_setStorageGroup(sessionId, storageGroup); - return recv_setStorageGroup(); - } - - public void send_setStorageGroup(long sessionId, java.lang.String storageGroup) throws org.apache.thrift.TException - { - setStorageGroup_args args = new setStorageGroup_args(); - args.setSessionId(sessionId); - args.setStorageGroup(storageGroup); - sendBase("setStorageGroup", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_setStorageGroup() throws org.apache.thrift.TException - { - setStorageGroup_result result = new setStorageGroup_result(); - receiveBase(result, "setStorageGroup"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setStorageGroup failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus createTimeseries(TSCreateTimeseriesReq req) throws org.apache.thrift.TException - { - send_createTimeseries(req); - return recv_createTimeseries(); - } - - public void send_createTimeseries(TSCreateTimeseriesReq req) throws org.apache.thrift.TException - { - createTimeseries_args args = new createTimeseries_args(); - args.setReq(req); - sendBase("createTimeseries", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createTimeseries() throws org.apache.thrift.TException - { - createTimeseries_result result = new createTimeseries_result(); - receiveBase(result, "createTimeseries"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createTimeseries failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus createAlignedTimeseries(TSCreateAlignedTimeseriesReq req) throws org.apache.thrift.TException - { - send_createAlignedTimeseries(req); - return recv_createAlignedTimeseries(); - } - - public void send_createAlignedTimeseries(TSCreateAlignedTimeseriesReq req) throws org.apache.thrift.TException - { - createAlignedTimeseries_args args = new createAlignedTimeseries_args(); - args.setReq(req); - sendBase("createAlignedTimeseries", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createAlignedTimeseries() throws org.apache.thrift.TException - { - createAlignedTimeseries_result result = new createAlignedTimeseries_result(); - receiveBase(result, "createAlignedTimeseries"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createAlignedTimeseries failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus createMultiTimeseries(TSCreateMultiTimeseriesReq req) throws org.apache.thrift.TException - { - send_createMultiTimeseries(req); - return recv_createMultiTimeseries(); - } - - public void send_createMultiTimeseries(TSCreateMultiTimeseriesReq req) throws org.apache.thrift.TException - { - createMultiTimeseries_args args = new createMultiTimeseries_args(); - args.setReq(req); - sendBase("createMultiTimeseries", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createMultiTimeseries() throws org.apache.thrift.TException - { - createMultiTimeseries_result result = new createMultiTimeseries_result(); - receiveBase(result, "createMultiTimeseries"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createMultiTimeseries failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus deleteTimeseries(long sessionId, java.util.List path) throws org.apache.thrift.TException - { - send_deleteTimeseries(sessionId, path); - return recv_deleteTimeseries(); - } - - public void send_deleteTimeseries(long sessionId, java.util.List path) throws org.apache.thrift.TException - { - deleteTimeseries_args args = new deleteTimeseries_args(); - args.setSessionId(sessionId); - args.setPath(path); - sendBase("deleteTimeseries", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_deleteTimeseries() throws org.apache.thrift.TException - { - deleteTimeseries_result result = new deleteTimeseries_result(); - receiveBase(result, "deleteTimeseries"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteTimeseries failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus deleteStorageGroups(long sessionId, java.util.List storageGroup) throws org.apache.thrift.TException - { - send_deleteStorageGroups(sessionId, storageGroup); - return recv_deleteStorageGroups(); - } - - public void send_deleteStorageGroups(long sessionId, java.util.List storageGroup) throws org.apache.thrift.TException - { - deleteStorageGroups_args args = new deleteStorageGroups_args(); - args.setSessionId(sessionId); - args.setStorageGroup(storageGroup); - sendBase("deleteStorageGroups", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_deleteStorageGroups() throws org.apache.thrift.TException - { - deleteStorageGroups_result result = new deleteStorageGroups_result(); - receiveBase(result, "deleteStorageGroups"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteStorageGroups failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException - { - send_insertRecord(req); - return recv_insertRecord(); - } - - public void send_insertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException - { - insertRecord_args args = new insertRecord_args(); - args.setReq(req); - sendBase("insertRecord", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertRecord() throws org.apache.thrift.TException - { - insertRecord_result result = new insertRecord_result(); - receiveBase(result, "insertRecord"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertRecord failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException - { - send_insertStringRecord(req); - return recv_insertStringRecord(); - } - - public void send_insertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException - { - insertStringRecord_args args = new insertStringRecord_args(); - args.setReq(req); - sendBase("insertStringRecord", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertStringRecord() throws org.apache.thrift.TException - { - insertStringRecord_result result = new insertStringRecord_result(); - receiveBase(result, "insertStringRecord"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertStringRecord failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus insertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException - { - send_insertTablet(req); - return recv_insertTablet(); - } - - public void send_insertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException - { - insertTablet_args args = new insertTablet_args(); - args.setReq(req); - sendBase("insertTablet", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertTablet() throws org.apache.thrift.TException - { - insertTablet_result result = new insertTablet_result(); - receiveBase(result, "insertTablet"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertTablet failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus insertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException - { - send_insertTablets(req); - return recv_insertTablets(); - } - - public void send_insertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException - { - insertTablets_args args = new insertTablets_args(); - args.setReq(req); - sendBase("insertTablets", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertTablets() throws org.apache.thrift.TException - { - insertTablets_result result = new insertTablets_result(); - receiveBase(result, "insertTablets"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertTablets failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException - { - send_insertRecords(req); - return recv_insertRecords(); - } - - public void send_insertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException - { - insertRecords_args args = new insertRecords_args(); - args.setReq(req); - sendBase("insertRecords", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertRecords() throws org.apache.thrift.TException - { - insertRecords_result result = new insertRecords_result(); - receiveBase(result, "insertRecords"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertRecords failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException - { - send_insertRecordsOfOneDevice(req); - return recv_insertRecordsOfOneDevice(); - } - - public void send_insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException - { - insertRecordsOfOneDevice_args args = new insertRecordsOfOneDevice_args(); - args.setReq(req); - sendBase("insertRecordsOfOneDevice", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertRecordsOfOneDevice() throws org.apache.thrift.TException - { - insertRecordsOfOneDevice_result result = new insertRecordsOfOneDevice_result(); - receiveBase(result, "insertRecordsOfOneDevice"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertRecordsOfOneDevice failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req) throws org.apache.thrift.TException - { - send_insertStringRecordsOfOneDevice(req); - return recv_insertStringRecordsOfOneDevice(); - } - - public void send_insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req) throws org.apache.thrift.TException - { - insertStringRecordsOfOneDevice_args args = new insertStringRecordsOfOneDevice_args(); - args.setReq(req); - sendBase("insertStringRecordsOfOneDevice", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertStringRecordsOfOneDevice() throws org.apache.thrift.TException - { - insertStringRecordsOfOneDevice_result result = new insertStringRecordsOfOneDevice_result(); - receiveBase(result, "insertStringRecordsOfOneDevice"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertStringRecordsOfOneDevice failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus insertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException - { - send_insertStringRecords(req); - return recv_insertStringRecords(); - } - - public void send_insertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException - { - insertStringRecords_args args = new insertStringRecords_args(); - args.setReq(req); - sendBase("insertStringRecords", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_insertStringRecords() throws org.apache.thrift.TException - { - insertStringRecords_result result = new insertStringRecords_result(); - receiveBase(result, "insertStringRecords"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertStringRecords failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException - { - send_testInsertTablet(req); - return recv_testInsertTablet(); - } - - public void send_testInsertTablet(TSInsertTabletReq req) throws org.apache.thrift.TException - { - testInsertTablet_args args = new testInsertTablet_args(); - args.setReq(req); - sendBase("testInsertTablet", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertTablet() throws org.apache.thrift.TException - { - testInsertTablet_result result = new testInsertTablet_result(); - receiveBase(result, "testInsertTablet"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertTablet failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException - { - send_testInsertTablets(req); - return recv_testInsertTablets(); - } - - public void send_testInsertTablets(TSInsertTabletsReq req) throws org.apache.thrift.TException - { - testInsertTablets_args args = new testInsertTablets_args(); - args.setReq(req); - sendBase("testInsertTablets", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertTablets() throws org.apache.thrift.TException - { - testInsertTablets_result result = new testInsertTablets_result(); - receiveBase(result, "testInsertTablets"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertTablets failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException - { - send_testInsertRecord(req); - return recv_testInsertRecord(); - } - - public void send_testInsertRecord(TSInsertRecordReq req) throws org.apache.thrift.TException - { - testInsertRecord_args args = new testInsertRecord_args(); - args.setReq(req); - sendBase("testInsertRecord", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertRecord() throws org.apache.thrift.TException - { - testInsertRecord_result result = new testInsertRecord_result(); - receiveBase(result, "testInsertRecord"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertRecord failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException - { - send_testInsertStringRecord(req); - return recv_testInsertStringRecord(); - } - - public void send_testInsertStringRecord(TSInsertStringRecordReq req) throws org.apache.thrift.TException - { - testInsertStringRecord_args args = new testInsertStringRecord_args(); - args.setReq(req); - sendBase("testInsertStringRecord", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertStringRecord() throws org.apache.thrift.TException - { - testInsertStringRecord_result result = new testInsertStringRecord_result(); - receiveBase(result, "testInsertStringRecord"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertStringRecord failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException - { - send_testInsertRecords(req); - return recv_testInsertRecords(); - } - - public void send_testInsertRecords(TSInsertRecordsReq req) throws org.apache.thrift.TException - { - testInsertRecords_args args = new testInsertRecords_args(); - args.setReq(req); - sendBase("testInsertRecords", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertRecords() throws org.apache.thrift.TException - { - testInsertRecords_result result = new testInsertRecords_result(); - receiveBase(result, "testInsertRecords"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertRecords failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException - { - send_testInsertRecordsOfOneDevice(req); - return recv_testInsertRecordsOfOneDevice(); - } - - public void send_testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req) throws org.apache.thrift.TException - { - testInsertRecordsOfOneDevice_args args = new testInsertRecordsOfOneDevice_args(); - args.setReq(req); - sendBase("testInsertRecordsOfOneDevice", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertRecordsOfOneDevice() throws org.apache.thrift.TException - { - testInsertRecordsOfOneDevice_result result = new testInsertRecordsOfOneDevice_result(); - receiveBase(result, "testInsertRecordsOfOneDevice"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertRecordsOfOneDevice failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus testInsertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException - { - send_testInsertStringRecords(req); - return recv_testInsertStringRecords(); - } - - public void send_testInsertStringRecords(TSInsertStringRecordsReq req) throws org.apache.thrift.TException - { - testInsertStringRecords_args args = new testInsertStringRecords_args(); - args.setReq(req); - sendBase("testInsertStringRecords", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testInsertStringRecords() throws org.apache.thrift.TException - { - testInsertStringRecords_result result = new testInsertStringRecords_result(); - receiveBase(result, "testInsertStringRecords"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testInsertStringRecords failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus deleteData(TSDeleteDataReq req) throws org.apache.thrift.TException - { - send_deleteData(req); - return recv_deleteData(); - } - - public void send_deleteData(TSDeleteDataReq req) throws org.apache.thrift.TException - { - deleteData_args args = new deleteData_args(); - args.setReq(req); - sendBase("deleteData", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_deleteData() throws org.apache.thrift.TException - { - deleteData_result result = new deleteData_result(); - receiveBase(result, "deleteData"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteData failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeRawDataQuery(TSRawDataQueryReq req) throws org.apache.thrift.TException - { - send_executeRawDataQuery(req); - return recv_executeRawDataQuery(); - } - - public void send_executeRawDataQuery(TSRawDataQueryReq req) throws org.apache.thrift.TException - { - executeRawDataQuery_args args = new executeRawDataQuery_args(); - args.setReq(req); - sendBase("executeRawDataQuery", args); - } - - public TSExecuteStatementResp recv_executeRawDataQuery() throws org.apache.thrift.TException - { - executeRawDataQuery_result result = new executeRawDataQuery_result(); - receiveBase(result, "executeRawDataQuery"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeRawDataQuery failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeLastDataQuery(TSLastDataQueryReq req) throws org.apache.thrift.TException - { - send_executeLastDataQuery(req); - return recv_executeLastDataQuery(); - } - - public void send_executeLastDataQuery(TSLastDataQueryReq req) throws org.apache.thrift.TException - { - executeLastDataQuery_args args = new executeLastDataQuery_args(); - args.setReq(req); - sendBase("executeLastDataQuery", args); - } - - public TSExecuteStatementResp recv_executeLastDataQuery() throws org.apache.thrift.TException - { - executeLastDataQuery_result result = new executeLastDataQuery_result(); - receiveBase(result, "executeLastDataQuery"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeLastDataQuery failed: unknown result"); - } - - @Override - public TSExecuteStatementResp executeAggregationQuery(TSAggregationQueryReq req) throws org.apache.thrift.TException - { - send_executeAggregationQuery(req); - return recv_executeAggregationQuery(); - } - - public void send_executeAggregationQuery(TSAggregationQueryReq req) throws org.apache.thrift.TException - { - executeAggregationQuery_args args = new executeAggregationQuery_args(); - args.setReq(req); - sendBase("executeAggregationQuery", args); - } - - public TSExecuteStatementResp recv_executeAggregationQuery() throws org.apache.thrift.TException - { - executeAggregationQuery_result result = new executeAggregationQuery_result(); - receiveBase(result, "executeAggregationQuery"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "executeAggregationQuery failed: unknown result"); - } - - @Override - public long requestStatementId(long sessionId) throws org.apache.thrift.TException - { - send_requestStatementId(sessionId); - return recv_requestStatementId(); - } - - public void send_requestStatementId(long sessionId) throws org.apache.thrift.TException - { - requestStatementId_args args = new requestStatementId_args(); - args.setSessionId(sessionId); - sendBase("requestStatementId", args); - } - - public long recv_requestStatementId() throws org.apache.thrift.TException - { - requestStatementId_result result = new requestStatementId_result(); - receiveBase(result, "requestStatementId"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestStatementId failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus createSchemaTemplate(TSCreateSchemaTemplateReq req) throws org.apache.thrift.TException - { - send_createSchemaTemplate(req); - return recv_createSchemaTemplate(); - } - - public void send_createSchemaTemplate(TSCreateSchemaTemplateReq req) throws org.apache.thrift.TException - { - createSchemaTemplate_args args = new createSchemaTemplate_args(); - args.setReq(req); - sendBase("createSchemaTemplate", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createSchemaTemplate() throws org.apache.thrift.TException - { - createSchemaTemplate_result result = new createSchemaTemplate_result(); - receiveBase(result, "createSchemaTemplate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSchemaTemplate failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus appendSchemaTemplate(TSAppendSchemaTemplateReq req) throws org.apache.thrift.TException - { - send_appendSchemaTemplate(req); - return recv_appendSchemaTemplate(); - } - - public void send_appendSchemaTemplate(TSAppendSchemaTemplateReq req) throws org.apache.thrift.TException - { - appendSchemaTemplate_args args = new appendSchemaTemplate_args(); - args.setReq(req); - sendBase("appendSchemaTemplate", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_appendSchemaTemplate() throws org.apache.thrift.TException - { - appendSchemaTemplate_result result = new appendSchemaTemplate_result(); - receiveBase(result, "appendSchemaTemplate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "appendSchemaTemplate failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus pruneSchemaTemplate(TSPruneSchemaTemplateReq req) throws org.apache.thrift.TException - { - send_pruneSchemaTemplate(req); - return recv_pruneSchemaTemplate(); - } - - public void send_pruneSchemaTemplate(TSPruneSchemaTemplateReq req) throws org.apache.thrift.TException - { - pruneSchemaTemplate_args args = new pruneSchemaTemplate_args(); - args.setReq(req); - sendBase("pruneSchemaTemplate", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_pruneSchemaTemplate() throws org.apache.thrift.TException - { - pruneSchemaTemplate_result result = new pruneSchemaTemplate_result(); - receiveBase(result, "pruneSchemaTemplate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pruneSchemaTemplate failed: unknown result"); - } - - @Override - public TSQueryTemplateResp querySchemaTemplate(TSQueryTemplateReq req) throws org.apache.thrift.TException - { - send_querySchemaTemplate(req); - return recv_querySchemaTemplate(); - } - - public void send_querySchemaTemplate(TSQueryTemplateReq req) throws org.apache.thrift.TException - { - querySchemaTemplate_args args = new querySchemaTemplate_args(); - args.setReq(req); - sendBase("querySchemaTemplate", args); - } - - public TSQueryTemplateResp recv_querySchemaTemplate() throws org.apache.thrift.TException - { - querySchemaTemplate_result result = new querySchemaTemplate_result(); - receiveBase(result, "querySchemaTemplate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "querySchemaTemplate failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp showConfigurationTemplate() throws org.apache.thrift.TException - { - send_showConfigurationTemplate(); - return recv_showConfigurationTemplate(); - } - - public void send_showConfigurationTemplate() throws org.apache.thrift.TException - { - showConfigurationTemplate_args args = new showConfigurationTemplate_args(); - sendBase("showConfigurationTemplate", args); - } - - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp recv_showConfigurationTemplate() throws org.apache.thrift.TException - { - showConfigurationTemplate_result result = new showConfigurationTemplate_result(); - receiveBase(result, "showConfigurationTemplate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "showConfigurationTemplate failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp showConfiguration(int nodeId) throws org.apache.thrift.TException - { - send_showConfiguration(nodeId); - return recv_showConfiguration(); - } - - public void send_showConfiguration(int nodeId) throws org.apache.thrift.TException - { - showConfiguration_args args = new showConfiguration_args(); - args.setNodeId(nodeId); - sendBase("showConfiguration", args); - } - - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp recv_showConfiguration() throws org.apache.thrift.TException - { - showConfiguration_result result = new showConfiguration_result(); - receiveBase(result, "showConfiguration"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "showConfiguration failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus setSchemaTemplate(TSSetSchemaTemplateReq req) throws org.apache.thrift.TException - { - send_setSchemaTemplate(req); - return recv_setSchemaTemplate(); - } - - public void send_setSchemaTemplate(TSSetSchemaTemplateReq req) throws org.apache.thrift.TException - { - setSchemaTemplate_args args = new setSchemaTemplate_args(); - args.setReq(req); - sendBase("setSchemaTemplate", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_setSchemaTemplate() throws org.apache.thrift.TException - { - setSchemaTemplate_result result = new setSchemaTemplate_result(); - receiveBase(result, "setSchemaTemplate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setSchemaTemplate failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus unsetSchemaTemplate(TSUnsetSchemaTemplateReq req) throws org.apache.thrift.TException - { - send_unsetSchemaTemplate(req); - return recv_unsetSchemaTemplate(); - } - - public void send_unsetSchemaTemplate(TSUnsetSchemaTemplateReq req) throws org.apache.thrift.TException - { - unsetSchemaTemplate_args args = new unsetSchemaTemplate_args(); - args.setReq(req); - sendBase("unsetSchemaTemplate", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_unsetSchemaTemplate() throws org.apache.thrift.TException - { - unsetSchemaTemplate_result result = new unsetSchemaTemplate_result(); - receiveBase(result, "unsetSchemaTemplate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unsetSchemaTemplate failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus dropSchemaTemplate(TSDropSchemaTemplateReq req) throws org.apache.thrift.TException - { - send_dropSchemaTemplate(req); - return recv_dropSchemaTemplate(); - } - - public void send_dropSchemaTemplate(TSDropSchemaTemplateReq req) throws org.apache.thrift.TException - { - dropSchemaTemplate_args args = new dropSchemaTemplate_args(); - args.setReq(req); - sendBase("dropSchemaTemplate", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_dropSchemaTemplate() throws org.apache.thrift.TException - { - dropSchemaTemplate_result result = new dropSchemaTemplate_result(); - receiveBase(result, "dropSchemaTemplate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "dropSchemaTemplate failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req) throws org.apache.thrift.TException - { - send_createTimeseriesUsingSchemaTemplate(req); - return recv_createTimeseriesUsingSchemaTemplate(); - } - - public void send_createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req) throws org.apache.thrift.TException - { - createTimeseriesUsingSchemaTemplate_args args = new createTimeseriesUsingSchemaTemplate_args(); - args.setReq(req); - sendBase("createTimeseriesUsingSchemaTemplate", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_createTimeseriesUsingSchemaTemplate() throws org.apache.thrift.TException - { - createTimeseriesUsingSchemaTemplate_result result = new createTimeseriesUsingSchemaTemplate_result(); - receiveBase(result, "createTimeseriesUsingSchemaTemplate"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createTimeseriesUsingSchemaTemplate failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus handshake(TSyncIdentityInfo info) throws org.apache.thrift.TException - { - send_handshake(info); - return recv_handshake(); - } - - public void send_handshake(TSyncIdentityInfo info) throws org.apache.thrift.TException - { - handshake_args args = new handshake_args(); - args.setInfo(info); - sendBase("handshake", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_handshake() throws org.apache.thrift.TException - { - handshake_result result = new handshake_result(); - receiveBase(result, "handshake"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "handshake failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus sendPipeData(java.nio.ByteBuffer buff) throws org.apache.thrift.TException - { - send_sendPipeData(buff); - return recv_sendPipeData(); - } - - public void send_sendPipeData(java.nio.ByteBuffer buff) throws org.apache.thrift.TException - { - sendPipeData_args args = new sendPipeData_args(); - args.setBuff(buff); - sendBase("sendPipeData", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_sendPipeData() throws org.apache.thrift.TException - { - sendPipeData_result result = new sendPipeData_result(); - receiveBase(result, "sendPipeData"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sendPipeData failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff) throws org.apache.thrift.TException - { - send_sendFile(metaInfo, buff); - return recv_sendFile(); - } - - public void send_sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff) throws org.apache.thrift.TException - { - sendFile_args args = new sendFile_args(); - args.setMetaInfo(metaInfo); - args.setBuff(buff); - sendBase("sendFile", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_sendFile() throws org.apache.thrift.TException - { - sendFile_result result = new sendFile_result(); - receiveBase(result, "sendFile"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sendFile failed: unknown result"); - } - - @Override - public TPipeTransferResp pipeTransfer(TPipeTransferReq req) throws org.apache.thrift.TException - { - send_pipeTransfer(req); - return recv_pipeTransfer(); - } - - public void send_pipeTransfer(TPipeTransferReq req) throws org.apache.thrift.TException - { - pipeTransfer_args args = new pipeTransfer_args(); - args.setReq(req); - sendBase("pipeTransfer", args); - } - - public TPipeTransferResp recv_pipeTransfer() throws org.apache.thrift.TException - { - pipeTransfer_result result = new pipeTransfer_result(); - receiveBase(result, "pipeTransfer"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pipeTransfer failed: unknown result"); - } - - @Override - public TPipeSubscribeResp pipeSubscribe(TPipeSubscribeReq req) throws org.apache.thrift.TException - { - send_pipeSubscribe(req); - return recv_pipeSubscribe(); - } - - public void send_pipeSubscribe(TPipeSubscribeReq req) throws org.apache.thrift.TException - { - pipeSubscribe_args args = new pipeSubscribe_args(); - args.setReq(req); - sendBase("pipeSubscribe", args); - } - - public TPipeSubscribeResp recv_pipeSubscribe() throws org.apache.thrift.TException - { - pipeSubscribe_result result = new pipeSubscribe_result(); - receiveBase(result, "pipeSubscribe"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pipeSubscribe failed: unknown result"); - } - - @Override - public TSBackupConfigurationResp getBackupConfiguration() throws org.apache.thrift.TException - { - send_getBackupConfiguration(); - return recv_getBackupConfiguration(); - } - - public void send_getBackupConfiguration() throws org.apache.thrift.TException - { - getBackupConfiguration_args args = new getBackupConfiguration_args(); - sendBase("getBackupConfiguration", args); - } - - public TSBackupConfigurationResp recv_getBackupConfiguration() throws org.apache.thrift.TException - { - getBackupConfiguration_result result = new getBackupConfiguration_result(); - receiveBase(result, "getBackupConfiguration"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBackupConfiguration failed: unknown result"); - } - - @Override - public TSConnectionInfoResp fetchAllConnectionsInfo() throws org.apache.thrift.TException - { - send_fetchAllConnectionsInfo(); - return recv_fetchAllConnectionsInfo(); - } - - public void send_fetchAllConnectionsInfo() throws org.apache.thrift.TException - { - fetchAllConnectionsInfo_args args = new fetchAllConnectionsInfo_args(); - sendBase("fetchAllConnectionsInfo", args); - } - - public TSConnectionInfoResp recv_fetchAllConnectionsInfo() throws org.apache.thrift.TException - { - fetchAllConnectionsInfo_result result = new fetchAllConnectionsInfo_result(); - receiveBase(result, "fetchAllConnectionsInfo"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchAllConnectionsInfo failed: unknown result"); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus testConnectionEmptyRPC() throws org.apache.thrift.TException - { - send_testConnectionEmptyRPC(); - return recv_testConnectionEmptyRPC(); - } - - public void send_testConnectionEmptyRPC() throws org.apache.thrift.TException - { - testConnectionEmptyRPC_args args = new testConnectionEmptyRPC_args(); - sendBase("testConnectionEmptyRPC", args); - } - - public org.apache.iotdb.common.rpc.thrift.TSStatus recv_testConnectionEmptyRPC() throws org.apache.thrift.TException - { - testConnectionEmptyRPC_result result = new testConnectionEmptyRPC_result(); - receiveBase(result, "testConnectionEmptyRPC"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testConnectionEmptyRPC failed: unknown result"); - } - - } - public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { - public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { - private org.apache.thrift.async.TAsyncClientManager clientManager; - private org.apache.thrift.protocol.TProtocolFactory protocolFactory; - public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { - this.clientManager = clientManager; - this.protocolFactory = protocolFactory; - } - @Override - public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { - return new AsyncClient(protocolFactory, clientManager, transport); - } - } - - public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { - super(protocolFactory, clientManager, transport); - } - - @Override - public void executeQueryStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeQueryStatementV2_call method_call = new executeQueryStatementV2_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeQueryStatementV2_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSExecuteStatementReq req; - public executeQueryStatementV2_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeQueryStatementV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeQueryStatementV2_args args = new executeQueryStatementV2_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeQueryStatementV2(); - } - } - - @Override - public void executeUpdateStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeUpdateStatementV2_call method_call = new executeUpdateStatementV2_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeUpdateStatementV2_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSExecuteStatementReq req; - public executeUpdateStatementV2_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeUpdateStatementV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeUpdateStatementV2_args args = new executeUpdateStatementV2_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeUpdateStatementV2(); - } - } - - @Override - public void executeStatementV2(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeStatementV2_call method_call = new executeStatementV2_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeStatementV2_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSExecuteStatementReq req; - public executeStatementV2_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeStatementV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeStatementV2_args args = new executeStatementV2_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeStatementV2(); - } - } - - @Override - public void executeRawDataQueryV2(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeRawDataQueryV2_call method_call = new executeRawDataQueryV2_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeRawDataQueryV2_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSRawDataQueryReq req; - public executeRawDataQueryV2_call(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeRawDataQueryV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeRawDataQueryV2_args args = new executeRawDataQueryV2_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeRawDataQueryV2(); - } - } - - @Override - public void executeLastDataQueryV2(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeLastDataQueryV2_call method_call = new executeLastDataQueryV2_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeLastDataQueryV2_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSLastDataQueryReq req; - public executeLastDataQueryV2_call(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeLastDataQueryV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeLastDataQueryV2_args args = new executeLastDataQueryV2_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeLastDataQueryV2(); - } - } - - @Override - public void executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeFastLastDataQueryForOneDeviceV2_call method_call = new executeFastLastDataQueryForOneDeviceV2_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeFastLastDataQueryForOneDeviceV2_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSFastLastDataQueryForOneDeviceReq req; - public executeFastLastDataQueryForOneDeviceV2_call(TSFastLastDataQueryForOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeFastLastDataQueryForOneDeviceV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeFastLastDataQueryForOneDeviceV2_args args = new executeFastLastDataQueryForOneDeviceV2_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeFastLastDataQueryForOneDeviceV2(); - } - } - - @Override - public void executeAggregationQueryV2(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeAggregationQueryV2_call method_call = new executeAggregationQueryV2_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeAggregationQueryV2_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSAggregationQueryReq req; - public executeAggregationQueryV2_call(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeAggregationQueryV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeAggregationQueryV2_args args = new executeAggregationQueryV2_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeAggregationQueryV2(); - } - } - - @Override - public void executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeGroupByQueryIntervalQuery_call method_call = new executeGroupByQueryIntervalQuery_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeGroupByQueryIntervalQuery_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSGroupByQueryIntervalReq req; - public executeGroupByQueryIntervalQuery_call(TSGroupByQueryIntervalReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeGroupByQueryIntervalQuery", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeGroupByQueryIntervalQuery_args args = new executeGroupByQueryIntervalQuery_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeGroupByQueryIntervalQuery(); - } - } - - @Override - public void fetchResultsV2(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - fetchResultsV2_call method_call = new fetchResultsV2_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class fetchResultsV2_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSFetchResultsReq req; - public fetchResultsV2_call(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchResultsV2", org.apache.thrift.protocol.TMessageType.CALL, 0)); - fetchResultsV2_args args = new fetchResultsV2_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSFetchResultsResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_fetchResultsV2(); - } - } - - @Override - public void openSession(TSOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - openSession_call method_call = new openSession_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class openSession_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSOpenSessionReq req; - public openSession_call(TSOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("openSession", org.apache.thrift.protocol.TMessageType.CALL, 0)); - openSession_args args = new openSession_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSOpenSessionResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_openSession(); - } - } - - @Override - public void closeSession(TSCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - closeSession_call method_call = new closeSession_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class closeSession_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSCloseSessionReq req; - public closeSession_call(TSCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeSession", org.apache.thrift.protocol.TMessageType.CALL, 0)); - closeSession_args args = new closeSession_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_closeSession(); - } - } - - @Override - public void executeStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeStatement_call method_call = new executeStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeStatement_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSExecuteStatementReq req; - public executeStatement_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeStatement", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeStatement_args args = new executeStatement_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeStatement(); - } - } - - @Override - public void executeBatchStatement(TSExecuteBatchStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeBatchStatement_call method_call = new executeBatchStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeBatchStatement_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSExecuteBatchStatementReq req; - public executeBatchStatement_call(TSExecuteBatchStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeBatchStatement", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeBatchStatement_args args = new executeBatchStatement_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeBatchStatement(); - } - } - - @Override - public void executeQueryStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeQueryStatement_call method_call = new executeQueryStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeQueryStatement_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSExecuteStatementReq req; - public executeQueryStatement_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeQueryStatement", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeQueryStatement_args args = new executeQueryStatement_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeQueryStatement(); - } - } - - @Override - public void executeUpdateStatement(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeUpdateStatement_call method_call = new executeUpdateStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeUpdateStatement_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSExecuteStatementReq req; - public executeUpdateStatement_call(TSExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeUpdateStatement", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeUpdateStatement_args args = new executeUpdateStatement_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeUpdateStatement(); - } - } - - @Override - public void fetchResults(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - fetchResults_call method_call = new fetchResults_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class fetchResults_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSFetchResultsReq req; - public fetchResults_call(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchResults", org.apache.thrift.protocol.TMessageType.CALL, 0)); - fetchResults_args args = new fetchResults_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSFetchResultsResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_fetchResults(); - } - } - - @Override - public void fetchMetadata(TSFetchMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - fetchMetadata_call method_call = new fetchMetadata_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class fetchMetadata_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSFetchMetadataReq req; - public fetchMetadata_call(TSFetchMetadataReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); - fetchMetadata_args args = new fetchMetadata_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSFetchMetadataResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_fetchMetadata(); - } - } - - @Override - public void cancelOperation(TSCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - cancelOperation_call method_call = new cancelOperation_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class cancelOperation_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSCancelOperationReq req; - public cancelOperation_call(TSCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelOperation", org.apache.thrift.protocol.TMessageType.CALL, 0)); - cancelOperation_args args = new cancelOperation_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_cancelOperation(); - } - } - - @Override - public void closeOperation(TSCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - closeOperation_call method_call = new closeOperation_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class closeOperation_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSCloseOperationReq req; - public closeOperation_call(TSCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeOperation", org.apache.thrift.protocol.TMessageType.CALL, 0)); - closeOperation_args args = new closeOperation_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_closeOperation(); - } - } - - @Override - public void getTimeZone(long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getTimeZone_call method_call = new getTimeZone_call(sessionId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getTimeZone_call extends org.apache.thrift.async.TAsyncMethodCall { - private long sessionId; - public getTimeZone_call(long sessionId, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTimeZone", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getTimeZone_args args = new getTimeZone_args(); - args.setSessionId(sessionId); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSGetTimeZoneResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getTimeZone(); - } - } - - @Override - public void setTimeZone(TSSetTimeZoneReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - setTimeZone_call method_call = new setTimeZone_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class setTimeZone_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSSetTimeZoneReq req; - public setTimeZone_call(TSSetTimeZoneReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setTimeZone", org.apache.thrift.protocol.TMessageType.CALL, 0)); - setTimeZone_args args = new setTimeZone_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_setTimeZone(); - } - } - - @Override - public void getProperties(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getProperties_call method_call = new getProperties_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getProperties_call extends org.apache.thrift.async.TAsyncMethodCall { - public getProperties_call(org.apache.thrift.async.AsyncMethodCallback 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); - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getProperties", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getProperties_args args = new getProperties_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public ServerProperties getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getProperties(); - } - } - - @Override - public void setStorageGroup(long sessionId, java.lang.String storageGroup, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - setStorageGroup_call method_call = new setStorageGroup_call(sessionId, storageGroup, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class setStorageGroup_call extends org.apache.thrift.async.TAsyncMethodCall { - private long sessionId; - private java.lang.String storageGroup; - public setStorageGroup_call(long sessionId, java.lang.String storageGroup, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; - this.storageGroup = storageGroup; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setStorageGroup", org.apache.thrift.protocol.TMessageType.CALL, 0)); - setStorageGroup_args args = new setStorageGroup_args(); - args.setSessionId(sessionId); - args.setStorageGroup(storageGroup); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_setStorageGroup(); - } - } - - @Override - public void createTimeseries(TSCreateTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - createTimeseries_call method_call = new createTimeseries_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class createTimeseries_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSCreateTimeseriesReq req; - public createTimeseries_call(TSCreateTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createTimeseries", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createTimeseries_args args = new createTimeseries_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_createTimeseries(); - } - } - - @Override - public void createAlignedTimeseries(TSCreateAlignedTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - createAlignedTimeseries_call method_call = new createAlignedTimeseries_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class createAlignedTimeseries_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSCreateAlignedTimeseriesReq req; - public createAlignedTimeseries_call(TSCreateAlignedTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createAlignedTimeseries", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createAlignedTimeseries_args args = new createAlignedTimeseries_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_createAlignedTimeseries(); - } - } - - @Override - public void createMultiTimeseries(TSCreateMultiTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - createMultiTimeseries_call method_call = new createMultiTimeseries_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class createMultiTimeseries_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSCreateMultiTimeseriesReq req; - public createMultiTimeseries_call(TSCreateMultiTimeseriesReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createMultiTimeseries", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createMultiTimeseries_args args = new createMultiTimeseries_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_createMultiTimeseries(); - } - } - - @Override - public void deleteTimeseries(long sessionId, java.util.List path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - deleteTimeseries_call method_call = new deleteTimeseries_call(sessionId, path, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class deleteTimeseries_call extends org.apache.thrift.async.TAsyncMethodCall { - private long sessionId; - private java.util.List path; - public deleteTimeseries_call(long sessionId, java.util.List path, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; - this.path = path; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteTimeseries", org.apache.thrift.protocol.TMessageType.CALL, 0)); - deleteTimeseries_args args = new deleteTimeseries_args(); - args.setSessionId(sessionId); - args.setPath(path); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_deleteTimeseries(); - } - } - - @Override - public void deleteStorageGroups(long sessionId, java.util.List storageGroup, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - deleteStorageGroups_call method_call = new deleteStorageGroups_call(sessionId, storageGroup, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class deleteStorageGroups_call extends org.apache.thrift.async.TAsyncMethodCall { - private long sessionId; - private java.util.List storageGroup; - public deleteStorageGroups_call(long sessionId, java.util.List storageGroup, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; - this.storageGroup = storageGroup; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteStorageGroups", org.apache.thrift.protocol.TMessageType.CALL, 0)); - deleteStorageGroups_args args = new deleteStorageGroups_args(); - args.setSessionId(sessionId); - args.setStorageGroup(storageGroup); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_deleteStorageGroups(); - } - } - - @Override - public void insertRecord(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - insertRecord_call method_call = new insertRecord_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class insertRecord_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertRecordReq req; - public insertRecord_call(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertRecord", org.apache.thrift.protocol.TMessageType.CALL, 0)); - insertRecord_args args = new insertRecord_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_insertRecord(); - } - } - - @Override - public void insertStringRecord(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - insertStringRecord_call method_call = new insertStringRecord_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class insertStringRecord_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertStringRecordReq req; - public insertStringRecord_call(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertStringRecord", org.apache.thrift.protocol.TMessageType.CALL, 0)); - insertStringRecord_args args = new insertStringRecord_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_insertStringRecord(); - } - } - - @Override - public void insertTablet(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - insertTablet_call method_call = new insertTablet_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class insertTablet_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertTabletReq req; - public insertTablet_call(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertTablet", org.apache.thrift.protocol.TMessageType.CALL, 0)); - insertTablet_args args = new insertTablet_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_insertTablet(); - } - } - - @Override - public void insertTablets(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - insertTablets_call method_call = new insertTablets_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class insertTablets_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertTabletsReq req; - public insertTablets_call(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertTablets", org.apache.thrift.protocol.TMessageType.CALL, 0)); - insertTablets_args args = new insertTablets_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_insertTablets(); - } - } - - @Override - public void insertRecords(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - insertRecords_call method_call = new insertRecords_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class insertRecords_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertRecordsReq req; - public insertRecords_call(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertRecords", org.apache.thrift.protocol.TMessageType.CALL, 0)); - insertRecords_args args = new insertRecords_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_insertRecords(); - } - } - - @Override - public void insertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - insertRecordsOfOneDevice_call method_call = new insertRecordsOfOneDevice_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class insertRecordsOfOneDevice_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertRecordsOfOneDeviceReq req; - public insertRecordsOfOneDevice_call(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertRecordsOfOneDevice", org.apache.thrift.protocol.TMessageType.CALL, 0)); - insertRecordsOfOneDevice_args args = new insertRecordsOfOneDevice_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_insertRecordsOfOneDevice(); - } - } - - @Override - public void insertStringRecordsOfOneDevice(TSInsertStringRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - insertStringRecordsOfOneDevice_call method_call = new insertStringRecordsOfOneDevice_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class insertStringRecordsOfOneDevice_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertStringRecordsOfOneDeviceReq req; - public insertStringRecordsOfOneDevice_call(TSInsertStringRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertStringRecordsOfOneDevice", org.apache.thrift.protocol.TMessageType.CALL, 0)); - insertStringRecordsOfOneDevice_args args = new insertStringRecordsOfOneDevice_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_insertStringRecordsOfOneDevice(); - } - } - - @Override - public void insertStringRecords(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - insertStringRecords_call method_call = new insertStringRecords_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class insertStringRecords_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertStringRecordsReq req; - public insertStringRecords_call(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertStringRecords", org.apache.thrift.protocol.TMessageType.CALL, 0)); - insertStringRecords_args args = new insertStringRecords_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_insertStringRecords(); - } - } - - @Override - public void testInsertTablet(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - testInsertTablet_call method_call = new testInsertTablet_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class testInsertTablet_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertTabletReq req; - public testInsertTablet_call(TSInsertTabletReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertTablet", org.apache.thrift.protocol.TMessageType.CALL, 0)); - testInsertTablet_args args = new testInsertTablet_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_testInsertTablet(); - } - } - - @Override - public void testInsertTablets(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - testInsertTablets_call method_call = new testInsertTablets_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class testInsertTablets_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertTabletsReq req; - public testInsertTablets_call(TSInsertTabletsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertTablets", org.apache.thrift.protocol.TMessageType.CALL, 0)); - testInsertTablets_args args = new testInsertTablets_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_testInsertTablets(); - } - } - - @Override - public void testInsertRecord(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - testInsertRecord_call method_call = new testInsertRecord_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class testInsertRecord_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertRecordReq req; - public testInsertRecord_call(TSInsertRecordReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertRecord", org.apache.thrift.protocol.TMessageType.CALL, 0)); - testInsertRecord_args args = new testInsertRecord_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_testInsertRecord(); - } - } - - @Override - public void testInsertStringRecord(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - testInsertStringRecord_call method_call = new testInsertStringRecord_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class testInsertStringRecord_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertStringRecordReq req; - public testInsertStringRecord_call(TSInsertStringRecordReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertStringRecord", org.apache.thrift.protocol.TMessageType.CALL, 0)); - testInsertStringRecord_args args = new testInsertStringRecord_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_testInsertStringRecord(); - } - } - - @Override - public void testInsertRecords(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - testInsertRecords_call method_call = new testInsertRecords_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class testInsertRecords_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertRecordsReq req; - public testInsertRecords_call(TSInsertRecordsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertRecords", org.apache.thrift.protocol.TMessageType.CALL, 0)); - testInsertRecords_args args = new testInsertRecords_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_testInsertRecords(); - } - } - - @Override - public void testInsertRecordsOfOneDevice(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - testInsertRecordsOfOneDevice_call method_call = new testInsertRecordsOfOneDevice_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class testInsertRecordsOfOneDevice_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertRecordsOfOneDeviceReq req; - public testInsertRecordsOfOneDevice_call(TSInsertRecordsOfOneDeviceReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertRecordsOfOneDevice", org.apache.thrift.protocol.TMessageType.CALL, 0)); - testInsertRecordsOfOneDevice_args args = new testInsertRecordsOfOneDevice_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_testInsertRecordsOfOneDevice(); - } - } - - @Override - public void testInsertStringRecords(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - testInsertStringRecords_call method_call = new testInsertStringRecords_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class testInsertStringRecords_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSInsertStringRecordsReq req; - public testInsertStringRecords_call(TSInsertStringRecordsReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testInsertStringRecords", org.apache.thrift.protocol.TMessageType.CALL, 0)); - testInsertStringRecords_args args = new testInsertStringRecords_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_testInsertStringRecords(); - } - } - - @Override - public void deleteData(TSDeleteDataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - deleteData_call method_call = new deleteData_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class deleteData_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSDeleteDataReq req; - public deleteData_call(TSDeleteDataReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteData", org.apache.thrift.protocol.TMessageType.CALL, 0)); - deleteData_args args = new deleteData_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_deleteData(); - } - } - - @Override - public void executeRawDataQuery(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeRawDataQuery_call method_call = new executeRawDataQuery_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeRawDataQuery_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSRawDataQueryReq req; - public executeRawDataQuery_call(TSRawDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeRawDataQuery", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeRawDataQuery_args args = new executeRawDataQuery_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeRawDataQuery(); - } - } - - @Override - public void executeLastDataQuery(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeLastDataQuery_call method_call = new executeLastDataQuery_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeLastDataQuery_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSLastDataQueryReq req; - public executeLastDataQuery_call(TSLastDataQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeLastDataQuery", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeLastDataQuery_args args = new executeLastDataQuery_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeLastDataQuery(); - } - } - - @Override - public void executeAggregationQuery(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - executeAggregationQuery_call method_call = new executeAggregationQuery_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class executeAggregationQuery_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSAggregationQueryReq req; - public executeAggregationQuery_call(TSAggregationQueryReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeAggregationQuery", org.apache.thrift.protocol.TMessageType.CALL, 0)); - executeAggregationQuery_args args = new executeAggregationQuery_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSExecuteStatementResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_executeAggregationQuery(); - } - } - - @Override - public void requestStatementId(long sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - requestStatementId_call method_call = new requestStatementId_call(sessionId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class requestStatementId_call extends org.apache.thrift.async.TAsyncMethodCall { - private long sessionId; - public requestStatementId_call(long sessionId, org.apache.thrift.async.AsyncMethodCallback 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.sessionId = sessionId; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestStatementId", org.apache.thrift.protocol.TMessageType.CALL, 0)); - requestStatementId_args args = new requestStatementId_args(); - args.setSessionId(sessionId); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public java.lang.Long getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_requestStatementId(); - } - } - - @Override - public void createSchemaTemplate(TSCreateSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - createSchemaTemplate_call method_call = new createSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class createSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSCreateSchemaTemplateReq req; - public createSchemaTemplate_call(TSCreateSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createSchemaTemplate_args args = new createSchemaTemplate_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_createSchemaTemplate(); - } - } - - @Override - public void appendSchemaTemplate(TSAppendSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - appendSchemaTemplate_call method_call = new appendSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class appendSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSAppendSchemaTemplateReq req; - public appendSchemaTemplate_call(TSAppendSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("appendSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - appendSchemaTemplate_args args = new appendSchemaTemplate_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_appendSchemaTemplate(); - } - } - - @Override - public void pruneSchemaTemplate(TSPruneSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - pruneSchemaTemplate_call method_call = new pruneSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class pruneSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSPruneSchemaTemplateReq req; - public pruneSchemaTemplate_call(TSPruneSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pruneSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - pruneSchemaTemplate_args args = new pruneSchemaTemplate_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_pruneSchemaTemplate(); - } - } - - @Override - public void querySchemaTemplate(TSQueryTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - querySchemaTemplate_call method_call = new querySchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class querySchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSQueryTemplateReq req; - public querySchemaTemplate_call(TSQueryTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("querySchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - querySchemaTemplate_args args = new querySchemaTemplate_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSQueryTemplateResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_querySchemaTemplate(); - } - } - - @Override - public void showConfigurationTemplate(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - showConfigurationTemplate_call method_call = new showConfigurationTemplate_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class showConfigurationTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { - public showConfigurationTemplate_call(org.apache.thrift.async.AsyncMethodCallback 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); - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("showConfigurationTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - showConfigurationTemplate_args args = new showConfigurationTemplate_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_showConfigurationTemplate(); - } - } - - @Override - public void showConfiguration(int nodeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - showConfiguration_call method_call = new showConfiguration_call(nodeId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class showConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall { - private int nodeId; - public showConfiguration_call(int nodeId, org.apache.thrift.async.AsyncMethodCallback 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.nodeId = nodeId; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("showConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0)); - showConfiguration_args args = new showConfiguration_args(); - args.setNodeId(nodeId); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_showConfiguration(); - } - } - - @Override - public void setSchemaTemplate(TSSetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - setSchemaTemplate_call method_call = new setSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class setSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSSetSchemaTemplateReq req; - public setSchemaTemplate_call(TSSetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - setSchemaTemplate_args args = new setSchemaTemplate_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_setSchemaTemplate(); - } - } - - @Override - public void unsetSchemaTemplate(TSUnsetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - unsetSchemaTemplate_call method_call = new unsetSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class unsetSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSUnsetSchemaTemplateReq req; - public unsetSchemaTemplate_call(TSUnsetSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unsetSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - unsetSchemaTemplate_args args = new unsetSchemaTemplate_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_unsetSchemaTemplate(); - } - } - - @Override - public void dropSchemaTemplate(TSDropSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - dropSchemaTemplate_call method_call = new dropSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class dropSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSDropSchemaTemplateReq req; - public dropSchemaTemplate_call(TSDropSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("dropSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - dropSchemaTemplate_args args = new dropSchemaTemplate_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_dropSchemaTemplate(); - } - } - - @Override - public void createTimeseriesUsingSchemaTemplate(TCreateTimeseriesUsingSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - createTimeseriesUsingSchemaTemplate_call method_call = new createTimeseriesUsingSchemaTemplate_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class createTimeseriesUsingSchemaTemplate_call extends org.apache.thrift.async.TAsyncMethodCall { - private TCreateTimeseriesUsingSchemaTemplateReq req; - public createTimeseriesUsingSchemaTemplate_call(TCreateTimeseriesUsingSchemaTemplateReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createTimeseriesUsingSchemaTemplate", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createTimeseriesUsingSchemaTemplate_args args = new createTimeseriesUsingSchemaTemplate_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_createTimeseriesUsingSchemaTemplate(); - } - } - - @Override - public void handshake(TSyncIdentityInfo info, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - handshake_call method_call = new handshake_call(info, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class handshake_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSyncIdentityInfo info; - public handshake_call(TSyncIdentityInfo info, org.apache.thrift.async.AsyncMethodCallback 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.info = info; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("handshake", org.apache.thrift.protocol.TMessageType.CALL, 0)); - handshake_args args = new handshake_args(); - args.setInfo(info); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_handshake(); - } - } - - @Override - public void sendPipeData(java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - sendPipeData_call method_call = new sendPipeData_call(buff, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class sendPipeData_call extends org.apache.thrift.async.TAsyncMethodCall { - private java.nio.ByteBuffer buff; - public sendPipeData_call(java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback 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.buff = buff; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendPipeData", org.apache.thrift.protocol.TMessageType.CALL, 0)); - sendPipeData_args args = new sendPipeData_args(); - args.setBuff(buff); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_sendPipeData(); - } - } - - @Override - public void sendFile(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - sendFile_call method_call = new sendFile_call(metaInfo, buff, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class sendFile_call extends org.apache.thrift.async.TAsyncMethodCall { - private TSyncTransportMetaInfo metaInfo; - private java.nio.ByteBuffer buff; - public sendFile_call(TSyncTransportMetaInfo metaInfo, java.nio.ByteBuffer buff, org.apache.thrift.async.AsyncMethodCallback 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.metaInfo = metaInfo; - this.buff = buff; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - sendFile_args args = new sendFile_args(); - args.setMetaInfo(metaInfo); - args.setBuff(buff); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_sendFile(); - } - } - - @Override - public void pipeTransfer(TPipeTransferReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - pipeTransfer_call method_call = new pipeTransfer_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class pipeTransfer_call extends org.apache.thrift.async.TAsyncMethodCall { - private TPipeTransferReq req; - public pipeTransfer_call(TPipeTransferReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pipeTransfer", org.apache.thrift.protocol.TMessageType.CALL, 0)); - pipeTransfer_args args = new pipeTransfer_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TPipeTransferResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_pipeTransfer(); - } - } - - @Override - public void pipeSubscribe(TPipeSubscribeReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - pipeSubscribe_call method_call = new pipeSubscribe_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class pipeSubscribe_call extends org.apache.thrift.async.TAsyncMethodCall { - private TPipeSubscribeReq req; - public pipeSubscribe_call(TPipeSubscribeReq req, org.apache.thrift.async.AsyncMethodCallback 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.req = req; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pipeSubscribe", org.apache.thrift.protocol.TMessageType.CALL, 0)); - pipeSubscribe_args args = new pipeSubscribe_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TPipeSubscribeResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_pipeSubscribe(); - } - } - - @Override - public void getBackupConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getBackupConfiguration_call method_call = new getBackupConfiguration_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getBackupConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall { - public getBackupConfiguration_call(org.apache.thrift.async.AsyncMethodCallback 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); - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBackupConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getBackupConfiguration_args args = new getBackupConfiguration_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSBackupConfigurationResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getBackupConfiguration(); - } - } - - @Override - public void fetchAllConnectionsInfo(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - fetchAllConnectionsInfo_call method_call = new fetchAllConnectionsInfo_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class fetchAllConnectionsInfo_call extends org.apache.thrift.async.TAsyncMethodCall { - public fetchAllConnectionsInfo_call(org.apache.thrift.async.AsyncMethodCallback 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); - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchAllConnectionsInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); - fetchAllConnectionsInfo_args args = new fetchAllConnectionsInfo_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public TSConnectionInfoResp getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_fetchAllConnectionsInfo(); - } - } - - @Override - public void testConnectionEmptyRPC(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - testConnectionEmptyRPC_call method_call = new testConnectionEmptyRPC_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class testConnectionEmptyRPC_call extends org.apache.thrift.async.TAsyncMethodCall { - public testConnectionEmptyRPC_call(org.apache.thrift.async.AsyncMethodCallback 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); - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testConnectionEmptyRPC", org.apache.thrift.protocol.TMessageType.CALL, 0)); - testConnectionEmptyRPC_args args = new testConnectionEmptyRPC_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public org.apache.iotdb.common.rpc.thrift.TSStatus getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_testConnectionEmptyRPC(); - } - } - - } - - public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new java.util.HashMap>())); - } - - protected Processor(I iface, java.util.Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static java.util.Map> getProcessMap(java.util.Map> processMap) { - processMap.put("executeQueryStatementV2", new executeQueryStatementV2()); - processMap.put("executeUpdateStatementV2", new executeUpdateStatementV2()); - processMap.put("executeStatementV2", new executeStatementV2()); - processMap.put("executeRawDataQueryV2", new executeRawDataQueryV2()); - processMap.put("executeLastDataQueryV2", new executeLastDataQueryV2()); - processMap.put("executeFastLastDataQueryForOneDeviceV2", new executeFastLastDataQueryForOneDeviceV2()); - processMap.put("executeAggregationQueryV2", new executeAggregationQueryV2()); - processMap.put("executeGroupByQueryIntervalQuery", new executeGroupByQueryIntervalQuery()); - processMap.put("fetchResultsV2", new fetchResultsV2()); - processMap.put("openSession", new openSession()); - processMap.put("closeSession", new closeSession()); - processMap.put("executeStatement", new executeStatement()); - processMap.put("executeBatchStatement", new executeBatchStatement()); - processMap.put("executeQueryStatement", new executeQueryStatement()); - processMap.put("executeUpdateStatement", new executeUpdateStatement()); - processMap.put("fetchResults", new fetchResults()); - processMap.put("fetchMetadata", new fetchMetadata()); - processMap.put("cancelOperation", new cancelOperation()); - processMap.put("closeOperation", new closeOperation()); - processMap.put("getTimeZone", new getTimeZone()); - processMap.put("setTimeZone", new setTimeZone()); - processMap.put("getProperties", new getProperties()); - processMap.put("setStorageGroup", new setStorageGroup()); - processMap.put("createTimeseries", new createTimeseries()); - processMap.put("createAlignedTimeseries", new createAlignedTimeseries()); - processMap.put("createMultiTimeseries", new createMultiTimeseries()); - processMap.put("deleteTimeseries", new deleteTimeseries()); - processMap.put("deleteStorageGroups", new deleteStorageGroups()); - processMap.put("insertRecord", new insertRecord()); - processMap.put("insertStringRecord", new insertStringRecord()); - processMap.put("insertTablet", new insertTablet()); - processMap.put("insertTablets", new insertTablets()); - processMap.put("insertRecords", new insertRecords()); - processMap.put("insertRecordsOfOneDevice", new insertRecordsOfOneDevice()); - processMap.put("insertStringRecordsOfOneDevice", new insertStringRecordsOfOneDevice()); - processMap.put("insertStringRecords", new insertStringRecords()); - processMap.put("testInsertTablet", new testInsertTablet()); - processMap.put("testInsertTablets", new testInsertTablets()); - processMap.put("testInsertRecord", new testInsertRecord()); - processMap.put("testInsertStringRecord", new testInsertStringRecord()); - processMap.put("testInsertRecords", new testInsertRecords()); - processMap.put("testInsertRecordsOfOneDevice", new testInsertRecordsOfOneDevice()); - processMap.put("testInsertStringRecords", new testInsertStringRecords()); - processMap.put("deleteData", new deleteData()); - processMap.put("executeRawDataQuery", new executeRawDataQuery()); - processMap.put("executeLastDataQuery", new executeLastDataQuery()); - processMap.put("executeAggregationQuery", new executeAggregationQuery()); - processMap.put("requestStatementId", new requestStatementId()); - processMap.put("createSchemaTemplate", new createSchemaTemplate()); - processMap.put("appendSchemaTemplate", new appendSchemaTemplate()); - processMap.put("pruneSchemaTemplate", new pruneSchemaTemplate()); - processMap.put("querySchemaTemplate", new querySchemaTemplate()); - processMap.put("showConfigurationTemplate", new showConfigurationTemplate()); - processMap.put("showConfiguration", new showConfiguration()); - processMap.put("setSchemaTemplate", new setSchemaTemplate()); - processMap.put("unsetSchemaTemplate", new unsetSchemaTemplate()); - processMap.put("dropSchemaTemplate", new dropSchemaTemplate()); - processMap.put("createTimeseriesUsingSchemaTemplate", new createTimeseriesUsingSchemaTemplate()); - processMap.put("handshake", new handshake()); - processMap.put("sendPipeData", new sendPipeData()); - processMap.put("sendFile", new sendFile()); - processMap.put("pipeTransfer", new pipeTransfer()); - processMap.put("pipeSubscribe", new pipeSubscribe()); - processMap.put("getBackupConfiguration", new getBackupConfiguration()); - processMap.put("fetchAllConnectionsInfo", new fetchAllConnectionsInfo()); - processMap.put("testConnectionEmptyRPC", new testConnectionEmptyRPC()); - return processMap; - } - - public static class executeQueryStatementV2 extends org.apache.thrift.ProcessFunction { - public executeQueryStatementV2() { - super("executeQueryStatementV2"); - } - - @Override - public executeQueryStatementV2_args getEmptyArgsInstance() { - return new executeQueryStatementV2_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeQueryStatementV2_result getResult(I iface, executeQueryStatementV2_args args) throws org.apache.thrift.TException { - executeQueryStatementV2_result result = new executeQueryStatementV2_result(); - result.success = iface.executeQueryStatementV2(args.req); - return result; - } - } - - public static class executeUpdateStatementV2 extends org.apache.thrift.ProcessFunction { - public executeUpdateStatementV2() { - super("executeUpdateStatementV2"); - } - - @Override - public executeUpdateStatementV2_args getEmptyArgsInstance() { - return new executeUpdateStatementV2_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeUpdateStatementV2_result getResult(I iface, executeUpdateStatementV2_args args) throws org.apache.thrift.TException { - executeUpdateStatementV2_result result = new executeUpdateStatementV2_result(); - result.success = iface.executeUpdateStatementV2(args.req); - return result; - } - } - - public static class executeStatementV2 extends org.apache.thrift.ProcessFunction { - public executeStatementV2() { - super("executeStatementV2"); - } - - @Override - public executeStatementV2_args getEmptyArgsInstance() { - return new executeStatementV2_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeStatementV2_result getResult(I iface, executeStatementV2_args args) throws org.apache.thrift.TException { - executeStatementV2_result result = new executeStatementV2_result(); - result.success = iface.executeStatementV2(args.req); - return result; - } - } - - public static class executeRawDataQueryV2 extends org.apache.thrift.ProcessFunction { - public executeRawDataQueryV2() { - super("executeRawDataQueryV2"); - } - - @Override - public executeRawDataQueryV2_args getEmptyArgsInstance() { - return new executeRawDataQueryV2_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeRawDataQueryV2_result getResult(I iface, executeRawDataQueryV2_args args) throws org.apache.thrift.TException { - executeRawDataQueryV2_result result = new executeRawDataQueryV2_result(); - result.success = iface.executeRawDataQueryV2(args.req); - return result; - } - } - - public static class executeLastDataQueryV2 extends org.apache.thrift.ProcessFunction { - public executeLastDataQueryV2() { - super("executeLastDataQueryV2"); - } - - @Override - public executeLastDataQueryV2_args getEmptyArgsInstance() { - return new executeLastDataQueryV2_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeLastDataQueryV2_result getResult(I iface, executeLastDataQueryV2_args args) throws org.apache.thrift.TException { - executeLastDataQueryV2_result result = new executeLastDataQueryV2_result(); - result.success = iface.executeLastDataQueryV2(args.req); - return result; - } - } - - public static class executeFastLastDataQueryForOneDeviceV2 extends org.apache.thrift.ProcessFunction { - public executeFastLastDataQueryForOneDeviceV2() { - super("executeFastLastDataQueryForOneDeviceV2"); - } - - @Override - public executeFastLastDataQueryForOneDeviceV2_args getEmptyArgsInstance() { - return new executeFastLastDataQueryForOneDeviceV2_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeFastLastDataQueryForOneDeviceV2_result getResult(I iface, executeFastLastDataQueryForOneDeviceV2_args args) throws org.apache.thrift.TException { - executeFastLastDataQueryForOneDeviceV2_result result = new executeFastLastDataQueryForOneDeviceV2_result(); - result.success = iface.executeFastLastDataQueryForOneDeviceV2(args.req); - return result; - } - } - - public static class executeAggregationQueryV2 extends org.apache.thrift.ProcessFunction { - public executeAggregationQueryV2() { - super("executeAggregationQueryV2"); - } - - @Override - public executeAggregationQueryV2_args getEmptyArgsInstance() { - return new executeAggregationQueryV2_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeAggregationQueryV2_result getResult(I iface, executeAggregationQueryV2_args args) throws org.apache.thrift.TException { - executeAggregationQueryV2_result result = new executeAggregationQueryV2_result(); - result.success = iface.executeAggregationQueryV2(args.req); - return result; - } - } - - public static class executeGroupByQueryIntervalQuery extends org.apache.thrift.ProcessFunction { - public executeGroupByQueryIntervalQuery() { - super("executeGroupByQueryIntervalQuery"); - } - - @Override - public executeGroupByQueryIntervalQuery_args getEmptyArgsInstance() { - return new executeGroupByQueryIntervalQuery_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeGroupByQueryIntervalQuery_result getResult(I iface, executeGroupByQueryIntervalQuery_args args) throws org.apache.thrift.TException { - executeGroupByQueryIntervalQuery_result result = new executeGroupByQueryIntervalQuery_result(); - result.success = iface.executeGroupByQueryIntervalQuery(args.req); - return result; - } - } - - public static class fetchResultsV2 extends org.apache.thrift.ProcessFunction { - public fetchResultsV2() { - super("fetchResultsV2"); - } - - @Override - public fetchResultsV2_args getEmptyArgsInstance() { - return new fetchResultsV2_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public fetchResultsV2_result getResult(I iface, fetchResultsV2_args args) throws org.apache.thrift.TException { - fetchResultsV2_result result = new fetchResultsV2_result(); - result.success = iface.fetchResultsV2(args.req); - return result; - } - } - - public static class openSession extends org.apache.thrift.ProcessFunction { - public openSession() { - super("openSession"); - } - - @Override - public openSession_args getEmptyArgsInstance() { - return new openSession_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public openSession_result getResult(I iface, openSession_args args) throws org.apache.thrift.TException { - openSession_result result = new openSession_result(); - result.success = iface.openSession(args.req); - return result; - } - } - - public static class closeSession extends org.apache.thrift.ProcessFunction { - public closeSession() { - super("closeSession"); - } - - @Override - public closeSession_args getEmptyArgsInstance() { - return new closeSession_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public closeSession_result getResult(I iface, closeSession_args args) throws org.apache.thrift.TException { - closeSession_result result = new closeSession_result(); - result.success = iface.closeSession(args.req); - return result; - } - } - - public static class executeStatement extends org.apache.thrift.ProcessFunction { - public executeStatement() { - super("executeStatement"); - } - - @Override - public executeStatement_args getEmptyArgsInstance() { - return new executeStatement_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeStatement_result getResult(I iface, executeStatement_args args) throws org.apache.thrift.TException { - executeStatement_result result = new executeStatement_result(); - result.success = iface.executeStatement(args.req); - return result; - } - } - - public static class executeBatchStatement extends org.apache.thrift.ProcessFunction { - public executeBatchStatement() { - super("executeBatchStatement"); - } - - @Override - public executeBatchStatement_args getEmptyArgsInstance() { - return new executeBatchStatement_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeBatchStatement_result getResult(I iface, executeBatchStatement_args args) throws org.apache.thrift.TException { - executeBatchStatement_result result = new executeBatchStatement_result(); - result.success = iface.executeBatchStatement(args.req); - return result; - } - } - - public static class executeQueryStatement extends org.apache.thrift.ProcessFunction { - public executeQueryStatement() { - super("executeQueryStatement"); - } - - @Override - public executeQueryStatement_args getEmptyArgsInstance() { - return new executeQueryStatement_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeQueryStatement_result getResult(I iface, executeQueryStatement_args args) throws org.apache.thrift.TException { - executeQueryStatement_result result = new executeQueryStatement_result(); - result.success = iface.executeQueryStatement(args.req); - return result; - } - } - - public static class executeUpdateStatement extends org.apache.thrift.ProcessFunction { - public executeUpdateStatement() { - super("executeUpdateStatement"); - } - - @Override - public executeUpdateStatement_args getEmptyArgsInstance() { - return new executeUpdateStatement_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeUpdateStatement_result getResult(I iface, executeUpdateStatement_args args) throws org.apache.thrift.TException { - executeUpdateStatement_result result = new executeUpdateStatement_result(); - result.success = iface.executeUpdateStatement(args.req); - return result; - } - } - - public static class fetchResults extends org.apache.thrift.ProcessFunction { - public fetchResults() { - super("fetchResults"); - } - - @Override - public fetchResults_args getEmptyArgsInstance() { - return new fetchResults_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public fetchResults_result getResult(I iface, fetchResults_args args) throws org.apache.thrift.TException { - fetchResults_result result = new fetchResults_result(); - result.success = iface.fetchResults(args.req); - return result; - } - } - - public static class fetchMetadata extends org.apache.thrift.ProcessFunction { - public fetchMetadata() { - super("fetchMetadata"); - } - - @Override - public fetchMetadata_args getEmptyArgsInstance() { - return new fetchMetadata_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public fetchMetadata_result getResult(I iface, fetchMetadata_args args) throws org.apache.thrift.TException { - fetchMetadata_result result = new fetchMetadata_result(); - result.success = iface.fetchMetadata(args.req); - return result; - } - } - - public static class cancelOperation extends org.apache.thrift.ProcessFunction { - public cancelOperation() { - super("cancelOperation"); - } - - @Override - public cancelOperation_args getEmptyArgsInstance() { - return new cancelOperation_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public cancelOperation_result getResult(I iface, cancelOperation_args args) throws org.apache.thrift.TException { - cancelOperation_result result = new cancelOperation_result(); - result.success = iface.cancelOperation(args.req); - return result; - } - } - - public static class closeOperation extends org.apache.thrift.ProcessFunction { - public closeOperation() { - super("closeOperation"); - } - - @Override - public closeOperation_args getEmptyArgsInstance() { - return new closeOperation_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public closeOperation_result getResult(I iface, closeOperation_args args) throws org.apache.thrift.TException { - closeOperation_result result = new closeOperation_result(); - result.success = iface.closeOperation(args.req); - return result; - } - } - - public static class getTimeZone extends org.apache.thrift.ProcessFunction { - public getTimeZone() { - super("getTimeZone"); - } - - @Override - public getTimeZone_args getEmptyArgsInstance() { - return new getTimeZone_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public getTimeZone_result getResult(I iface, getTimeZone_args args) throws org.apache.thrift.TException { - getTimeZone_result result = new getTimeZone_result(); - result.success = iface.getTimeZone(args.sessionId); - return result; - } - } - - public static class setTimeZone extends org.apache.thrift.ProcessFunction { - public setTimeZone() { - super("setTimeZone"); - } - - @Override - public setTimeZone_args getEmptyArgsInstance() { - return new setTimeZone_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public setTimeZone_result getResult(I iface, setTimeZone_args args) throws org.apache.thrift.TException { - setTimeZone_result result = new setTimeZone_result(); - result.success = iface.setTimeZone(args.req); - return result; - } - } - - public static class getProperties extends org.apache.thrift.ProcessFunction { - public getProperties() { - super("getProperties"); - } - - @Override - public getProperties_args getEmptyArgsInstance() { - return new getProperties_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public getProperties_result getResult(I iface, getProperties_args args) throws org.apache.thrift.TException { - getProperties_result result = new getProperties_result(); - result.success = iface.getProperties(); - return result; - } - } - - public static class setStorageGroup extends org.apache.thrift.ProcessFunction { - public setStorageGroup() { - super("setStorageGroup"); - } - - @Override - public setStorageGroup_args getEmptyArgsInstance() { - return new setStorageGroup_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public setStorageGroup_result getResult(I iface, setStorageGroup_args args) throws org.apache.thrift.TException { - setStorageGroup_result result = new setStorageGroup_result(); - result.success = iface.setStorageGroup(args.sessionId, args.storageGroup); - return result; - } - } - - public static class createTimeseries extends org.apache.thrift.ProcessFunction { - public createTimeseries() { - super("createTimeseries"); - } - - @Override - public createTimeseries_args getEmptyArgsInstance() { - return new createTimeseries_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public createTimeseries_result getResult(I iface, createTimeseries_args args) throws org.apache.thrift.TException { - createTimeseries_result result = new createTimeseries_result(); - result.success = iface.createTimeseries(args.req); - return result; - } - } - - public static class createAlignedTimeseries extends org.apache.thrift.ProcessFunction { - public createAlignedTimeseries() { - super("createAlignedTimeseries"); - } - - @Override - public createAlignedTimeseries_args getEmptyArgsInstance() { - return new createAlignedTimeseries_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public createAlignedTimeseries_result getResult(I iface, createAlignedTimeseries_args args) throws org.apache.thrift.TException { - createAlignedTimeseries_result result = new createAlignedTimeseries_result(); - result.success = iface.createAlignedTimeseries(args.req); - return result; - } - } - - public static class createMultiTimeseries extends org.apache.thrift.ProcessFunction { - public createMultiTimeseries() { - super("createMultiTimeseries"); - } - - @Override - public createMultiTimeseries_args getEmptyArgsInstance() { - return new createMultiTimeseries_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public createMultiTimeseries_result getResult(I iface, createMultiTimeseries_args args) throws org.apache.thrift.TException { - createMultiTimeseries_result result = new createMultiTimeseries_result(); - result.success = iface.createMultiTimeseries(args.req); - return result; - } - } - - public static class deleteTimeseries extends org.apache.thrift.ProcessFunction { - public deleteTimeseries() { - super("deleteTimeseries"); - } - - @Override - public deleteTimeseries_args getEmptyArgsInstance() { - return new deleteTimeseries_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public deleteTimeseries_result getResult(I iface, deleteTimeseries_args args) throws org.apache.thrift.TException { - deleteTimeseries_result result = new deleteTimeseries_result(); - result.success = iface.deleteTimeseries(args.sessionId, args.path); - return result; - } - } - - public static class deleteStorageGroups extends org.apache.thrift.ProcessFunction { - public deleteStorageGroups() { - super("deleteStorageGroups"); - } - - @Override - public deleteStorageGroups_args getEmptyArgsInstance() { - return new deleteStorageGroups_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public deleteStorageGroups_result getResult(I iface, deleteStorageGroups_args args) throws org.apache.thrift.TException { - deleteStorageGroups_result result = new deleteStorageGroups_result(); - result.success = iface.deleteStorageGroups(args.sessionId, args.storageGroup); - return result; - } - } - - public static class insertRecord extends org.apache.thrift.ProcessFunction { - public insertRecord() { - super("insertRecord"); - } - - @Override - public insertRecord_args getEmptyArgsInstance() { - return new insertRecord_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public insertRecord_result getResult(I iface, insertRecord_args args) throws org.apache.thrift.TException { - insertRecord_result result = new insertRecord_result(); - result.success = iface.insertRecord(args.req); - return result; - } - } - - public static class insertStringRecord extends org.apache.thrift.ProcessFunction { - public insertStringRecord() { - super("insertStringRecord"); - } - - @Override - public insertStringRecord_args getEmptyArgsInstance() { - return new insertStringRecord_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public insertStringRecord_result getResult(I iface, insertStringRecord_args args) throws org.apache.thrift.TException { - insertStringRecord_result result = new insertStringRecord_result(); - result.success = iface.insertStringRecord(args.req); - return result; - } - } - - public static class insertTablet extends org.apache.thrift.ProcessFunction { - public insertTablet() { - super("insertTablet"); - } - - @Override - public insertTablet_args getEmptyArgsInstance() { - return new insertTablet_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public insertTablet_result getResult(I iface, insertTablet_args args) throws org.apache.thrift.TException { - insertTablet_result result = new insertTablet_result(); - result.success = iface.insertTablet(args.req); - return result; - } - } - - public static class insertTablets extends org.apache.thrift.ProcessFunction { - public insertTablets() { - super("insertTablets"); - } - - @Override - public insertTablets_args getEmptyArgsInstance() { - return new insertTablets_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public insertTablets_result getResult(I iface, insertTablets_args args) throws org.apache.thrift.TException { - insertTablets_result result = new insertTablets_result(); - result.success = iface.insertTablets(args.req); - return result; - } - } - - public static class insertRecords extends org.apache.thrift.ProcessFunction { - public insertRecords() { - super("insertRecords"); - } - - @Override - public insertRecords_args getEmptyArgsInstance() { - return new insertRecords_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public insertRecords_result getResult(I iface, insertRecords_args args) throws org.apache.thrift.TException { - insertRecords_result result = new insertRecords_result(); - result.success = iface.insertRecords(args.req); - return result; - } - } - - public static class insertRecordsOfOneDevice extends org.apache.thrift.ProcessFunction { - public insertRecordsOfOneDevice() { - super("insertRecordsOfOneDevice"); - } - - @Override - public insertRecordsOfOneDevice_args getEmptyArgsInstance() { - return new insertRecordsOfOneDevice_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public insertRecordsOfOneDevice_result getResult(I iface, insertRecordsOfOneDevice_args args) throws org.apache.thrift.TException { - insertRecordsOfOneDevice_result result = new insertRecordsOfOneDevice_result(); - result.success = iface.insertRecordsOfOneDevice(args.req); - return result; - } - } - - public static class insertStringRecordsOfOneDevice extends org.apache.thrift.ProcessFunction { - public insertStringRecordsOfOneDevice() { - super("insertStringRecordsOfOneDevice"); - } - - @Override - public insertStringRecordsOfOneDevice_args getEmptyArgsInstance() { - return new insertStringRecordsOfOneDevice_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public insertStringRecordsOfOneDevice_result getResult(I iface, insertStringRecordsOfOneDevice_args args) throws org.apache.thrift.TException { - insertStringRecordsOfOneDevice_result result = new insertStringRecordsOfOneDevice_result(); - result.success = iface.insertStringRecordsOfOneDevice(args.req); - return result; - } - } - - public static class insertStringRecords extends org.apache.thrift.ProcessFunction { - public insertStringRecords() { - super("insertStringRecords"); - } - - @Override - public insertStringRecords_args getEmptyArgsInstance() { - return new insertStringRecords_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public insertStringRecords_result getResult(I iface, insertStringRecords_args args) throws org.apache.thrift.TException { - insertStringRecords_result result = new insertStringRecords_result(); - result.success = iface.insertStringRecords(args.req); - return result; - } - } - - public static class testInsertTablet extends org.apache.thrift.ProcessFunction { - public testInsertTablet() { - super("testInsertTablet"); - } - - @Override - public testInsertTablet_args getEmptyArgsInstance() { - return new testInsertTablet_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public testInsertTablet_result getResult(I iface, testInsertTablet_args args) throws org.apache.thrift.TException { - testInsertTablet_result result = new testInsertTablet_result(); - result.success = iface.testInsertTablet(args.req); - return result; - } - } - - public static class testInsertTablets extends org.apache.thrift.ProcessFunction { - public testInsertTablets() { - super("testInsertTablets"); - } - - @Override - public testInsertTablets_args getEmptyArgsInstance() { - return new testInsertTablets_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public testInsertTablets_result getResult(I iface, testInsertTablets_args args) throws org.apache.thrift.TException { - testInsertTablets_result result = new testInsertTablets_result(); - result.success = iface.testInsertTablets(args.req); - return result; - } - } - - public static class testInsertRecord extends org.apache.thrift.ProcessFunction { - public testInsertRecord() { - super("testInsertRecord"); - } - - @Override - public testInsertRecord_args getEmptyArgsInstance() { - return new testInsertRecord_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public testInsertRecord_result getResult(I iface, testInsertRecord_args args) throws org.apache.thrift.TException { - testInsertRecord_result result = new testInsertRecord_result(); - result.success = iface.testInsertRecord(args.req); - return result; - } - } - - public static class testInsertStringRecord extends org.apache.thrift.ProcessFunction { - public testInsertStringRecord() { - super("testInsertStringRecord"); - } - - @Override - public testInsertStringRecord_args getEmptyArgsInstance() { - return new testInsertStringRecord_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public testInsertStringRecord_result getResult(I iface, testInsertStringRecord_args args) throws org.apache.thrift.TException { - testInsertStringRecord_result result = new testInsertStringRecord_result(); - result.success = iface.testInsertStringRecord(args.req); - return result; - } - } - - public static class testInsertRecords extends org.apache.thrift.ProcessFunction { - public testInsertRecords() { - super("testInsertRecords"); - } - - @Override - public testInsertRecords_args getEmptyArgsInstance() { - return new testInsertRecords_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public testInsertRecords_result getResult(I iface, testInsertRecords_args args) throws org.apache.thrift.TException { - testInsertRecords_result result = new testInsertRecords_result(); - result.success = iface.testInsertRecords(args.req); - return result; - } - } - - public static class testInsertRecordsOfOneDevice extends org.apache.thrift.ProcessFunction { - public testInsertRecordsOfOneDevice() { - super("testInsertRecordsOfOneDevice"); - } - - @Override - public testInsertRecordsOfOneDevice_args getEmptyArgsInstance() { - return new testInsertRecordsOfOneDevice_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public testInsertRecordsOfOneDevice_result getResult(I iface, testInsertRecordsOfOneDevice_args args) throws org.apache.thrift.TException { - testInsertRecordsOfOneDevice_result result = new testInsertRecordsOfOneDevice_result(); - result.success = iface.testInsertRecordsOfOneDevice(args.req); - return result; - } - } - - public static class testInsertStringRecords extends org.apache.thrift.ProcessFunction { - public testInsertStringRecords() { - super("testInsertStringRecords"); - } - - @Override - public testInsertStringRecords_args getEmptyArgsInstance() { - return new testInsertStringRecords_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public testInsertStringRecords_result getResult(I iface, testInsertStringRecords_args args) throws org.apache.thrift.TException { - testInsertStringRecords_result result = new testInsertStringRecords_result(); - result.success = iface.testInsertStringRecords(args.req); - return result; - } - } - - public static class deleteData extends org.apache.thrift.ProcessFunction { - public deleteData() { - super("deleteData"); - } - - @Override - public deleteData_args getEmptyArgsInstance() { - return new deleteData_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public deleteData_result getResult(I iface, deleteData_args args) throws org.apache.thrift.TException { - deleteData_result result = new deleteData_result(); - result.success = iface.deleteData(args.req); - return result; - } - } - - public static class executeRawDataQuery extends org.apache.thrift.ProcessFunction { - public executeRawDataQuery() { - super("executeRawDataQuery"); - } - - @Override - public executeRawDataQuery_args getEmptyArgsInstance() { - return new executeRawDataQuery_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeRawDataQuery_result getResult(I iface, executeRawDataQuery_args args) throws org.apache.thrift.TException { - executeRawDataQuery_result result = new executeRawDataQuery_result(); - result.success = iface.executeRawDataQuery(args.req); - return result; - } - } - - public static class executeLastDataQuery extends org.apache.thrift.ProcessFunction { - public executeLastDataQuery() { - super("executeLastDataQuery"); - } - - @Override - public executeLastDataQuery_args getEmptyArgsInstance() { - return new executeLastDataQuery_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeLastDataQuery_result getResult(I iface, executeLastDataQuery_args args) throws org.apache.thrift.TException { - executeLastDataQuery_result result = new executeLastDataQuery_result(); - result.success = iface.executeLastDataQuery(args.req); - return result; - } - } - - public static class executeAggregationQuery extends org.apache.thrift.ProcessFunction { - public executeAggregationQuery() { - super("executeAggregationQuery"); - } - - @Override - public executeAggregationQuery_args getEmptyArgsInstance() { - return new executeAggregationQuery_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public executeAggregationQuery_result getResult(I iface, executeAggregationQuery_args args) throws org.apache.thrift.TException { - executeAggregationQuery_result result = new executeAggregationQuery_result(); - result.success = iface.executeAggregationQuery(args.req); - return result; - } - } - - public static class requestStatementId extends org.apache.thrift.ProcessFunction { - public requestStatementId() { - super("requestStatementId"); - } - - @Override - public requestStatementId_args getEmptyArgsInstance() { - return new requestStatementId_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public requestStatementId_result getResult(I iface, requestStatementId_args args) throws org.apache.thrift.TException { - requestStatementId_result result = new requestStatementId_result(); - result.success = iface.requestStatementId(args.sessionId); - result.setSuccessIsSet(true); - return result; - } - } - - public static class createSchemaTemplate extends org.apache.thrift.ProcessFunction { - public createSchemaTemplate() { - super("createSchemaTemplate"); - } - - @Override - public createSchemaTemplate_args getEmptyArgsInstance() { - return new createSchemaTemplate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public createSchemaTemplate_result getResult(I iface, createSchemaTemplate_args args) throws org.apache.thrift.TException { - createSchemaTemplate_result result = new createSchemaTemplate_result(); - result.success = iface.createSchemaTemplate(args.req); - return result; - } - } - - public static class appendSchemaTemplate extends org.apache.thrift.ProcessFunction { - public appendSchemaTemplate() { - super("appendSchemaTemplate"); - } - - @Override - public appendSchemaTemplate_args getEmptyArgsInstance() { - return new appendSchemaTemplate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public appendSchemaTemplate_result getResult(I iface, appendSchemaTemplate_args args) throws org.apache.thrift.TException { - appendSchemaTemplate_result result = new appendSchemaTemplate_result(); - result.success = iface.appendSchemaTemplate(args.req); - return result; - } - } - - public static class pruneSchemaTemplate extends org.apache.thrift.ProcessFunction { - public pruneSchemaTemplate() { - super("pruneSchemaTemplate"); - } - - @Override - public pruneSchemaTemplate_args getEmptyArgsInstance() { - return new pruneSchemaTemplate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public pruneSchemaTemplate_result getResult(I iface, pruneSchemaTemplate_args args) throws org.apache.thrift.TException { - pruneSchemaTemplate_result result = new pruneSchemaTemplate_result(); - result.success = iface.pruneSchemaTemplate(args.req); - return result; - } - } - - public static class querySchemaTemplate extends org.apache.thrift.ProcessFunction { - public querySchemaTemplate() { - super("querySchemaTemplate"); - } - - @Override - public querySchemaTemplate_args getEmptyArgsInstance() { - return new querySchemaTemplate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public querySchemaTemplate_result getResult(I iface, querySchemaTemplate_args args) throws org.apache.thrift.TException { - querySchemaTemplate_result result = new querySchemaTemplate_result(); - result.success = iface.querySchemaTemplate(args.req); - return result; - } - } - - public static class showConfigurationTemplate extends org.apache.thrift.ProcessFunction { - public showConfigurationTemplate() { - super("showConfigurationTemplate"); - } - - @Override - public showConfigurationTemplate_args getEmptyArgsInstance() { - return new showConfigurationTemplate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public showConfigurationTemplate_result getResult(I iface, showConfigurationTemplate_args args) throws org.apache.thrift.TException { - showConfigurationTemplate_result result = new showConfigurationTemplate_result(); - result.success = iface.showConfigurationTemplate(); - return result; - } - } - - public static class showConfiguration extends org.apache.thrift.ProcessFunction { - public showConfiguration() { - super("showConfiguration"); - } - - @Override - public showConfiguration_args getEmptyArgsInstance() { - return new showConfiguration_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public showConfiguration_result getResult(I iface, showConfiguration_args args) throws org.apache.thrift.TException { - showConfiguration_result result = new showConfiguration_result(); - result.success = iface.showConfiguration(args.nodeId); - return result; - } - } - - public static class setSchemaTemplate extends org.apache.thrift.ProcessFunction { - public setSchemaTemplate() { - super("setSchemaTemplate"); - } - - @Override - public setSchemaTemplate_args getEmptyArgsInstance() { - return new setSchemaTemplate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public setSchemaTemplate_result getResult(I iface, setSchemaTemplate_args args) throws org.apache.thrift.TException { - setSchemaTemplate_result result = new setSchemaTemplate_result(); - result.success = iface.setSchemaTemplate(args.req); - return result; - } - } - - public static class unsetSchemaTemplate extends org.apache.thrift.ProcessFunction { - public unsetSchemaTemplate() { - super("unsetSchemaTemplate"); - } - - @Override - public unsetSchemaTemplate_args getEmptyArgsInstance() { - return new unsetSchemaTemplate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public unsetSchemaTemplate_result getResult(I iface, unsetSchemaTemplate_args args) throws org.apache.thrift.TException { - unsetSchemaTemplate_result result = new unsetSchemaTemplate_result(); - result.success = iface.unsetSchemaTemplate(args.req); - return result; - } - } - - public static class dropSchemaTemplate extends org.apache.thrift.ProcessFunction { - public dropSchemaTemplate() { - super("dropSchemaTemplate"); - } - - @Override - public dropSchemaTemplate_args getEmptyArgsInstance() { - return new dropSchemaTemplate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public dropSchemaTemplate_result getResult(I iface, dropSchemaTemplate_args args) throws org.apache.thrift.TException { - dropSchemaTemplate_result result = new dropSchemaTemplate_result(); - result.success = iface.dropSchemaTemplate(args.req); - return result; - } - } - - public static class createTimeseriesUsingSchemaTemplate extends org.apache.thrift.ProcessFunction { - public createTimeseriesUsingSchemaTemplate() { - super("createTimeseriesUsingSchemaTemplate"); - } - - @Override - public createTimeseriesUsingSchemaTemplate_args getEmptyArgsInstance() { - return new createTimeseriesUsingSchemaTemplate_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public createTimeseriesUsingSchemaTemplate_result getResult(I iface, createTimeseriesUsingSchemaTemplate_args args) throws org.apache.thrift.TException { - createTimeseriesUsingSchemaTemplate_result result = new createTimeseriesUsingSchemaTemplate_result(); - result.success = iface.createTimeseriesUsingSchemaTemplate(args.req); - return result; - } - } - - public static class handshake extends org.apache.thrift.ProcessFunction { - public handshake() { - super("handshake"); - } - - @Override - public handshake_args getEmptyArgsInstance() { - return new handshake_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public handshake_result getResult(I iface, handshake_args args) throws org.apache.thrift.TException { - handshake_result result = new handshake_result(); - result.success = iface.handshake(args.info); - return result; - } - } - - public static class sendPipeData extends org.apache.thrift.ProcessFunction { - public sendPipeData() { - super("sendPipeData"); - } - - @Override - public sendPipeData_args getEmptyArgsInstance() { - return new sendPipeData_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public sendPipeData_result getResult(I iface, sendPipeData_args args) throws org.apache.thrift.TException { - sendPipeData_result result = new sendPipeData_result(); - result.success = iface.sendPipeData(args.buff); - return result; - } - } - - public static class sendFile extends org.apache.thrift.ProcessFunction { - public sendFile() { - super("sendFile"); - } - - @Override - public sendFile_args getEmptyArgsInstance() { - return new sendFile_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public sendFile_result getResult(I iface, sendFile_args args) throws org.apache.thrift.TException { - sendFile_result result = new sendFile_result(); - result.success = iface.sendFile(args.metaInfo, args.buff); - return result; - } - } - - public static class pipeTransfer extends org.apache.thrift.ProcessFunction { - public pipeTransfer() { - super("pipeTransfer"); - } - - @Override - public pipeTransfer_args getEmptyArgsInstance() { - return new pipeTransfer_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public pipeTransfer_result getResult(I iface, pipeTransfer_args args) throws org.apache.thrift.TException { - pipeTransfer_result result = new pipeTransfer_result(); - result.success = iface.pipeTransfer(args.req); - return result; - } - } - - public static class pipeSubscribe extends org.apache.thrift.ProcessFunction { - public pipeSubscribe() { - super("pipeSubscribe"); - } - - @Override - public pipeSubscribe_args getEmptyArgsInstance() { - return new pipeSubscribe_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public pipeSubscribe_result getResult(I iface, pipeSubscribe_args args) throws org.apache.thrift.TException { - pipeSubscribe_result result = new pipeSubscribe_result(); - result.success = iface.pipeSubscribe(args.req); - return result; - } - } - - public static class getBackupConfiguration extends org.apache.thrift.ProcessFunction { - public getBackupConfiguration() { - super("getBackupConfiguration"); - } - - @Override - public getBackupConfiguration_args getEmptyArgsInstance() { - return new getBackupConfiguration_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public getBackupConfiguration_result getResult(I iface, getBackupConfiguration_args args) throws org.apache.thrift.TException { - getBackupConfiguration_result result = new getBackupConfiguration_result(); - result.success = iface.getBackupConfiguration(); - return result; - } - } - - public static class fetchAllConnectionsInfo extends org.apache.thrift.ProcessFunction { - public fetchAllConnectionsInfo() { - super("fetchAllConnectionsInfo"); - } - - @Override - public fetchAllConnectionsInfo_args getEmptyArgsInstance() { - return new fetchAllConnectionsInfo_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public fetchAllConnectionsInfo_result getResult(I iface, fetchAllConnectionsInfo_args args) throws org.apache.thrift.TException { - fetchAllConnectionsInfo_result result = new fetchAllConnectionsInfo_result(); - result.success = iface.fetchAllConnectionsInfo(); - return result; - } - } - - public static class testConnectionEmptyRPC extends org.apache.thrift.ProcessFunction { - public testConnectionEmptyRPC() { - super("testConnectionEmptyRPC"); - } - - @Override - public testConnectionEmptyRPC_args getEmptyArgsInstance() { - return new testConnectionEmptyRPC_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public testConnectionEmptyRPC_result getResult(I iface, testConnectionEmptyRPC_args args) throws org.apache.thrift.TException { - testConnectionEmptyRPC_result result = new testConnectionEmptyRPC_result(); - result.success = iface.testConnectionEmptyRPC(); - return result; - } - } - - } - - public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new java.util.HashMap>())); - } - - protected AsyncProcessor(I iface, java.util.Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static java.util.Map> getProcessMap(java.util.Map> processMap) { - processMap.put("executeQueryStatementV2", new executeQueryStatementV2()); - processMap.put("executeUpdateStatementV2", new executeUpdateStatementV2()); - processMap.put("executeStatementV2", new executeStatementV2()); - processMap.put("executeRawDataQueryV2", new executeRawDataQueryV2()); - processMap.put("executeLastDataQueryV2", new executeLastDataQueryV2()); - processMap.put("executeFastLastDataQueryForOneDeviceV2", new executeFastLastDataQueryForOneDeviceV2()); - processMap.put("executeAggregationQueryV2", new executeAggregationQueryV2()); - processMap.put("executeGroupByQueryIntervalQuery", new executeGroupByQueryIntervalQuery()); - processMap.put("fetchResultsV2", new fetchResultsV2()); - processMap.put("openSession", new openSession()); - processMap.put("closeSession", new closeSession()); - processMap.put("executeStatement", new executeStatement()); - processMap.put("executeBatchStatement", new executeBatchStatement()); - processMap.put("executeQueryStatement", new executeQueryStatement()); - processMap.put("executeUpdateStatement", new executeUpdateStatement()); - processMap.put("fetchResults", new fetchResults()); - processMap.put("fetchMetadata", new fetchMetadata()); - processMap.put("cancelOperation", new cancelOperation()); - processMap.put("closeOperation", new closeOperation()); - processMap.put("getTimeZone", new getTimeZone()); - processMap.put("setTimeZone", new setTimeZone()); - processMap.put("getProperties", new getProperties()); - processMap.put("setStorageGroup", new setStorageGroup()); - processMap.put("createTimeseries", new createTimeseries()); - processMap.put("createAlignedTimeseries", new createAlignedTimeseries()); - processMap.put("createMultiTimeseries", new createMultiTimeseries()); - processMap.put("deleteTimeseries", new deleteTimeseries()); - processMap.put("deleteStorageGroups", new deleteStorageGroups()); - processMap.put("insertRecord", new insertRecord()); - processMap.put("insertStringRecord", new insertStringRecord()); - processMap.put("insertTablet", new insertTablet()); - processMap.put("insertTablets", new insertTablets()); - processMap.put("insertRecords", new insertRecords()); - processMap.put("insertRecordsOfOneDevice", new insertRecordsOfOneDevice()); - processMap.put("insertStringRecordsOfOneDevice", new insertStringRecordsOfOneDevice()); - processMap.put("insertStringRecords", new insertStringRecords()); - processMap.put("testInsertTablet", new testInsertTablet()); - processMap.put("testInsertTablets", new testInsertTablets()); - processMap.put("testInsertRecord", new testInsertRecord()); - processMap.put("testInsertStringRecord", new testInsertStringRecord()); - processMap.put("testInsertRecords", new testInsertRecords()); - processMap.put("testInsertRecordsOfOneDevice", new testInsertRecordsOfOneDevice()); - processMap.put("testInsertStringRecords", new testInsertStringRecords()); - processMap.put("deleteData", new deleteData()); - processMap.put("executeRawDataQuery", new executeRawDataQuery()); - processMap.put("executeLastDataQuery", new executeLastDataQuery()); - processMap.put("executeAggregationQuery", new executeAggregationQuery()); - processMap.put("requestStatementId", new requestStatementId()); - processMap.put("createSchemaTemplate", new createSchemaTemplate()); - processMap.put("appendSchemaTemplate", new appendSchemaTemplate()); - processMap.put("pruneSchemaTemplate", new pruneSchemaTemplate()); - processMap.put("querySchemaTemplate", new querySchemaTemplate()); - processMap.put("showConfigurationTemplate", new showConfigurationTemplate()); - processMap.put("showConfiguration", new showConfiguration()); - processMap.put("setSchemaTemplate", new setSchemaTemplate()); - processMap.put("unsetSchemaTemplate", new unsetSchemaTemplate()); - processMap.put("dropSchemaTemplate", new dropSchemaTemplate()); - processMap.put("createTimeseriesUsingSchemaTemplate", new createTimeseriesUsingSchemaTemplate()); - processMap.put("handshake", new handshake()); - processMap.put("sendPipeData", new sendPipeData()); - processMap.put("sendFile", new sendFile()); - processMap.put("pipeTransfer", new pipeTransfer()); - processMap.put("pipeSubscribe", new pipeSubscribe()); - processMap.put("getBackupConfiguration", new getBackupConfiguration()); - processMap.put("fetchAllConnectionsInfo", new fetchAllConnectionsInfo()); - processMap.put("testConnectionEmptyRPC", new testConnectionEmptyRPC()); - return processMap; - } - - public static class executeQueryStatementV2 extends org.apache.thrift.AsyncProcessFunction { - public executeQueryStatementV2() { - super("executeQueryStatementV2"); - } - - @Override - public executeQueryStatementV2_args getEmptyArgsInstance() { - return new executeQueryStatementV2_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeQueryStatementV2_result result = new executeQueryStatementV2_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeQueryStatementV2_result result = new executeQueryStatementV2_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeQueryStatementV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeQueryStatementV2(args.req,resultHandler); - } - } - - public static class executeUpdateStatementV2 extends org.apache.thrift.AsyncProcessFunction { - public executeUpdateStatementV2() { - super("executeUpdateStatementV2"); - } - - @Override - public executeUpdateStatementV2_args getEmptyArgsInstance() { - return new executeUpdateStatementV2_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeUpdateStatementV2_result result = new executeUpdateStatementV2_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeUpdateStatementV2_result result = new executeUpdateStatementV2_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeUpdateStatementV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeUpdateStatementV2(args.req,resultHandler); - } - } - - public static class executeStatementV2 extends org.apache.thrift.AsyncProcessFunction { - public executeStatementV2() { - super("executeStatementV2"); - } - - @Override - public executeStatementV2_args getEmptyArgsInstance() { - return new executeStatementV2_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeStatementV2_result result = new executeStatementV2_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeStatementV2_result result = new executeStatementV2_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeStatementV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeStatementV2(args.req,resultHandler); - } - } - - public static class executeRawDataQueryV2 extends org.apache.thrift.AsyncProcessFunction { - public executeRawDataQueryV2() { - super("executeRawDataQueryV2"); - } - - @Override - public executeRawDataQueryV2_args getEmptyArgsInstance() { - return new executeRawDataQueryV2_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeRawDataQueryV2_result result = new executeRawDataQueryV2_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeRawDataQueryV2_result result = new executeRawDataQueryV2_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeRawDataQueryV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeRawDataQueryV2(args.req,resultHandler); - } - } - - public static class executeLastDataQueryV2 extends org.apache.thrift.AsyncProcessFunction { - public executeLastDataQueryV2() { - super("executeLastDataQueryV2"); - } - - @Override - public executeLastDataQueryV2_args getEmptyArgsInstance() { - return new executeLastDataQueryV2_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeLastDataQueryV2_result result = new executeLastDataQueryV2_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeLastDataQueryV2_result result = new executeLastDataQueryV2_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeLastDataQueryV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeLastDataQueryV2(args.req,resultHandler); - } - } - - public static class executeFastLastDataQueryForOneDeviceV2 extends org.apache.thrift.AsyncProcessFunction { - public executeFastLastDataQueryForOneDeviceV2() { - super("executeFastLastDataQueryForOneDeviceV2"); - } - - @Override - public executeFastLastDataQueryForOneDeviceV2_args getEmptyArgsInstance() { - return new executeFastLastDataQueryForOneDeviceV2_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeFastLastDataQueryForOneDeviceV2_result result = new executeFastLastDataQueryForOneDeviceV2_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeFastLastDataQueryForOneDeviceV2_result result = new executeFastLastDataQueryForOneDeviceV2_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeFastLastDataQueryForOneDeviceV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeFastLastDataQueryForOneDeviceV2(args.req,resultHandler); - } - } - - public static class executeAggregationQueryV2 extends org.apache.thrift.AsyncProcessFunction { - public executeAggregationQueryV2() { - super("executeAggregationQueryV2"); - } - - @Override - public executeAggregationQueryV2_args getEmptyArgsInstance() { - return new executeAggregationQueryV2_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeAggregationQueryV2_result result = new executeAggregationQueryV2_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeAggregationQueryV2_result result = new executeAggregationQueryV2_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeAggregationQueryV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeAggregationQueryV2(args.req,resultHandler); - } - } - - public static class executeGroupByQueryIntervalQuery extends org.apache.thrift.AsyncProcessFunction { - public executeGroupByQueryIntervalQuery() { - super("executeGroupByQueryIntervalQuery"); - } - - @Override - public executeGroupByQueryIntervalQuery_args getEmptyArgsInstance() { - return new executeGroupByQueryIntervalQuery_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeGroupByQueryIntervalQuery_result result = new executeGroupByQueryIntervalQuery_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeGroupByQueryIntervalQuery_result result = new executeGroupByQueryIntervalQuery_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeGroupByQueryIntervalQuery_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeGroupByQueryIntervalQuery(args.req,resultHandler); - } - } - - public static class fetchResultsV2 extends org.apache.thrift.AsyncProcessFunction { - public fetchResultsV2() { - super("fetchResultsV2"); - } - - @Override - public fetchResultsV2_args getEmptyArgsInstance() { - return new fetchResultsV2_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSFetchResultsResp o) { - fetchResultsV2_result result = new fetchResultsV2_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - fetchResultsV2_result result = new fetchResultsV2_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, fetchResultsV2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.fetchResultsV2(args.req,resultHandler); - } - } - - public static class openSession extends org.apache.thrift.AsyncProcessFunction { - public openSession() { - super("openSession"); - } - - @Override - public openSession_args getEmptyArgsInstance() { - return new openSession_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSOpenSessionResp o) { - openSession_result result = new openSession_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - openSession_result result = new openSession_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, openSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.openSession(args.req,resultHandler); - } - } - - public static class closeSession extends org.apache.thrift.AsyncProcessFunction { - public closeSession() { - super("closeSession"); - } - - @Override - public closeSession_args getEmptyArgsInstance() { - return new closeSession_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - closeSession_result result = new closeSession_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - closeSession_result result = new closeSession_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, closeSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.closeSession(args.req,resultHandler); - } - } - - public static class executeStatement extends org.apache.thrift.AsyncProcessFunction { - public executeStatement() { - super("executeStatement"); - } - - @Override - public executeStatement_args getEmptyArgsInstance() { - return new executeStatement_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeStatement_result result = new executeStatement_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeStatement_result result = new executeStatement_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeStatement(args.req,resultHandler); - } - } - - public static class executeBatchStatement extends org.apache.thrift.AsyncProcessFunction { - public executeBatchStatement() { - super("executeBatchStatement"); - } - - @Override - public executeBatchStatement_args getEmptyArgsInstance() { - return new executeBatchStatement_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - executeBatchStatement_result result = new executeBatchStatement_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeBatchStatement_result result = new executeBatchStatement_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeBatchStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeBatchStatement(args.req,resultHandler); - } - } - - public static class executeQueryStatement extends org.apache.thrift.AsyncProcessFunction { - public executeQueryStatement() { - super("executeQueryStatement"); - } - - @Override - public executeQueryStatement_args getEmptyArgsInstance() { - return new executeQueryStatement_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeQueryStatement_result result = new executeQueryStatement_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeQueryStatement_result result = new executeQueryStatement_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeQueryStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeQueryStatement(args.req,resultHandler); - } - } - - public static class executeUpdateStatement extends org.apache.thrift.AsyncProcessFunction { - public executeUpdateStatement() { - super("executeUpdateStatement"); - } - - @Override - public executeUpdateStatement_args getEmptyArgsInstance() { - return new executeUpdateStatement_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeUpdateStatement_result result = new executeUpdateStatement_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeUpdateStatement_result result = new executeUpdateStatement_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeUpdateStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeUpdateStatement(args.req,resultHandler); - } - } - - public static class fetchResults extends org.apache.thrift.AsyncProcessFunction { - public fetchResults() { - super("fetchResults"); - } - - @Override - public fetchResults_args getEmptyArgsInstance() { - return new fetchResults_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSFetchResultsResp o) { - fetchResults_result result = new fetchResults_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - fetchResults_result result = new fetchResults_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, fetchResults_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.fetchResults(args.req,resultHandler); - } - } - - public static class fetchMetadata extends org.apache.thrift.AsyncProcessFunction { - public fetchMetadata() { - super("fetchMetadata"); - } - - @Override - public fetchMetadata_args getEmptyArgsInstance() { - return new fetchMetadata_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSFetchMetadataResp o) { - fetchMetadata_result result = new fetchMetadata_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - fetchMetadata_result result = new fetchMetadata_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, fetchMetadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.fetchMetadata(args.req,resultHandler); - } - } - - public static class cancelOperation extends org.apache.thrift.AsyncProcessFunction { - public cancelOperation() { - super("cancelOperation"); - } - - @Override - public cancelOperation_args getEmptyArgsInstance() { - return new cancelOperation_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - cancelOperation_result result = new cancelOperation_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - cancelOperation_result result = new cancelOperation_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, cancelOperation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.cancelOperation(args.req,resultHandler); - } - } - - public static class closeOperation extends org.apache.thrift.AsyncProcessFunction { - public closeOperation() { - super("closeOperation"); - } - - @Override - public closeOperation_args getEmptyArgsInstance() { - return new closeOperation_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - closeOperation_result result = new closeOperation_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - closeOperation_result result = new closeOperation_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, closeOperation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.closeOperation(args.req,resultHandler); - } - } - - public static class getTimeZone extends org.apache.thrift.AsyncProcessFunction { - public getTimeZone() { - super("getTimeZone"); - } - - @Override - public getTimeZone_args getEmptyArgsInstance() { - return new getTimeZone_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSGetTimeZoneResp o) { - getTimeZone_result result = new getTimeZone_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getTimeZone_result result = new getTimeZone_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, getTimeZone_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.getTimeZone(args.sessionId,resultHandler); - } - } - - public static class setTimeZone extends org.apache.thrift.AsyncProcessFunction { - public setTimeZone() { - super("setTimeZone"); - } - - @Override - public setTimeZone_args getEmptyArgsInstance() { - return new setTimeZone_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - setTimeZone_result result = new setTimeZone_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - setTimeZone_result result = new setTimeZone_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, setTimeZone_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.setTimeZone(args.req,resultHandler); - } - } - - public static class getProperties extends org.apache.thrift.AsyncProcessFunction { - public getProperties() { - super("getProperties"); - } - - @Override - public getProperties_args getEmptyArgsInstance() { - return new getProperties_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(ServerProperties o) { - getProperties_result result = new getProperties_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getProperties_result result = new getProperties_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, getProperties_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.getProperties(resultHandler); - } - } - - public static class setStorageGroup extends org.apache.thrift.AsyncProcessFunction { - public setStorageGroup() { - super("setStorageGroup"); - } - - @Override - public setStorageGroup_args getEmptyArgsInstance() { - return new setStorageGroup_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - setStorageGroup_result result = new setStorageGroup_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - setStorageGroup_result result = new setStorageGroup_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, setStorageGroup_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.setStorageGroup(args.sessionId, args.storageGroup,resultHandler); - } - } - - public static class createTimeseries extends org.apache.thrift.AsyncProcessFunction { - public createTimeseries() { - super("createTimeseries"); - } - - @Override - public createTimeseries_args getEmptyArgsInstance() { - return new createTimeseries_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - createTimeseries_result result = new createTimeseries_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - createTimeseries_result result = new createTimeseries_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, createTimeseries_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.createTimeseries(args.req,resultHandler); - } - } - - public static class createAlignedTimeseries extends org.apache.thrift.AsyncProcessFunction { - public createAlignedTimeseries() { - super("createAlignedTimeseries"); - } - - @Override - public createAlignedTimeseries_args getEmptyArgsInstance() { - return new createAlignedTimeseries_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - createAlignedTimeseries_result result = new createAlignedTimeseries_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - createAlignedTimeseries_result result = new createAlignedTimeseries_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, createAlignedTimeseries_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.createAlignedTimeseries(args.req,resultHandler); - } - } - - public static class createMultiTimeseries extends org.apache.thrift.AsyncProcessFunction { - public createMultiTimeseries() { - super("createMultiTimeseries"); - } - - @Override - public createMultiTimeseries_args getEmptyArgsInstance() { - return new createMultiTimeseries_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - createMultiTimeseries_result result = new createMultiTimeseries_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - createMultiTimeseries_result result = new createMultiTimeseries_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, createMultiTimeseries_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.createMultiTimeseries(args.req,resultHandler); - } - } - - public static class deleteTimeseries extends org.apache.thrift.AsyncProcessFunction { - public deleteTimeseries() { - super("deleteTimeseries"); - } - - @Override - public deleteTimeseries_args getEmptyArgsInstance() { - return new deleteTimeseries_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - deleteTimeseries_result result = new deleteTimeseries_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - deleteTimeseries_result result = new deleteTimeseries_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, deleteTimeseries_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.deleteTimeseries(args.sessionId, args.path,resultHandler); - } - } - - public static class deleteStorageGroups extends org.apache.thrift.AsyncProcessFunction { - public deleteStorageGroups() { - super("deleteStorageGroups"); - } - - @Override - public deleteStorageGroups_args getEmptyArgsInstance() { - return new deleteStorageGroups_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - deleteStorageGroups_result result = new deleteStorageGroups_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - deleteStorageGroups_result result = new deleteStorageGroups_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, deleteStorageGroups_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.deleteStorageGroups(args.sessionId, args.storageGroup,resultHandler); - } - } - - public static class insertRecord extends org.apache.thrift.AsyncProcessFunction { - public insertRecord() { - super("insertRecord"); - } - - @Override - public insertRecord_args getEmptyArgsInstance() { - return new insertRecord_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - insertRecord_result result = new insertRecord_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - insertRecord_result result = new insertRecord_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, insertRecord_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.insertRecord(args.req,resultHandler); - } - } - - public static class insertStringRecord extends org.apache.thrift.AsyncProcessFunction { - public insertStringRecord() { - super("insertStringRecord"); - } - - @Override - public insertStringRecord_args getEmptyArgsInstance() { - return new insertStringRecord_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - insertStringRecord_result result = new insertStringRecord_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - insertStringRecord_result result = new insertStringRecord_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, insertStringRecord_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.insertStringRecord(args.req,resultHandler); - } - } - - public static class insertTablet extends org.apache.thrift.AsyncProcessFunction { - public insertTablet() { - super("insertTablet"); - } - - @Override - public insertTablet_args getEmptyArgsInstance() { - return new insertTablet_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - insertTablet_result result = new insertTablet_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - insertTablet_result result = new insertTablet_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, insertTablet_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.insertTablet(args.req,resultHandler); - } - } - - public static class insertTablets extends org.apache.thrift.AsyncProcessFunction { - public insertTablets() { - super("insertTablets"); - } - - @Override - public insertTablets_args getEmptyArgsInstance() { - return new insertTablets_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - insertTablets_result result = new insertTablets_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - insertTablets_result result = new insertTablets_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, insertTablets_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.insertTablets(args.req,resultHandler); - } - } - - public static class insertRecords extends org.apache.thrift.AsyncProcessFunction { - public insertRecords() { - super("insertRecords"); - } - - @Override - public insertRecords_args getEmptyArgsInstance() { - return new insertRecords_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - insertRecords_result result = new insertRecords_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - insertRecords_result result = new insertRecords_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, insertRecords_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.insertRecords(args.req,resultHandler); - } - } - - public static class insertRecordsOfOneDevice extends org.apache.thrift.AsyncProcessFunction { - public insertRecordsOfOneDevice() { - super("insertRecordsOfOneDevice"); - } - - @Override - public insertRecordsOfOneDevice_args getEmptyArgsInstance() { - return new insertRecordsOfOneDevice_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - insertRecordsOfOneDevice_result result = new insertRecordsOfOneDevice_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - insertRecordsOfOneDevice_result result = new insertRecordsOfOneDevice_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, insertRecordsOfOneDevice_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.insertRecordsOfOneDevice(args.req,resultHandler); - } - } - - public static class insertStringRecordsOfOneDevice extends org.apache.thrift.AsyncProcessFunction { - public insertStringRecordsOfOneDevice() { - super("insertStringRecordsOfOneDevice"); - } - - @Override - public insertStringRecordsOfOneDevice_args getEmptyArgsInstance() { - return new insertStringRecordsOfOneDevice_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - insertStringRecordsOfOneDevice_result result = new insertStringRecordsOfOneDevice_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - insertStringRecordsOfOneDevice_result result = new insertStringRecordsOfOneDevice_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, insertStringRecordsOfOneDevice_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.insertStringRecordsOfOneDevice(args.req,resultHandler); - } - } - - public static class insertStringRecords extends org.apache.thrift.AsyncProcessFunction { - public insertStringRecords() { - super("insertStringRecords"); - } - - @Override - public insertStringRecords_args getEmptyArgsInstance() { - return new insertStringRecords_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - insertStringRecords_result result = new insertStringRecords_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - insertStringRecords_result result = new insertStringRecords_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, insertStringRecords_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.insertStringRecords(args.req,resultHandler); - } - } - - public static class testInsertTablet extends org.apache.thrift.AsyncProcessFunction { - public testInsertTablet() { - super("testInsertTablet"); - } - - @Override - public testInsertTablet_args getEmptyArgsInstance() { - return new testInsertTablet_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - testInsertTablet_result result = new testInsertTablet_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - testInsertTablet_result result = new testInsertTablet_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, testInsertTablet_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.testInsertTablet(args.req,resultHandler); - } - } - - public static class testInsertTablets extends org.apache.thrift.AsyncProcessFunction { - public testInsertTablets() { - super("testInsertTablets"); - } - - @Override - public testInsertTablets_args getEmptyArgsInstance() { - return new testInsertTablets_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - testInsertTablets_result result = new testInsertTablets_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - testInsertTablets_result result = new testInsertTablets_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, testInsertTablets_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.testInsertTablets(args.req,resultHandler); - } - } - - public static class testInsertRecord extends org.apache.thrift.AsyncProcessFunction { - public testInsertRecord() { - super("testInsertRecord"); - } - - @Override - public testInsertRecord_args getEmptyArgsInstance() { - return new testInsertRecord_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - testInsertRecord_result result = new testInsertRecord_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - testInsertRecord_result result = new testInsertRecord_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, testInsertRecord_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.testInsertRecord(args.req,resultHandler); - } - } - - public static class testInsertStringRecord extends org.apache.thrift.AsyncProcessFunction { - public testInsertStringRecord() { - super("testInsertStringRecord"); - } - - @Override - public testInsertStringRecord_args getEmptyArgsInstance() { - return new testInsertStringRecord_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - testInsertStringRecord_result result = new testInsertStringRecord_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - testInsertStringRecord_result result = new testInsertStringRecord_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, testInsertStringRecord_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.testInsertStringRecord(args.req,resultHandler); - } - } - - public static class testInsertRecords extends org.apache.thrift.AsyncProcessFunction { - public testInsertRecords() { - super("testInsertRecords"); - } - - @Override - public testInsertRecords_args getEmptyArgsInstance() { - return new testInsertRecords_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - testInsertRecords_result result = new testInsertRecords_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - testInsertRecords_result result = new testInsertRecords_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, testInsertRecords_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.testInsertRecords(args.req,resultHandler); - } - } - - public static class testInsertRecordsOfOneDevice extends org.apache.thrift.AsyncProcessFunction { - public testInsertRecordsOfOneDevice() { - super("testInsertRecordsOfOneDevice"); - } - - @Override - public testInsertRecordsOfOneDevice_args getEmptyArgsInstance() { - return new testInsertRecordsOfOneDevice_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - testInsertRecordsOfOneDevice_result result = new testInsertRecordsOfOneDevice_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - testInsertRecordsOfOneDevice_result result = new testInsertRecordsOfOneDevice_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, testInsertRecordsOfOneDevice_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.testInsertRecordsOfOneDevice(args.req,resultHandler); - } - } - - public static class testInsertStringRecords extends org.apache.thrift.AsyncProcessFunction { - public testInsertStringRecords() { - super("testInsertStringRecords"); - } - - @Override - public testInsertStringRecords_args getEmptyArgsInstance() { - return new testInsertStringRecords_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - testInsertStringRecords_result result = new testInsertStringRecords_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - testInsertStringRecords_result result = new testInsertStringRecords_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, testInsertStringRecords_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.testInsertStringRecords(args.req,resultHandler); - } - } - - public static class deleteData extends org.apache.thrift.AsyncProcessFunction { - public deleteData() { - super("deleteData"); - } - - @Override - public deleteData_args getEmptyArgsInstance() { - return new deleteData_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - deleteData_result result = new deleteData_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - deleteData_result result = new deleteData_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, deleteData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.deleteData(args.req,resultHandler); - } - } - - public static class executeRawDataQuery extends org.apache.thrift.AsyncProcessFunction { - public executeRawDataQuery() { - super("executeRawDataQuery"); - } - - @Override - public executeRawDataQuery_args getEmptyArgsInstance() { - return new executeRawDataQuery_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeRawDataQuery_result result = new executeRawDataQuery_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeRawDataQuery_result result = new executeRawDataQuery_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeRawDataQuery_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeRawDataQuery(args.req,resultHandler); - } - } - - public static class executeLastDataQuery extends org.apache.thrift.AsyncProcessFunction { - public executeLastDataQuery() { - super("executeLastDataQuery"); - } - - @Override - public executeLastDataQuery_args getEmptyArgsInstance() { - return new executeLastDataQuery_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeLastDataQuery_result result = new executeLastDataQuery_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeLastDataQuery_result result = new executeLastDataQuery_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeLastDataQuery_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeLastDataQuery(args.req,resultHandler); - } - } - - public static class executeAggregationQuery extends org.apache.thrift.AsyncProcessFunction { - public executeAggregationQuery() { - super("executeAggregationQuery"); - } - - @Override - public executeAggregationQuery_args getEmptyArgsInstance() { - return new executeAggregationQuery_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSExecuteStatementResp o) { - executeAggregationQuery_result result = new executeAggregationQuery_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - executeAggregationQuery_result result = new executeAggregationQuery_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, executeAggregationQuery_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.executeAggregationQuery(args.req,resultHandler); - } - } - - public static class requestStatementId extends org.apache.thrift.AsyncProcessFunction { - public requestStatementId() { - super("requestStatementId"); - } - - @Override - public requestStatementId_args getEmptyArgsInstance() { - return new requestStatementId_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(java.lang.Long o) { - requestStatementId_result result = new requestStatementId_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - requestStatementId_result result = new requestStatementId_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, requestStatementId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.requestStatementId(args.sessionId,resultHandler); - } - } - - public static class createSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { - public createSchemaTemplate() { - super("createSchemaTemplate"); - } - - @Override - public createSchemaTemplate_args getEmptyArgsInstance() { - return new createSchemaTemplate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - createSchemaTemplate_result result = new createSchemaTemplate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - createSchemaTemplate_result result = new createSchemaTemplate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, createSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.createSchemaTemplate(args.req,resultHandler); - } - } - - public static class appendSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { - public appendSchemaTemplate() { - super("appendSchemaTemplate"); - } - - @Override - public appendSchemaTemplate_args getEmptyArgsInstance() { - return new appendSchemaTemplate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - appendSchemaTemplate_result result = new appendSchemaTemplate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - appendSchemaTemplate_result result = new appendSchemaTemplate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, appendSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.appendSchemaTemplate(args.req,resultHandler); - } - } - - public static class pruneSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { - public pruneSchemaTemplate() { - super("pruneSchemaTemplate"); - } - - @Override - public pruneSchemaTemplate_args getEmptyArgsInstance() { - return new pruneSchemaTemplate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - pruneSchemaTemplate_result result = new pruneSchemaTemplate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - pruneSchemaTemplate_result result = new pruneSchemaTemplate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, pruneSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.pruneSchemaTemplate(args.req,resultHandler); - } - } - - public static class querySchemaTemplate extends org.apache.thrift.AsyncProcessFunction { - public querySchemaTemplate() { - super("querySchemaTemplate"); - } - - @Override - public querySchemaTemplate_args getEmptyArgsInstance() { - return new querySchemaTemplate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSQueryTemplateResp o) { - querySchemaTemplate_result result = new querySchemaTemplate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - querySchemaTemplate_result result = new querySchemaTemplate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, querySchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.querySchemaTemplate(args.req,resultHandler); - } - } - - public static class showConfigurationTemplate extends org.apache.thrift.AsyncProcessFunction { - public showConfigurationTemplate() { - super("showConfigurationTemplate"); - } - - @Override - public showConfigurationTemplate_args getEmptyArgsInstance() { - return new showConfigurationTemplate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp o) { - showConfigurationTemplate_result result = new showConfigurationTemplate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - showConfigurationTemplate_result result = new showConfigurationTemplate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, showConfigurationTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.showConfigurationTemplate(resultHandler); - } - } - - public static class showConfiguration extends org.apache.thrift.AsyncProcessFunction { - public showConfiguration() { - super("showConfiguration"); - } - - @Override - public showConfiguration_args getEmptyArgsInstance() { - return new showConfiguration_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp o) { - showConfiguration_result result = new showConfiguration_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - showConfiguration_result result = new showConfiguration_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, showConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.showConfiguration(args.nodeId,resultHandler); - } - } - - public static class setSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { - public setSchemaTemplate() { - super("setSchemaTemplate"); - } - - @Override - public setSchemaTemplate_args getEmptyArgsInstance() { - return new setSchemaTemplate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - setSchemaTemplate_result result = new setSchemaTemplate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - setSchemaTemplate_result result = new setSchemaTemplate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, setSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.setSchemaTemplate(args.req,resultHandler); - } - } - - public static class unsetSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { - public unsetSchemaTemplate() { - super("unsetSchemaTemplate"); - } - - @Override - public unsetSchemaTemplate_args getEmptyArgsInstance() { - return new unsetSchemaTemplate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - unsetSchemaTemplate_result result = new unsetSchemaTemplate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - unsetSchemaTemplate_result result = new unsetSchemaTemplate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, unsetSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.unsetSchemaTemplate(args.req,resultHandler); - } - } - - public static class dropSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { - public dropSchemaTemplate() { - super("dropSchemaTemplate"); - } - - @Override - public dropSchemaTemplate_args getEmptyArgsInstance() { - return new dropSchemaTemplate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - dropSchemaTemplate_result result = new dropSchemaTemplate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - dropSchemaTemplate_result result = new dropSchemaTemplate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, dropSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.dropSchemaTemplate(args.req,resultHandler); - } - } - - public static class createTimeseriesUsingSchemaTemplate extends org.apache.thrift.AsyncProcessFunction { - public createTimeseriesUsingSchemaTemplate() { - super("createTimeseriesUsingSchemaTemplate"); - } - - @Override - public createTimeseriesUsingSchemaTemplate_args getEmptyArgsInstance() { - return new createTimeseriesUsingSchemaTemplate_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - createTimeseriesUsingSchemaTemplate_result result = new createTimeseriesUsingSchemaTemplate_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - createTimeseriesUsingSchemaTemplate_result result = new createTimeseriesUsingSchemaTemplate_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, createTimeseriesUsingSchemaTemplate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.createTimeseriesUsingSchemaTemplate(args.req,resultHandler); - } - } - - public static class handshake extends org.apache.thrift.AsyncProcessFunction { - public handshake() { - super("handshake"); - } - - @Override - public handshake_args getEmptyArgsInstance() { - return new handshake_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - handshake_result result = new handshake_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - handshake_result result = new handshake_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, handshake_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.handshake(args.info,resultHandler); - } - } - - public static class sendPipeData extends org.apache.thrift.AsyncProcessFunction { - public sendPipeData() { - super("sendPipeData"); - } - - @Override - public sendPipeData_args getEmptyArgsInstance() { - return new sendPipeData_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - sendPipeData_result result = new sendPipeData_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - sendPipeData_result result = new sendPipeData_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, sendPipeData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.sendPipeData(args.buff,resultHandler); - } - } - - public static class sendFile extends org.apache.thrift.AsyncProcessFunction { - public sendFile() { - super("sendFile"); - } - - @Override - public sendFile_args getEmptyArgsInstance() { - return new sendFile_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - sendFile_result result = new sendFile_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - sendFile_result result = new sendFile_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, sendFile_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.sendFile(args.metaInfo, args.buff,resultHandler); - } - } - - public static class pipeTransfer extends org.apache.thrift.AsyncProcessFunction { - public pipeTransfer() { - super("pipeTransfer"); - } - - @Override - public pipeTransfer_args getEmptyArgsInstance() { - return new pipeTransfer_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TPipeTransferResp o) { - pipeTransfer_result result = new pipeTransfer_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - pipeTransfer_result result = new pipeTransfer_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, pipeTransfer_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.pipeTransfer(args.req,resultHandler); - } - } - - public static class pipeSubscribe extends org.apache.thrift.AsyncProcessFunction { - public pipeSubscribe() { - super("pipeSubscribe"); - } - - @Override - public pipeSubscribe_args getEmptyArgsInstance() { - return new pipeSubscribe_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TPipeSubscribeResp o) { - pipeSubscribe_result result = new pipeSubscribe_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - pipeSubscribe_result result = new pipeSubscribe_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, pipeSubscribe_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.pipeSubscribe(args.req,resultHandler); - } - } - - public static class getBackupConfiguration extends org.apache.thrift.AsyncProcessFunction { - public getBackupConfiguration() { - super("getBackupConfiguration"); - } - - @Override - public getBackupConfiguration_args getEmptyArgsInstance() { - return new getBackupConfiguration_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSBackupConfigurationResp o) { - getBackupConfiguration_result result = new getBackupConfiguration_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getBackupConfiguration_result result = new getBackupConfiguration_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, getBackupConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.getBackupConfiguration(resultHandler); - } - } - - public static class fetchAllConnectionsInfo extends org.apache.thrift.AsyncProcessFunction { - public fetchAllConnectionsInfo() { - super("fetchAllConnectionsInfo"); - } - - @Override - public fetchAllConnectionsInfo_args getEmptyArgsInstance() { - return new fetchAllConnectionsInfo_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(TSConnectionInfoResp o) { - fetchAllConnectionsInfo_result result = new fetchAllConnectionsInfo_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - fetchAllConnectionsInfo_result result = new fetchAllConnectionsInfo_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, fetchAllConnectionsInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.fetchAllConnectionsInfo(resultHandler); - } - } - - public static class testConnectionEmptyRPC extends org.apache.thrift.AsyncProcessFunction { - public testConnectionEmptyRPC() { - super("testConnectionEmptyRPC"); - } - - @Override - public testConnectionEmptyRPC_args getEmptyArgsInstance() { - return new testConnectionEmptyRPC_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - @Override - public void onComplete(org.apache.iotdb.common.rpc.thrift.TSStatus o) { - testConnectionEmptyRPC_result result = new testConnectionEmptyRPC_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - testConnectionEmptyRPC_result result = new testConnectionEmptyRPC_result(); - if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, testConnectionEmptyRPC_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.testConnectionEmptyRPC(resultHandler); - } - } - - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeQueryStatementV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeQueryStatementV2_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeQueryStatementV2_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeQueryStatementV2_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeQueryStatementV2_args.class, metaDataMap); - } - - public executeQueryStatementV2_args() { - } - - public executeQueryStatementV2_args( - TSExecuteStatementReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeQueryStatementV2_args(executeQueryStatementV2_args other) { - if (other.isSetReq()) { - this.req = new TSExecuteStatementReq(other.req); - } - } - - @Override - public executeQueryStatementV2_args deepCopy() { - return new executeQueryStatementV2_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementReq getReq() { - return this.req; - } - - public executeQueryStatementV2_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSExecuteStatementReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeQueryStatementV2_args) - return this.equals((executeQueryStatementV2_args)that); - return false; - } - - public boolean equals(executeQueryStatementV2_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeQueryStatementV2_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeQueryStatementV2_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeQueryStatementV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeQueryStatementV2_argsStandardScheme getScheme() { - return new executeQueryStatementV2_argsStandardScheme(); - } - } - - private static class executeQueryStatementV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeQueryStatementV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeQueryStatementV2_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeQueryStatementV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeQueryStatementV2_argsTupleScheme getScheme() { - return new executeQueryStatementV2_argsTupleScheme(); - } - } - - private static class executeQueryStatementV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeQueryStatementV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeQueryStatementV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeQueryStatementV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeQueryStatementV2_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeQueryStatementV2_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeQueryStatementV2_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeQueryStatementV2_result.class, metaDataMap); - } - - public executeQueryStatementV2_result() { - } - - public executeQueryStatementV2_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeQueryStatementV2_result(executeQueryStatementV2_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeQueryStatementV2_result deepCopy() { - return new executeQueryStatementV2_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeQueryStatementV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeQueryStatementV2_result) - return this.equals((executeQueryStatementV2_result)that); - return false; - } - - public boolean equals(executeQueryStatementV2_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeQueryStatementV2_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeQueryStatementV2_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeQueryStatementV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeQueryStatementV2_resultStandardScheme getScheme() { - return new executeQueryStatementV2_resultStandardScheme(); - } - } - - private static class executeQueryStatementV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeQueryStatementV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeQueryStatementV2_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeQueryStatementV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeQueryStatementV2_resultTupleScheme getScheme() { - return new executeQueryStatementV2_resultTupleScheme(); - } - } - - private static class executeQueryStatementV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeQueryStatementV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeQueryStatementV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeUpdateStatementV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeUpdateStatementV2_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeUpdateStatementV2_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeUpdateStatementV2_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeUpdateStatementV2_args.class, metaDataMap); - } - - public executeUpdateStatementV2_args() { - } - - public executeUpdateStatementV2_args( - TSExecuteStatementReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeUpdateStatementV2_args(executeUpdateStatementV2_args other) { - if (other.isSetReq()) { - this.req = new TSExecuteStatementReq(other.req); - } - } - - @Override - public executeUpdateStatementV2_args deepCopy() { - return new executeUpdateStatementV2_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementReq getReq() { - return this.req; - } - - public executeUpdateStatementV2_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSExecuteStatementReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeUpdateStatementV2_args) - return this.equals((executeUpdateStatementV2_args)that); - return false; - } - - public boolean equals(executeUpdateStatementV2_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeUpdateStatementV2_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeUpdateStatementV2_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeUpdateStatementV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeUpdateStatementV2_argsStandardScheme getScheme() { - return new executeUpdateStatementV2_argsStandardScheme(); - } - } - - private static class executeUpdateStatementV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeUpdateStatementV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeUpdateStatementV2_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeUpdateStatementV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeUpdateStatementV2_argsTupleScheme getScheme() { - return new executeUpdateStatementV2_argsTupleScheme(); - } - } - - private static class executeUpdateStatementV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatementV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatementV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeUpdateStatementV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeUpdateStatementV2_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeUpdateStatementV2_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeUpdateStatementV2_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeUpdateStatementV2_result.class, metaDataMap); - } - - public executeUpdateStatementV2_result() { - } - - public executeUpdateStatementV2_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeUpdateStatementV2_result(executeUpdateStatementV2_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeUpdateStatementV2_result deepCopy() { - return new executeUpdateStatementV2_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeUpdateStatementV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeUpdateStatementV2_result) - return this.equals((executeUpdateStatementV2_result)that); - return false; - } - - public boolean equals(executeUpdateStatementV2_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeUpdateStatementV2_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeUpdateStatementV2_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeUpdateStatementV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeUpdateStatementV2_resultStandardScheme getScheme() { - return new executeUpdateStatementV2_resultStandardScheme(); - } - } - - private static class executeUpdateStatementV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeUpdateStatementV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeUpdateStatementV2_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeUpdateStatementV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeUpdateStatementV2_resultTupleScheme getScheme() { - return new executeUpdateStatementV2_resultTupleScheme(); - } - } - - private static class executeUpdateStatementV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatementV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatementV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeStatementV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeStatementV2_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeStatementV2_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeStatementV2_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeStatementV2_args.class, metaDataMap); - } - - public executeStatementV2_args() { - } - - public executeStatementV2_args( - TSExecuteStatementReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeStatementV2_args(executeStatementV2_args other) { - if (other.isSetReq()) { - this.req = new TSExecuteStatementReq(other.req); - } - } - - @Override - public executeStatementV2_args deepCopy() { - return new executeStatementV2_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementReq getReq() { - return this.req; - } - - public executeStatementV2_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSExecuteStatementReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeStatementV2_args) - return this.equals((executeStatementV2_args)that); - return false; - } - - public boolean equals(executeStatementV2_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeStatementV2_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeStatementV2_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeStatementV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeStatementV2_argsStandardScheme getScheme() { - return new executeStatementV2_argsStandardScheme(); - } - } - - private static class executeStatementV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeStatementV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeStatementV2_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeStatementV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeStatementV2_argsTupleScheme getScheme() { - return new executeStatementV2_argsTupleScheme(); - } - } - - private static class executeStatementV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeStatementV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeStatementV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeStatementV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeStatementV2_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeStatementV2_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeStatementV2_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeStatementV2_result.class, metaDataMap); - } - - public executeStatementV2_result() { - } - - public executeStatementV2_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeStatementV2_result(executeStatementV2_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeStatementV2_result deepCopy() { - return new executeStatementV2_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeStatementV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeStatementV2_result) - return this.equals((executeStatementV2_result)that); - return false; - } - - public boolean equals(executeStatementV2_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeStatementV2_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeStatementV2_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeStatementV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeStatementV2_resultStandardScheme getScheme() { - return new executeStatementV2_resultStandardScheme(); - } - } - - private static class executeStatementV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeStatementV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeStatementV2_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeStatementV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeStatementV2_resultTupleScheme getScheme() { - return new executeStatementV2_resultTupleScheme(); - } - } - - private static class executeStatementV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeStatementV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeStatementV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeRawDataQueryV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeRawDataQueryV2_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeRawDataQueryV2_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeRawDataQueryV2_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSRawDataQueryReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSRawDataQueryReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeRawDataQueryV2_args.class, metaDataMap); - } - - public executeRawDataQueryV2_args() { - } - - public executeRawDataQueryV2_args( - TSRawDataQueryReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeRawDataQueryV2_args(executeRawDataQueryV2_args other) { - if (other.isSetReq()) { - this.req = new TSRawDataQueryReq(other.req); - } - } - - @Override - public executeRawDataQueryV2_args deepCopy() { - return new executeRawDataQueryV2_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSRawDataQueryReq getReq() { - return this.req; - } - - public executeRawDataQueryV2_args setReq(@org.apache.thrift.annotation.Nullable TSRawDataQueryReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSRawDataQueryReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeRawDataQueryV2_args) - return this.equals((executeRawDataQueryV2_args)that); - return false; - } - - public boolean equals(executeRawDataQueryV2_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeRawDataQueryV2_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeRawDataQueryV2_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeRawDataQueryV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeRawDataQueryV2_argsStandardScheme getScheme() { - return new executeRawDataQueryV2_argsStandardScheme(); - } - } - - private static class executeRawDataQueryV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeRawDataQueryV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSRawDataQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeRawDataQueryV2_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeRawDataQueryV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeRawDataQueryV2_argsTupleScheme getScheme() { - return new executeRawDataQueryV2_argsTupleScheme(); - } - } - - private static class executeRawDataQueryV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeRawDataQueryV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeRawDataQueryV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSRawDataQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeRawDataQueryV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeRawDataQueryV2_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeRawDataQueryV2_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeRawDataQueryV2_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeRawDataQueryV2_result.class, metaDataMap); - } - - public executeRawDataQueryV2_result() { - } - - public executeRawDataQueryV2_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeRawDataQueryV2_result(executeRawDataQueryV2_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeRawDataQueryV2_result deepCopy() { - return new executeRawDataQueryV2_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeRawDataQueryV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeRawDataQueryV2_result) - return this.equals((executeRawDataQueryV2_result)that); - return false; - } - - public boolean equals(executeRawDataQueryV2_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeRawDataQueryV2_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeRawDataQueryV2_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeRawDataQueryV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeRawDataQueryV2_resultStandardScheme getScheme() { - return new executeRawDataQueryV2_resultStandardScheme(); - } - } - - private static class executeRawDataQueryV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeRawDataQueryV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeRawDataQueryV2_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeRawDataQueryV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeRawDataQueryV2_resultTupleScheme getScheme() { - return new executeRawDataQueryV2_resultTupleScheme(); - } - } - - private static class executeRawDataQueryV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeRawDataQueryV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeRawDataQueryV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeLastDataQueryV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeLastDataQueryV2_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeLastDataQueryV2_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeLastDataQueryV2_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSLastDataQueryReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSLastDataQueryReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeLastDataQueryV2_args.class, metaDataMap); - } - - public executeLastDataQueryV2_args() { - } - - public executeLastDataQueryV2_args( - TSLastDataQueryReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeLastDataQueryV2_args(executeLastDataQueryV2_args other) { - if (other.isSetReq()) { - this.req = new TSLastDataQueryReq(other.req); - } - } - - @Override - public executeLastDataQueryV2_args deepCopy() { - return new executeLastDataQueryV2_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSLastDataQueryReq getReq() { - return this.req; - } - - public executeLastDataQueryV2_args setReq(@org.apache.thrift.annotation.Nullable TSLastDataQueryReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSLastDataQueryReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeLastDataQueryV2_args) - return this.equals((executeLastDataQueryV2_args)that); - return false; - } - - public boolean equals(executeLastDataQueryV2_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeLastDataQueryV2_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeLastDataQueryV2_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeLastDataQueryV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeLastDataQueryV2_argsStandardScheme getScheme() { - return new executeLastDataQueryV2_argsStandardScheme(); - } - } - - private static class executeLastDataQueryV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeLastDataQueryV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSLastDataQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeLastDataQueryV2_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeLastDataQueryV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeLastDataQueryV2_argsTupleScheme getScheme() { - return new executeLastDataQueryV2_argsTupleScheme(); - } - } - - private static class executeLastDataQueryV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeLastDataQueryV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeLastDataQueryV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSLastDataQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeLastDataQueryV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeLastDataQueryV2_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeLastDataQueryV2_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeLastDataQueryV2_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeLastDataQueryV2_result.class, metaDataMap); - } - - public executeLastDataQueryV2_result() { - } - - public executeLastDataQueryV2_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeLastDataQueryV2_result(executeLastDataQueryV2_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeLastDataQueryV2_result deepCopy() { - return new executeLastDataQueryV2_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeLastDataQueryV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeLastDataQueryV2_result) - return this.equals((executeLastDataQueryV2_result)that); - return false; - } - - public boolean equals(executeLastDataQueryV2_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeLastDataQueryV2_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeLastDataQueryV2_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeLastDataQueryV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeLastDataQueryV2_resultStandardScheme getScheme() { - return new executeLastDataQueryV2_resultStandardScheme(); - } - } - - private static class executeLastDataQueryV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeLastDataQueryV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeLastDataQueryV2_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeLastDataQueryV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeLastDataQueryV2_resultTupleScheme getScheme() { - return new executeLastDataQueryV2_resultTupleScheme(); - } - } - - private static class executeLastDataQueryV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeLastDataQueryV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeLastDataQueryV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeFastLastDataQueryForOneDeviceV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeFastLastDataQueryForOneDeviceV2_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeFastLastDataQueryForOneDeviceV2_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeFastLastDataQueryForOneDeviceV2_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSFastLastDataQueryForOneDeviceReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFastLastDataQueryForOneDeviceReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeFastLastDataQueryForOneDeviceV2_args.class, metaDataMap); - } - - public executeFastLastDataQueryForOneDeviceV2_args() { - } - - public executeFastLastDataQueryForOneDeviceV2_args( - TSFastLastDataQueryForOneDeviceReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeFastLastDataQueryForOneDeviceV2_args(executeFastLastDataQueryForOneDeviceV2_args other) { - if (other.isSetReq()) { - this.req = new TSFastLastDataQueryForOneDeviceReq(other.req); - } - } - - @Override - public executeFastLastDataQueryForOneDeviceV2_args deepCopy() { - return new executeFastLastDataQueryForOneDeviceV2_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSFastLastDataQueryForOneDeviceReq getReq() { - return this.req; - } - - public executeFastLastDataQueryForOneDeviceV2_args setReq(@org.apache.thrift.annotation.Nullable TSFastLastDataQueryForOneDeviceReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSFastLastDataQueryForOneDeviceReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeFastLastDataQueryForOneDeviceV2_args) - return this.equals((executeFastLastDataQueryForOneDeviceV2_args)that); - return false; - } - - public boolean equals(executeFastLastDataQueryForOneDeviceV2_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeFastLastDataQueryForOneDeviceV2_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeFastLastDataQueryForOneDeviceV2_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeFastLastDataQueryForOneDeviceV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeFastLastDataQueryForOneDeviceV2_argsStandardScheme getScheme() { - return new executeFastLastDataQueryForOneDeviceV2_argsStandardScheme(); - } - } - - private static class executeFastLastDataQueryForOneDeviceV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeFastLastDataQueryForOneDeviceV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSFastLastDataQueryForOneDeviceReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeFastLastDataQueryForOneDeviceV2_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeFastLastDataQueryForOneDeviceV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeFastLastDataQueryForOneDeviceV2_argsTupleScheme getScheme() { - return new executeFastLastDataQueryForOneDeviceV2_argsTupleScheme(); - } - } - - private static class executeFastLastDataQueryForOneDeviceV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeFastLastDataQueryForOneDeviceV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeFastLastDataQueryForOneDeviceV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSFastLastDataQueryForOneDeviceReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeFastLastDataQueryForOneDeviceV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeFastLastDataQueryForOneDeviceV2_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeFastLastDataQueryForOneDeviceV2_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeFastLastDataQueryForOneDeviceV2_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeFastLastDataQueryForOneDeviceV2_result.class, metaDataMap); - } - - public executeFastLastDataQueryForOneDeviceV2_result() { - } - - public executeFastLastDataQueryForOneDeviceV2_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeFastLastDataQueryForOneDeviceV2_result(executeFastLastDataQueryForOneDeviceV2_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeFastLastDataQueryForOneDeviceV2_result deepCopy() { - return new executeFastLastDataQueryForOneDeviceV2_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeFastLastDataQueryForOneDeviceV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeFastLastDataQueryForOneDeviceV2_result) - return this.equals((executeFastLastDataQueryForOneDeviceV2_result)that); - return false; - } - - public boolean equals(executeFastLastDataQueryForOneDeviceV2_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeFastLastDataQueryForOneDeviceV2_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeFastLastDataQueryForOneDeviceV2_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeFastLastDataQueryForOneDeviceV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeFastLastDataQueryForOneDeviceV2_resultStandardScheme getScheme() { - return new executeFastLastDataQueryForOneDeviceV2_resultStandardScheme(); - } - } - - private static class executeFastLastDataQueryForOneDeviceV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeFastLastDataQueryForOneDeviceV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeFastLastDataQueryForOneDeviceV2_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeFastLastDataQueryForOneDeviceV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeFastLastDataQueryForOneDeviceV2_resultTupleScheme getScheme() { - return new executeFastLastDataQueryForOneDeviceV2_resultTupleScheme(); - } - } - - private static class executeFastLastDataQueryForOneDeviceV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeFastLastDataQueryForOneDeviceV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeFastLastDataQueryForOneDeviceV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeAggregationQueryV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeAggregationQueryV2_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeAggregationQueryV2_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeAggregationQueryV2_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSAggregationQueryReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSAggregationQueryReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeAggregationQueryV2_args.class, metaDataMap); - } - - public executeAggregationQueryV2_args() { - } - - public executeAggregationQueryV2_args( - TSAggregationQueryReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeAggregationQueryV2_args(executeAggregationQueryV2_args other) { - if (other.isSetReq()) { - this.req = new TSAggregationQueryReq(other.req); - } - } - - @Override - public executeAggregationQueryV2_args deepCopy() { - return new executeAggregationQueryV2_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSAggregationQueryReq getReq() { - return this.req; - } - - public executeAggregationQueryV2_args setReq(@org.apache.thrift.annotation.Nullable TSAggregationQueryReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSAggregationQueryReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeAggregationQueryV2_args) - return this.equals((executeAggregationQueryV2_args)that); - return false; - } - - public boolean equals(executeAggregationQueryV2_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeAggregationQueryV2_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeAggregationQueryV2_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeAggregationQueryV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeAggregationQueryV2_argsStandardScheme getScheme() { - return new executeAggregationQueryV2_argsStandardScheme(); - } - } - - private static class executeAggregationQueryV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeAggregationQueryV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSAggregationQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeAggregationQueryV2_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeAggregationQueryV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeAggregationQueryV2_argsTupleScheme getScheme() { - return new executeAggregationQueryV2_argsTupleScheme(); - } - } - - private static class executeAggregationQueryV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeAggregationQueryV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeAggregationQueryV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSAggregationQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeAggregationQueryV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeAggregationQueryV2_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeAggregationQueryV2_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeAggregationQueryV2_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeAggregationQueryV2_result.class, metaDataMap); - } - - public executeAggregationQueryV2_result() { - } - - public executeAggregationQueryV2_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeAggregationQueryV2_result(executeAggregationQueryV2_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeAggregationQueryV2_result deepCopy() { - return new executeAggregationQueryV2_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeAggregationQueryV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeAggregationQueryV2_result) - return this.equals((executeAggregationQueryV2_result)that); - return false; - } - - public boolean equals(executeAggregationQueryV2_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeAggregationQueryV2_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeAggregationQueryV2_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeAggregationQueryV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeAggregationQueryV2_resultStandardScheme getScheme() { - return new executeAggregationQueryV2_resultStandardScheme(); - } - } - - private static class executeAggregationQueryV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeAggregationQueryV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeAggregationQueryV2_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeAggregationQueryV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeAggregationQueryV2_resultTupleScheme getScheme() { - return new executeAggregationQueryV2_resultTupleScheme(); - } - } - - private static class executeAggregationQueryV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeAggregationQueryV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeAggregationQueryV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeGroupByQueryIntervalQuery_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeGroupByQueryIntervalQuery_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeGroupByQueryIntervalQuery_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeGroupByQueryIntervalQuery_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSGroupByQueryIntervalReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSGroupByQueryIntervalReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeGroupByQueryIntervalQuery_args.class, metaDataMap); - } - - public executeGroupByQueryIntervalQuery_args() { - } - - public executeGroupByQueryIntervalQuery_args( - TSGroupByQueryIntervalReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeGroupByQueryIntervalQuery_args(executeGroupByQueryIntervalQuery_args other) { - if (other.isSetReq()) { - this.req = new TSGroupByQueryIntervalReq(other.req); - } - } - - @Override - public executeGroupByQueryIntervalQuery_args deepCopy() { - return new executeGroupByQueryIntervalQuery_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSGroupByQueryIntervalReq getReq() { - return this.req; - } - - public executeGroupByQueryIntervalQuery_args setReq(@org.apache.thrift.annotation.Nullable TSGroupByQueryIntervalReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSGroupByQueryIntervalReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeGroupByQueryIntervalQuery_args) - return this.equals((executeGroupByQueryIntervalQuery_args)that); - return false; - } - - public boolean equals(executeGroupByQueryIntervalQuery_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeGroupByQueryIntervalQuery_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeGroupByQueryIntervalQuery_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeGroupByQueryIntervalQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeGroupByQueryIntervalQuery_argsStandardScheme getScheme() { - return new executeGroupByQueryIntervalQuery_argsStandardScheme(); - } - } - - private static class executeGroupByQueryIntervalQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeGroupByQueryIntervalQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSGroupByQueryIntervalReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeGroupByQueryIntervalQuery_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeGroupByQueryIntervalQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeGroupByQueryIntervalQuery_argsTupleScheme getScheme() { - return new executeGroupByQueryIntervalQuery_argsTupleScheme(); - } - } - - private static class executeGroupByQueryIntervalQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeGroupByQueryIntervalQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeGroupByQueryIntervalQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSGroupByQueryIntervalReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeGroupByQueryIntervalQuery_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeGroupByQueryIntervalQuery_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeGroupByQueryIntervalQuery_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeGroupByQueryIntervalQuery_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeGroupByQueryIntervalQuery_result.class, metaDataMap); - } - - public executeGroupByQueryIntervalQuery_result() { - } - - public executeGroupByQueryIntervalQuery_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeGroupByQueryIntervalQuery_result(executeGroupByQueryIntervalQuery_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeGroupByQueryIntervalQuery_result deepCopy() { - return new executeGroupByQueryIntervalQuery_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeGroupByQueryIntervalQuery_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeGroupByQueryIntervalQuery_result) - return this.equals((executeGroupByQueryIntervalQuery_result)that); - return false; - } - - public boolean equals(executeGroupByQueryIntervalQuery_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeGroupByQueryIntervalQuery_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeGroupByQueryIntervalQuery_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeGroupByQueryIntervalQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeGroupByQueryIntervalQuery_resultStandardScheme getScheme() { - return new executeGroupByQueryIntervalQuery_resultStandardScheme(); - } - } - - private static class executeGroupByQueryIntervalQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeGroupByQueryIntervalQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeGroupByQueryIntervalQuery_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeGroupByQueryIntervalQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeGroupByQueryIntervalQuery_resultTupleScheme getScheme() { - return new executeGroupByQueryIntervalQuery_resultTupleScheme(); - } - } - - private static class executeGroupByQueryIntervalQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeGroupByQueryIntervalQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeGroupByQueryIntervalQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class fetchResultsV2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchResultsV2_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchResultsV2_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchResultsV2_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSFetchResultsReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchResultsReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchResultsV2_args.class, metaDataMap); - } - - public fetchResultsV2_args() { - } - - public fetchResultsV2_args( - TSFetchResultsReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public fetchResultsV2_args(fetchResultsV2_args other) { - if (other.isSetReq()) { - this.req = new TSFetchResultsReq(other.req); - } - } - - @Override - public fetchResultsV2_args deepCopy() { - return new fetchResultsV2_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSFetchResultsReq getReq() { - return this.req; - } - - public fetchResultsV2_args setReq(@org.apache.thrift.annotation.Nullable TSFetchResultsReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSFetchResultsReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof fetchResultsV2_args) - return this.equals((fetchResultsV2_args)that); - return false; - } - - public boolean equals(fetchResultsV2_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(fetchResultsV2_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchResultsV2_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class fetchResultsV2_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchResultsV2_argsStandardScheme getScheme() { - return new fetchResultsV2_argsStandardScheme(); - } - } - - private static class fetchResultsV2_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, fetchResultsV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSFetchResultsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, fetchResultsV2_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fetchResultsV2_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchResultsV2_argsTupleScheme getScheme() { - return new fetchResultsV2_argsTupleScheme(); - } - } - - private static class fetchResultsV2_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fetchResultsV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fetchResultsV2_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSFetchResultsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class fetchResultsV2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchResultsV2_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchResultsV2_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchResultsV2_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSFetchResultsResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchResultsResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchResultsV2_result.class, metaDataMap); - } - - public fetchResultsV2_result() { - } - - public fetchResultsV2_result( - TSFetchResultsResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public fetchResultsV2_result(fetchResultsV2_result other) { - if (other.isSetSuccess()) { - this.success = new TSFetchResultsResp(other.success); - } - } - - @Override - public fetchResultsV2_result deepCopy() { - return new fetchResultsV2_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSFetchResultsResp getSuccess() { - return this.success; - } - - public fetchResultsV2_result setSuccess(@org.apache.thrift.annotation.Nullable TSFetchResultsResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSFetchResultsResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof fetchResultsV2_result) - return this.equals((fetchResultsV2_result)that); - return false; - } - - public boolean equals(fetchResultsV2_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(fetchResultsV2_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchResultsV2_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class fetchResultsV2_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchResultsV2_resultStandardScheme getScheme() { - return new fetchResultsV2_resultStandardScheme(); - } - } - - private static class fetchResultsV2_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, fetchResultsV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSFetchResultsResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, fetchResultsV2_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fetchResultsV2_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchResultsV2_resultTupleScheme getScheme() { - return new fetchResultsV2_resultTupleScheme(); - } - } - - private static class fetchResultsV2_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fetchResultsV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fetchResultsV2_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSFetchResultsResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class openSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openSession_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openSession_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openSession_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSOpenSessionReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSOpenSessionReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openSession_args.class, metaDataMap); - } - - public openSession_args() { - } - - public openSession_args( - TSOpenSessionReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public openSession_args(openSession_args other) { - if (other.isSetReq()) { - this.req = new TSOpenSessionReq(other.req); - } - } - - @Override - public openSession_args deepCopy() { - return new openSession_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSOpenSessionReq getReq() { - return this.req; - } - - public openSession_args setReq(@org.apache.thrift.annotation.Nullable TSOpenSessionReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSOpenSessionReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof openSession_args) - return this.equals((openSession_args)that); - return false; - } - - public boolean equals(openSession_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(openSession_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("openSession_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class openSession_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openSession_argsStandardScheme getScheme() { - return new openSession_argsStandardScheme(); - } - } - - private static class openSession_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, openSession_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSOpenSessionReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, openSession_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class openSession_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openSession_argsTupleScheme getScheme() { - return new openSession_argsTupleScheme(); - } - } - - private static class openSession_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, openSession_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, openSession_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSOpenSessionReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class openSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openSession_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openSession_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openSession_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSOpenSessionResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSOpenSessionResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openSession_result.class, metaDataMap); - } - - public openSession_result() { - } - - public openSession_result( - TSOpenSessionResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public openSession_result(openSession_result other) { - if (other.isSetSuccess()) { - this.success = new TSOpenSessionResp(other.success); - } - } - - @Override - public openSession_result deepCopy() { - return new openSession_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSOpenSessionResp getSuccess() { - return this.success; - } - - public openSession_result setSuccess(@org.apache.thrift.annotation.Nullable TSOpenSessionResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSOpenSessionResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof openSession_result) - return this.equals((openSession_result)that); - return false; - } - - public boolean equals(openSession_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(openSession_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("openSession_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class openSession_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openSession_resultStandardScheme getScheme() { - return new openSession_resultStandardScheme(); - } - } - - private static class openSession_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, openSession_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSOpenSessionResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, openSession_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class openSession_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public openSession_resultTupleScheme getScheme() { - return new openSession_resultTupleScheme(); - } - } - - private static class openSession_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, openSession_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, openSession_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSOpenSessionResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeSession_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeSession_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeSession_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSCloseSessionReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCloseSessionReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap); - } - - public closeSession_args() { - } - - public closeSession_args( - TSCloseSessionReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public closeSession_args(closeSession_args other) { - if (other.isSetReq()) { - this.req = new TSCloseSessionReq(other.req); - } - } - - @Override - public closeSession_args deepCopy() { - return new closeSession_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSCloseSessionReq getReq() { - return this.req; - } - - public closeSession_args setReq(@org.apache.thrift.annotation.Nullable TSCloseSessionReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSCloseSessionReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeSession_args) - return this.equals((closeSession_args)that); - return false; - } - - public boolean equals(closeSession_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(closeSession_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeSession_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class closeSession_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeSession_argsStandardScheme getScheme() { - return new closeSession_argsStandardScheme(); - } - } - - private static class closeSession_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeSession_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSCloseSessionReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeSession_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeSession_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeSession_argsTupleScheme getScheme() { - return new closeSession_argsTupleScheme(); - } - } - - private static class closeSession_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeSession_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeSession_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSCloseSessionReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeSession_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeSession_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeSession_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap); - } - - public closeSession_result() { - } - - public closeSession_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public closeSession_result(closeSession_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public closeSession_result deepCopy() { - return new closeSession_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public closeSession_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeSession_result) - return this.equals((closeSession_result)that); - return false; - } - - public boolean equals(closeSession_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(closeSession_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeSession_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class closeSession_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeSession_resultStandardScheme getScheme() { - return new closeSession_resultStandardScheme(); - } - } - - private static class closeSession_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeSession_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeSession_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeSession_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeSession_resultTupleScheme getScheme() { - return new closeSession_resultTupleScheme(); - } - } - - private static class closeSession_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeSession_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeSession_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeStatement_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeStatement_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeStatement_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeStatement_args.class, metaDataMap); - } - - public executeStatement_args() { - } - - public executeStatement_args( - TSExecuteStatementReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeStatement_args(executeStatement_args other) { - if (other.isSetReq()) { - this.req = new TSExecuteStatementReq(other.req); - } - } - - @Override - public executeStatement_args deepCopy() { - return new executeStatement_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementReq getReq() { - return this.req; - } - - public executeStatement_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSExecuteStatementReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeStatement_args) - return this.equals((executeStatement_args)that); - return false; - } - - public boolean equals(executeStatement_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeStatement_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeStatement_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeStatement_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeStatement_argsStandardScheme getScheme() { - return new executeStatement_argsStandardScheme(); - } - } - - private static class executeStatement_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeStatement_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeStatement_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeStatement_argsTupleScheme getScheme() { - return new executeStatement_argsTupleScheme(); - } - } - - private static class executeStatement_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeStatement_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeStatement_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeStatement_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeStatement_result.class, metaDataMap); - } - - public executeStatement_result() { - } - - public executeStatement_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeStatement_result(executeStatement_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeStatement_result deepCopy() { - return new executeStatement_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeStatement_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeStatement_result) - return this.equals((executeStatement_result)that); - return false; - } - - public boolean equals(executeStatement_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeStatement_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeStatement_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeStatement_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeStatement_resultStandardScheme getScheme() { - return new executeStatement_resultStandardScheme(); - } - } - - private static class executeStatement_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeStatement_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeStatement_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeStatement_resultTupleScheme getScheme() { - return new executeStatement_resultTupleScheme(); - } - } - - private static class executeStatement_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeBatchStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeBatchStatement_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeBatchStatement_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeBatchStatement_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteBatchStatementReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteBatchStatementReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeBatchStatement_args.class, metaDataMap); - } - - public executeBatchStatement_args() { - } - - public executeBatchStatement_args( - TSExecuteBatchStatementReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeBatchStatement_args(executeBatchStatement_args other) { - if (other.isSetReq()) { - this.req = new TSExecuteBatchStatementReq(other.req); - } - } - - @Override - public executeBatchStatement_args deepCopy() { - return new executeBatchStatement_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteBatchStatementReq getReq() { - return this.req; - } - - public executeBatchStatement_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteBatchStatementReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSExecuteBatchStatementReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeBatchStatement_args) - return this.equals((executeBatchStatement_args)that); - return false; - } - - public boolean equals(executeBatchStatement_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeBatchStatement_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeBatchStatement_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeBatchStatement_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeBatchStatement_argsStandardScheme getScheme() { - return new executeBatchStatement_argsStandardScheme(); - } - } - - private static class executeBatchStatement_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeBatchStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSExecuteBatchStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeBatchStatement_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeBatchStatement_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeBatchStatement_argsTupleScheme getScheme() { - return new executeBatchStatement_argsTupleScheme(); - } - } - - private static class executeBatchStatement_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeBatchStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeBatchStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSExecuteBatchStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeBatchStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeBatchStatement_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeBatchStatement_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeBatchStatement_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeBatchStatement_result.class, metaDataMap); - } - - public executeBatchStatement_result() { - } - - public executeBatchStatement_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeBatchStatement_result(executeBatchStatement_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public executeBatchStatement_result deepCopy() { - return new executeBatchStatement_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public executeBatchStatement_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeBatchStatement_result) - return this.equals((executeBatchStatement_result)that); - return false; - } - - public boolean equals(executeBatchStatement_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeBatchStatement_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeBatchStatement_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeBatchStatement_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeBatchStatement_resultStandardScheme getScheme() { - return new executeBatchStatement_resultStandardScheme(); - } - } - - private static class executeBatchStatement_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeBatchStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeBatchStatement_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeBatchStatement_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeBatchStatement_resultTupleScheme getScheme() { - return new executeBatchStatement_resultTupleScheme(); - } - } - - private static class executeBatchStatement_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeBatchStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeBatchStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeQueryStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeQueryStatement_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeQueryStatement_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeQueryStatement_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeQueryStatement_args.class, metaDataMap); - } - - public executeQueryStatement_args() { - } - - public executeQueryStatement_args( - TSExecuteStatementReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeQueryStatement_args(executeQueryStatement_args other) { - if (other.isSetReq()) { - this.req = new TSExecuteStatementReq(other.req); - } - } - - @Override - public executeQueryStatement_args deepCopy() { - return new executeQueryStatement_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementReq getReq() { - return this.req; - } - - public executeQueryStatement_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSExecuteStatementReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeQueryStatement_args) - return this.equals((executeQueryStatement_args)that); - return false; - } - - public boolean equals(executeQueryStatement_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeQueryStatement_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeQueryStatement_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeQueryStatement_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeQueryStatement_argsStandardScheme getScheme() { - return new executeQueryStatement_argsStandardScheme(); - } - } - - private static class executeQueryStatement_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeQueryStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeQueryStatement_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeQueryStatement_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeQueryStatement_argsTupleScheme getScheme() { - return new executeQueryStatement_argsTupleScheme(); - } - } - - private static class executeQueryStatement_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeQueryStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeQueryStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeQueryStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeQueryStatement_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeQueryStatement_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeQueryStatement_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeQueryStatement_result.class, metaDataMap); - } - - public executeQueryStatement_result() { - } - - public executeQueryStatement_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeQueryStatement_result(executeQueryStatement_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeQueryStatement_result deepCopy() { - return new executeQueryStatement_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeQueryStatement_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeQueryStatement_result) - return this.equals((executeQueryStatement_result)that); - return false; - } - - public boolean equals(executeQueryStatement_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeQueryStatement_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeQueryStatement_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeQueryStatement_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeQueryStatement_resultStandardScheme getScheme() { - return new executeQueryStatement_resultStandardScheme(); - } - } - - private static class executeQueryStatement_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeQueryStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeQueryStatement_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeQueryStatement_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeQueryStatement_resultTupleScheme getScheme() { - return new executeQueryStatement_resultTupleScheme(); - } - } - - private static class executeQueryStatement_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeQueryStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeQueryStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeUpdateStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeUpdateStatement_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeUpdateStatement_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeUpdateStatement_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeUpdateStatement_args.class, metaDataMap); - } - - public executeUpdateStatement_args() { - } - - public executeUpdateStatement_args( - TSExecuteStatementReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeUpdateStatement_args(executeUpdateStatement_args other) { - if (other.isSetReq()) { - this.req = new TSExecuteStatementReq(other.req); - } - } - - @Override - public executeUpdateStatement_args deepCopy() { - return new executeUpdateStatement_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementReq getReq() { - return this.req; - } - - public executeUpdateStatement_args setReq(@org.apache.thrift.annotation.Nullable TSExecuteStatementReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSExecuteStatementReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeUpdateStatement_args) - return this.equals((executeUpdateStatement_args)that); - return false; - } - - public boolean equals(executeUpdateStatement_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeUpdateStatement_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeUpdateStatement_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeUpdateStatement_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeUpdateStatement_argsStandardScheme getScheme() { - return new executeUpdateStatement_argsStandardScheme(); - } - } - - private static class executeUpdateStatement_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeUpdateStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeUpdateStatement_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeUpdateStatement_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeUpdateStatement_argsTupleScheme getScheme() { - return new executeUpdateStatement_argsTupleScheme(); - } - } - - private static class executeUpdateStatement_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatement_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSExecuteStatementReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeUpdateStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeUpdateStatement_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeUpdateStatement_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeUpdateStatement_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeUpdateStatement_result.class, metaDataMap); - } - - public executeUpdateStatement_result() { - } - - public executeUpdateStatement_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeUpdateStatement_result(executeUpdateStatement_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeUpdateStatement_result deepCopy() { - return new executeUpdateStatement_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeUpdateStatement_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeUpdateStatement_result) - return this.equals((executeUpdateStatement_result)that); - return false; - } - - public boolean equals(executeUpdateStatement_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeUpdateStatement_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeUpdateStatement_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeUpdateStatement_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeUpdateStatement_resultStandardScheme getScheme() { - return new executeUpdateStatement_resultStandardScheme(); - } - } - - private static class executeUpdateStatement_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeUpdateStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeUpdateStatement_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeUpdateStatement_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeUpdateStatement_resultTupleScheme getScheme() { - return new executeUpdateStatement_resultTupleScheme(); - } - } - - private static class executeUpdateStatement_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeUpdateStatement_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class fetchResults_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchResults_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchResults_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchResults_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSFetchResultsReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchResultsReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchResults_args.class, metaDataMap); - } - - public fetchResults_args() { - } - - public fetchResults_args( - TSFetchResultsReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public fetchResults_args(fetchResults_args other) { - if (other.isSetReq()) { - this.req = new TSFetchResultsReq(other.req); - } - } - - @Override - public fetchResults_args deepCopy() { - return new fetchResults_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSFetchResultsReq getReq() { - return this.req; - } - - public fetchResults_args setReq(@org.apache.thrift.annotation.Nullable TSFetchResultsReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSFetchResultsReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof fetchResults_args) - return this.equals((fetchResults_args)that); - return false; - } - - public boolean equals(fetchResults_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(fetchResults_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchResults_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class fetchResults_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchResults_argsStandardScheme getScheme() { - return new fetchResults_argsStandardScheme(); - } - } - - private static class fetchResults_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, fetchResults_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSFetchResultsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, fetchResults_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fetchResults_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchResults_argsTupleScheme getScheme() { - return new fetchResults_argsTupleScheme(); - } - } - - private static class fetchResults_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fetchResults_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fetchResults_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSFetchResultsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class fetchResults_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchResults_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchResults_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchResults_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSFetchResultsResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchResultsResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchResults_result.class, metaDataMap); - } - - public fetchResults_result() { - } - - public fetchResults_result( - TSFetchResultsResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public fetchResults_result(fetchResults_result other) { - if (other.isSetSuccess()) { - this.success = new TSFetchResultsResp(other.success); - } - } - - @Override - public fetchResults_result deepCopy() { - return new fetchResults_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSFetchResultsResp getSuccess() { - return this.success; - } - - public fetchResults_result setSuccess(@org.apache.thrift.annotation.Nullable TSFetchResultsResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSFetchResultsResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof fetchResults_result) - return this.equals((fetchResults_result)that); - return false; - } - - public boolean equals(fetchResults_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(fetchResults_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchResults_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class fetchResults_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchResults_resultStandardScheme getScheme() { - return new fetchResults_resultStandardScheme(); - } - } - - private static class fetchResults_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, fetchResults_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSFetchResultsResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, fetchResults_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fetchResults_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchResults_resultTupleScheme getScheme() { - return new fetchResults_resultTupleScheme(); - } - } - - private static class fetchResults_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fetchResults_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fetchResults_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSFetchResultsResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class fetchMetadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchMetadata_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchMetadata_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchMetadata_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSFetchMetadataReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchMetadataReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchMetadata_args.class, metaDataMap); - } - - public fetchMetadata_args() { - } - - public fetchMetadata_args( - TSFetchMetadataReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public fetchMetadata_args(fetchMetadata_args other) { - if (other.isSetReq()) { - this.req = new TSFetchMetadataReq(other.req); - } - } - - @Override - public fetchMetadata_args deepCopy() { - return new fetchMetadata_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSFetchMetadataReq getReq() { - return this.req; - } - - public fetchMetadata_args setReq(@org.apache.thrift.annotation.Nullable TSFetchMetadataReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSFetchMetadataReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof fetchMetadata_args) - return this.equals((fetchMetadata_args)that); - return false; - } - - public boolean equals(fetchMetadata_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(fetchMetadata_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchMetadata_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class fetchMetadata_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchMetadata_argsStandardScheme getScheme() { - return new fetchMetadata_argsStandardScheme(); - } - } - - private static class fetchMetadata_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, fetchMetadata_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSFetchMetadataReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, fetchMetadata_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fetchMetadata_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchMetadata_argsTupleScheme getScheme() { - return new fetchMetadata_argsTupleScheme(); - } - } - - private static class fetchMetadata_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fetchMetadata_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fetchMetadata_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSFetchMetadataReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class fetchMetadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchMetadata_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchMetadata_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchMetadata_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSFetchMetadataResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSFetchMetadataResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchMetadata_result.class, metaDataMap); - } - - public fetchMetadata_result() { - } - - public fetchMetadata_result( - TSFetchMetadataResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public fetchMetadata_result(fetchMetadata_result other) { - if (other.isSetSuccess()) { - this.success = new TSFetchMetadataResp(other.success); - } - } - - @Override - public fetchMetadata_result deepCopy() { - return new fetchMetadata_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSFetchMetadataResp getSuccess() { - return this.success; - } - - public fetchMetadata_result setSuccess(@org.apache.thrift.annotation.Nullable TSFetchMetadataResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSFetchMetadataResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof fetchMetadata_result) - return this.equals((fetchMetadata_result)that); - return false; - } - - public boolean equals(fetchMetadata_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(fetchMetadata_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchMetadata_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class fetchMetadata_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchMetadata_resultStandardScheme getScheme() { - return new fetchMetadata_resultStandardScheme(); - } - } - - private static class fetchMetadata_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, fetchMetadata_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSFetchMetadataResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, fetchMetadata_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fetchMetadata_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchMetadata_resultTupleScheme getScheme() { - return new fetchMetadata_resultTupleScheme(); - } - } - - private static class fetchMetadata_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fetchMetadata_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fetchMetadata_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSFetchMetadataResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class cancelOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelOperation_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelOperation_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelOperation_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSCancelOperationReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCancelOperationReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelOperation_args.class, metaDataMap); - } - - public cancelOperation_args() { - } - - public cancelOperation_args( - TSCancelOperationReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public cancelOperation_args(cancelOperation_args other) { - if (other.isSetReq()) { - this.req = new TSCancelOperationReq(other.req); - } - } - - @Override - public cancelOperation_args deepCopy() { - return new cancelOperation_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSCancelOperationReq getReq() { - return this.req; - } - - public cancelOperation_args setReq(@org.apache.thrift.annotation.Nullable TSCancelOperationReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSCancelOperationReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof cancelOperation_args) - return this.equals((cancelOperation_args)that); - return false; - } - - public boolean equals(cancelOperation_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(cancelOperation_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelOperation_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class cancelOperation_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public cancelOperation_argsStandardScheme getScheme() { - return new cancelOperation_argsStandardScheme(); - } - } - - private static class cancelOperation_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, cancelOperation_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSCancelOperationReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, cancelOperation_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class cancelOperation_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public cancelOperation_argsTupleScheme getScheme() { - return new cancelOperation_argsTupleScheme(); - } - } - - private static class cancelOperation_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cancelOperation_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, cancelOperation_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSCancelOperationReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class cancelOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelOperation_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelOperation_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelOperation_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelOperation_result.class, metaDataMap); - } - - public cancelOperation_result() { - } - - public cancelOperation_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public cancelOperation_result(cancelOperation_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public cancelOperation_result deepCopy() { - return new cancelOperation_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public cancelOperation_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof cancelOperation_result) - return this.equals((cancelOperation_result)that); - return false; - } - - public boolean equals(cancelOperation_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(cancelOperation_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelOperation_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class cancelOperation_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public cancelOperation_resultStandardScheme getScheme() { - return new cancelOperation_resultStandardScheme(); - } - } - - private static class cancelOperation_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, cancelOperation_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, cancelOperation_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class cancelOperation_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public cancelOperation_resultTupleScheme getScheme() { - return new cancelOperation_resultTupleScheme(); - } - } - - private static class cancelOperation_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cancelOperation_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, cancelOperation_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeOperation_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeOperation_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeOperation_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSCloseOperationReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCloseOperationReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeOperation_args.class, metaDataMap); - } - - public closeOperation_args() { - } - - public closeOperation_args( - TSCloseOperationReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public closeOperation_args(closeOperation_args other) { - if (other.isSetReq()) { - this.req = new TSCloseOperationReq(other.req); - } - } - - @Override - public closeOperation_args deepCopy() { - return new closeOperation_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSCloseOperationReq getReq() { - return this.req; - } - - public closeOperation_args setReq(@org.apache.thrift.annotation.Nullable TSCloseOperationReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSCloseOperationReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeOperation_args) - return this.equals((closeOperation_args)that); - return false; - } - - public boolean equals(closeOperation_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(closeOperation_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeOperation_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class closeOperation_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeOperation_argsStandardScheme getScheme() { - return new closeOperation_argsStandardScheme(); - } - } - - private static class closeOperation_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeOperation_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSCloseOperationReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeOperation_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeOperation_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeOperation_argsTupleScheme getScheme() { - return new closeOperation_argsTupleScheme(); - } - } - - private static class closeOperation_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeOperation_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeOperation_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSCloseOperationReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class closeOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeOperation_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeOperation_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeOperation_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeOperation_result.class, metaDataMap); - } - - public closeOperation_result() { - } - - public closeOperation_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public closeOperation_result(closeOperation_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public closeOperation_result deepCopy() { - return new closeOperation_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public closeOperation_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof closeOperation_result) - return this.equals((closeOperation_result)that); - return false; - } - - public boolean equals(closeOperation_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(closeOperation_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("closeOperation_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class closeOperation_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeOperation_resultStandardScheme getScheme() { - return new closeOperation_resultStandardScheme(); - } - } - - private static class closeOperation_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, closeOperation_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, closeOperation_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeOperation_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public closeOperation_resultTupleScheme getScheme() { - return new closeOperation_resultTupleScheme(); - } - } - - private static class closeOperation_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeOperation_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeOperation_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getTimeZone_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTimeZone_args"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTimeZone_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTimeZone_argsTupleSchemeFactory(); - - public long sessionId; // 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 { - SESSION_ID((short)1, "sessionId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTimeZone_args.class, metaDataMap); - } - - public getTimeZone_args() { - } - - public getTimeZone_args( - long sessionId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public getTimeZone_args(getTimeZone_args other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - } - - @Override - public getTimeZone_args deepCopy() { - return new getTimeZone_args(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public getTimeZone_args setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getTimeZone_args) - return this.equals((getTimeZone_args)that); - return false; - } - - public boolean equals(getTimeZone_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - return hashCode; - } - - @Override - public int compareTo(getTimeZone_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getTimeZone_args("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class getTimeZone_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getTimeZone_argsStandardScheme getScheme() { - return new getTimeZone_argsStandardScheme(); - } - } - - private static class getTimeZone_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getTimeZone_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getTimeZone_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getTimeZone_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getTimeZone_argsTupleScheme getScheme() { - return new getTimeZone_argsTupleScheme(); - } - } - - private static class getTimeZone_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getTimeZone_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSessionId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSessionId()) { - oprot.writeI64(struct.sessionId); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getTimeZone_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getTimeZone_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTimeZone_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTimeZone_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTimeZone_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSGetTimeZoneResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSGetTimeZoneResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTimeZone_result.class, metaDataMap); - } - - public getTimeZone_result() { - } - - public getTimeZone_result( - TSGetTimeZoneResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public getTimeZone_result(getTimeZone_result other) { - if (other.isSetSuccess()) { - this.success = new TSGetTimeZoneResp(other.success); - } - } - - @Override - public getTimeZone_result deepCopy() { - return new getTimeZone_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSGetTimeZoneResp getSuccess() { - return this.success; - } - - public getTimeZone_result setSuccess(@org.apache.thrift.annotation.Nullable TSGetTimeZoneResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSGetTimeZoneResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getTimeZone_result) - return this.equals((getTimeZone_result)that); - return false; - } - - public boolean equals(getTimeZone_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getTimeZone_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getTimeZone_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class getTimeZone_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getTimeZone_resultStandardScheme getScheme() { - return new getTimeZone_resultStandardScheme(); - } - } - - private static class getTimeZone_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getTimeZone_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSGetTimeZoneResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getTimeZone_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getTimeZone_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getTimeZone_resultTupleScheme getScheme() { - return new getTimeZone_resultTupleScheme(); - } - } - - private static class getTimeZone_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getTimeZone_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getTimeZone_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSGetTimeZoneResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class setTimeZone_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setTimeZone_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setTimeZone_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setTimeZone_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSSetTimeZoneReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSSetTimeZoneReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setTimeZone_args.class, metaDataMap); - } - - public setTimeZone_args() { - } - - public setTimeZone_args( - TSSetTimeZoneReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public setTimeZone_args(setTimeZone_args other) { - if (other.isSetReq()) { - this.req = new TSSetTimeZoneReq(other.req); - } - } - - @Override - public setTimeZone_args deepCopy() { - return new setTimeZone_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSSetTimeZoneReq getReq() { - return this.req; - } - - public setTimeZone_args setReq(@org.apache.thrift.annotation.Nullable TSSetTimeZoneReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSSetTimeZoneReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof setTimeZone_args) - return this.equals((setTimeZone_args)that); - return false; - } - - public boolean equals(setTimeZone_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(setTimeZone_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("setTimeZone_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class setTimeZone_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setTimeZone_argsStandardScheme getScheme() { - return new setTimeZone_argsStandardScheme(); - } - } - - private static class setTimeZone_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, setTimeZone_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSSetTimeZoneReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, setTimeZone_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class setTimeZone_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setTimeZone_argsTupleScheme getScheme() { - return new setTimeZone_argsTupleScheme(); - } - } - - private static class setTimeZone_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setTimeZone_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setTimeZone_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSSetTimeZoneReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class setTimeZone_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setTimeZone_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setTimeZone_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setTimeZone_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setTimeZone_result.class, metaDataMap); - } - - public setTimeZone_result() { - } - - public setTimeZone_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public setTimeZone_result(setTimeZone_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public setTimeZone_result deepCopy() { - return new setTimeZone_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public setTimeZone_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof setTimeZone_result) - return this.equals((setTimeZone_result)that); - return false; - } - - public boolean equals(setTimeZone_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(setTimeZone_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("setTimeZone_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class setTimeZone_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setTimeZone_resultStandardScheme getScheme() { - return new setTimeZone_resultStandardScheme(); - } - } - - private static class setTimeZone_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, setTimeZone_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, setTimeZone_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class setTimeZone_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setTimeZone_resultTupleScheme getScheme() { - return new setTimeZone_resultTupleScheme(); - } - } - - private static class setTimeZone_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setTimeZone_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setTimeZone_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getProperties_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getProperties_args"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getProperties_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getProperties_argsTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getProperties_args.class, metaDataMap); - } - - public getProperties_args() { - } - - /** - * Performs a deep copy on other. - */ - public getProperties_args(getProperties_args other) { - } - - @Override - public getProperties_args deepCopy() { - return new getProperties_args(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getProperties_args) - return this.equals((getProperties_args)that); - return false; - } - - public boolean equals(getProperties_args that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(getProperties_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getProperties_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class getProperties_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getProperties_argsStandardScheme getScheme() { - return new getProperties_argsStandardScheme(); - } - } - - private static class getProperties_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getProperties_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getProperties_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getProperties_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getProperties_argsTupleScheme getScheme() { - return new getProperties_argsTupleScheme(); - } - } - - private static class getProperties_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getProperties_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getProperties_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getProperties_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getProperties_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getProperties_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getProperties_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable ServerProperties success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ServerProperties.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getProperties_result.class, metaDataMap); - } - - public getProperties_result() { - } - - public getProperties_result( - ServerProperties success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public getProperties_result(getProperties_result other) { - if (other.isSetSuccess()) { - this.success = new ServerProperties(other.success); - } - } - - @Override - public getProperties_result deepCopy() { - return new getProperties_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public ServerProperties getSuccess() { - return this.success; - } - - public getProperties_result setSuccess(@org.apache.thrift.annotation.Nullable ServerProperties success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ServerProperties)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getProperties_result) - return this.equals((getProperties_result)that); - return false; - } - - public boolean equals(getProperties_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getProperties_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getProperties_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class getProperties_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getProperties_resultStandardScheme getScheme() { - return new getProperties_resultStandardScheme(); - } - } - - private static class getProperties_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getProperties_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new ServerProperties(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getProperties_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getProperties_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getProperties_resultTupleScheme getScheme() { - return new getProperties_resultTupleScheme(); - } - } - - private static class getProperties_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getProperties_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getProperties_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new ServerProperties(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class setStorageGroup_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setStorageGroup_args"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField STORAGE_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("storageGroup", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setStorageGroup_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setStorageGroup_argsTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String storageGroup; // 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 { - SESSION_ID((short)1, "sessionId"), - STORAGE_GROUP((short)2, "storageGroup"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // STORAGE_GROUP - return STORAGE_GROUP; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STORAGE_GROUP, new org.apache.thrift.meta_data.FieldMetaData("storageGroup", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setStorageGroup_args.class, metaDataMap); - } - - public setStorageGroup_args() { - } - - public setStorageGroup_args( - long sessionId, - java.lang.String storageGroup) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.storageGroup = storageGroup; - } - - /** - * Performs a deep copy on other. - */ - public setStorageGroup_args(setStorageGroup_args other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetStorageGroup()) { - this.storageGroup = other.storageGroup; - } - } - - @Override - public setStorageGroup_args deepCopy() { - return new setStorageGroup_args(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.storageGroup = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public setStorageGroup_args setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getStorageGroup() { - return this.storageGroup; - } - - public setStorageGroup_args setStorageGroup(@org.apache.thrift.annotation.Nullable java.lang.String storageGroup) { - this.storageGroup = storageGroup; - return this; - } - - public void unsetStorageGroup() { - this.storageGroup = null; - } - - /** Returns true if field storageGroup is set (has been assigned a value) and false otherwise */ - public boolean isSetStorageGroup() { - return this.storageGroup != null; - } - - public void setStorageGroupIsSet(boolean value) { - if (!value) { - this.storageGroup = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case STORAGE_GROUP: - if (value == null) { - unsetStorageGroup(); - } else { - setStorageGroup((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case STORAGE_GROUP: - return getStorageGroup(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case STORAGE_GROUP: - return isSetStorageGroup(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof setStorageGroup_args) - return this.equals((setStorageGroup_args)that); - return false; - } - - public boolean equals(setStorageGroup_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_storageGroup = true && this.isSetStorageGroup(); - boolean that_present_storageGroup = true && that.isSetStorageGroup(); - if (this_present_storageGroup || that_present_storageGroup) { - if (!(this_present_storageGroup && that_present_storageGroup)) - return false; - if (!this.storageGroup.equals(that.storageGroup)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetStorageGroup()) ? 131071 : 524287); - if (isSetStorageGroup()) - hashCode = hashCode * 8191 + storageGroup.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(setStorageGroup_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStorageGroup(), other.isSetStorageGroup()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStorageGroup()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storageGroup, other.storageGroup); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("setStorageGroup_args("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("storageGroup:"); - if (this.storageGroup == null) { - sb.append("null"); - } else { - sb.append(this.storageGroup); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class setStorageGroup_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setStorageGroup_argsStandardScheme getScheme() { - return new setStorageGroup_argsStandardScheme(); - } - } - - private static class setStorageGroup_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, setStorageGroup_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STORAGE_GROUP - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.storageGroup = iprot.readString(); - struct.setStorageGroupIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, setStorageGroup_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.storageGroup != null) { - oprot.writeFieldBegin(STORAGE_GROUP_FIELD_DESC); - oprot.writeString(struct.storageGroup); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class setStorageGroup_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setStorageGroup_argsTupleScheme getScheme() { - return new setStorageGroup_argsTupleScheme(); - } - } - - private static class setStorageGroup_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setStorageGroup_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSessionId()) { - optionals.set(0); - } - if (struct.isSetStorageGroup()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSessionId()) { - oprot.writeI64(struct.sessionId); - } - if (struct.isSetStorageGroup()) { - oprot.writeString(struct.storageGroup); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setStorageGroup_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } - if (incoming.get(1)) { - struct.storageGroup = iprot.readString(); - struct.setStorageGroupIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class setStorageGroup_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setStorageGroup_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setStorageGroup_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setStorageGroup_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setStorageGroup_result.class, metaDataMap); - } - - public setStorageGroup_result() { - } - - public setStorageGroup_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public setStorageGroup_result(setStorageGroup_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public setStorageGroup_result deepCopy() { - return new setStorageGroup_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public setStorageGroup_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof setStorageGroup_result) - return this.equals((setStorageGroup_result)that); - return false; - } - - public boolean equals(setStorageGroup_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(setStorageGroup_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("setStorageGroup_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class setStorageGroup_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setStorageGroup_resultStandardScheme getScheme() { - return new setStorageGroup_resultStandardScheme(); - } - } - - private static class setStorageGroup_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, setStorageGroup_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, setStorageGroup_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class setStorageGroup_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setStorageGroup_resultTupleScheme getScheme() { - return new setStorageGroup_resultTupleScheme(); - } - } - - private static class setStorageGroup_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setStorageGroup_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setStorageGroup_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createTimeseries_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTimeseries_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTimeseries_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTimeseries_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSCreateTimeseriesReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCreateTimeseriesReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTimeseries_args.class, metaDataMap); - } - - public createTimeseries_args() { - } - - public createTimeseries_args( - TSCreateTimeseriesReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public createTimeseries_args(createTimeseries_args other) { - if (other.isSetReq()) { - this.req = new TSCreateTimeseriesReq(other.req); - } - } - - @Override - public createTimeseries_args deepCopy() { - return new createTimeseries_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSCreateTimeseriesReq getReq() { - return this.req; - } - - public createTimeseries_args setReq(@org.apache.thrift.annotation.Nullable TSCreateTimeseriesReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSCreateTimeseriesReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createTimeseries_args) - return this.equals((createTimeseries_args)that); - return false; - } - - public boolean equals(createTimeseries_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createTimeseries_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createTimeseries_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createTimeseries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createTimeseries_argsStandardScheme getScheme() { - return new createTimeseries_argsStandardScheme(); - } - } - - private static class createTimeseries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSCreateTimeseriesReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createTimeseries_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createTimeseries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createTimeseries_argsTupleScheme getScheme() { - return new createTimeseries_argsTupleScheme(); - } - } - - private static class createTimeseries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSCreateTimeseriesReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createTimeseries_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTimeseries_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTimeseries_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTimeseries_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTimeseries_result.class, metaDataMap); - } - - public createTimeseries_result() { - } - - public createTimeseries_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public createTimeseries_result(createTimeseries_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public createTimeseries_result deepCopy() { - return new createTimeseries_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public createTimeseries_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createTimeseries_result) - return this.equals((createTimeseries_result)that); - return false; - } - - public boolean equals(createTimeseries_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createTimeseries_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createTimeseries_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createTimeseries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createTimeseries_resultStandardScheme getScheme() { - return new createTimeseries_resultStandardScheme(); - } - } - - private static class createTimeseries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createTimeseries_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createTimeseries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createTimeseries_resultTupleScheme getScheme() { - return new createTimeseries_resultTupleScheme(); - } - } - - private static class createTimeseries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createAlignedTimeseries_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAlignedTimeseries_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createAlignedTimeseries_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createAlignedTimeseries_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSCreateAlignedTimeseriesReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCreateAlignedTimeseriesReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createAlignedTimeseries_args.class, metaDataMap); - } - - public createAlignedTimeseries_args() { - } - - public createAlignedTimeseries_args( - TSCreateAlignedTimeseriesReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public createAlignedTimeseries_args(createAlignedTimeseries_args other) { - if (other.isSetReq()) { - this.req = new TSCreateAlignedTimeseriesReq(other.req); - } - } - - @Override - public createAlignedTimeseries_args deepCopy() { - return new createAlignedTimeseries_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSCreateAlignedTimeseriesReq getReq() { - return this.req; - } - - public createAlignedTimeseries_args setReq(@org.apache.thrift.annotation.Nullable TSCreateAlignedTimeseriesReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSCreateAlignedTimeseriesReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createAlignedTimeseries_args) - return this.equals((createAlignedTimeseries_args)that); - return false; - } - - public boolean equals(createAlignedTimeseries_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createAlignedTimeseries_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createAlignedTimeseries_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createAlignedTimeseries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createAlignedTimeseries_argsStandardScheme getScheme() { - return new createAlignedTimeseries_argsStandardScheme(); - } - } - - private static class createAlignedTimeseries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createAlignedTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSCreateAlignedTimeseriesReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createAlignedTimeseries_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createAlignedTimeseries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createAlignedTimeseries_argsTupleScheme getScheme() { - return new createAlignedTimeseries_argsTupleScheme(); - } - } - - private static class createAlignedTimeseries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createAlignedTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createAlignedTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSCreateAlignedTimeseriesReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createAlignedTimeseries_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAlignedTimeseries_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createAlignedTimeseries_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createAlignedTimeseries_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createAlignedTimeseries_result.class, metaDataMap); - } - - public createAlignedTimeseries_result() { - } - - public createAlignedTimeseries_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public createAlignedTimeseries_result(createAlignedTimeseries_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public createAlignedTimeseries_result deepCopy() { - return new createAlignedTimeseries_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public createAlignedTimeseries_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createAlignedTimeseries_result) - return this.equals((createAlignedTimeseries_result)that); - return false; - } - - public boolean equals(createAlignedTimeseries_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createAlignedTimeseries_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createAlignedTimeseries_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createAlignedTimeseries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createAlignedTimeseries_resultStandardScheme getScheme() { - return new createAlignedTimeseries_resultStandardScheme(); - } - } - - private static class createAlignedTimeseries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createAlignedTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createAlignedTimeseries_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createAlignedTimeseries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createAlignedTimeseries_resultTupleScheme getScheme() { - return new createAlignedTimeseries_resultTupleScheme(); - } - } - - private static class createAlignedTimeseries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createAlignedTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createAlignedTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createMultiTimeseries_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createMultiTimeseries_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createMultiTimeseries_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createMultiTimeseries_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSCreateMultiTimeseriesReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCreateMultiTimeseriesReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createMultiTimeseries_args.class, metaDataMap); - } - - public createMultiTimeseries_args() { - } - - public createMultiTimeseries_args( - TSCreateMultiTimeseriesReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public createMultiTimeseries_args(createMultiTimeseries_args other) { - if (other.isSetReq()) { - this.req = new TSCreateMultiTimeseriesReq(other.req); - } - } - - @Override - public createMultiTimeseries_args deepCopy() { - return new createMultiTimeseries_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSCreateMultiTimeseriesReq getReq() { - return this.req; - } - - public createMultiTimeseries_args setReq(@org.apache.thrift.annotation.Nullable TSCreateMultiTimeseriesReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSCreateMultiTimeseriesReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createMultiTimeseries_args) - return this.equals((createMultiTimeseries_args)that); - return false; - } - - public boolean equals(createMultiTimeseries_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createMultiTimeseries_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createMultiTimeseries_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createMultiTimeseries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createMultiTimeseries_argsStandardScheme getScheme() { - return new createMultiTimeseries_argsStandardScheme(); - } - } - - private static class createMultiTimeseries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createMultiTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSCreateMultiTimeseriesReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createMultiTimeseries_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createMultiTimeseries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createMultiTimeseries_argsTupleScheme getScheme() { - return new createMultiTimeseries_argsTupleScheme(); - } - } - - private static class createMultiTimeseries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createMultiTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createMultiTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSCreateMultiTimeseriesReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createMultiTimeseries_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createMultiTimeseries_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createMultiTimeseries_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createMultiTimeseries_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createMultiTimeseries_result.class, metaDataMap); - } - - public createMultiTimeseries_result() { - } - - public createMultiTimeseries_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public createMultiTimeseries_result(createMultiTimeseries_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public createMultiTimeseries_result deepCopy() { - return new createMultiTimeseries_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public createMultiTimeseries_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createMultiTimeseries_result) - return this.equals((createMultiTimeseries_result)that); - return false; - } - - public boolean equals(createMultiTimeseries_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createMultiTimeseries_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createMultiTimeseries_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createMultiTimeseries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createMultiTimeseries_resultStandardScheme getScheme() { - return new createMultiTimeseries_resultStandardScheme(); - } - } - - private static class createMultiTimeseries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createMultiTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createMultiTimeseries_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createMultiTimeseries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createMultiTimeseries_resultTupleScheme getScheme() { - return new createMultiTimeseries_resultTupleScheme(); - } - } - - private static class createMultiTimeseries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createMultiTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createMultiTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class deleteTimeseries_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTimeseries_args"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteTimeseries_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteTimeseries_argsTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List path; // 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 { - SESSION_ID((short)1, "sessionId"), - PATH((short)2, "path"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PATH - return PATH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTimeseries_args.class, metaDataMap); - } - - public deleteTimeseries_args() { - } - - public deleteTimeseries_args( - long sessionId, - java.util.List path) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.path = path; - } - - /** - * Performs a deep copy on other. - */ - public deleteTimeseries_args(deleteTimeseries_args other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPath()) { - java.util.List __this__path = new java.util.ArrayList(other.path); - this.path = __this__path; - } - } - - @Override - public deleteTimeseries_args deepCopy() { - return new deleteTimeseries_args(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.path = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public deleteTimeseries_args setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getPathSize() { - return (this.path == null) ? 0 : this.path.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getPathIterator() { - return (this.path == null) ? null : this.path.iterator(); - } - - public void addToPath(java.lang.String elem) { - if (this.path == null) { - this.path = new java.util.ArrayList(); - } - this.path.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getPath() { - return this.path; - } - - public deleteTimeseries_args setPath(@org.apache.thrift.annotation.Nullable java.util.List path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PATH: - return getPath(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PATH: - return isSetPath(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof deleteTimeseries_args) - return this.equals((deleteTimeseries_args)that); - return false; - } - - public boolean equals(deleteTimeseries_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287); - if (isSetPath()) - hashCode = hashCode * 8191 + path.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(deleteTimeseries_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPath(), other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteTimeseries_args("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class deleteTimeseries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteTimeseries_argsStandardScheme getScheme() { - return new deleteTimeseries_argsStandardScheme(); - } - } - - private static class deleteTimeseries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list758 = iprot.readListBegin(); - struct.path = new java.util.ArrayList(_list758.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem759; - for (int _i760 = 0; _i760 < _list758.size; ++_i760) - { - _elem759 = iprot.readString(); - struct.path.add(_elem759); - } - iprot.readListEnd(); - } - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTimeseries_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.path.size())); - for (java.lang.String _iter761 : struct.path) - { - oprot.writeString(_iter761); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteTimeseries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteTimeseries_argsTupleScheme getScheme() { - return new deleteTimeseries_argsTupleScheme(); - } - } - - private static class deleteTimeseries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSessionId()) { - optionals.set(0); - } - if (struct.isSetPath()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSessionId()) { - oprot.writeI64(struct.sessionId); - } - if (struct.isSetPath()) { - { - oprot.writeI32(struct.path.size()); - for (java.lang.String _iter762 : struct.path) - { - oprot.writeString(_iter762); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteTimeseries_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list763 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.path = new java.util.ArrayList(_list763.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem764; - for (int _i765 = 0; _i765 < _list763.size; ++_i765) - { - _elem764 = iprot.readString(); - struct.path.add(_elem764); - } - } - struct.setPathIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class deleteTimeseries_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTimeseries_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteTimeseries_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteTimeseries_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTimeseries_result.class, metaDataMap); - } - - public deleteTimeseries_result() { - } - - public deleteTimeseries_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public deleteTimeseries_result(deleteTimeseries_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public deleteTimeseries_result deepCopy() { - return new deleteTimeseries_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public deleteTimeseries_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof deleteTimeseries_result) - return this.equals((deleteTimeseries_result)that); - return false; - } - - public boolean equals(deleteTimeseries_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(deleteTimeseries_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteTimeseries_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class deleteTimeseries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteTimeseries_resultStandardScheme getScheme() { - return new deleteTimeseries_resultStandardScheme(); - } - } - - private static class deleteTimeseries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTimeseries_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteTimeseries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteTimeseries_resultTupleScheme getScheme() { - return new deleteTimeseries_resultTupleScheme(); - } - } - - private static class deleteTimeseries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteTimeseries_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class deleteStorageGroups_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteStorageGroups_args"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField STORAGE_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("storageGroup", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteStorageGroups_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteStorageGroups_argsTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List storageGroup; // 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 { - SESSION_ID((short)1, "sessionId"), - STORAGE_GROUP((short)2, "storageGroup"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // STORAGE_GROUP - return STORAGE_GROUP; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STORAGE_GROUP, new org.apache.thrift.meta_data.FieldMetaData("storageGroup", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteStorageGroups_args.class, metaDataMap); - } - - public deleteStorageGroups_args() { - } - - public deleteStorageGroups_args( - long sessionId, - java.util.List storageGroup) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.storageGroup = storageGroup; - } - - /** - * Performs a deep copy on other. - */ - public deleteStorageGroups_args(deleteStorageGroups_args other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetStorageGroup()) { - java.util.List __this__storageGroup = new java.util.ArrayList(other.storageGroup); - this.storageGroup = __this__storageGroup; - } - } - - @Override - public deleteStorageGroups_args deepCopy() { - return new deleteStorageGroups_args(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.storageGroup = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public deleteStorageGroups_args setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getStorageGroupSize() { - return (this.storageGroup == null) ? 0 : this.storageGroup.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getStorageGroupIterator() { - return (this.storageGroup == null) ? null : this.storageGroup.iterator(); - } - - public void addToStorageGroup(java.lang.String elem) { - if (this.storageGroup == null) { - this.storageGroup = new java.util.ArrayList(); - } - this.storageGroup.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getStorageGroup() { - return this.storageGroup; - } - - public deleteStorageGroups_args setStorageGroup(@org.apache.thrift.annotation.Nullable java.util.List storageGroup) { - this.storageGroup = storageGroup; - return this; - } - - public void unsetStorageGroup() { - this.storageGroup = null; - } - - /** Returns true if field storageGroup is set (has been assigned a value) and false otherwise */ - public boolean isSetStorageGroup() { - return this.storageGroup != null; - } - - public void setStorageGroupIsSet(boolean value) { - if (!value) { - this.storageGroup = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case STORAGE_GROUP: - if (value == null) { - unsetStorageGroup(); - } else { - setStorageGroup((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case STORAGE_GROUP: - return getStorageGroup(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case STORAGE_GROUP: - return isSetStorageGroup(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof deleteStorageGroups_args) - return this.equals((deleteStorageGroups_args)that); - return false; - } - - public boolean equals(deleteStorageGroups_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_storageGroup = true && this.isSetStorageGroup(); - boolean that_present_storageGroup = true && that.isSetStorageGroup(); - if (this_present_storageGroup || that_present_storageGroup) { - if (!(this_present_storageGroup && that_present_storageGroup)) - return false; - if (!this.storageGroup.equals(that.storageGroup)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetStorageGroup()) ? 131071 : 524287); - if (isSetStorageGroup()) - hashCode = hashCode * 8191 + storageGroup.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(deleteStorageGroups_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStorageGroup(), other.isSetStorageGroup()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStorageGroup()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storageGroup, other.storageGroup); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteStorageGroups_args("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("storageGroup:"); - if (this.storageGroup == null) { - sb.append("null"); - } else { - sb.append(this.storageGroup); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class deleteStorageGroups_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteStorageGroups_argsStandardScheme getScheme() { - return new deleteStorageGroups_argsStandardScheme(); - } - } - - private static class deleteStorageGroups_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteStorageGroups_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STORAGE_GROUP - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list766 = iprot.readListBegin(); - struct.storageGroup = new java.util.ArrayList(_list766.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem767; - for (int _i768 = 0; _i768 < _list766.size; ++_i768) - { - _elem767 = iprot.readString(); - struct.storageGroup.add(_elem767); - } - iprot.readListEnd(); - } - struct.setStorageGroupIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteStorageGroups_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.storageGroup != null) { - oprot.writeFieldBegin(STORAGE_GROUP_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.storageGroup.size())); - for (java.lang.String _iter769 : struct.storageGroup) - { - oprot.writeString(_iter769); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteStorageGroups_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteStorageGroups_argsTupleScheme getScheme() { - return new deleteStorageGroups_argsTupleScheme(); - } - } - - private static class deleteStorageGroups_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteStorageGroups_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSessionId()) { - optionals.set(0); - } - if (struct.isSetStorageGroup()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSessionId()) { - oprot.writeI64(struct.sessionId); - } - if (struct.isSetStorageGroup()) { - { - oprot.writeI32(struct.storageGroup.size()); - for (java.lang.String _iter770 : struct.storageGroup) - { - oprot.writeString(_iter770); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteStorageGroups_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list771 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.storageGroup = new java.util.ArrayList(_list771.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem772; - for (int _i773 = 0; _i773 < _list771.size; ++_i773) - { - _elem772 = iprot.readString(); - struct.storageGroup.add(_elem772); - } - } - struct.setStorageGroupIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class deleteStorageGroups_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteStorageGroups_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteStorageGroups_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteStorageGroups_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteStorageGroups_result.class, metaDataMap); - } - - public deleteStorageGroups_result() { - } - - public deleteStorageGroups_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public deleteStorageGroups_result(deleteStorageGroups_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public deleteStorageGroups_result deepCopy() { - return new deleteStorageGroups_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public deleteStorageGroups_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof deleteStorageGroups_result) - return this.equals((deleteStorageGroups_result)that); - return false; - } - - public boolean equals(deleteStorageGroups_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(deleteStorageGroups_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteStorageGroups_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class deleteStorageGroups_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteStorageGroups_resultStandardScheme getScheme() { - return new deleteStorageGroups_resultStandardScheme(); - } - } - - private static class deleteStorageGroups_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteStorageGroups_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteStorageGroups_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteStorageGroups_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteStorageGroups_resultTupleScheme getScheme() { - return new deleteStorageGroups_resultTupleScheme(); - } - } - - private static class deleteStorageGroups_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteStorageGroups_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteStorageGroups_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertRecord_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecord_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecord_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecord_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertRecordReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecord_args.class, metaDataMap); - } - - public insertRecord_args() { - } - - public insertRecord_args( - TSInsertRecordReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public insertRecord_args(insertRecord_args other) { - if (other.isSetReq()) { - this.req = new TSInsertRecordReq(other.req); - } - } - - @Override - public insertRecord_args deepCopy() { - return new insertRecord_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertRecordReq getReq() { - return this.req; - } - - public insertRecord_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertRecordReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertRecord_args) - return this.equals((insertRecord_args)that); - return false; - } - - public boolean equals(insertRecord_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertRecord_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecord_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertRecord_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecord_argsStandardScheme getScheme() { - return new insertRecord_argsStandardScheme(); - } - } - - private static class insertRecord_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertRecordReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecord_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertRecord_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecord_argsTupleScheme getScheme() { - return new insertRecord_argsTupleScheme(); - } - } - - private static class insertRecord_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertRecordReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertRecord_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecord_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecord_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecord_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecord_result.class, metaDataMap); - } - - public insertRecord_result() { - } - - public insertRecord_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public insertRecord_result(insertRecord_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public insertRecord_result deepCopy() { - return new insertRecord_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public insertRecord_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertRecord_result) - return this.equals((insertRecord_result)that); - return false; - } - - public boolean equals(insertRecord_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertRecord_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecord_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertRecord_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecord_resultStandardScheme getScheme() { - return new insertRecord_resultStandardScheme(); - } - } - - private static class insertRecord_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecord_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertRecord_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecord_resultTupleScheme getScheme() { - return new insertRecord_resultTupleScheme(); - } - } - - private static class insertRecord_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertStringRecord_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecord_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecord_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecord_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertStringRecordReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecord_args.class, metaDataMap); - } - - public insertStringRecord_args() { - } - - public insertStringRecord_args( - TSInsertStringRecordReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public insertStringRecord_args(insertStringRecord_args other) { - if (other.isSetReq()) { - this.req = new TSInsertStringRecordReq(other.req); - } - } - - @Override - public insertStringRecord_args deepCopy() { - return new insertStringRecord_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertStringRecordReq getReq() { - return this.req; - } - - public insertStringRecord_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertStringRecordReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertStringRecord_args) - return this.equals((insertStringRecord_args)that); - return false; - } - - public boolean equals(insertStringRecord_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertStringRecord_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecord_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertStringRecord_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecord_argsStandardScheme getScheme() { - return new insertStringRecord_argsStandardScheme(); - } - } - - private static class insertStringRecord_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertStringRecordReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecord_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertStringRecord_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecord_argsTupleScheme getScheme() { - return new insertStringRecord_argsTupleScheme(); - } - } - - private static class insertStringRecord_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertStringRecordReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertStringRecord_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecord_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecord_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecord_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecord_result.class, metaDataMap); - } - - public insertStringRecord_result() { - } - - public insertStringRecord_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public insertStringRecord_result(insertStringRecord_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public insertStringRecord_result deepCopy() { - return new insertStringRecord_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public insertStringRecord_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertStringRecord_result) - return this.equals((insertStringRecord_result)that); - return false; - } - - public boolean equals(insertStringRecord_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertStringRecord_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecord_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertStringRecord_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecord_resultStandardScheme getScheme() { - return new insertStringRecord_resultStandardScheme(); - } - } - - private static class insertStringRecord_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecord_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertStringRecord_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecord_resultTupleScheme getScheme() { - return new insertStringRecord_resultTupleScheme(); - } - } - - private static class insertStringRecord_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertTablet_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertTablet_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertTablet_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertTablet_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertTabletReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertTabletReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTablet_args.class, metaDataMap); - } - - public insertTablet_args() { - } - - public insertTablet_args( - TSInsertTabletReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public insertTablet_args(insertTablet_args other) { - if (other.isSetReq()) { - this.req = new TSInsertTabletReq(other.req); - } - } - - @Override - public insertTablet_args deepCopy() { - return new insertTablet_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertTabletReq getReq() { - return this.req; - } - - public insertTablet_args setReq(@org.apache.thrift.annotation.Nullable TSInsertTabletReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertTabletReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertTablet_args) - return this.equals((insertTablet_args)that); - return false; - } - - public boolean equals(insertTablet_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertTablet_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertTablet_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertTablet_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertTablet_argsStandardScheme getScheme() { - return new insertTablet_argsStandardScheme(); - } - } - - private static class insertTablet_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertTablet_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertTabletReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertTablet_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertTablet_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertTablet_argsTupleScheme getScheme() { - return new insertTablet_argsTupleScheme(); - } - } - - private static class insertTablet_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertTablet_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertTablet_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertTabletReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertTablet_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertTablet_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertTablet_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertTablet_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTablet_result.class, metaDataMap); - } - - public insertTablet_result() { - } - - public insertTablet_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public insertTablet_result(insertTablet_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public insertTablet_result deepCopy() { - return new insertTablet_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public insertTablet_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertTablet_result) - return this.equals((insertTablet_result)that); - return false; - } - - public boolean equals(insertTablet_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertTablet_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertTablet_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertTablet_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertTablet_resultStandardScheme getScheme() { - return new insertTablet_resultStandardScheme(); - } - } - - private static class insertTablet_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertTablet_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertTablet_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertTablet_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertTablet_resultTupleScheme getScheme() { - return new insertTablet_resultTupleScheme(); - } - } - - private static class insertTablet_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertTablet_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertTablet_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertTablets_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertTablets_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertTablets_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertTablets_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertTabletsReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertTabletsReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTablets_args.class, metaDataMap); - } - - public insertTablets_args() { - } - - public insertTablets_args( - TSInsertTabletsReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public insertTablets_args(insertTablets_args other) { - if (other.isSetReq()) { - this.req = new TSInsertTabletsReq(other.req); - } - } - - @Override - public insertTablets_args deepCopy() { - return new insertTablets_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertTabletsReq getReq() { - return this.req; - } - - public insertTablets_args setReq(@org.apache.thrift.annotation.Nullable TSInsertTabletsReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertTabletsReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertTablets_args) - return this.equals((insertTablets_args)that); - return false; - } - - public boolean equals(insertTablets_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertTablets_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertTablets_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertTablets_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertTablets_argsStandardScheme getScheme() { - return new insertTablets_argsStandardScheme(); - } - } - - private static class insertTablets_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertTablets_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertTabletsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertTablets_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertTablets_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertTablets_argsTupleScheme getScheme() { - return new insertTablets_argsTupleScheme(); - } - } - - private static class insertTablets_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertTablets_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertTablets_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertTabletsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertTablets_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertTablets_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertTablets_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertTablets_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTablets_result.class, metaDataMap); - } - - public insertTablets_result() { - } - - public insertTablets_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public insertTablets_result(insertTablets_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public insertTablets_result deepCopy() { - return new insertTablets_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public insertTablets_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertTablets_result) - return this.equals((insertTablets_result)that); - return false; - } - - public boolean equals(insertTablets_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertTablets_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertTablets_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertTablets_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertTablets_resultStandardScheme getScheme() { - return new insertTablets_resultStandardScheme(); - } - } - - private static class insertTablets_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertTablets_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertTablets_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertTablets_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertTablets_resultTupleScheme getScheme() { - return new insertTablets_resultTupleScheme(); - } - } - - private static class insertTablets_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertTablets_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertTablets_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertRecords_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecords_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecords_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecords_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertRecordsReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordsReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecords_args.class, metaDataMap); - } - - public insertRecords_args() { - } - - public insertRecords_args( - TSInsertRecordsReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public insertRecords_args(insertRecords_args other) { - if (other.isSetReq()) { - this.req = new TSInsertRecordsReq(other.req); - } - } - - @Override - public insertRecords_args deepCopy() { - return new insertRecords_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertRecordsReq getReq() { - return this.req; - } - - public insertRecords_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordsReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertRecordsReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertRecords_args) - return this.equals((insertRecords_args)that); - return false; - } - - public boolean equals(insertRecords_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertRecords_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecords_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertRecords_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecords_argsStandardScheme getScheme() { - return new insertRecords_argsStandardScheme(); - } - } - - private static class insertRecords_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertRecordsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecords_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertRecords_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecords_argsTupleScheme getScheme() { - return new insertRecords_argsTupleScheme(); - } - } - - private static class insertRecords_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertRecordsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertRecords_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecords_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecords_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecords_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecords_result.class, metaDataMap); - } - - public insertRecords_result() { - } - - public insertRecords_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public insertRecords_result(insertRecords_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public insertRecords_result deepCopy() { - return new insertRecords_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public insertRecords_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertRecords_result) - return this.equals((insertRecords_result)that); - return false; - } - - public boolean equals(insertRecords_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertRecords_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecords_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertRecords_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecords_resultStandardScheme getScheme() { - return new insertRecords_resultStandardScheme(); - } - } - - private static class insertRecords_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecords_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertRecords_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecords_resultTupleScheme getScheme() { - return new insertRecords_resultTupleScheme(); - } - } - - private static class insertRecords_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertRecordsOfOneDevice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecordsOfOneDevice_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecordsOfOneDevice_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecordsOfOneDevice_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertRecordsOfOneDeviceReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordsOfOneDeviceReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecordsOfOneDevice_args.class, metaDataMap); - } - - public insertRecordsOfOneDevice_args() { - } - - public insertRecordsOfOneDevice_args( - TSInsertRecordsOfOneDeviceReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public insertRecordsOfOneDevice_args(insertRecordsOfOneDevice_args other) { - if (other.isSetReq()) { - this.req = new TSInsertRecordsOfOneDeviceReq(other.req); - } - } - - @Override - public insertRecordsOfOneDevice_args deepCopy() { - return new insertRecordsOfOneDevice_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertRecordsOfOneDeviceReq getReq() { - return this.req; - } - - public insertRecordsOfOneDevice_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordsOfOneDeviceReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertRecordsOfOneDeviceReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertRecordsOfOneDevice_args) - return this.equals((insertRecordsOfOneDevice_args)that); - return false; - } - - public boolean equals(insertRecordsOfOneDevice_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertRecordsOfOneDevice_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecordsOfOneDevice_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertRecordsOfOneDevice_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecordsOfOneDevice_argsStandardScheme getScheme() { - return new insertRecordsOfOneDevice_argsStandardScheme(); - } - } - - private static class insertRecordsOfOneDevice_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertRecordsOfOneDeviceReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertRecordsOfOneDevice_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecordsOfOneDevice_argsTupleScheme getScheme() { - return new insertRecordsOfOneDevice_argsTupleScheme(); - } - } - - private static class insertRecordsOfOneDevice_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertRecordsOfOneDeviceReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertRecordsOfOneDevice_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertRecordsOfOneDevice_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertRecordsOfOneDevice_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertRecordsOfOneDevice_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertRecordsOfOneDevice_result.class, metaDataMap); - } - - public insertRecordsOfOneDevice_result() { - } - - public insertRecordsOfOneDevice_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public insertRecordsOfOneDevice_result(insertRecordsOfOneDevice_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public insertRecordsOfOneDevice_result deepCopy() { - return new insertRecordsOfOneDevice_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public insertRecordsOfOneDevice_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertRecordsOfOneDevice_result) - return this.equals((insertRecordsOfOneDevice_result)that); - return false; - } - - public boolean equals(insertRecordsOfOneDevice_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertRecordsOfOneDevice_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertRecordsOfOneDevice_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertRecordsOfOneDevice_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecordsOfOneDevice_resultStandardScheme getScheme() { - return new insertRecordsOfOneDevice_resultStandardScheme(); - } - } - - private static class insertRecordsOfOneDevice_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertRecordsOfOneDevice_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertRecordsOfOneDevice_resultTupleScheme getScheme() { - return new insertRecordsOfOneDevice_resultTupleScheme(); - } - } - - private static class insertRecordsOfOneDevice_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertStringRecordsOfOneDevice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecordsOfOneDevice_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecordsOfOneDevice_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecordsOfOneDevice_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertStringRecordsOfOneDeviceReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordsOfOneDeviceReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecordsOfOneDevice_args.class, metaDataMap); - } - - public insertStringRecordsOfOneDevice_args() { - } - - public insertStringRecordsOfOneDevice_args( - TSInsertStringRecordsOfOneDeviceReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public insertStringRecordsOfOneDevice_args(insertStringRecordsOfOneDevice_args other) { - if (other.isSetReq()) { - this.req = new TSInsertStringRecordsOfOneDeviceReq(other.req); - } - } - - @Override - public insertStringRecordsOfOneDevice_args deepCopy() { - return new insertStringRecordsOfOneDevice_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertStringRecordsOfOneDeviceReq getReq() { - return this.req; - } - - public insertStringRecordsOfOneDevice_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordsOfOneDeviceReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertStringRecordsOfOneDeviceReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertStringRecordsOfOneDevice_args) - return this.equals((insertStringRecordsOfOneDevice_args)that); - return false; - } - - public boolean equals(insertStringRecordsOfOneDevice_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertStringRecordsOfOneDevice_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecordsOfOneDevice_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertStringRecordsOfOneDevice_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecordsOfOneDevice_argsStandardScheme getScheme() { - return new insertStringRecordsOfOneDevice_argsStandardScheme(); - } - } - - private static class insertStringRecordsOfOneDevice_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertStringRecordsOfOneDeviceReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertStringRecordsOfOneDevice_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecordsOfOneDevice_argsTupleScheme getScheme() { - return new insertStringRecordsOfOneDevice_argsTupleScheme(); - } - } - - private static class insertStringRecordsOfOneDevice_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertStringRecordsOfOneDeviceReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertStringRecordsOfOneDevice_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecordsOfOneDevice_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecordsOfOneDevice_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecordsOfOneDevice_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecordsOfOneDevice_result.class, metaDataMap); - } - - public insertStringRecordsOfOneDevice_result() { - } - - public insertStringRecordsOfOneDevice_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public insertStringRecordsOfOneDevice_result(insertStringRecordsOfOneDevice_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public insertStringRecordsOfOneDevice_result deepCopy() { - return new insertStringRecordsOfOneDevice_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public insertStringRecordsOfOneDevice_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertStringRecordsOfOneDevice_result) - return this.equals((insertStringRecordsOfOneDevice_result)that); - return false; - } - - public boolean equals(insertStringRecordsOfOneDevice_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertStringRecordsOfOneDevice_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecordsOfOneDevice_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertStringRecordsOfOneDevice_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecordsOfOneDevice_resultStandardScheme getScheme() { - return new insertStringRecordsOfOneDevice_resultStandardScheme(); - } - } - - private static class insertStringRecordsOfOneDevice_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertStringRecordsOfOneDevice_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecordsOfOneDevice_resultTupleScheme getScheme() { - return new insertStringRecordsOfOneDevice_resultTupleScheme(); - } - } - - private static class insertStringRecordsOfOneDevice_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertStringRecords_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecords_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecords_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecords_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertStringRecordsReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordsReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecords_args.class, metaDataMap); - } - - public insertStringRecords_args() { - } - - public insertStringRecords_args( - TSInsertStringRecordsReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public insertStringRecords_args(insertStringRecords_args other) { - if (other.isSetReq()) { - this.req = new TSInsertStringRecordsReq(other.req); - } - } - - @Override - public insertStringRecords_args deepCopy() { - return new insertStringRecords_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertStringRecordsReq getReq() { - return this.req; - } - - public insertStringRecords_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordsReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertStringRecordsReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertStringRecords_args) - return this.equals((insertStringRecords_args)that); - return false; - } - - public boolean equals(insertStringRecords_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertStringRecords_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecords_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertStringRecords_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecords_argsStandardScheme getScheme() { - return new insertStringRecords_argsStandardScheme(); - } - } - - private static class insertStringRecords_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertStringRecordsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecords_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertStringRecords_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecords_argsTupleScheme getScheme() { - return new insertStringRecords_argsTupleScheme(); - } - } - - private static class insertStringRecords_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertStringRecordsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class insertStringRecords_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertStringRecords_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new insertStringRecords_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new insertStringRecords_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertStringRecords_result.class, metaDataMap); - } - - public insertStringRecords_result() { - } - - public insertStringRecords_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public insertStringRecords_result(insertStringRecords_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public insertStringRecords_result deepCopy() { - return new insertStringRecords_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public insertStringRecords_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof insertStringRecords_result) - return this.equals((insertStringRecords_result)that); - return false; - } - - public boolean equals(insertStringRecords_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(insertStringRecords_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("insertStringRecords_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class insertStringRecords_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecords_resultStandardScheme getScheme() { - return new insertStringRecords_resultStandardScheme(); - } - } - - private static class insertStringRecords_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, insertStringRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, insertStringRecords_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class insertStringRecords_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public insertStringRecords_resultTupleScheme getScheme() { - return new insertStringRecords_resultTupleScheme(); - } - } - - private static class insertStringRecords_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, insertStringRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, insertStringRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertTablet_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertTablet_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertTablet_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertTablet_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertTabletReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertTabletReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertTablet_args.class, metaDataMap); - } - - public testInsertTablet_args() { - } - - public testInsertTablet_args( - TSInsertTabletReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public testInsertTablet_args(testInsertTablet_args other) { - if (other.isSetReq()) { - this.req = new TSInsertTabletReq(other.req); - } - } - - @Override - public testInsertTablet_args deepCopy() { - return new testInsertTablet_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertTabletReq getReq() { - return this.req; - } - - public testInsertTablet_args setReq(@org.apache.thrift.annotation.Nullable TSInsertTabletReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertTabletReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertTablet_args) - return this.equals((testInsertTablet_args)that); - return false; - } - - public boolean equals(testInsertTablet_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertTablet_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertTablet_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertTablet_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertTablet_argsStandardScheme getScheme() { - return new testInsertTablet_argsStandardScheme(); - } - } - - private static class testInsertTablet_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertTablet_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertTabletReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertTablet_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertTablet_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertTablet_argsTupleScheme getScheme() { - return new testInsertTablet_argsTupleScheme(); - } - } - - private static class testInsertTablet_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertTablet_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertTablet_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertTabletReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertTablet_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertTablet_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertTablet_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertTablet_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertTablet_result.class, metaDataMap); - } - - public testInsertTablet_result() { - } - - public testInsertTablet_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public testInsertTablet_result(testInsertTablet_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public testInsertTablet_result deepCopy() { - return new testInsertTablet_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public testInsertTablet_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertTablet_result) - return this.equals((testInsertTablet_result)that); - return false; - } - - public boolean equals(testInsertTablet_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertTablet_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertTablet_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertTablet_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertTablet_resultStandardScheme getScheme() { - return new testInsertTablet_resultStandardScheme(); - } - } - - private static class testInsertTablet_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertTablet_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertTablet_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertTablet_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertTablet_resultTupleScheme getScheme() { - return new testInsertTablet_resultTupleScheme(); - } - } - - private static class testInsertTablet_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertTablet_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertTablet_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertTablets_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertTablets_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertTablets_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertTablets_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertTabletsReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertTabletsReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertTablets_args.class, metaDataMap); - } - - public testInsertTablets_args() { - } - - public testInsertTablets_args( - TSInsertTabletsReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public testInsertTablets_args(testInsertTablets_args other) { - if (other.isSetReq()) { - this.req = new TSInsertTabletsReq(other.req); - } - } - - @Override - public testInsertTablets_args deepCopy() { - return new testInsertTablets_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertTabletsReq getReq() { - return this.req; - } - - public testInsertTablets_args setReq(@org.apache.thrift.annotation.Nullable TSInsertTabletsReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertTabletsReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertTablets_args) - return this.equals((testInsertTablets_args)that); - return false; - } - - public boolean equals(testInsertTablets_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertTablets_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertTablets_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertTablets_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertTablets_argsStandardScheme getScheme() { - return new testInsertTablets_argsStandardScheme(); - } - } - - private static class testInsertTablets_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertTablets_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertTabletsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertTablets_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertTablets_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertTablets_argsTupleScheme getScheme() { - return new testInsertTablets_argsTupleScheme(); - } - } - - private static class testInsertTablets_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertTablets_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertTablets_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertTabletsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertTablets_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertTablets_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertTablets_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertTablets_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertTablets_result.class, metaDataMap); - } - - public testInsertTablets_result() { - } - - public testInsertTablets_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public testInsertTablets_result(testInsertTablets_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public testInsertTablets_result deepCopy() { - return new testInsertTablets_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public testInsertTablets_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertTablets_result) - return this.equals((testInsertTablets_result)that); - return false; - } - - public boolean equals(testInsertTablets_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertTablets_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertTablets_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertTablets_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertTablets_resultStandardScheme getScheme() { - return new testInsertTablets_resultStandardScheme(); - } - } - - private static class testInsertTablets_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertTablets_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertTablets_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertTablets_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertTablets_resultTupleScheme getScheme() { - return new testInsertTablets_resultTupleScheme(); - } - } - - private static class testInsertTablets_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertTablets_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertTablets_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertRecord_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecord_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecord_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecord_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertRecordReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecord_args.class, metaDataMap); - } - - public testInsertRecord_args() { - } - - public testInsertRecord_args( - TSInsertRecordReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public testInsertRecord_args(testInsertRecord_args other) { - if (other.isSetReq()) { - this.req = new TSInsertRecordReq(other.req); - } - } - - @Override - public testInsertRecord_args deepCopy() { - return new testInsertRecord_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertRecordReq getReq() { - return this.req; - } - - public testInsertRecord_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertRecordReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertRecord_args) - return this.equals((testInsertRecord_args)that); - return false; - } - - public boolean equals(testInsertRecord_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertRecord_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecord_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertRecord_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecord_argsStandardScheme getScheme() { - return new testInsertRecord_argsStandardScheme(); - } - } - - private static class testInsertRecord_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertRecordReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecord_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertRecord_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecord_argsTupleScheme getScheme() { - return new testInsertRecord_argsTupleScheme(); - } - } - - private static class testInsertRecord_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertRecordReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertRecord_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecord_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecord_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecord_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecord_result.class, metaDataMap); - } - - public testInsertRecord_result() { - } - - public testInsertRecord_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public testInsertRecord_result(testInsertRecord_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public testInsertRecord_result deepCopy() { - return new testInsertRecord_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public testInsertRecord_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertRecord_result) - return this.equals((testInsertRecord_result)that); - return false; - } - - public boolean equals(testInsertRecord_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertRecord_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecord_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertRecord_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecord_resultStandardScheme getScheme() { - return new testInsertRecord_resultStandardScheme(); - } - } - - private static class testInsertRecord_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecord_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertRecord_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecord_resultTupleScheme getScheme() { - return new testInsertRecord_resultTupleScheme(); - } - } - - private static class testInsertRecord_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertStringRecord_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertStringRecord_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertStringRecord_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertStringRecord_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertStringRecordReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertStringRecord_args.class, metaDataMap); - } - - public testInsertStringRecord_args() { - } - - public testInsertStringRecord_args( - TSInsertStringRecordReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public testInsertStringRecord_args(testInsertStringRecord_args other) { - if (other.isSetReq()) { - this.req = new TSInsertStringRecordReq(other.req); - } - } - - @Override - public testInsertStringRecord_args deepCopy() { - return new testInsertStringRecord_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertStringRecordReq getReq() { - return this.req; - } - - public testInsertStringRecord_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertStringRecordReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertStringRecord_args) - return this.equals((testInsertStringRecord_args)that); - return false; - } - - public boolean equals(testInsertStringRecord_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertStringRecord_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertStringRecord_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertStringRecord_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertStringRecord_argsStandardScheme getScheme() { - return new testInsertStringRecord_argsStandardScheme(); - } - } - - private static class testInsertStringRecord_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertStringRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertStringRecordReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertStringRecord_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertStringRecord_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertStringRecord_argsTupleScheme getScheme() { - return new testInsertStringRecord_argsTupleScheme(); - } - } - - private static class testInsertStringRecord_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecord_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertStringRecordReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertStringRecord_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertStringRecord_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertStringRecord_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertStringRecord_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertStringRecord_result.class, metaDataMap); - } - - public testInsertStringRecord_result() { - } - - public testInsertStringRecord_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public testInsertStringRecord_result(testInsertStringRecord_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public testInsertStringRecord_result deepCopy() { - return new testInsertStringRecord_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public testInsertStringRecord_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertStringRecord_result) - return this.equals((testInsertStringRecord_result)that); - return false; - } - - public boolean equals(testInsertStringRecord_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertStringRecord_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertStringRecord_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertStringRecord_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertStringRecord_resultStandardScheme getScheme() { - return new testInsertStringRecord_resultStandardScheme(); - } - } - - private static class testInsertStringRecord_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertStringRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertStringRecord_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertStringRecord_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertStringRecord_resultTupleScheme getScheme() { - return new testInsertStringRecord_resultTupleScheme(); - } - } - - private static class testInsertStringRecord_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecord_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertRecords_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecords_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecords_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecords_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertRecordsReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordsReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecords_args.class, metaDataMap); - } - - public testInsertRecords_args() { - } - - public testInsertRecords_args( - TSInsertRecordsReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public testInsertRecords_args(testInsertRecords_args other) { - if (other.isSetReq()) { - this.req = new TSInsertRecordsReq(other.req); - } - } - - @Override - public testInsertRecords_args deepCopy() { - return new testInsertRecords_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertRecordsReq getReq() { - return this.req; - } - - public testInsertRecords_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordsReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertRecordsReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertRecords_args) - return this.equals((testInsertRecords_args)that); - return false; - } - - public boolean equals(testInsertRecords_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertRecords_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecords_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertRecords_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecords_argsStandardScheme getScheme() { - return new testInsertRecords_argsStandardScheme(); - } - } - - private static class testInsertRecords_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertRecordsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecords_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertRecords_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecords_argsTupleScheme getScheme() { - return new testInsertRecords_argsTupleScheme(); - } - } - - private static class testInsertRecords_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertRecordsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertRecords_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecords_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecords_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecords_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecords_result.class, metaDataMap); - } - - public testInsertRecords_result() { - } - - public testInsertRecords_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public testInsertRecords_result(testInsertRecords_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public testInsertRecords_result deepCopy() { - return new testInsertRecords_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public testInsertRecords_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertRecords_result) - return this.equals((testInsertRecords_result)that); - return false; - } - - public boolean equals(testInsertRecords_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertRecords_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecords_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertRecords_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecords_resultStandardScheme getScheme() { - return new testInsertRecords_resultStandardScheme(); - } - } - - private static class testInsertRecords_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecords_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertRecords_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecords_resultTupleScheme getScheme() { - return new testInsertRecords_resultTupleScheme(); - } - } - - private static class testInsertRecords_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertRecordsOfOneDevice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecordsOfOneDevice_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecordsOfOneDevice_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecordsOfOneDevice_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertRecordsOfOneDeviceReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertRecordsOfOneDeviceReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecordsOfOneDevice_args.class, metaDataMap); - } - - public testInsertRecordsOfOneDevice_args() { - } - - public testInsertRecordsOfOneDevice_args( - TSInsertRecordsOfOneDeviceReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public testInsertRecordsOfOneDevice_args(testInsertRecordsOfOneDevice_args other) { - if (other.isSetReq()) { - this.req = new TSInsertRecordsOfOneDeviceReq(other.req); - } - } - - @Override - public testInsertRecordsOfOneDevice_args deepCopy() { - return new testInsertRecordsOfOneDevice_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertRecordsOfOneDeviceReq getReq() { - return this.req; - } - - public testInsertRecordsOfOneDevice_args setReq(@org.apache.thrift.annotation.Nullable TSInsertRecordsOfOneDeviceReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertRecordsOfOneDeviceReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertRecordsOfOneDevice_args) - return this.equals((testInsertRecordsOfOneDevice_args)that); - return false; - } - - public boolean equals(testInsertRecordsOfOneDevice_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertRecordsOfOneDevice_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecordsOfOneDevice_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertRecordsOfOneDevice_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecordsOfOneDevice_argsStandardScheme getScheme() { - return new testInsertRecordsOfOneDevice_argsStandardScheme(); - } - } - - private static class testInsertRecordsOfOneDevice_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertRecordsOfOneDeviceReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertRecordsOfOneDevice_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecordsOfOneDevice_argsTupleScheme getScheme() { - return new testInsertRecordsOfOneDevice_argsTupleScheme(); - } - } - - private static class testInsertRecordsOfOneDevice_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecordsOfOneDevice_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertRecordsOfOneDeviceReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertRecordsOfOneDevice_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertRecordsOfOneDevice_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertRecordsOfOneDevice_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertRecordsOfOneDevice_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertRecordsOfOneDevice_result.class, metaDataMap); - } - - public testInsertRecordsOfOneDevice_result() { - } - - public testInsertRecordsOfOneDevice_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public testInsertRecordsOfOneDevice_result(testInsertRecordsOfOneDevice_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public testInsertRecordsOfOneDevice_result deepCopy() { - return new testInsertRecordsOfOneDevice_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public testInsertRecordsOfOneDevice_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertRecordsOfOneDevice_result) - return this.equals((testInsertRecordsOfOneDevice_result)that); - return false; - } - - public boolean equals(testInsertRecordsOfOneDevice_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertRecordsOfOneDevice_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertRecordsOfOneDevice_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertRecordsOfOneDevice_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecordsOfOneDevice_resultStandardScheme getScheme() { - return new testInsertRecordsOfOneDevice_resultStandardScheme(); - } - } - - private static class testInsertRecordsOfOneDevice_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertRecordsOfOneDevice_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertRecordsOfOneDevice_resultTupleScheme getScheme() { - return new testInsertRecordsOfOneDevice_resultTupleScheme(); - } - } - - private static class testInsertRecordsOfOneDevice_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertRecordsOfOneDevice_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertStringRecords_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertStringRecords_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertStringRecords_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertStringRecords_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSInsertStringRecordsReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSInsertStringRecordsReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertStringRecords_args.class, metaDataMap); - } - - public testInsertStringRecords_args() { - } - - public testInsertStringRecords_args( - TSInsertStringRecordsReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public testInsertStringRecords_args(testInsertStringRecords_args other) { - if (other.isSetReq()) { - this.req = new TSInsertStringRecordsReq(other.req); - } - } - - @Override - public testInsertStringRecords_args deepCopy() { - return new testInsertStringRecords_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSInsertStringRecordsReq getReq() { - return this.req; - } - - public testInsertStringRecords_args setReq(@org.apache.thrift.annotation.Nullable TSInsertStringRecordsReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSInsertStringRecordsReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertStringRecords_args) - return this.equals((testInsertStringRecords_args)that); - return false; - } - - public boolean equals(testInsertStringRecords_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertStringRecords_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertStringRecords_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertStringRecords_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertStringRecords_argsStandardScheme getScheme() { - return new testInsertStringRecords_argsStandardScheme(); - } - } - - private static class testInsertStringRecords_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertStringRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSInsertStringRecordsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertStringRecords_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertStringRecords_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertStringRecords_argsTupleScheme getScheme() { - return new testInsertStringRecords_argsTupleScheme(); - } - } - - private static class testInsertStringRecords_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecords_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSInsertStringRecordsReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testInsertStringRecords_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testInsertStringRecords_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testInsertStringRecords_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testInsertStringRecords_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testInsertStringRecords_result.class, metaDataMap); - } - - public testInsertStringRecords_result() { - } - - public testInsertStringRecords_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public testInsertStringRecords_result(testInsertStringRecords_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public testInsertStringRecords_result deepCopy() { - return new testInsertStringRecords_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public testInsertStringRecords_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testInsertStringRecords_result) - return this.equals((testInsertStringRecords_result)that); - return false; - } - - public boolean equals(testInsertStringRecords_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testInsertStringRecords_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testInsertStringRecords_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testInsertStringRecords_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertStringRecords_resultStandardScheme getScheme() { - return new testInsertStringRecords_resultStandardScheme(); - } - } - - private static class testInsertStringRecords_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testInsertStringRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testInsertStringRecords_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testInsertStringRecords_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testInsertStringRecords_resultTupleScheme getScheme() { - return new testInsertStringRecords_resultTupleScheme(); - } - } - - private static class testInsertStringRecords_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testInsertStringRecords_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class deleteData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteData_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteData_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteData_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSDeleteDataReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSDeleteDataReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteData_args.class, metaDataMap); - } - - public deleteData_args() { - } - - public deleteData_args( - TSDeleteDataReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public deleteData_args(deleteData_args other) { - if (other.isSetReq()) { - this.req = new TSDeleteDataReq(other.req); - } - } - - @Override - public deleteData_args deepCopy() { - return new deleteData_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSDeleteDataReq getReq() { - return this.req; - } - - public deleteData_args setReq(@org.apache.thrift.annotation.Nullable TSDeleteDataReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSDeleteDataReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof deleteData_args) - return this.equals((deleteData_args)that); - return false; - } - - public boolean equals(deleteData_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(deleteData_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteData_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class deleteData_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteData_argsStandardScheme getScheme() { - return new deleteData_argsStandardScheme(); - } - } - - private static class deleteData_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSDeleteDataReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteData_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteData_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteData_argsTupleScheme getScheme() { - return new deleteData_argsTupleScheme(); - } - } - - private static class deleteData_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSDeleteDataReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class deleteData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteData_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteData_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteData_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteData_result.class, metaDataMap); - } - - public deleteData_result() { - } - - public deleteData_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public deleteData_result(deleteData_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public deleteData_result deepCopy() { - return new deleteData_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public deleteData_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof deleteData_result) - return this.equals((deleteData_result)that); - return false; - } - - public boolean equals(deleteData_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(deleteData_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteData_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class deleteData_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteData_resultStandardScheme getScheme() { - return new deleteData_resultStandardScheme(); - } - } - - private static class deleteData_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteData_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteData_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public deleteData_resultTupleScheme getScheme() { - return new deleteData_resultTupleScheme(); - } - } - - private static class deleteData_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeRawDataQuery_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeRawDataQuery_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeRawDataQuery_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeRawDataQuery_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSRawDataQueryReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSRawDataQueryReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeRawDataQuery_args.class, metaDataMap); - } - - public executeRawDataQuery_args() { - } - - public executeRawDataQuery_args( - TSRawDataQueryReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeRawDataQuery_args(executeRawDataQuery_args other) { - if (other.isSetReq()) { - this.req = new TSRawDataQueryReq(other.req); - } - } - - @Override - public executeRawDataQuery_args deepCopy() { - return new executeRawDataQuery_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSRawDataQueryReq getReq() { - return this.req; - } - - public executeRawDataQuery_args setReq(@org.apache.thrift.annotation.Nullable TSRawDataQueryReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSRawDataQueryReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeRawDataQuery_args) - return this.equals((executeRawDataQuery_args)that); - return false; - } - - public boolean equals(executeRawDataQuery_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeRawDataQuery_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeRawDataQuery_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeRawDataQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeRawDataQuery_argsStandardScheme getScheme() { - return new executeRawDataQuery_argsStandardScheme(); - } - } - - private static class executeRawDataQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeRawDataQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSRawDataQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeRawDataQuery_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeRawDataQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeRawDataQuery_argsTupleScheme getScheme() { - return new executeRawDataQuery_argsTupleScheme(); - } - } - - private static class executeRawDataQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeRawDataQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeRawDataQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSRawDataQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeRawDataQuery_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeRawDataQuery_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeRawDataQuery_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeRawDataQuery_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeRawDataQuery_result.class, metaDataMap); - } - - public executeRawDataQuery_result() { - } - - public executeRawDataQuery_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeRawDataQuery_result(executeRawDataQuery_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeRawDataQuery_result deepCopy() { - return new executeRawDataQuery_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeRawDataQuery_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeRawDataQuery_result) - return this.equals((executeRawDataQuery_result)that); - return false; - } - - public boolean equals(executeRawDataQuery_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeRawDataQuery_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeRawDataQuery_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeRawDataQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeRawDataQuery_resultStandardScheme getScheme() { - return new executeRawDataQuery_resultStandardScheme(); - } - } - - private static class executeRawDataQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeRawDataQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeRawDataQuery_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeRawDataQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeRawDataQuery_resultTupleScheme getScheme() { - return new executeRawDataQuery_resultTupleScheme(); - } - } - - private static class executeRawDataQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeRawDataQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeRawDataQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeLastDataQuery_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeLastDataQuery_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeLastDataQuery_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeLastDataQuery_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSLastDataQueryReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSLastDataQueryReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeLastDataQuery_args.class, metaDataMap); - } - - public executeLastDataQuery_args() { - } - - public executeLastDataQuery_args( - TSLastDataQueryReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeLastDataQuery_args(executeLastDataQuery_args other) { - if (other.isSetReq()) { - this.req = new TSLastDataQueryReq(other.req); - } - } - - @Override - public executeLastDataQuery_args deepCopy() { - return new executeLastDataQuery_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSLastDataQueryReq getReq() { - return this.req; - } - - public executeLastDataQuery_args setReq(@org.apache.thrift.annotation.Nullable TSLastDataQueryReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSLastDataQueryReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeLastDataQuery_args) - return this.equals((executeLastDataQuery_args)that); - return false; - } - - public boolean equals(executeLastDataQuery_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeLastDataQuery_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeLastDataQuery_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeLastDataQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeLastDataQuery_argsStandardScheme getScheme() { - return new executeLastDataQuery_argsStandardScheme(); - } - } - - private static class executeLastDataQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeLastDataQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSLastDataQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeLastDataQuery_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeLastDataQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeLastDataQuery_argsTupleScheme getScheme() { - return new executeLastDataQuery_argsTupleScheme(); - } - } - - private static class executeLastDataQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeLastDataQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeLastDataQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSLastDataQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeLastDataQuery_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeLastDataQuery_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeLastDataQuery_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeLastDataQuery_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeLastDataQuery_result.class, metaDataMap); - } - - public executeLastDataQuery_result() { - } - - public executeLastDataQuery_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeLastDataQuery_result(executeLastDataQuery_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeLastDataQuery_result deepCopy() { - return new executeLastDataQuery_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeLastDataQuery_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeLastDataQuery_result) - return this.equals((executeLastDataQuery_result)that); - return false; - } - - public boolean equals(executeLastDataQuery_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeLastDataQuery_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeLastDataQuery_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeLastDataQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeLastDataQuery_resultStandardScheme getScheme() { - return new executeLastDataQuery_resultStandardScheme(); - } - } - - private static class executeLastDataQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeLastDataQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeLastDataQuery_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeLastDataQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeLastDataQuery_resultTupleScheme getScheme() { - return new executeLastDataQuery_resultTupleScheme(); - } - } - - private static class executeLastDataQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeLastDataQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeLastDataQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeAggregationQuery_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeAggregationQuery_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeAggregationQuery_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeAggregationQuery_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSAggregationQueryReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSAggregationQueryReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeAggregationQuery_args.class, metaDataMap); - } - - public executeAggregationQuery_args() { - } - - public executeAggregationQuery_args( - TSAggregationQueryReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public executeAggregationQuery_args(executeAggregationQuery_args other) { - if (other.isSetReq()) { - this.req = new TSAggregationQueryReq(other.req); - } - } - - @Override - public executeAggregationQuery_args deepCopy() { - return new executeAggregationQuery_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSAggregationQueryReq getReq() { - return this.req; - } - - public executeAggregationQuery_args setReq(@org.apache.thrift.annotation.Nullable TSAggregationQueryReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSAggregationQueryReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeAggregationQuery_args) - return this.equals((executeAggregationQuery_args)that); - return false; - } - - public boolean equals(executeAggregationQuery_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeAggregationQuery_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeAggregationQuery_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeAggregationQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeAggregationQuery_argsStandardScheme getScheme() { - return new executeAggregationQuery_argsStandardScheme(); - } - } - - private static class executeAggregationQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeAggregationQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSAggregationQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeAggregationQuery_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeAggregationQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeAggregationQuery_argsTupleScheme getScheme() { - return new executeAggregationQuery_argsTupleScheme(); - } - } - - private static class executeAggregationQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeAggregationQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeAggregationQuery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSAggregationQueryReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class executeAggregationQuery_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeAggregationQuery_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeAggregationQuery_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeAggregationQuery_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSExecuteStatementResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSExecuteStatementResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeAggregationQuery_result.class, metaDataMap); - } - - public executeAggregationQuery_result() { - } - - public executeAggregationQuery_result( - TSExecuteStatementResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public executeAggregationQuery_result(executeAggregationQuery_result other) { - if (other.isSetSuccess()) { - this.success = new TSExecuteStatementResp(other.success); - } - } - - @Override - public executeAggregationQuery_result deepCopy() { - return new executeAggregationQuery_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSExecuteStatementResp getSuccess() { - return this.success; - } - - public executeAggregationQuery_result setSuccess(@org.apache.thrift.annotation.Nullable TSExecuteStatementResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSExecuteStatementResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof executeAggregationQuery_result) - return this.equals((executeAggregationQuery_result)that); - return false; - } - - public boolean equals(executeAggregationQuery_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(executeAggregationQuery_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("executeAggregationQuery_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class executeAggregationQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeAggregationQuery_resultStandardScheme getScheme() { - return new executeAggregationQuery_resultStandardScheme(); - } - } - - private static class executeAggregationQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, executeAggregationQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, executeAggregationQuery_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class executeAggregationQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public executeAggregationQuery_resultTupleScheme getScheme() { - return new executeAggregationQuery_resultTupleScheme(); - } - } - - private static class executeAggregationQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, executeAggregationQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, executeAggregationQuery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSExecuteStatementResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class requestStatementId_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestStatementId_args"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestStatementId_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestStatementId_argsTupleSchemeFactory(); - - public long sessionId; // 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 { - SESSION_ID((short)1, "sessionId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestStatementId_args.class, metaDataMap); - } - - public requestStatementId_args() { - } - - public requestStatementId_args( - long sessionId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public requestStatementId_args(requestStatementId_args other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - } - - @Override - public requestStatementId_args deepCopy() { - return new requestStatementId_args(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public requestStatementId_args setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof requestStatementId_args) - return this.equals((requestStatementId_args)that); - return false; - } - - public boolean equals(requestStatementId_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - return hashCode; - } - - @Override - public int compareTo(requestStatementId_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("requestStatementId_args("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class requestStatementId_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public requestStatementId_argsStandardScheme getScheme() { - return new requestStatementId_argsStandardScheme(); - } - } - - private static class requestStatementId_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, requestStatementId_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, requestStatementId_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class requestStatementId_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public requestStatementId_argsTupleScheme getScheme() { - return new requestStatementId_argsTupleScheme(); - } - } - - private static class requestStatementId_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, requestStatementId_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSessionId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSessionId()) { - oprot.writeI64(struct.sessionId); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, requestStatementId_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class requestStatementId_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestStatementId_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestStatementId_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestStatementId_resultTupleSchemeFactory(); - - public long success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestStatementId_result.class, metaDataMap); - } - - public requestStatementId_result() { - } - - public requestStatementId_result( - long success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public requestStatementId_result(requestStatementId_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - @Override - public requestStatementId_result deepCopy() { - return new requestStatementId_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - } - - public long getSuccess() { - return this.success; - } - - public requestStatementId_result setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof requestStatementId_result) - return this.equals((requestStatementId_result)that); - return false; - } - - public boolean equals(requestStatementId_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success); - - return hashCode; - } - - @Override - public int compareTo(requestStatementId_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("requestStatementId_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class requestStatementId_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public requestStatementId_resultStandardScheme getScheme() { - return new requestStatementId_resultStandardScheme(); - } - } - - private static class requestStatementId_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, requestStatementId_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, requestStatementId_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(struct.success); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class requestStatementId_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public requestStatementId_resultTupleScheme getScheme() { - return new requestStatementId_resultTupleScheme(); - } - } - - private static class requestStatementId_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, requestStatementId_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeI64(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, requestStatementId_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readI64(); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSchemaTemplate_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createSchemaTemplate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createSchemaTemplate_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSCreateSchemaTemplateReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSCreateSchemaTemplateReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSchemaTemplate_args.class, metaDataMap); - } - - public createSchemaTemplate_args() { - } - - public createSchemaTemplate_args( - TSCreateSchemaTemplateReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public createSchemaTemplate_args(createSchemaTemplate_args other) { - if (other.isSetReq()) { - this.req = new TSCreateSchemaTemplateReq(other.req); - } - } - - @Override - public createSchemaTemplate_args deepCopy() { - return new createSchemaTemplate_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSCreateSchemaTemplateReq getReq() { - return this.req; - } - - public createSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSCreateSchemaTemplateReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSCreateSchemaTemplateReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createSchemaTemplate_args) - return this.equals((createSchemaTemplate_args)that); - return false; - } - - public boolean equals(createSchemaTemplate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createSchemaTemplate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createSchemaTemplate_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createSchemaTemplate_argsStandardScheme getScheme() { - return new createSchemaTemplate_argsStandardScheme(); - } - } - - private static class createSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSCreateSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createSchemaTemplate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createSchemaTemplate_argsTupleScheme getScheme() { - return new createSchemaTemplate_argsTupleScheme(); - } - } - - private static class createSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSCreateSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSchemaTemplate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createSchemaTemplate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createSchemaTemplate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSchemaTemplate_result.class, metaDataMap); - } - - public createSchemaTemplate_result() { - } - - public createSchemaTemplate_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public createSchemaTemplate_result(createSchemaTemplate_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public createSchemaTemplate_result deepCopy() { - return new createSchemaTemplate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public createSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createSchemaTemplate_result) - return this.equals((createSchemaTemplate_result)that); - return false; - } - - public boolean equals(createSchemaTemplate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createSchemaTemplate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createSchemaTemplate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createSchemaTemplate_resultStandardScheme getScheme() { - return new createSchemaTemplate_resultStandardScheme(); - } - } - - private static class createSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createSchemaTemplate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createSchemaTemplate_resultTupleScheme getScheme() { - return new createSchemaTemplate_resultTupleScheme(); - } - } - - private static class createSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class appendSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("appendSchemaTemplate_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new appendSchemaTemplate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new appendSchemaTemplate_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSAppendSchemaTemplateReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSAppendSchemaTemplateReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(appendSchemaTemplate_args.class, metaDataMap); - } - - public appendSchemaTemplate_args() { - } - - public appendSchemaTemplate_args( - TSAppendSchemaTemplateReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public appendSchemaTemplate_args(appendSchemaTemplate_args other) { - if (other.isSetReq()) { - this.req = new TSAppendSchemaTemplateReq(other.req); - } - } - - @Override - public appendSchemaTemplate_args deepCopy() { - return new appendSchemaTemplate_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSAppendSchemaTemplateReq getReq() { - return this.req; - } - - public appendSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSAppendSchemaTemplateReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSAppendSchemaTemplateReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof appendSchemaTemplate_args) - return this.equals((appendSchemaTemplate_args)that); - return false; - } - - public boolean equals(appendSchemaTemplate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(appendSchemaTemplate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("appendSchemaTemplate_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class appendSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public appendSchemaTemplate_argsStandardScheme getScheme() { - return new appendSchemaTemplate_argsStandardScheme(); - } - } - - private static class appendSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, appendSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSAppendSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, appendSchemaTemplate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class appendSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public appendSchemaTemplate_argsTupleScheme getScheme() { - return new appendSchemaTemplate_argsTupleScheme(); - } - } - - private static class appendSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, appendSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, appendSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSAppendSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class appendSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("appendSchemaTemplate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new appendSchemaTemplate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new appendSchemaTemplate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(appendSchemaTemplate_result.class, metaDataMap); - } - - public appendSchemaTemplate_result() { - } - - public appendSchemaTemplate_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public appendSchemaTemplate_result(appendSchemaTemplate_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public appendSchemaTemplate_result deepCopy() { - return new appendSchemaTemplate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public appendSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof appendSchemaTemplate_result) - return this.equals((appendSchemaTemplate_result)that); - return false; - } - - public boolean equals(appendSchemaTemplate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(appendSchemaTemplate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("appendSchemaTemplate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class appendSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public appendSchemaTemplate_resultStandardScheme getScheme() { - return new appendSchemaTemplate_resultStandardScheme(); - } - } - - private static class appendSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, appendSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, appendSchemaTemplate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class appendSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public appendSchemaTemplate_resultTupleScheme getScheme() { - return new appendSchemaTemplate_resultTupleScheme(); - } - } - - private static class appendSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, appendSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, appendSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class pruneSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pruneSchemaTemplate_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pruneSchemaTemplate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pruneSchemaTemplate_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSPruneSchemaTemplateReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSPruneSchemaTemplateReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pruneSchemaTemplate_args.class, metaDataMap); - } - - public pruneSchemaTemplate_args() { - } - - public pruneSchemaTemplate_args( - TSPruneSchemaTemplateReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public pruneSchemaTemplate_args(pruneSchemaTemplate_args other) { - if (other.isSetReq()) { - this.req = new TSPruneSchemaTemplateReq(other.req); - } - } - - @Override - public pruneSchemaTemplate_args deepCopy() { - return new pruneSchemaTemplate_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSPruneSchemaTemplateReq getReq() { - return this.req; - } - - public pruneSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSPruneSchemaTemplateReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSPruneSchemaTemplateReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof pruneSchemaTemplate_args) - return this.equals((pruneSchemaTemplate_args)that); - return false; - } - - public boolean equals(pruneSchemaTemplate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(pruneSchemaTemplate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("pruneSchemaTemplate_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class pruneSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pruneSchemaTemplate_argsStandardScheme getScheme() { - return new pruneSchemaTemplate_argsStandardScheme(); - } - } - - private static class pruneSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, pruneSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSPruneSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, pruneSchemaTemplate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class pruneSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pruneSchemaTemplate_argsTupleScheme getScheme() { - return new pruneSchemaTemplate_argsTupleScheme(); - } - } - - private static class pruneSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, pruneSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, pruneSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSPruneSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class pruneSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pruneSchemaTemplate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pruneSchemaTemplate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pruneSchemaTemplate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pruneSchemaTemplate_result.class, metaDataMap); - } - - public pruneSchemaTemplate_result() { - } - - public pruneSchemaTemplate_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public pruneSchemaTemplate_result(pruneSchemaTemplate_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public pruneSchemaTemplate_result deepCopy() { - return new pruneSchemaTemplate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public pruneSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof pruneSchemaTemplate_result) - return this.equals((pruneSchemaTemplate_result)that); - return false; - } - - public boolean equals(pruneSchemaTemplate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(pruneSchemaTemplate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("pruneSchemaTemplate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class pruneSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pruneSchemaTemplate_resultStandardScheme getScheme() { - return new pruneSchemaTemplate_resultStandardScheme(); - } - } - - private static class pruneSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, pruneSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, pruneSchemaTemplate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class pruneSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pruneSchemaTemplate_resultTupleScheme getScheme() { - return new pruneSchemaTemplate_resultTupleScheme(); - } - } - - private static class pruneSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, pruneSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, pruneSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class querySchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("querySchemaTemplate_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new querySchemaTemplate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new querySchemaTemplate_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSQueryTemplateReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryTemplateReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(querySchemaTemplate_args.class, metaDataMap); - } - - public querySchemaTemplate_args() { - } - - public querySchemaTemplate_args( - TSQueryTemplateReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public querySchemaTemplate_args(querySchemaTemplate_args other) { - if (other.isSetReq()) { - this.req = new TSQueryTemplateReq(other.req); - } - } - - @Override - public querySchemaTemplate_args deepCopy() { - return new querySchemaTemplate_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSQueryTemplateReq getReq() { - return this.req; - } - - public querySchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSQueryTemplateReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSQueryTemplateReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof querySchemaTemplate_args) - return this.equals((querySchemaTemplate_args)that); - return false; - } - - public boolean equals(querySchemaTemplate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(querySchemaTemplate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("querySchemaTemplate_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class querySchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public querySchemaTemplate_argsStandardScheme getScheme() { - return new querySchemaTemplate_argsStandardScheme(); - } - } - - private static class querySchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, querySchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSQueryTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, querySchemaTemplate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class querySchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public querySchemaTemplate_argsTupleScheme getScheme() { - return new querySchemaTemplate_argsTupleScheme(); - } - } - - private static class querySchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, querySchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, querySchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSQueryTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class querySchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("querySchemaTemplate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new querySchemaTemplate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new querySchemaTemplate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSQueryTemplateResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryTemplateResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(querySchemaTemplate_result.class, metaDataMap); - } - - public querySchemaTemplate_result() { - } - - public querySchemaTemplate_result( - TSQueryTemplateResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public querySchemaTemplate_result(querySchemaTemplate_result other) { - if (other.isSetSuccess()) { - this.success = new TSQueryTemplateResp(other.success); - } - } - - @Override - public querySchemaTemplate_result deepCopy() { - return new querySchemaTemplate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSQueryTemplateResp getSuccess() { - return this.success; - } - - public querySchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable TSQueryTemplateResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSQueryTemplateResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof querySchemaTemplate_result) - return this.equals((querySchemaTemplate_result)that); - return false; - } - - public boolean equals(querySchemaTemplate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(querySchemaTemplate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("querySchemaTemplate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class querySchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public querySchemaTemplate_resultStandardScheme getScheme() { - return new querySchemaTemplate_resultStandardScheme(); - } - } - - private static class querySchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, querySchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSQueryTemplateResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, querySchemaTemplate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class querySchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public querySchemaTemplate_resultTupleScheme getScheme() { - return new querySchemaTemplate_resultTupleScheme(); - } - } - - private static class querySchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, querySchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, querySchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSQueryTemplateResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class showConfigurationTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showConfigurationTemplate_args"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new showConfigurationTemplate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new showConfigurationTemplate_argsTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(showConfigurationTemplate_args.class, metaDataMap); - } - - public showConfigurationTemplate_args() { - } - - /** - * Performs a deep copy on other. - */ - public showConfigurationTemplate_args(showConfigurationTemplate_args other) { - } - - @Override - public showConfigurationTemplate_args deepCopy() { - return new showConfigurationTemplate_args(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof showConfigurationTemplate_args) - return this.equals((showConfigurationTemplate_args)that); - return false; - } - - public boolean equals(showConfigurationTemplate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(showConfigurationTemplate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("showConfigurationTemplate_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class showConfigurationTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public showConfigurationTemplate_argsStandardScheme getScheme() { - return new showConfigurationTemplate_argsStandardScheme(); - } - } - - private static class showConfigurationTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, showConfigurationTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, showConfigurationTemplate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class showConfigurationTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public showConfigurationTemplate_argsTupleScheme getScheme() { - return new showConfigurationTemplate_argsTupleScheme(); - } - } - - private static class showConfigurationTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, showConfigurationTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, showConfigurationTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class showConfigurationTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showConfigurationTemplate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new showConfigurationTemplate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new showConfigurationTemplate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(showConfigurationTemplate_result.class, metaDataMap); - } - - public showConfigurationTemplate_result() { - } - - public showConfigurationTemplate_result( - org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public showConfigurationTemplate_result(showConfigurationTemplate_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp(other.success); - } - } - - @Override - public showConfigurationTemplate_result deepCopy() { - return new showConfigurationTemplate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp getSuccess() { - return this.success; - } - - public showConfigurationTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof showConfigurationTemplate_result) - return this.equals((showConfigurationTemplate_result)that); - return false; - } - - public boolean equals(showConfigurationTemplate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(showConfigurationTemplate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("showConfigurationTemplate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class showConfigurationTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public showConfigurationTemplate_resultStandardScheme getScheme() { - return new showConfigurationTemplate_resultStandardScheme(); - } - } - - private static class showConfigurationTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, showConfigurationTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, showConfigurationTemplate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class showConfigurationTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public showConfigurationTemplate_resultTupleScheme getScheme() { - return new showConfigurationTemplate_resultTupleScheme(); - } - } - - private static class showConfigurationTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, showConfigurationTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, showConfigurationTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationTemplateResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class showConfiguration_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showConfiguration_args"); - - private static final org.apache.thrift.protocol.TField NODE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeId", org.apache.thrift.protocol.TType.I32, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new showConfiguration_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new showConfiguration_argsTupleSchemeFactory(); - - public int nodeId; // 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 { - NODE_ID((short)1, "nodeId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NODE_ID - return NODE_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __NODEID_ISSET_ID = 0; - 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.NODE_ID, new org.apache.thrift.meta_data.FieldMetaData("nodeId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(showConfiguration_args.class, metaDataMap); - } - - public showConfiguration_args() { - } - - public showConfiguration_args( - int nodeId) - { - this(); - this.nodeId = nodeId; - setNodeIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public showConfiguration_args(showConfiguration_args other) { - __isset_bitfield = other.__isset_bitfield; - this.nodeId = other.nodeId; - } - - @Override - public showConfiguration_args deepCopy() { - return new showConfiguration_args(this); - } - - @Override - public void clear() { - setNodeIdIsSet(false); - this.nodeId = 0; - } - - public int getNodeId() { - return this.nodeId; - } - - public showConfiguration_args setNodeId(int nodeId) { - this.nodeId = nodeId; - setNodeIdIsSet(true); - return this; - } - - public void unsetNodeId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NODEID_ISSET_ID); - } - - /** Returns true if field nodeId is set (has been assigned a value) and false otherwise */ - public boolean isSetNodeId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NODEID_ISSET_ID); - } - - public void setNodeIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NODEID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case NODE_ID: - if (value == null) { - unsetNodeId(); - } else { - setNodeId((java.lang.Integer)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case NODE_ID: - return getNodeId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case NODE_ID: - return isSetNodeId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof showConfiguration_args) - return this.equals((showConfiguration_args)that); - return false; - } - - public boolean equals(showConfiguration_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_nodeId = true; - boolean that_present_nodeId = true; - if (this_present_nodeId || that_present_nodeId) { - if (!(this_present_nodeId && that_present_nodeId)) - return false; - if (this.nodeId != that.nodeId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + nodeId; - - return hashCode; - } - - @Override - public int compareTo(showConfiguration_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetNodeId(), other.isSetNodeId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNodeId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeId, other.nodeId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("showConfiguration_args("); - boolean first = true; - - sb.append("nodeId:"); - sb.append(this.nodeId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class showConfiguration_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public showConfiguration_argsStandardScheme getScheme() { - return new showConfiguration_argsStandardScheme(); - } - } - - private static class showConfiguration_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, showConfiguration_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // NODE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.nodeId = iprot.readI32(); - struct.setNodeIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, showConfiguration_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(NODE_ID_FIELD_DESC); - oprot.writeI32(struct.nodeId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class showConfiguration_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public showConfiguration_argsTupleScheme getScheme() { - return new showConfiguration_argsTupleScheme(); - } - } - - private static class showConfiguration_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, showConfiguration_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetNodeId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetNodeId()) { - oprot.writeI32(struct.nodeId); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, showConfiguration_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.nodeId = iprot.readI32(); - struct.setNodeIdIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class showConfiguration_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showConfiguration_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new showConfiguration_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new showConfiguration_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(showConfiguration_result.class, metaDataMap); - } - - public showConfiguration_result() { - } - - public showConfiguration_result( - org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public showConfiguration_result(showConfiguration_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp(other.success); - } - } - - @Override - public showConfiguration_result deepCopy() { - return new showConfiguration_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp getSuccess() { - return this.success; - } - - public showConfiguration_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof showConfiguration_result) - return this.equals((showConfiguration_result)that); - return false; - } - - public boolean equals(showConfiguration_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(showConfiguration_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("showConfiguration_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class showConfiguration_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public showConfiguration_resultStandardScheme getScheme() { - return new showConfiguration_resultStandardScheme(); - } - } - - private static class showConfiguration_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, showConfiguration_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, showConfiguration_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class showConfiguration_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public showConfiguration_resultTupleScheme getScheme() { - return new showConfiguration_resultTupleScheme(); - } - } - - private static class showConfiguration_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, showConfiguration_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, showConfiguration_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class setSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setSchemaTemplate_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setSchemaTemplate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setSchemaTemplate_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSSetSchemaTemplateReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSSetSchemaTemplateReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setSchemaTemplate_args.class, metaDataMap); - } - - public setSchemaTemplate_args() { - } - - public setSchemaTemplate_args( - TSSetSchemaTemplateReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public setSchemaTemplate_args(setSchemaTemplate_args other) { - if (other.isSetReq()) { - this.req = new TSSetSchemaTemplateReq(other.req); - } - } - - @Override - public setSchemaTemplate_args deepCopy() { - return new setSchemaTemplate_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSSetSchemaTemplateReq getReq() { - return this.req; - } - - public setSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSSetSchemaTemplateReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSSetSchemaTemplateReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof setSchemaTemplate_args) - return this.equals((setSchemaTemplate_args)that); - return false; - } - - public boolean equals(setSchemaTemplate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(setSchemaTemplate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("setSchemaTemplate_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class setSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setSchemaTemplate_argsStandardScheme getScheme() { - return new setSchemaTemplate_argsStandardScheme(); - } - } - - private static class setSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, setSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSSetSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, setSchemaTemplate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class setSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setSchemaTemplate_argsTupleScheme getScheme() { - return new setSchemaTemplate_argsTupleScheme(); - } - } - - private static class setSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSSetSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class setSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setSchemaTemplate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setSchemaTemplate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setSchemaTemplate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setSchemaTemplate_result.class, metaDataMap); - } - - public setSchemaTemplate_result() { - } - - public setSchemaTemplate_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public setSchemaTemplate_result(setSchemaTemplate_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public setSchemaTemplate_result deepCopy() { - return new setSchemaTemplate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public setSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof setSchemaTemplate_result) - return this.equals((setSchemaTemplate_result)that); - return false; - } - - public boolean equals(setSchemaTemplate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(setSchemaTemplate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("setSchemaTemplate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class setSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setSchemaTemplate_resultStandardScheme getScheme() { - return new setSchemaTemplate_resultStandardScheme(); - } - } - - private static class setSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, setSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, setSchemaTemplate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class setSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public setSchemaTemplate_resultTupleScheme getScheme() { - return new setSchemaTemplate_resultTupleScheme(); - } - } - - private static class setSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class unsetSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetSchemaTemplate_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unsetSchemaTemplate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unsetSchemaTemplate_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSUnsetSchemaTemplateReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSUnsetSchemaTemplateReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetSchemaTemplate_args.class, metaDataMap); - } - - public unsetSchemaTemplate_args() { - } - - public unsetSchemaTemplate_args( - TSUnsetSchemaTemplateReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public unsetSchemaTemplate_args(unsetSchemaTemplate_args other) { - if (other.isSetReq()) { - this.req = new TSUnsetSchemaTemplateReq(other.req); - } - } - - @Override - public unsetSchemaTemplate_args deepCopy() { - return new unsetSchemaTemplate_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSUnsetSchemaTemplateReq getReq() { - return this.req; - } - - public unsetSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSUnsetSchemaTemplateReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSUnsetSchemaTemplateReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof unsetSchemaTemplate_args) - return this.equals((unsetSchemaTemplate_args)that); - return false; - } - - public boolean equals(unsetSchemaTemplate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(unsetSchemaTemplate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("unsetSchemaTemplate_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class unsetSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public unsetSchemaTemplate_argsStandardScheme getScheme() { - return new unsetSchemaTemplate_argsStandardScheme(); - } - } - - private static class unsetSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, unsetSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSUnsetSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, unsetSchemaTemplate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class unsetSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public unsetSchemaTemplate_argsTupleScheme getScheme() { - return new unsetSchemaTemplate_argsTupleScheme(); - } - } - - private static class unsetSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unsetSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, unsetSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSUnsetSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class unsetSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unsetSchemaTemplate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unsetSchemaTemplate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unsetSchemaTemplate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unsetSchemaTemplate_result.class, metaDataMap); - } - - public unsetSchemaTemplate_result() { - } - - public unsetSchemaTemplate_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public unsetSchemaTemplate_result(unsetSchemaTemplate_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public unsetSchemaTemplate_result deepCopy() { - return new unsetSchemaTemplate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public unsetSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof unsetSchemaTemplate_result) - return this.equals((unsetSchemaTemplate_result)that); - return false; - } - - public boolean equals(unsetSchemaTemplate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(unsetSchemaTemplate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("unsetSchemaTemplate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class unsetSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public unsetSchemaTemplate_resultStandardScheme getScheme() { - return new unsetSchemaTemplate_resultStandardScheme(); - } - } - - private static class unsetSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, unsetSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, unsetSchemaTemplate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class unsetSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public unsetSchemaTemplate_resultTupleScheme getScheme() { - return new unsetSchemaTemplate_resultTupleScheme(); - } - } - - private static class unsetSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unsetSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, unsetSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class dropSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("dropSchemaTemplate_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new dropSchemaTemplate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new dropSchemaTemplate_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSDropSchemaTemplateReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSDropSchemaTemplateReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(dropSchemaTemplate_args.class, metaDataMap); - } - - public dropSchemaTemplate_args() { - } - - public dropSchemaTemplate_args( - TSDropSchemaTemplateReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public dropSchemaTemplate_args(dropSchemaTemplate_args other) { - if (other.isSetReq()) { - this.req = new TSDropSchemaTemplateReq(other.req); - } - } - - @Override - public dropSchemaTemplate_args deepCopy() { - return new dropSchemaTemplate_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TSDropSchemaTemplateReq getReq() { - return this.req; - } - - public dropSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TSDropSchemaTemplateReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TSDropSchemaTemplateReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof dropSchemaTemplate_args) - return this.equals((dropSchemaTemplate_args)that); - return false; - } - - public boolean equals(dropSchemaTemplate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(dropSchemaTemplate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("dropSchemaTemplate_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class dropSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public dropSchemaTemplate_argsStandardScheme getScheme() { - return new dropSchemaTemplate_argsStandardScheme(); - } - } - - private static class dropSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, dropSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TSDropSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, dropSchemaTemplate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class dropSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public dropSchemaTemplate_argsTupleScheme getScheme() { - return new dropSchemaTemplate_argsTupleScheme(); - } - } - - private static class dropSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, dropSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, dropSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TSDropSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class dropSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("dropSchemaTemplate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new dropSchemaTemplate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new dropSchemaTemplate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(dropSchemaTemplate_result.class, metaDataMap); - } - - public dropSchemaTemplate_result() { - } - - public dropSchemaTemplate_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public dropSchemaTemplate_result(dropSchemaTemplate_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public dropSchemaTemplate_result deepCopy() { - return new dropSchemaTemplate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public dropSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof dropSchemaTemplate_result) - return this.equals((dropSchemaTemplate_result)that); - return false; - } - - public boolean equals(dropSchemaTemplate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(dropSchemaTemplate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("dropSchemaTemplate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class dropSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public dropSchemaTemplate_resultStandardScheme getScheme() { - return new dropSchemaTemplate_resultStandardScheme(); - } - } - - private static class dropSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, dropSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, dropSchemaTemplate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class dropSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public dropSchemaTemplate_resultTupleScheme getScheme() { - return new dropSchemaTemplate_resultTupleScheme(); - } - } - - private static class dropSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, dropSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, dropSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createTimeseriesUsingSchemaTemplate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTimeseriesUsingSchemaTemplate_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTimeseriesUsingSchemaTemplate_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTimeseriesUsingSchemaTemplate_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TCreateTimeseriesUsingSchemaTemplateReq req; // 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 { - REQ((short)1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCreateTimeseriesUsingSchemaTemplateReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTimeseriesUsingSchemaTemplate_args.class, metaDataMap); - } - - public createTimeseriesUsingSchemaTemplate_args() { - } - - public createTimeseriesUsingSchemaTemplate_args( - TCreateTimeseriesUsingSchemaTemplateReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public createTimeseriesUsingSchemaTemplate_args(createTimeseriesUsingSchemaTemplate_args other) { - if (other.isSetReq()) { - this.req = new TCreateTimeseriesUsingSchemaTemplateReq(other.req); - } - } - - @Override - public createTimeseriesUsingSchemaTemplate_args deepCopy() { - return new createTimeseriesUsingSchemaTemplate_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TCreateTimeseriesUsingSchemaTemplateReq getReq() { - return this.req; - } - - public createTimeseriesUsingSchemaTemplate_args setReq(@org.apache.thrift.annotation.Nullable TCreateTimeseriesUsingSchemaTemplateReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TCreateTimeseriesUsingSchemaTemplateReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createTimeseriesUsingSchemaTemplate_args) - return this.equals((createTimeseriesUsingSchemaTemplate_args)that); - return false; - } - - public boolean equals(createTimeseriesUsingSchemaTemplate_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createTimeseriesUsingSchemaTemplate_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createTimeseriesUsingSchemaTemplate_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createTimeseriesUsingSchemaTemplate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createTimeseriesUsingSchemaTemplate_argsStandardScheme getScheme() { - return new createTimeseriesUsingSchemaTemplate_argsStandardScheme(); - } - } - - private static class createTimeseriesUsingSchemaTemplate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createTimeseriesUsingSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TCreateTimeseriesUsingSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createTimeseriesUsingSchemaTemplate_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createTimeseriesUsingSchemaTemplate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createTimeseriesUsingSchemaTemplate_argsTupleScheme getScheme() { - return new createTimeseriesUsingSchemaTemplate_argsTupleScheme(); - } - } - - private static class createTimeseriesUsingSchemaTemplate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createTimeseriesUsingSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createTimeseriesUsingSchemaTemplate_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TCreateTimeseriesUsingSchemaTemplateReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class createTimeseriesUsingSchemaTemplate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTimeseriesUsingSchemaTemplate_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTimeseriesUsingSchemaTemplate_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTimeseriesUsingSchemaTemplate_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTimeseriesUsingSchemaTemplate_result.class, metaDataMap); - } - - public createTimeseriesUsingSchemaTemplate_result() { - } - - public createTimeseriesUsingSchemaTemplate_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public createTimeseriesUsingSchemaTemplate_result(createTimeseriesUsingSchemaTemplate_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public createTimeseriesUsingSchemaTemplate_result deepCopy() { - return new createTimeseriesUsingSchemaTemplate_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public createTimeseriesUsingSchemaTemplate_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof createTimeseriesUsingSchemaTemplate_result) - return this.equals((createTimeseriesUsingSchemaTemplate_result)that); - return false; - } - - public boolean equals(createTimeseriesUsingSchemaTemplate_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(createTimeseriesUsingSchemaTemplate_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("createTimeseriesUsingSchemaTemplate_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class createTimeseriesUsingSchemaTemplate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createTimeseriesUsingSchemaTemplate_resultStandardScheme getScheme() { - return new createTimeseriesUsingSchemaTemplate_resultStandardScheme(); - } - } - - private static class createTimeseriesUsingSchemaTemplate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, createTimeseriesUsingSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, createTimeseriesUsingSchemaTemplate_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createTimeseriesUsingSchemaTemplate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public createTimeseriesUsingSchemaTemplate_resultTupleScheme getScheme() { - return new createTimeseriesUsingSchemaTemplate_resultTupleScheme(); - } - } - - private static class createTimeseriesUsingSchemaTemplate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createTimeseriesUsingSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createTimeseriesUsingSchemaTemplate_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class handshake_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("handshake_args"); - - private static final org.apache.thrift.protocol.TField INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("info", org.apache.thrift.protocol.TType.STRUCT, (short)-1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new handshake_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new handshake_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSyncIdentityInfo info; // 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 { - INFO((short)-1, "info"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case -1: // INFO - return INFO; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.INFO, new org.apache.thrift.meta_data.FieldMetaData("info", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSyncIdentityInfo.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(handshake_args.class, metaDataMap); - } - - public handshake_args() { - } - - public handshake_args( - TSyncIdentityInfo info) - { - this(); - this.info = info; - } - - /** - * Performs a deep copy on other. - */ - public handshake_args(handshake_args other) { - if (other.isSetInfo()) { - this.info = new TSyncIdentityInfo(other.info); - } - } - - @Override - public handshake_args deepCopy() { - return new handshake_args(this); - } - - @Override - public void clear() { - this.info = null; - } - - @org.apache.thrift.annotation.Nullable - public TSyncIdentityInfo getInfo() { - return this.info; - } - - public handshake_args setInfo(@org.apache.thrift.annotation.Nullable TSyncIdentityInfo info) { - this.info = info; - return this; - } - - public void unsetInfo() { - this.info = null; - } - - /** Returns true if field info is set (has been assigned a value) and false otherwise */ - public boolean isSetInfo() { - return this.info != null; - } - - public void setInfoIsSet(boolean value) { - if (!value) { - this.info = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case INFO: - if (value == null) { - unsetInfo(); - } else { - setInfo((TSyncIdentityInfo)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case INFO: - return getInfo(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case INFO: - return isSetInfo(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof handshake_args) - return this.equals((handshake_args)that); - return false; - } - - public boolean equals(handshake_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_info = true && this.isSetInfo(); - boolean that_present_info = true && that.isSetInfo(); - if (this_present_info || that_present_info) { - if (!(this_present_info && that_present_info)) - return false; - if (!this.info.equals(that.info)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetInfo()) ? 131071 : 524287); - if (isSetInfo()) - hashCode = hashCode * 8191 + info.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(handshake_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetInfo(), other.isSetInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.info, other.info); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("handshake_args("); - boolean first = true; - - sb.append("info:"); - if (this.info == null) { - sb.append("null"); - } else { - sb.append(this.info); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (info != null) { - info.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class handshake_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public handshake_argsStandardScheme getScheme() { - return new handshake_argsStandardScheme(); - } - } - - private static class handshake_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, handshake_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case -1: // INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.info = new TSyncIdentityInfo(); - struct.info.read(iprot); - struct.setInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, handshake_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.info != null) { - oprot.writeFieldBegin(INFO_FIELD_DESC); - struct.info.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class handshake_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public handshake_argsTupleScheme getScheme() { - return new handshake_argsTupleScheme(); - } - } - - private static class handshake_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, handshake_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetInfo()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetInfo()) { - struct.info.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, handshake_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.info = new TSyncIdentityInfo(); - struct.info.read(iprot); - struct.setInfoIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class handshake_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("handshake_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new handshake_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new handshake_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(handshake_result.class, metaDataMap); - } - - public handshake_result() { - } - - public handshake_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public handshake_result(handshake_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public handshake_result deepCopy() { - return new handshake_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public handshake_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof handshake_result) - return this.equals((handshake_result)that); - return false; - } - - public boolean equals(handshake_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(handshake_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("handshake_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class handshake_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public handshake_resultStandardScheme getScheme() { - return new handshake_resultStandardScheme(); - } - } - - private static class handshake_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, handshake_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, handshake_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class handshake_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public handshake_resultTupleScheme getScheme() { - return new handshake_resultTupleScheme(); - } - } - - private static class handshake_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, handshake_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, handshake_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class sendPipeData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendPipeData_args"); - - private static final org.apache.thrift.protocol.TField BUFF_FIELD_DESC = new org.apache.thrift.protocol.TField("buff", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendPipeData_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendPipeData_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer buff; // 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 { - BUFF((short)1, "buff"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // BUFF - return BUFF; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.BUFF, new org.apache.thrift.meta_data.FieldMetaData("buff", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendPipeData_args.class, metaDataMap); - } - - public sendPipeData_args() { - } - - public sendPipeData_args( - java.nio.ByteBuffer buff) - { - this(); - this.buff = org.apache.thrift.TBaseHelper.copyBinary(buff); - } - - /** - * Performs a deep copy on other. - */ - public sendPipeData_args(sendPipeData_args other) { - if (other.isSetBuff()) { - this.buff = org.apache.thrift.TBaseHelper.copyBinary(other.buff); - } - } - - @Override - public sendPipeData_args deepCopy() { - return new sendPipeData_args(this); - } - - @Override - public void clear() { - this.buff = null; - } - - public byte[] getBuff() { - setBuff(org.apache.thrift.TBaseHelper.rightSize(buff)); - return buff == null ? null : buff.array(); - } - - public java.nio.ByteBuffer bufferForBuff() { - return org.apache.thrift.TBaseHelper.copyBinary(buff); - } - - public sendPipeData_args setBuff(byte[] buff) { - this.buff = buff == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(buff.clone()); - return this; - } - - public sendPipeData_args setBuff(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer buff) { - this.buff = org.apache.thrift.TBaseHelper.copyBinary(buff); - return this; - } - - public void unsetBuff() { - this.buff = null; - } - - /** Returns true if field buff is set (has been assigned a value) and false otherwise */ - public boolean isSetBuff() { - return this.buff != null; - } - - public void setBuffIsSet(boolean value) { - if (!value) { - this.buff = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case BUFF: - if (value == null) { - unsetBuff(); - } else { - if (value instanceof byte[]) { - setBuff((byte[])value); - } else { - setBuff((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case BUFF: - return getBuff(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case BUFF: - return isSetBuff(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof sendPipeData_args) - return this.equals((sendPipeData_args)that); - return false; - } - - public boolean equals(sendPipeData_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_buff = true && this.isSetBuff(); - boolean that_present_buff = true && that.isSetBuff(); - if (this_present_buff || that_present_buff) { - if (!(this_present_buff && that_present_buff)) - return false; - if (!this.buff.equals(that.buff)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetBuff()) ? 131071 : 524287); - if (isSetBuff()) - hashCode = hashCode * 8191 + buff.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(sendPipeData_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetBuff(), other.isSetBuff()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBuff()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buff, other.buff); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("sendPipeData_args("); - boolean first = true; - - sb.append("buff:"); - if (this.buff == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.buff, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class sendPipeData_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public sendPipeData_argsStandardScheme getScheme() { - return new sendPipeData_argsStandardScheme(); - } - } - - private static class sendPipeData_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, sendPipeData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // BUFF - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.buff = iprot.readBinary(); - struct.setBuffIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, sendPipeData_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.buff != null) { - oprot.writeFieldBegin(BUFF_FIELD_DESC); - oprot.writeBinary(struct.buff); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class sendPipeData_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public sendPipeData_argsTupleScheme getScheme() { - return new sendPipeData_argsTupleScheme(); - } - } - - private static class sendPipeData_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, sendPipeData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetBuff()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetBuff()) { - oprot.writeBinary(struct.buff); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, sendPipeData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.buff = iprot.readBinary(); - struct.setBuffIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class sendPipeData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendPipeData_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendPipeData_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendPipeData_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendPipeData_result.class, metaDataMap); - } - - public sendPipeData_result() { - } - - public sendPipeData_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public sendPipeData_result(sendPipeData_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public sendPipeData_result deepCopy() { - return new sendPipeData_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public sendPipeData_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof sendPipeData_result) - return this.equals((sendPipeData_result)that); - return false; - } - - public boolean equals(sendPipeData_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(sendPipeData_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("sendPipeData_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class sendPipeData_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public sendPipeData_resultStandardScheme getScheme() { - return new sendPipeData_resultStandardScheme(); - } - } - - private static class sendPipeData_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, sendPipeData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, sendPipeData_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class sendPipeData_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public sendPipeData_resultTupleScheme getScheme() { - return new sendPipeData_resultTupleScheme(); - } - } - - private static class sendPipeData_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, sendPipeData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, sendPipeData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class sendFile_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendFile_args"); - - private static final org.apache.thrift.protocol.TField META_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("metaInfo", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField BUFF_FIELD_DESC = new org.apache.thrift.protocol.TField("buff", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendFile_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendFile_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSyncTransportMetaInfo metaInfo; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer buff; // 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 { - META_INFO((short)1, "metaInfo"), - BUFF((short)2, "buff"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // META_INFO - return META_INFO; - case 2: // BUFF - return BUFF; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.META_INFO, new org.apache.thrift.meta_data.FieldMetaData("metaInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSyncTransportMetaInfo.class))); - tmpMap.put(_Fields.BUFF, new org.apache.thrift.meta_data.FieldMetaData("buff", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFile_args.class, metaDataMap); - } - - public sendFile_args() { - } - - public sendFile_args( - TSyncTransportMetaInfo metaInfo, - java.nio.ByteBuffer buff) - { - this(); - this.metaInfo = metaInfo; - this.buff = org.apache.thrift.TBaseHelper.copyBinary(buff); - } - - /** - * Performs a deep copy on other. - */ - public sendFile_args(sendFile_args other) { - if (other.isSetMetaInfo()) { - this.metaInfo = new TSyncTransportMetaInfo(other.metaInfo); - } - if (other.isSetBuff()) { - this.buff = org.apache.thrift.TBaseHelper.copyBinary(other.buff); - } - } - - @Override - public sendFile_args deepCopy() { - return new sendFile_args(this); - } - - @Override - public void clear() { - this.metaInfo = null; - this.buff = null; - } - - @org.apache.thrift.annotation.Nullable - public TSyncTransportMetaInfo getMetaInfo() { - return this.metaInfo; - } - - public sendFile_args setMetaInfo(@org.apache.thrift.annotation.Nullable TSyncTransportMetaInfo metaInfo) { - this.metaInfo = metaInfo; - return this; - } - - public void unsetMetaInfo() { - this.metaInfo = null; - } - - /** Returns true if field metaInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetMetaInfo() { - return this.metaInfo != null; - } - - public void setMetaInfoIsSet(boolean value) { - if (!value) { - this.metaInfo = null; - } - } - - public byte[] getBuff() { - setBuff(org.apache.thrift.TBaseHelper.rightSize(buff)); - return buff == null ? null : buff.array(); - } - - public java.nio.ByteBuffer bufferForBuff() { - return org.apache.thrift.TBaseHelper.copyBinary(buff); - } - - public sendFile_args setBuff(byte[] buff) { - this.buff = buff == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(buff.clone()); - return this; - } - - public sendFile_args setBuff(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer buff) { - this.buff = org.apache.thrift.TBaseHelper.copyBinary(buff); - return this; - } - - public void unsetBuff() { - this.buff = null; - } - - /** Returns true if field buff is set (has been assigned a value) and false otherwise */ - public boolean isSetBuff() { - return this.buff != null; - } - - public void setBuffIsSet(boolean value) { - if (!value) { - this.buff = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case META_INFO: - if (value == null) { - unsetMetaInfo(); - } else { - setMetaInfo((TSyncTransportMetaInfo)value); - } - break; - - case BUFF: - if (value == null) { - unsetBuff(); - } else { - if (value instanceof byte[]) { - setBuff((byte[])value); - } else { - setBuff((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case META_INFO: - return getMetaInfo(); - - case BUFF: - return getBuff(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case META_INFO: - return isSetMetaInfo(); - case BUFF: - return isSetBuff(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof sendFile_args) - return this.equals((sendFile_args)that); - return false; - } - - public boolean equals(sendFile_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_metaInfo = true && this.isSetMetaInfo(); - boolean that_present_metaInfo = true && that.isSetMetaInfo(); - if (this_present_metaInfo || that_present_metaInfo) { - if (!(this_present_metaInfo && that_present_metaInfo)) - return false; - if (!this.metaInfo.equals(that.metaInfo)) - return false; - } - - boolean this_present_buff = true && this.isSetBuff(); - boolean that_present_buff = true && that.isSetBuff(); - if (this_present_buff || that_present_buff) { - if (!(this_present_buff && that_present_buff)) - return false; - if (!this.buff.equals(that.buff)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetMetaInfo()) ? 131071 : 524287); - if (isSetMetaInfo()) - hashCode = hashCode * 8191 + metaInfo.hashCode(); - - hashCode = hashCode * 8191 + ((isSetBuff()) ? 131071 : 524287); - if (isSetBuff()) - hashCode = hashCode * 8191 + buff.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(sendFile_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetMetaInfo(), other.isSetMetaInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMetaInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaInfo, other.metaInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetBuff(), other.isSetBuff()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBuff()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buff, other.buff); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("sendFile_args("); - boolean first = true; - - sb.append("metaInfo:"); - if (this.metaInfo == null) { - sb.append("null"); - } else { - sb.append(this.metaInfo); - } - first = false; - if (!first) sb.append(", "); - sb.append("buff:"); - if (this.buff == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.buff, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (metaInfo != null) { - metaInfo.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class sendFile_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public sendFile_argsStandardScheme getScheme() { - return new sendFile_argsStandardScheme(); - } - } - - private static class sendFile_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, sendFile_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // META_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.metaInfo = new TSyncTransportMetaInfo(); - struct.metaInfo.read(iprot); - struct.setMetaInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // BUFF - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.buff = iprot.readBinary(); - struct.setBuffIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, sendFile_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.metaInfo != null) { - oprot.writeFieldBegin(META_INFO_FIELD_DESC); - struct.metaInfo.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.buff != null) { - oprot.writeFieldBegin(BUFF_FIELD_DESC); - oprot.writeBinary(struct.buff); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class sendFile_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public sendFile_argsTupleScheme getScheme() { - return new sendFile_argsTupleScheme(); - } - } - - private static class sendFile_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, sendFile_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetMetaInfo()) { - optionals.set(0); - } - if (struct.isSetBuff()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetMetaInfo()) { - struct.metaInfo.write(oprot); - } - if (struct.isSetBuff()) { - oprot.writeBinary(struct.buff); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, sendFile_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.metaInfo = new TSyncTransportMetaInfo(); - struct.metaInfo.read(iprot); - struct.setMetaInfoIsSet(true); - } - if (incoming.get(1)) { - struct.buff = iprot.readBinary(); - struct.setBuffIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class sendFile_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendFile_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new sendFile_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new sendFile_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFile_result.class, metaDataMap); - } - - public sendFile_result() { - } - - public sendFile_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public sendFile_result(sendFile_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public sendFile_result deepCopy() { - return new sendFile_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public sendFile_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof sendFile_result) - return this.equals((sendFile_result)that); - return false; - } - - public boolean equals(sendFile_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(sendFile_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("sendFile_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class sendFile_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public sendFile_resultStandardScheme getScheme() { - return new sendFile_resultStandardScheme(); - } - } - - private static class sendFile_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, sendFile_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, sendFile_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class sendFile_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public sendFile_resultTupleScheme getScheme() { - return new sendFile_resultTupleScheme(); - } - } - - private static class sendFile_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, sendFile_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, sendFile_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class pipeTransfer_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pipeTransfer_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)-1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pipeTransfer_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pipeTransfer_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TPipeTransferReq req; // 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 { - REQ((short)-1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case -1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPipeTransferReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pipeTransfer_args.class, metaDataMap); - } - - public pipeTransfer_args() { - } - - public pipeTransfer_args( - TPipeTransferReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public pipeTransfer_args(pipeTransfer_args other) { - if (other.isSetReq()) { - this.req = new TPipeTransferReq(other.req); - } - } - - @Override - public pipeTransfer_args deepCopy() { - return new pipeTransfer_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TPipeTransferReq getReq() { - return this.req; - } - - public pipeTransfer_args setReq(@org.apache.thrift.annotation.Nullable TPipeTransferReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TPipeTransferReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof pipeTransfer_args) - return this.equals((pipeTransfer_args)that); - return false; - } - - public boolean equals(pipeTransfer_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(pipeTransfer_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("pipeTransfer_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class pipeTransfer_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pipeTransfer_argsStandardScheme getScheme() { - return new pipeTransfer_argsStandardScheme(); - } - } - - private static class pipeTransfer_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, pipeTransfer_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case -1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TPipeTransferReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, pipeTransfer_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class pipeTransfer_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pipeTransfer_argsTupleScheme getScheme() { - return new pipeTransfer_argsTupleScheme(); - } - } - - private static class pipeTransfer_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, pipeTransfer_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, pipeTransfer_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TPipeTransferReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class pipeTransfer_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pipeTransfer_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pipeTransfer_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pipeTransfer_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TPipeTransferResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPipeTransferResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pipeTransfer_result.class, metaDataMap); - } - - public pipeTransfer_result() { - } - - public pipeTransfer_result( - TPipeTransferResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public pipeTransfer_result(pipeTransfer_result other) { - if (other.isSetSuccess()) { - this.success = new TPipeTransferResp(other.success); - } - } - - @Override - public pipeTransfer_result deepCopy() { - return new pipeTransfer_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TPipeTransferResp getSuccess() { - return this.success; - } - - public pipeTransfer_result setSuccess(@org.apache.thrift.annotation.Nullable TPipeTransferResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TPipeTransferResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof pipeTransfer_result) - return this.equals((pipeTransfer_result)that); - return false; - } - - public boolean equals(pipeTransfer_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(pipeTransfer_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("pipeTransfer_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class pipeTransfer_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pipeTransfer_resultStandardScheme getScheme() { - return new pipeTransfer_resultStandardScheme(); - } - } - - private static class pipeTransfer_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, pipeTransfer_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TPipeTransferResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, pipeTransfer_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class pipeTransfer_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pipeTransfer_resultTupleScheme getScheme() { - return new pipeTransfer_resultTupleScheme(); - } - } - - private static class pipeTransfer_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, pipeTransfer_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, pipeTransfer_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TPipeTransferResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class pipeSubscribe_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pipeSubscribe_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)-1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pipeSubscribe_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pipeSubscribe_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TPipeSubscribeReq req; // 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 { - REQ((short)-1, "req"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case -1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPipeSubscribeReq.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pipeSubscribe_args.class, metaDataMap); - } - - public pipeSubscribe_args() { - } - - public pipeSubscribe_args( - TPipeSubscribeReq req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public pipeSubscribe_args(pipeSubscribe_args other) { - if (other.isSetReq()) { - this.req = new TPipeSubscribeReq(other.req); - } - } - - @Override - public pipeSubscribe_args deepCopy() { - return new pipeSubscribe_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - @org.apache.thrift.annotation.Nullable - public TPipeSubscribeReq getReq() { - return this.req; - } - - public pipeSubscribe_args setReq(@org.apache.thrift.annotation.Nullable TPipeSubscribeReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((TPipeSubscribeReq)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof pipeSubscribe_args) - return this.equals((pipeSubscribe_args)that); - return false; - } - - public boolean equals(pipeSubscribe_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetReq()) ? 131071 : 524287); - if (isSetReq()) - hashCode = hashCode * 8191 + req.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(pipeSubscribe_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetReq(), other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("pipeSubscribe_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class pipeSubscribe_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pipeSubscribe_argsStandardScheme getScheme() { - return new pipeSubscribe_argsStandardScheme(); - } - } - - private static class pipeSubscribe_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, pipeSubscribe_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case -1: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TPipeSubscribeReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, pipeSubscribe_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class pipeSubscribe_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pipeSubscribe_argsTupleScheme getScheme() { - return new pipeSubscribe_argsTupleScheme(); - } - } - - private static class pipeSubscribe_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, pipeSubscribe_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, pipeSubscribe_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new TPipeSubscribeReq(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class pipeSubscribe_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pipeSubscribe_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pipeSubscribe_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pipeSubscribe_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TPipeSubscribeResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPipeSubscribeResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pipeSubscribe_result.class, metaDataMap); - } - - public pipeSubscribe_result() { - } - - public pipeSubscribe_result( - TPipeSubscribeResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public pipeSubscribe_result(pipeSubscribe_result other) { - if (other.isSetSuccess()) { - this.success = new TPipeSubscribeResp(other.success); - } - } - - @Override - public pipeSubscribe_result deepCopy() { - return new pipeSubscribe_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TPipeSubscribeResp getSuccess() { - return this.success; - } - - public pipeSubscribe_result setSuccess(@org.apache.thrift.annotation.Nullable TPipeSubscribeResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TPipeSubscribeResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof pipeSubscribe_result) - return this.equals((pipeSubscribe_result)that); - return false; - } - - public boolean equals(pipeSubscribe_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(pipeSubscribe_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("pipeSubscribe_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class pipeSubscribe_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pipeSubscribe_resultStandardScheme getScheme() { - return new pipeSubscribe_resultStandardScheme(); - } - } - - private static class pipeSubscribe_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, pipeSubscribe_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TPipeSubscribeResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, pipeSubscribe_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class pipeSubscribe_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public pipeSubscribe_resultTupleScheme getScheme() { - return new pipeSubscribe_resultTupleScheme(); - } - } - - private static class pipeSubscribe_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, pipeSubscribe_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, pipeSubscribe_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TPipeSubscribeResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getBackupConfiguration_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBackupConfiguration_args"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getBackupConfiguration_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getBackupConfiguration_argsTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBackupConfiguration_args.class, metaDataMap); - } - - public getBackupConfiguration_args() { - } - - /** - * Performs a deep copy on other. - */ - public getBackupConfiguration_args(getBackupConfiguration_args other) { - } - - @Override - public getBackupConfiguration_args deepCopy() { - return new getBackupConfiguration_args(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getBackupConfiguration_args) - return this.equals((getBackupConfiguration_args)that); - return false; - } - - public boolean equals(getBackupConfiguration_args that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(getBackupConfiguration_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getBackupConfiguration_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class getBackupConfiguration_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getBackupConfiguration_argsStandardScheme getScheme() { - return new getBackupConfiguration_argsStandardScheme(); - } - } - - private static class getBackupConfiguration_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getBackupConfiguration_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getBackupConfiguration_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getBackupConfiguration_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getBackupConfiguration_argsTupleScheme getScheme() { - return new getBackupConfiguration_argsTupleScheme(); - } - } - - private static class getBackupConfiguration_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getBackupConfiguration_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getBackupConfiguration_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class getBackupConfiguration_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBackupConfiguration_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getBackupConfiguration_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getBackupConfiguration_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSBackupConfigurationResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSBackupConfigurationResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBackupConfiguration_result.class, metaDataMap); - } - - public getBackupConfiguration_result() { - } - - public getBackupConfiguration_result( - TSBackupConfigurationResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public getBackupConfiguration_result(getBackupConfiguration_result other) { - if (other.isSetSuccess()) { - this.success = new TSBackupConfigurationResp(other.success); - } - } - - @Override - public getBackupConfiguration_result deepCopy() { - return new getBackupConfiguration_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSBackupConfigurationResp getSuccess() { - return this.success; - } - - public getBackupConfiguration_result setSuccess(@org.apache.thrift.annotation.Nullable TSBackupConfigurationResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSBackupConfigurationResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof getBackupConfiguration_result) - return this.equals((getBackupConfiguration_result)that); - return false; - } - - public boolean equals(getBackupConfiguration_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getBackupConfiguration_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getBackupConfiguration_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class getBackupConfiguration_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getBackupConfiguration_resultStandardScheme getScheme() { - return new getBackupConfiguration_resultStandardScheme(); - } - } - - private static class getBackupConfiguration_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, getBackupConfiguration_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSBackupConfigurationResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, getBackupConfiguration_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getBackupConfiguration_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public getBackupConfiguration_resultTupleScheme getScheme() { - return new getBackupConfiguration_resultTupleScheme(); - } - } - - private static class getBackupConfiguration_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getBackupConfiguration_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getBackupConfiguration_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSBackupConfigurationResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class fetchAllConnectionsInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchAllConnectionsInfo_args"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchAllConnectionsInfo_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchAllConnectionsInfo_argsTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchAllConnectionsInfo_args.class, metaDataMap); - } - - public fetchAllConnectionsInfo_args() { - } - - /** - * Performs a deep copy on other. - */ - public fetchAllConnectionsInfo_args(fetchAllConnectionsInfo_args other) { - } - - @Override - public fetchAllConnectionsInfo_args deepCopy() { - return new fetchAllConnectionsInfo_args(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof fetchAllConnectionsInfo_args) - return this.equals((fetchAllConnectionsInfo_args)that); - return false; - } - - public boolean equals(fetchAllConnectionsInfo_args that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(fetchAllConnectionsInfo_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchAllConnectionsInfo_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class fetchAllConnectionsInfo_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchAllConnectionsInfo_argsStandardScheme getScheme() { - return new fetchAllConnectionsInfo_argsStandardScheme(); - } - } - - private static class fetchAllConnectionsInfo_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAllConnectionsInfo_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, fetchAllConnectionsInfo_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fetchAllConnectionsInfo_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchAllConnectionsInfo_argsTupleScheme getScheme() { - return new fetchAllConnectionsInfo_argsTupleScheme(); - } - } - - private static class fetchAllConnectionsInfo_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fetchAllConnectionsInfo_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fetchAllConnectionsInfo_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class fetchAllConnectionsInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchAllConnectionsInfo_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchAllConnectionsInfo_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchAllConnectionsInfo_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable TSConnectionInfoResp success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSConnectionInfoResp.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchAllConnectionsInfo_result.class, metaDataMap); - } - - public fetchAllConnectionsInfo_result() { - } - - public fetchAllConnectionsInfo_result( - TSConnectionInfoResp success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public fetchAllConnectionsInfo_result(fetchAllConnectionsInfo_result other) { - if (other.isSetSuccess()) { - this.success = new TSConnectionInfoResp(other.success); - } - } - - @Override - public fetchAllConnectionsInfo_result deepCopy() { - return new fetchAllConnectionsInfo_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public TSConnectionInfoResp getSuccess() { - return this.success; - } - - public fetchAllConnectionsInfo_result setSuccess(@org.apache.thrift.annotation.Nullable TSConnectionInfoResp success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TSConnectionInfoResp)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof fetchAllConnectionsInfo_result) - return this.equals((fetchAllConnectionsInfo_result)that); - return false; - } - - public boolean equals(fetchAllConnectionsInfo_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(fetchAllConnectionsInfo_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchAllConnectionsInfo_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class fetchAllConnectionsInfo_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchAllConnectionsInfo_resultStandardScheme getScheme() { - return new fetchAllConnectionsInfo_resultStandardScheme(); - } - } - - private static class fetchAllConnectionsInfo_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAllConnectionsInfo_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TSConnectionInfoResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, fetchAllConnectionsInfo_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fetchAllConnectionsInfo_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public fetchAllConnectionsInfo_resultTupleScheme getScheme() { - return new fetchAllConnectionsInfo_resultTupleScheme(); - } - } - - private static class fetchAllConnectionsInfo_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fetchAllConnectionsInfo_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fetchAllConnectionsInfo_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new TSConnectionInfoResp(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testConnectionEmptyRPC_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testConnectionEmptyRPC_args"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testConnectionEmptyRPC_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testConnectionEmptyRPC_argsTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testConnectionEmptyRPC_args.class, metaDataMap); - } - - public testConnectionEmptyRPC_args() { - } - - /** - * Performs a deep copy on other. - */ - public testConnectionEmptyRPC_args(testConnectionEmptyRPC_args other) { - } - - @Override - public testConnectionEmptyRPC_args deepCopy() { - return new testConnectionEmptyRPC_args(this); - } - - @Override - public void clear() { - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testConnectionEmptyRPC_args) - return this.equals((testConnectionEmptyRPC_args)that); - return false; - } - - public boolean equals(testConnectionEmptyRPC_args that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(testConnectionEmptyRPC_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testConnectionEmptyRPC_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testConnectionEmptyRPC_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testConnectionEmptyRPC_argsStandardScheme getScheme() { - return new testConnectionEmptyRPC_argsStandardScheme(); - } - } - - private static class testConnectionEmptyRPC_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testConnectionEmptyRPC_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testConnectionEmptyRPC_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testConnectionEmptyRPC_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testConnectionEmptyRPC_argsTupleScheme getScheme() { - return new testConnectionEmptyRPC_argsTupleScheme(); - } - } - - private static class testConnectionEmptyRPC_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testConnectionEmptyRPC_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testConnectionEmptyRPC_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class testConnectionEmptyRPC_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testConnectionEmptyRPC_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new testConnectionEmptyRPC_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new testConnectionEmptyRPC_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success; // 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 { - SUCCESS((short)0, "success"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(testConnectionEmptyRPC_result.class, metaDataMap); - } - - public testConnectionEmptyRPC_result() { - } - - public testConnectionEmptyRPC_result( - org.apache.iotdb.common.rpc.thrift.TSStatus success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public testConnectionEmptyRPC_result(testConnectionEmptyRPC_result other) { - if (other.isSetSuccess()) { - this.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.success); - } - } - - @Override - public testConnectionEmptyRPC_result deepCopy() { - return new testConnectionEmptyRPC_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getSuccess() { - return this.success; - } - - public testConnectionEmptyRPC_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof testConnectionEmptyRPC_result) - return this.equals((testConnectionEmptyRPC_result)that); - return false; - } - - public boolean equals(testConnectionEmptyRPC_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(testConnectionEmptyRPC_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("testConnectionEmptyRPC_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class testConnectionEmptyRPC_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testConnectionEmptyRPC_resultStandardScheme getScheme() { - return new testConnectionEmptyRPC_resultStandardScheme(); - } - } - - private static class testConnectionEmptyRPC_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, testConnectionEmptyRPC_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, testConnectionEmptyRPC_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class testConnectionEmptyRPC_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public testConnectionEmptyRPC_resultTupleScheme getScheme() { - return new testConnectionEmptyRPC_resultTupleScheme(); - } - } - - private static class testConnectionEmptyRPC_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, testConnectionEmptyRPC_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, testConnectionEmptyRPC_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - -} diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/ServerProperties.java b/gen-java/org/apache/iotdb/service/rpc/thrift/ServerProperties.java deleted file mode 100644 index b0f5b0d118cea..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/ServerProperties.java +++ /dev/null @@ -1,1149 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class ServerProperties implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ServerProperties"); - - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField SUPPORTED_TIME_AGGREGATION_OPERATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("supportedTimeAggregationOperations", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField TIMESTAMP_PRECISION_FIELD_DESC = new org.apache.thrift.protocol.TField("timestampPrecision", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField MAX_CONCURRENT_CLIENT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("maxConcurrentClientNum", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField THRIFT_MAX_FRAME_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("thriftMaxFrameSize", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField IS_READ_ONLY_FIELD_DESC = new org.apache.thrift.protocol.TField("isReadOnly", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField BUILD_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("buildInfo", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField LOGO_FIELD_DESC = new org.apache.thrift.protocol.TField("logo", org.apache.thrift.protocol.TType.STRING, (short)8); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ServerPropertiesStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ServerPropertiesTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.lang.String version; // required - public @org.apache.thrift.annotation.Nullable java.util.List supportedTimeAggregationOperations; // required - public @org.apache.thrift.annotation.Nullable java.lang.String timestampPrecision; // required - public int maxConcurrentClientNum; // required - public int thriftMaxFrameSize; // optional - public boolean isReadOnly; // optional - public @org.apache.thrift.annotation.Nullable java.lang.String buildInfo; // optional - public @org.apache.thrift.annotation.Nullable java.lang.String logo; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - VERSION((short)1, "version"), - SUPPORTED_TIME_AGGREGATION_OPERATIONS((short)2, "supportedTimeAggregationOperations"), - TIMESTAMP_PRECISION((short)3, "timestampPrecision"), - MAX_CONCURRENT_CLIENT_NUM((short)4, "maxConcurrentClientNum"), - THRIFT_MAX_FRAME_SIZE((short)5, "thriftMaxFrameSize"), - IS_READ_ONLY((short)6, "isReadOnly"), - BUILD_INFO((short)7, "buildInfo"), - LOGO((short)8, "logo"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VERSION - return VERSION; - case 2: // SUPPORTED_TIME_AGGREGATION_OPERATIONS - return SUPPORTED_TIME_AGGREGATION_OPERATIONS; - case 3: // TIMESTAMP_PRECISION - return TIMESTAMP_PRECISION; - case 4: // MAX_CONCURRENT_CLIENT_NUM - return MAX_CONCURRENT_CLIENT_NUM; - case 5: // THRIFT_MAX_FRAME_SIZE - return THRIFT_MAX_FRAME_SIZE; - case 6: // IS_READ_ONLY - return IS_READ_ONLY; - case 7: // BUILD_INFO - return BUILD_INFO; - case 8: // LOGO - return LOGO; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAXCONCURRENTCLIENTNUM_ISSET_ID = 0; - private static final int __THRIFTMAXFRAMESIZE_ISSET_ID = 1; - private static final int __ISREADONLY_ISSET_ID = 2; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.THRIFT_MAX_FRAME_SIZE,_Fields.IS_READ_ONLY,_Fields.BUILD_INFO,_Fields.LOGO}; - 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.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SUPPORTED_TIME_AGGREGATION_OPERATIONS, new org.apache.thrift.meta_data.FieldMetaData("supportedTimeAggregationOperations", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.TIMESTAMP_PRECISION, new org.apache.thrift.meta_data.FieldMetaData("timestampPrecision", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_CONCURRENT_CLIENT_NUM, new org.apache.thrift.meta_data.FieldMetaData("maxConcurrentClientNum", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.THRIFT_MAX_FRAME_SIZE, new org.apache.thrift.meta_data.FieldMetaData("thriftMaxFrameSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.IS_READ_ONLY, new org.apache.thrift.meta_data.FieldMetaData("isReadOnly", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.BUILD_INFO, new org.apache.thrift.meta_data.FieldMetaData("buildInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.LOGO, new org.apache.thrift.meta_data.FieldMetaData("logo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ServerProperties.class, metaDataMap); - } - - public ServerProperties() { - } - - public ServerProperties( - java.lang.String version, - java.util.List supportedTimeAggregationOperations, - java.lang.String timestampPrecision, - int maxConcurrentClientNum) - { - this(); - this.version = version; - this.supportedTimeAggregationOperations = supportedTimeAggregationOperations; - this.timestampPrecision = timestampPrecision; - this.maxConcurrentClientNum = maxConcurrentClientNum; - setMaxConcurrentClientNumIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public ServerProperties(ServerProperties other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetVersion()) { - this.version = other.version; - } - if (other.isSetSupportedTimeAggregationOperations()) { - java.util.List __this__supportedTimeAggregationOperations = new java.util.ArrayList(other.supportedTimeAggregationOperations); - this.supportedTimeAggregationOperations = __this__supportedTimeAggregationOperations; - } - if (other.isSetTimestampPrecision()) { - this.timestampPrecision = other.timestampPrecision; - } - this.maxConcurrentClientNum = other.maxConcurrentClientNum; - this.thriftMaxFrameSize = other.thriftMaxFrameSize; - this.isReadOnly = other.isReadOnly; - if (other.isSetBuildInfo()) { - this.buildInfo = other.buildInfo; - } - if (other.isSetLogo()) { - this.logo = other.logo; - } - } - - @Override - public ServerProperties deepCopy() { - return new ServerProperties(this); - } - - @Override - public void clear() { - this.version = null; - this.supportedTimeAggregationOperations = null; - this.timestampPrecision = null; - setMaxConcurrentClientNumIsSet(false); - this.maxConcurrentClientNum = 0; - setThriftMaxFrameSizeIsSet(false); - this.thriftMaxFrameSize = 0; - setIsReadOnlyIsSet(false); - this.isReadOnly = false; - this.buildInfo = null; - this.logo = null; - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getVersion() { - return this.version; - } - - public ServerProperties setVersion(@org.apache.thrift.annotation.Nullable java.lang.String version) { - this.version = version; - return this; - } - - public void unsetVersion() { - this.version = null; - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return this.version != null; - } - - public void setVersionIsSet(boolean value) { - if (!value) { - this.version = null; - } - } - - public int getSupportedTimeAggregationOperationsSize() { - return (this.supportedTimeAggregationOperations == null) ? 0 : this.supportedTimeAggregationOperations.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getSupportedTimeAggregationOperationsIterator() { - return (this.supportedTimeAggregationOperations == null) ? null : this.supportedTimeAggregationOperations.iterator(); - } - - public void addToSupportedTimeAggregationOperations(java.lang.String elem) { - if (this.supportedTimeAggregationOperations == null) { - this.supportedTimeAggregationOperations = new java.util.ArrayList(); - } - this.supportedTimeAggregationOperations.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getSupportedTimeAggregationOperations() { - return this.supportedTimeAggregationOperations; - } - - public ServerProperties setSupportedTimeAggregationOperations(@org.apache.thrift.annotation.Nullable java.util.List supportedTimeAggregationOperations) { - this.supportedTimeAggregationOperations = supportedTimeAggregationOperations; - return this; - } - - public void unsetSupportedTimeAggregationOperations() { - this.supportedTimeAggregationOperations = null; - } - - /** Returns true if field supportedTimeAggregationOperations is set (has been assigned a value) and false otherwise */ - public boolean isSetSupportedTimeAggregationOperations() { - return this.supportedTimeAggregationOperations != null; - } - - public void setSupportedTimeAggregationOperationsIsSet(boolean value) { - if (!value) { - this.supportedTimeAggregationOperations = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getTimestampPrecision() { - return this.timestampPrecision; - } - - public ServerProperties setTimestampPrecision(@org.apache.thrift.annotation.Nullable java.lang.String timestampPrecision) { - this.timestampPrecision = timestampPrecision; - return this; - } - - public void unsetTimestampPrecision() { - this.timestampPrecision = null; - } - - /** Returns true if field timestampPrecision is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestampPrecision() { - return this.timestampPrecision != null; - } - - public void setTimestampPrecisionIsSet(boolean value) { - if (!value) { - this.timestampPrecision = null; - } - } - - public int getMaxConcurrentClientNum() { - return this.maxConcurrentClientNum; - } - - public ServerProperties setMaxConcurrentClientNum(int maxConcurrentClientNum) { - this.maxConcurrentClientNum = maxConcurrentClientNum; - setMaxConcurrentClientNumIsSet(true); - return this; - } - - public void unsetMaxConcurrentClientNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXCONCURRENTCLIENTNUM_ISSET_ID); - } - - /** Returns true if field maxConcurrentClientNum is set (has been assigned a value) and false otherwise */ - public boolean isSetMaxConcurrentClientNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXCONCURRENTCLIENTNUM_ISSET_ID); - } - - public void setMaxConcurrentClientNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXCONCURRENTCLIENTNUM_ISSET_ID, value); - } - - public int getThriftMaxFrameSize() { - return this.thriftMaxFrameSize; - } - - public ServerProperties setThriftMaxFrameSize(int thriftMaxFrameSize) { - this.thriftMaxFrameSize = thriftMaxFrameSize; - setThriftMaxFrameSizeIsSet(true); - return this; - } - - public void unsetThriftMaxFrameSize() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THRIFTMAXFRAMESIZE_ISSET_ID); - } - - /** Returns true if field thriftMaxFrameSize is set (has been assigned a value) and false otherwise */ - public boolean isSetThriftMaxFrameSize() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THRIFTMAXFRAMESIZE_ISSET_ID); - } - - public void setThriftMaxFrameSizeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THRIFTMAXFRAMESIZE_ISSET_ID, value); - } - - public boolean isIsReadOnly() { - return this.isReadOnly; - } - - public ServerProperties setIsReadOnly(boolean isReadOnly) { - this.isReadOnly = isReadOnly; - setIsReadOnlyIsSet(true); - return this; - } - - public void unsetIsReadOnly() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISREADONLY_ISSET_ID); - } - - /** Returns true if field isReadOnly is set (has been assigned a value) and false otherwise */ - public boolean isSetIsReadOnly() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISREADONLY_ISSET_ID); - } - - public void setIsReadOnlyIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISREADONLY_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getBuildInfo() { - return this.buildInfo; - } - - public ServerProperties setBuildInfo(@org.apache.thrift.annotation.Nullable java.lang.String buildInfo) { - this.buildInfo = buildInfo; - return this; - } - - public void unsetBuildInfo() { - this.buildInfo = null; - } - - /** Returns true if field buildInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetBuildInfo() { - return this.buildInfo != null; - } - - public void setBuildInfoIsSet(boolean value) { - if (!value) { - this.buildInfo = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getLogo() { - return this.logo; - } - - public ServerProperties setLogo(@org.apache.thrift.annotation.Nullable java.lang.String logo) { - this.logo = logo; - return this; - } - - public void unsetLogo() { - this.logo = null; - } - - /** Returns true if field logo is set (has been assigned a value) and false otherwise */ - public boolean isSetLogo() { - return this.logo != null; - } - - public void setLogoIsSet(boolean value) { - if (!value) { - this.logo = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((java.lang.String)value); - } - break; - - case SUPPORTED_TIME_AGGREGATION_OPERATIONS: - if (value == null) { - unsetSupportedTimeAggregationOperations(); - } else { - setSupportedTimeAggregationOperations((java.util.List)value); - } - break; - - case TIMESTAMP_PRECISION: - if (value == null) { - unsetTimestampPrecision(); - } else { - setTimestampPrecision((java.lang.String)value); - } - break; - - case MAX_CONCURRENT_CLIENT_NUM: - if (value == null) { - unsetMaxConcurrentClientNum(); - } else { - setMaxConcurrentClientNum((java.lang.Integer)value); - } - break; - - case THRIFT_MAX_FRAME_SIZE: - if (value == null) { - unsetThriftMaxFrameSize(); - } else { - setThriftMaxFrameSize((java.lang.Integer)value); - } - break; - - case IS_READ_ONLY: - if (value == null) { - unsetIsReadOnly(); - } else { - setIsReadOnly((java.lang.Boolean)value); - } - break; - - case BUILD_INFO: - if (value == null) { - unsetBuildInfo(); - } else { - setBuildInfo((java.lang.String)value); - } - break; - - case LOGO: - if (value == null) { - unsetLogo(); - } else { - setLogo((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case VERSION: - return getVersion(); - - case SUPPORTED_TIME_AGGREGATION_OPERATIONS: - return getSupportedTimeAggregationOperations(); - - case TIMESTAMP_PRECISION: - return getTimestampPrecision(); - - case MAX_CONCURRENT_CLIENT_NUM: - return getMaxConcurrentClientNum(); - - case THRIFT_MAX_FRAME_SIZE: - return getThriftMaxFrameSize(); - - case IS_READ_ONLY: - return isIsReadOnly(); - - case BUILD_INFO: - return getBuildInfo(); - - case LOGO: - return getLogo(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case VERSION: - return isSetVersion(); - case SUPPORTED_TIME_AGGREGATION_OPERATIONS: - return isSetSupportedTimeAggregationOperations(); - case TIMESTAMP_PRECISION: - return isSetTimestampPrecision(); - case MAX_CONCURRENT_CLIENT_NUM: - return isSetMaxConcurrentClientNum(); - case THRIFT_MAX_FRAME_SIZE: - return isSetThriftMaxFrameSize(); - case IS_READ_ONLY: - return isSetIsReadOnly(); - case BUILD_INFO: - return isSetBuildInfo(); - case LOGO: - return isSetLogo(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof ServerProperties) - return this.equals((ServerProperties)that); - return false; - } - - public boolean equals(ServerProperties that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_version = true && this.isSetVersion(); - boolean that_present_version = true && that.isSetVersion(); - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (!this.version.equals(that.version)) - return false; - } - - boolean this_present_supportedTimeAggregationOperations = true && this.isSetSupportedTimeAggregationOperations(); - boolean that_present_supportedTimeAggregationOperations = true && that.isSetSupportedTimeAggregationOperations(); - if (this_present_supportedTimeAggregationOperations || that_present_supportedTimeAggregationOperations) { - if (!(this_present_supportedTimeAggregationOperations && that_present_supportedTimeAggregationOperations)) - return false; - if (!this.supportedTimeAggregationOperations.equals(that.supportedTimeAggregationOperations)) - return false; - } - - boolean this_present_timestampPrecision = true && this.isSetTimestampPrecision(); - boolean that_present_timestampPrecision = true && that.isSetTimestampPrecision(); - if (this_present_timestampPrecision || that_present_timestampPrecision) { - if (!(this_present_timestampPrecision && that_present_timestampPrecision)) - return false; - if (!this.timestampPrecision.equals(that.timestampPrecision)) - return false; - } - - boolean this_present_maxConcurrentClientNum = true; - boolean that_present_maxConcurrentClientNum = true; - if (this_present_maxConcurrentClientNum || that_present_maxConcurrentClientNum) { - if (!(this_present_maxConcurrentClientNum && that_present_maxConcurrentClientNum)) - return false; - if (this.maxConcurrentClientNum != that.maxConcurrentClientNum) - return false; - } - - boolean this_present_thriftMaxFrameSize = true && this.isSetThriftMaxFrameSize(); - boolean that_present_thriftMaxFrameSize = true && that.isSetThriftMaxFrameSize(); - if (this_present_thriftMaxFrameSize || that_present_thriftMaxFrameSize) { - if (!(this_present_thriftMaxFrameSize && that_present_thriftMaxFrameSize)) - return false; - if (this.thriftMaxFrameSize != that.thriftMaxFrameSize) - return false; - } - - boolean this_present_isReadOnly = true && this.isSetIsReadOnly(); - boolean that_present_isReadOnly = true && that.isSetIsReadOnly(); - if (this_present_isReadOnly || that_present_isReadOnly) { - if (!(this_present_isReadOnly && that_present_isReadOnly)) - return false; - if (this.isReadOnly != that.isReadOnly) - return false; - } - - boolean this_present_buildInfo = true && this.isSetBuildInfo(); - boolean that_present_buildInfo = true && that.isSetBuildInfo(); - if (this_present_buildInfo || that_present_buildInfo) { - if (!(this_present_buildInfo && that_present_buildInfo)) - return false; - if (!this.buildInfo.equals(that.buildInfo)) - return false; - } - - boolean this_present_logo = true && this.isSetLogo(); - boolean that_present_logo = true && that.isSetLogo(); - if (this_present_logo || that_present_logo) { - if (!(this_present_logo && that_present_logo)) - return false; - if (!this.logo.equals(that.logo)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetVersion()) ? 131071 : 524287); - if (isSetVersion()) - hashCode = hashCode * 8191 + version.hashCode(); - - hashCode = hashCode * 8191 + ((isSetSupportedTimeAggregationOperations()) ? 131071 : 524287); - if (isSetSupportedTimeAggregationOperations()) - hashCode = hashCode * 8191 + supportedTimeAggregationOperations.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTimestampPrecision()) ? 131071 : 524287); - if (isSetTimestampPrecision()) - hashCode = hashCode * 8191 + timestampPrecision.hashCode(); - - hashCode = hashCode * 8191 + maxConcurrentClientNum; - - hashCode = hashCode * 8191 + ((isSetThriftMaxFrameSize()) ? 131071 : 524287); - if (isSetThriftMaxFrameSize()) - hashCode = hashCode * 8191 + thriftMaxFrameSize; - - hashCode = hashCode * 8191 + ((isSetIsReadOnly()) ? 131071 : 524287); - if (isSetIsReadOnly()) - hashCode = hashCode * 8191 + ((isReadOnly) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetBuildInfo()) ? 131071 : 524287); - if (isSetBuildInfo()) - hashCode = hashCode * 8191 + buildInfo.hashCode(); - - hashCode = hashCode * 8191 + ((isSetLogo()) ? 131071 : 524287); - if (isSetLogo()) - hashCode = hashCode * 8191 + logo.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(ServerProperties other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSupportedTimeAggregationOperations(), other.isSetSupportedTimeAggregationOperations()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSupportedTimeAggregationOperations()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supportedTimeAggregationOperations, other.supportedTimeAggregationOperations); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimestampPrecision(), other.isSetTimestampPrecision()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestampPrecision()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestampPrecision, other.timestampPrecision); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMaxConcurrentClientNum(), other.isSetMaxConcurrentClientNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMaxConcurrentClientNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxConcurrentClientNum, other.maxConcurrentClientNum); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetThriftMaxFrameSize(), other.isSetThriftMaxFrameSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetThriftMaxFrameSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.thriftMaxFrameSize, other.thriftMaxFrameSize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsReadOnly(), other.isSetIsReadOnly()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsReadOnly()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isReadOnly, other.isReadOnly); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetBuildInfo(), other.isSetBuildInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBuildInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buildInfo, other.buildInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetLogo(), other.isSetLogo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLogo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logo, other.logo); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("ServerProperties("); - boolean first = true; - - sb.append("version:"); - if (this.version == null) { - sb.append("null"); - } else { - sb.append(this.version); - } - first = false; - if (!first) sb.append(", "); - sb.append("supportedTimeAggregationOperations:"); - if (this.supportedTimeAggregationOperations == null) { - sb.append("null"); - } else { - sb.append(this.supportedTimeAggregationOperations); - } - first = false; - if (!first) sb.append(", "); - sb.append("timestampPrecision:"); - if (this.timestampPrecision == null) { - sb.append("null"); - } else { - sb.append(this.timestampPrecision); - } - first = false; - if (!first) sb.append(", "); - sb.append("maxConcurrentClientNum:"); - sb.append(this.maxConcurrentClientNum); - first = false; - if (isSetThriftMaxFrameSize()) { - if (!first) sb.append(", "); - sb.append("thriftMaxFrameSize:"); - sb.append(this.thriftMaxFrameSize); - first = false; - } - if (isSetIsReadOnly()) { - if (!first) sb.append(", "); - sb.append("isReadOnly:"); - sb.append(this.isReadOnly); - first = false; - } - if (isSetBuildInfo()) { - if (!first) sb.append(", "); - sb.append("buildInfo:"); - if (this.buildInfo == null) { - sb.append("null"); - } else { - sb.append(this.buildInfo); - } - first = false; - } - if (isSetLogo()) { - if (!first) sb.append(", "); - sb.append("logo:"); - if (this.logo == null) { - sb.append("null"); - } else { - sb.append(this.logo); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (version == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not present! Struct: " + toString()); - } - if (supportedTimeAggregationOperations == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'supportedTimeAggregationOperations' was not present! Struct: " + toString()); - } - if (timestampPrecision == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestampPrecision' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class ServerPropertiesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public ServerPropertiesStandardScheme getScheme() { - return new ServerPropertiesStandardScheme(); - } - } - - private static class ServerPropertiesStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, ServerProperties struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.version = iprot.readString(); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SUPPORTED_TIME_AGGREGATION_OPERATIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list686 = iprot.readListBegin(); - struct.supportedTimeAggregationOperations = new java.util.ArrayList(_list686.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem687; - for (int _i688 = 0; _i688 < _list686.size; ++_i688) - { - _elem687 = iprot.readString(); - struct.supportedTimeAggregationOperations.add(_elem687); - } - iprot.readListEnd(); - } - struct.setSupportedTimeAggregationOperationsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TIMESTAMP_PRECISION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.timestampPrecision = iprot.readString(); - struct.setTimestampPrecisionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MAX_CONCURRENT_CLIENT_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.maxConcurrentClientNum = iprot.readI32(); - struct.setMaxConcurrentClientNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // THRIFT_MAX_FRAME_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.thriftMaxFrameSize = iprot.readI32(); - struct.setThriftMaxFrameSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // IS_READ_ONLY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isReadOnly = iprot.readBool(); - struct.setIsReadOnlyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // BUILD_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.buildInfo = iprot.readString(); - struct.setBuildInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // LOGO - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.logo = iprot.readString(); - struct.setLogoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, ServerProperties struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeString(struct.version); - oprot.writeFieldEnd(); - } - if (struct.supportedTimeAggregationOperations != null) { - oprot.writeFieldBegin(SUPPORTED_TIME_AGGREGATION_OPERATIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.supportedTimeAggregationOperations.size())); - for (java.lang.String _iter689 : struct.supportedTimeAggregationOperations) - { - oprot.writeString(_iter689); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.timestampPrecision != null) { - oprot.writeFieldBegin(TIMESTAMP_PRECISION_FIELD_DESC); - oprot.writeString(struct.timestampPrecision); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_CONCURRENT_CLIENT_NUM_FIELD_DESC); - oprot.writeI32(struct.maxConcurrentClientNum); - oprot.writeFieldEnd(); - if (struct.isSetThriftMaxFrameSize()) { - oprot.writeFieldBegin(THRIFT_MAX_FRAME_SIZE_FIELD_DESC); - oprot.writeI32(struct.thriftMaxFrameSize); - oprot.writeFieldEnd(); - } - if (struct.isSetIsReadOnly()) { - oprot.writeFieldBegin(IS_READ_ONLY_FIELD_DESC); - oprot.writeBool(struct.isReadOnly); - oprot.writeFieldEnd(); - } - if (struct.buildInfo != null) { - if (struct.isSetBuildInfo()) { - oprot.writeFieldBegin(BUILD_INFO_FIELD_DESC); - oprot.writeString(struct.buildInfo); - oprot.writeFieldEnd(); - } - } - if (struct.logo != null) { - if (struct.isSetLogo()) { - oprot.writeFieldBegin(LOGO_FIELD_DESC); - oprot.writeString(struct.logo); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ServerPropertiesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public ServerPropertiesTupleScheme getScheme() { - return new ServerPropertiesTupleScheme(); - } - } - - private static class ServerPropertiesTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ServerProperties struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.version); - { - oprot.writeI32(struct.supportedTimeAggregationOperations.size()); - for (java.lang.String _iter690 : struct.supportedTimeAggregationOperations) - { - oprot.writeString(_iter690); - } - } - oprot.writeString(struct.timestampPrecision); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetMaxConcurrentClientNum()) { - optionals.set(0); - } - if (struct.isSetThriftMaxFrameSize()) { - optionals.set(1); - } - if (struct.isSetIsReadOnly()) { - optionals.set(2); - } - if (struct.isSetBuildInfo()) { - optionals.set(3); - } - if (struct.isSetLogo()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetMaxConcurrentClientNum()) { - oprot.writeI32(struct.maxConcurrentClientNum); - } - if (struct.isSetThriftMaxFrameSize()) { - oprot.writeI32(struct.thriftMaxFrameSize); - } - if (struct.isSetIsReadOnly()) { - oprot.writeBool(struct.isReadOnly); - } - if (struct.isSetBuildInfo()) { - oprot.writeString(struct.buildInfo); - } - if (struct.isSetLogo()) { - oprot.writeString(struct.logo); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ServerProperties struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.version = iprot.readString(); - struct.setVersionIsSet(true); - { - org.apache.thrift.protocol.TList _list691 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.supportedTimeAggregationOperations = new java.util.ArrayList(_list691.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem692; - for (int _i693 = 0; _i693 < _list691.size; ++_i693) - { - _elem692 = iprot.readString(); - struct.supportedTimeAggregationOperations.add(_elem692); - } - } - struct.setSupportedTimeAggregationOperationsIsSet(true); - struct.timestampPrecision = iprot.readString(); - struct.setTimestampPrecisionIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.maxConcurrentClientNum = iprot.readI32(); - struct.setMaxConcurrentClientNumIsSet(true); - } - if (incoming.get(1)) { - struct.thriftMaxFrameSize = iprot.readI32(); - struct.setThriftMaxFrameSizeIsSet(true); - } - if (incoming.get(2)) { - struct.isReadOnly = iprot.readBool(); - struct.setIsReadOnlyIsSet(true); - } - if (incoming.get(3)) { - struct.buildInfo = iprot.readString(); - struct.setBuildInfoIsSet(true); - } - if (incoming.get(4)) { - struct.logo = iprot.readString(); - struct.setLogoIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TCreateTimeseriesUsingSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TCreateTimeseriesUsingSchemaTemplateReq.java deleted file mode 100644 index ffbc14a5d2837..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TCreateTimeseriesUsingSchemaTemplateReq.java +++ /dev/null @@ -1,528 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TCreateTimeseriesUsingSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCreateTimeseriesUsingSchemaTemplateReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField DEVICE_PATH_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("devicePathList", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCreateTimeseriesUsingSchemaTemplateReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCreateTimeseriesUsingSchemaTemplateReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List devicePathList; // 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 { - SESSION_ID((short)1, "sessionId"), - DEVICE_PATH_LIST((short)2, "devicePathList"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // DEVICE_PATH_LIST - return DEVICE_PATH_LIST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.DEVICE_PATH_LIST, new org.apache.thrift.meta_data.FieldMetaData("devicePathList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCreateTimeseriesUsingSchemaTemplateReq.class, metaDataMap); - } - - public TCreateTimeseriesUsingSchemaTemplateReq() { - } - - public TCreateTimeseriesUsingSchemaTemplateReq( - long sessionId, - java.util.List devicePathList) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.devicePathList = devicePathList; - } - - /** - * Performs a deep copy on other. - */ - public TCreateTimeseriesUsingSchemaTemplateReq(TCreateTimeseriesUsingSchemaTemplateReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetDevicePathList()) { - java.util.List __this__devicePathList = new java.util.ArrayList(other.devicePathList); - this.devicePathList = __this__devicePathList; - } - } - - @Override - public TCreateTimeseriesUsingSchemaTemplateReq deepCopy() { - return new TCreateTimeseriesUsingSchemaTemplateReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.devicePathList = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TCreateTimeseriesUsingSchemaTemplateReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getDevicePathListSize() { - return (this.devicePathList == null) ? 0 : this.devicePathList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getDevicePathListIterator() { - return (this.devicePathList == null) ? null : this.devicePathList.iterator(); - } - - public void addToDevicePathList(java.lang.String elem) { - if (this.devicePathList == null) { - this.devicePathList = new java.util.ArrayList(); - } - this.devicePathList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getDevicePathList() { - return this.devicePathList; - } - - public TCreateTimeseriesUsingSchemaTemplateReq setDevicePathList(@org.apache.thrift.annotation.Nullable java.util.List devicePathList) { - this.devicePathList = devicePathList; - return this; - } - - public void unsetDevicePathList() { - this.devicePathList = null; - } - - /** Returns true if field devicePathList is set (has been assigned a value) and false otherwise */ - public boolean isSetDevicePathList() { - return this.devicePathList != null; - } - - public void setDevicePathListIsSet(boolean value) { - if (!value) { - this.devicePathList = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case DEVICE_PATH_LIST: - if (value == null) { - unsetDevicePathList(); - } else { - setDevicePathList((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case DEVICE_PATH_LIST: - return getDevicePathList(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case DEVICE_PATH_LIST: - return isSetDevicePathList(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TCreateTimeseriesUsingSchemaTemplateReq) - return this.equals((TCreateTimeseriesUsingSchemaTemplateReq)that); - return false; - } - - public boolean equals(TCreateTimeseriesUsingSchemaTemplateReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_devicePathList = true && this.isSetDevicePathList(); - boolean that_present_devicePathList = true && that.isSetDevicePathList(); - if (this_present_devicePathList || that_present_devicePathList) { - if (!(this_present_devicePathList && that_present_devicePathList)) - return false; - if (!this.devicePathList.equals(that.devicePathList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetDevicePathList()) ? 131071 : 524287); - if (isSetDevicePathList()) - hashCode = hashCode * 8191 + devicePathList.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TCreateTimeseriesUsingSchemaTemplateReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDevicePathList(), other.isSetDevicePathList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDevicePathList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.devicePathList, other.devicePathList); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TCreateTimeseriesUsingSchemaTemplateReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("devicePathList:"); - if (this.devicePathList == null) { - sb.append("null"); - } else { - sb.append(this.devicePathList); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (devicePathList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'devicePathList' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TCreateTimeseriesUsingSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TCreateTimeseriesUsingSchemaTemplateReqStandardScheme getScheme() { - return new TCreateTimeseriesUsingSchemaTemplateReqStandardScheme(); - } - } - - private static class TCreateTimeseriesUsingSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TCreateTimeseriesUsingSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DEVICE_PATH_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list734 = iprot.readListBegin(); - struct.devicePathList = new java.util.ArrayList(_list734.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem735; - for (int _i736 = 0; _i736 < _list734.size; ++_i736) - { - _elem735 = iprot.readString(); - struct.devicePathList.add(_elem735); - } - iprot.readListEnd(); - } - struct.setDevicePathListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TCreateTimeseriesUsingSchemaTemplateReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.devicePathList != null) { - oprot.writeFieldBegin(DEVICE_PATH_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.devicePathList.size())); - for (java.lang.String _iter737 : struct.devicePathList) - { - oprot.writeString(_iter737); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TCreateTimeseriesUsingSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TCreateTimeseriesUsingSchemaTemplateReqTupleScheme getScheme() { - return new TCreateTimeseriesUsingSchemaTemplateReqTupleScheme(); - } - } - - private static class TCreateTimeseriesUsingSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TCreateTimeseriesUsingSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - { - oprot.writeI32(struct.devicePathList.size()); - for (java.lang.String _iter738 : struct.devicePathList) - { - oprot.writeString(_iter738); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TCreateTimeseriesUsingSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - { - org.apache.thrift.protocol.TList _list739 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.devicePathList = new java.util.ArrayList(_list739.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem740; - for (int _i741 = 0; _i741 < _list739.size; ++_i741) - { - _elem740 = iprot.readString(); - struct.devicePathList.add(_elem740); - } - } - struct.setDevicePathListIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeReq.java deleted file mode 100644 index 4ba895ae077c0..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeReq.java +++ /dev/null @@ -1,594 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TPipeSubscribeReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPipeSubscribeReq"); - - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.BYTE, (short)1); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I16, (short)2); - private static final org.apache.thrift.protocol.TField BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("body", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPipeSubscribeReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPipeSubscribeReqTupleSchemeFactory(); - - public byte version; // required - public short type; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - VERSION((short)1, "version"), - TYPE((short)2, "type"), - BODY((short)3, "body"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VERSION - return VERSION; - case 2: // TYPE - return TYPE; - case 3: // BODY - return BODY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __VERSION_ISSET_ID = 0; - private static final int __TYPE_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.BODY}; - 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.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPipeSubscribeReq.class, metaDataMap); - } - - public TPipeSubscribeReq() { - } - - public TPipeSubscribeReq( - byte version, - short type) - { - this(); - this.version = version; - setVersionIsSet(true); - this.type = type; - setTypeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TPipeSubscribeReq(TPipeSubscribeReq other) { - __isset_bitfield = other.__isset_bitfield; - this.version = other.version; - this.type = other.type; - if (other.isSetBody()) { - this.body = org.apache.thrift.TBaseHelper.copyBinary(other.body); - } - } - - @Override - public TPipeSubscribeReq deepCopy() { - return new TPipeSubscribeReq(this); - } - - @Override - public void clear() { - setVersionIsSet(false); - this.version = 0; - setTypeIsSet(false); - this.type = 0; - this.body = null; - } - - public byte getVersion() { - return this.version; - } - - public TPipeSubscribeReq setVersion(byte version) { - this.version = version; - setVersionIsSet(true); - return this; - } - - public void unsetVersion() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - public void setVersionIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); - } - - public short getType() { - return this.type; - } - - public TPipeSubscribeReq setType(short type) { - this.type = type; - setTypeIsSet(true); - return this; - } - - public void unsetType() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID); - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID); - } - - public void setTypeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value); - } - - public byte[] getBody() { - setBody(org.apache.thrift.TBaseHelper.rightSize(body)); - return body == null ? null : body.array(); - } - - public java.nio.ByteBuffer bufferForBody() { - return org.apache.thrift.TBaseHelper.copyBinary(body); - } - - public TPipeSubscribeReq setBody(byte[] body) { - this.body = body == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(body.clone()); - return this; - } - - public TPipeSubscribeReq setBody(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body) { - this.body = org.apache.thrift.TBaseHelper.copyBinary(body); - return this; - } - - public void unsetBody() { - this.body = null; - } - - /** Returns true if field body is set (has been assigned a value) and false otherwise */ - public boolean isSetBody() { - return this.body != null; - } - - public void setBodyIsSet(boolean value) { - if (!value) { - this.body = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((java.lang.Byte)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((java.lang.Short)value); - } - break; - - case BODY: - if (value == null) { - unsetBody(); - } else { - if (value instanceof byte[]) { - setBody((byte[])value); - } else { - setBody((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case VERSION: - return getVersion(); - - case TYPE: - return getType(); - - case BODY: - return getBody(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case VERSION: - return isSetVersion(); - case TYPE: - return isSetType(); - case BODY: - return isSetBody(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TPipeSubscribeReq) - return this.equals((TPipeSubscribeReq)that); - return false; - } - - public boolean equals(TPipeSubscribeReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_version = true; - boolean that_present_version = true; - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (this.version != that.version) - return false; - } - - boolean this_present_type = true; - boolean that_present_type = true; - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (this.type != that.type) - return false; - } - - boolean this_present_body = true && this.isSetBody(); - boolean that_present_body = true && that.isSetBody(); - if (this_present_body || that_present_body) { - if (!(this_present_body && that_present_body)) - return false; - if (!this.body.equals(that.body)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + (int) (version); - - hashCode = hashCode * 8191 + type; - - hashCode = hashCode * 8191 + ((isSetBody()) ? 131071 : 524287); - if (isSetBody()) - hashCode = hashCode * 8191 + body.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TPipeSubscribeReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetBody(), other.isSetBody()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBody()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, other.body); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TPipeSubscribeReq("); - boolean first = true; - - sb.append("version:"); - sb.append(this.version); - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - sb.append(this.type); - first = false; - if (isSetBody()) { - if (!first) sb.append(", "); - sb.append("body:"); - if (this.body == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.body, sb); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'version' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'type' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TPipeSubscribeReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TPipeSubscribeReqStandardScheme getScheme() { - return new TPipeSubscribeReqStandardScheme(); - } - } - - private static class TPipeSubscribeReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TPipeSubscribeReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { - struct.version = iprot.readByte(); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.type = iprot.readI16(); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // BODY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.body = iprot.readBinary(); - struct.setBodyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetVersion()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TPipeSubscribeReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeByte(struct.version); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI16(struct.type); - oprot.writeFieldEnd(); - if (struct.body != null) { - if (struct.isSetBody()) { - oprot.writeFieldBegin(BODY_FIELD_DESC); - oprot.writeBinary(struct.body); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TPipeSubscribeReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TPipeSubscribeReqTupleScheme getScheme() { - return new TPipeSubscribeReqTupleScheme(); - } - } - - private static class TPipeSubscribeReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TPipeSubscribeReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeByte(struct.version); - oprot.writeI16(struct.type); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetBody()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetBody()) { - oprot.writeBinary(struct.body); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TPipeSubscribeReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.version = iprot.readByte(); - struct.setVersionIsSet(true); - struct.type = iprot.readI16(); - struct.setTypeIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.body = iprot.readBinary(); - struct.setBodyIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeResp.java deleted file mode 100644 index 6ed812b8e44bd..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeSubscribeResp.java +++ /dev/null @@ -1,737 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TPipeSubscribeResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPipeSubscribeResp"); - - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.BYTE, (short)2); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I16, (short)3); - private static final org.apache.thrift.protocol.TField BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("body", org.apache.thrift.protocol.TType.LIST, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPipeSubscribeRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPipeSubscribeRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required - public byte version; // required - public short type; // required - public @org.apache.thrift.annotation.Nullable java.util.List body; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATUS((short)1, "status"), - VERSION((short)2, "version"), - TYPE((short)3, "type"), - BODY((short)4, "body"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATUS - return STATUS; - case 2: // VERSION - return VERSION; - case 3: // TYPE - return TYPE; - case 4: // BODY - return BODY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __VERSION_ISSET_ID = 0; - private static final int __TYPE_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.BODY}; - 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPipeSubscribeResp.class, metaDataMap); - } - - public TPipeSubscribeResp() { - } - - public TPipeSubscribeResp( - org.apache.iotdb.common.rpc.thrift.TSStatus status, - byte version, - short type) - { - this(); - this.status = status; - this.version = version; - setVersionIsSet(true); - this.type = type; - setTypeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TPipeSubscribeResp(TPipeSubscribeResp other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetStatus()) { - this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); - } - this.version = other.version; - this.type = other.type; - if (other.isSetBody()) { - java.util.List __this__body = new java.util.ArrayList(other.body); - this.body = __this__body; - } - } - - @Override - public TPipeSubscribeResp deepCopy() { - return new TPipeSubscribeResp(this); - } - - @Override - public void clear() { - this.status = null; - setVersionIsSet(false); - this.version = 0; - setTypeIsSet(false); - this.type = 0; - this.body = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { - return this.status; - } - - public TPipeSubscribeResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { - this.status = status; - return this; - } - - public void unsetStatus() { - this.status = null; - } - - /** Returns true if field status is set (has been assigned a value) and false otherwise */ - public boolean isSetStatus() { - return this.status != null; - } - - public void setStatusIsSet(boolean value) { - if (!value) { - this.status = null; - } - } - - public byte getVersion() { - return this.version; - } - - public TPipeSubscribeResp setVersion(byte version) { - this.version = version; - setVersionIsSet(true); - return this; - } - - public void unsetVersion() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - public void setVersionIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); - } - - public short getType() { - return this.type; - } - - public TPipeSubscribeResp setType(short type) { - this.type = type; - setTypeIsSet(true); - return this; - } - - public void unsetType() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID); - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID); - } - - public void setTypeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value); - } - - public int getBodySize() { - return (this.body == null) ? 0 : this.body.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getBodyIterator() { - return (this.body == null) ? null : this.body.iterator(); - } - - public void addToBody(java.nio.ByteBuffer elem) { - if (this.body == null) { - this.body = new java.util.ArrayList(); - } - this.body.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getBody() { - return this.body; - } - - public TPipeSubscribeResp setBody(@org.apache.thrift.annotation.Nullable java.util.List body) { - this.body = body; - return this; - } - - public void unsetBody() { - this.body = null; - } - - /** Returns true if field body is set (has been assigned a value) and false otherwise */ - public boolean isSetBody() { - return this.body != null; - } - - public void setBodyIsSet(boolean value) { - if (!value) { - this.body = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((java.lang.Byte)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((java.lang.Short)value); - } - break; - - case BODY: - if (value == null) { - unsetBody(); - } else { - setBody((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case STATUS: - return getStatus(); - - case VERSION: - return getVersion(); - - case TYPE: - return getType(); - - case BODY: - return getBody(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case STATUS: - return isSetStatus(); - case VERSION: - return isSetVersion(); - case TYPE: - return isSetType(); - case BODY: - return isSetBody(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TPipeSubscribeResp) - return this.equals((TPipeSubscribeResp)that); - return false; - } - - public boolean equals(TPipeSubscribeResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_status = true && this.isSetStatus(); - boolean that_present_status = true && that.isSetStatus(); - if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) - return false; - if (!this.status.equals(that.status)) - return false; - } - - boolean this_present_version = true; - boolean that_present_version = true; - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (this.version != that.version) - return false; - } - - boolean this_present_type = true; - boolean that_present_type = true; - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (this.type != that.type) - return false; - } - - boolean this_present_body = true && this.isSetBody(); - boolean that_present_body = true && that.isSetBody(); - if (this_present_body || that_present_body) { - if (!(this_present_body && that_present_body)) - return false; - if (!this.body.equals(that.body)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); - if (isSetStatus()) - hashCode = hashCode * 8191 + status.hashCode(); - - hashCode = hashCode * 8191 + (int) (version); - - hashCode = hashCode * 8191 + type; - - hashCode = hashCode * 8191 + ((isSetBody()) ? 131071 : 524287); - if (isSetBody()) - hashCode = hashCode * 8191 + body.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TPipeSubscribeResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetBody(), other.isSetBody()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBody()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, other.body); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TPipeSubscribeResp("); - boolean first = true; - - sb.append("status:"); - if (this.status == null) { - sb.append("null"); - } else { - sb.append(this.status); - } - first = false; - if (!first) sb.append(", "); - sb.append("version:"); - sb.append(this.version); - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - sb.append(this.type); - first = false; - if (isSetBody()) { - if (!first) sb.append(", "); - sb.append("body:"); - if (this.body == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.body, sb); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (status == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); - } - // alas, we cannot check 'version' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'type' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - if (status != null) { - status.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TPipeSubscribeRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TPipeSubscribeRespStandardScheme getScheme() { - return new TPipeSubscribeRespStandardScheme(); - } - } - - private static class TPipeSubscribeRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TPipeSubscribeResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { - struct.version = iprot.readByte(); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.type = iprot.readI16(); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // BODY - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list742 = iprot.readListBegin(); - struct.body = new java.util.ArrayList(_list742.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem743; - for (int _i744 = 0; _i744 < _list742.size; ++_i744) - { - _elem743 = iprot.readBinary(); - struct.body.add(_elem743); - } - iprot.readListEnd(); - } - struct.setBodyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetVersion()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TPipeSubscribeResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.status != null) { - oprot.writeFieldBegin(STATUS_FIELD_DESC); - struct.status.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeByte(struct.version); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI16(struct.type); - oprot.writeFieldEnd(); - if (struct.body != null) { - if (struct.isSetBody()) { - oprot.writeFieldBegin(BODY_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.body.size())); - for (java.nio.ByteBuffer _iter745 : struct.body) - { - oprot.writeBinary(_iter745); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TPipeSubscribeRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TPipeSubscribeRespTupleScheme getScheme() { - return new TPipeSubscribeRespTupleScheme(); - } - } - - private static class TPipeSubscribeRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TPipeSubscribeResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status.write(oprot); - oprot.writeByte(struct.version); - oprot.writeI16(struct.type); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetBody()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetBody()) { - { - oprot.writeI32(struct.body.size()); - for (java.nio.ByteBuffer _iter746 : struct.body) - { - oprot.writeBinary(_iter746); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TPipeSubscribeResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - struct.version = iprot.readByte(); - struct.setVersionIsSet(true); - struct.type = iprot.readI16(); - struct.setTypeIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list747 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.body = new java.util.ArrayList(_list747.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem748; - for (int _i749 = 0; _i749 < _list747.size; ++_i749) - { - _elem748 = iprot.readBinary(); - struct.body.add(_elem748); - } - } - struct.setBodyIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferReq.java deleted file mode 100644 index e26787ffe66a3..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferReq.java +++ /dev/null @@ -1,584 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TPipeTransferReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPipeTransferReq"); - - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.BYTE, (short)1); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I16, (short)2); - private static final org.apache.thrift.protocol.TField BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("body", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPipeTransferReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPipeTransferReqTupleSchemeFactory(); - - public byte version; // required - public short type; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body; // 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 { - VERSION((short)1, "version"), - TYPE((short)2, "type"), - BODY((short)3, "body"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VERSION - return VERSION; - case 2: // TYPE - return TYPE; - case 3: // BODY - return BODY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __VERSION_ISSET_ID = 0; - private static final int __TYPE_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.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPipeTransferReq.class, metaDataMap); - } - - public TPipeTransferReq() { - } - - public TPipeTransferReq( - byte version, - short type, - java.nio.ByteBuffer body) - { - this(); - this.version = version; - setVersionIsSet(true); - this.type = type; - setTypeIsSet(true); - this.body = org.apache.thrift.TBaseHelper.copyBinary(body); - } - - /** - * Performs a deep copy on other. - */ - public TPipeTransferReq(TPipeTransferReq other) { - __isset_bitfield = other.__isset_bitfield; - this.version = other.version; - this.type = other.type; - if (other.isSetBody()) { - this.body = org.apache.thrift.TBaseHelper.copyBinary(other.body); - } - } - - @Override - public TPipeTransferReq deepCopy() { - return new TPipeTransferReq(this); - } - - @Override - public void clear() { - setVersionIsSet(false); - this.version = 0; - setTypeIsSet(false); - this.type = 0; - this.body = null; - } - - public byte getVersion() { - return this.version; - } - - public TPipeTransferReq setVersion(byte version) { - this.version = version; - setVersionIsSet(true); - return this; - } - - public void unsetVersion() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - public void setVersionIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); - } - - public short getType() { - return this.type; - } - - public TPipeTransferReq setType(short type) { - this.type = type; - setTypeIsSet(true); - return this; - } - - public void unsetType() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID); - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID); - } - - public void setTypeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value); - } - - public byte[] getBody() { - setBody(org.apache.thrift.TBaseHelper.rightSize(body)); - return body == null ? null : body.array(); - } - - public java.nio.ByteBuffer bufferForBody() { - return org.apache.thrift.TBaseHelper.copyBinary(body); - } - - public TPipeTransferReq setBody(byte[] body) { - this.body = body == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(body.clone()); - return this; - } - - public TPipeTransferReq setBody(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body) { - this.body = org.apache.thrift.TBaseHelper.copyBinary(body); - return this; - } - - public void unsetBody() { - this.body = null; - } - - /** Returns true if field body is set (has been assigned a value) and false otherwise */ - public boolean isSetBody() { - return this.body != null; - } - - public void setBodyIsSet(boolean value) { - if (!value) { - this.body = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((java.lang.Byte)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((java.lang.Short)value); - } - break; - - case BODY: - if (value == null) { - unsetBody(); - } else { - if (value instanceof byte[]) { - setBody((byte[])value); - } else { - setBody((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case VERSION: - return getVersion(); - - case TYPE: - return getType(); - - case BODY: - return getBody(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case VERSION: - return isSetVersion(); - case TYPE: - return isSetType(); - case BODY: - return isSetBody(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TPipeTransferReq) - return this.equals((TPipeTransferReq)that); - return false; - } - - public boolean equals(TPipeTransferReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_version = true; - boolean that_present_version = true; - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (this.version != that.version) - return false; - } - - boolean this_present_type = true; - boolean that_present_type = true; - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (this.type != that.type) - return false; - } - - boolean this_present_body = true && this.isSetBody(); - boolean that_present_body = true && that.isSetBody(); - if (this_present_body || that_present_body) { - if (!(this_present_body && that_present_body)) - return false; - if (!this.body.equals(that.body)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + (int) (version); - - hashCode = hashCode * 8191 + type; - - hashCode = hashCode * 8191 + ((isSetBody()) ? 131071 : 524287); - if (isSetBody()) - hashCode = hashCode * 8191 + body.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TPipeTransferReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetBody(), other.isSetBody()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBody()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, other.body); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TPipeTransferReq("); - boolean first = true; - - sb.append("version:"); - sb.append(this.version); - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - sb.append(this.type); - first = false; - if (!first) sb.append(", "); - sb.append("body:"); - if (this.body == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.body, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'version' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'type' because it's a primitive and you chose the non-beans generator. - if (body == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'body' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TPipeTransferReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TPipeTransferReqStandardScheme getScheme() { - return new TPipeTransferReqStandardScheme(); - } - } - - private static class TPipeTransferReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TPipeTransferReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { - struct.version = iprot.readByte(); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.type = iprot.readI16(); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // BODY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.body = iprot.readBinary(); - struct.setBodyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetVersion()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TPipeTransferReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeByte(struct.version); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI16(struct.type); - oprot.writeFieldEnd(); - if (struct.body != null) { - oprot.writeFieldBegin(BODY_FIELD_DESC); - oprot.writeBinary(struct.body); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TPipeTransferReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TPipeTransferReqTupleScheme getScheme() { - return new TPipeTransferReqTupleScheme(); - } - } - - private static class TPipeTransferReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TPipeTransferReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeByte(struct.version); - oprot.writeI16(struct.type); - oprot.writeBinary(struct.body); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TPipeTransferReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.version = iprot.readByte(); - struct.setVersionIsSet(true); - struct.type = iprot.readI16(); - struct.setTypeIsSet(true); - struct.body = iprot.readBinary(); - struct.setBodyIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferResp.java deleted file mode 100644 index 2ddf1b1d6fc9b..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TPipeTransferResp.java +++ /dev/null @@ -1,510 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TPipeTransferResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPipeTransferResp"); - - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("body", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPipeTransferRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPipeTransferRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATUS((short)1, "status"), - BODY((short)2, "body"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATUS - return STATUS; - case 2: // BODY - return BODY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.BODY}; - 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPipeTransferResp.class, metaDataMap); - } - - public TPipeTransferResp() { - } - - public TPipeTransferResp( - org.apache.iotdb.common.rpc.thrift.TSStatus status) - { - this(); - this.status = status; - } - - /** - * Performs a deep copy on other. - */ - public TPipeTransferResp(TPipeTransferResp other) { - if (other.isSetStatus()) { - this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); - } - if (other.isSetBody()) { - this.body = org.apache.thrift.TBaseHelper.copyBinary(other.body); - } - } - - @Override - public TPipeTransferResp deepCopy() { - return new TPipeTransferResp(this); - } - - @Override - public void clear() { - this.status = null; - this.body = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { - return this.status; - } - - public TPipeTransferResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { - this.status = status; - return this; - } - - public void unsetStatus() { - this.status = null; - } - - /** Returns true if field status is set (has been assigned a value) and false otherwise */ - public boolean isSetStatus() { - return this.status != null; - } - - public void setStatusIsSet(boolean value) { - if (!value) { - this.status = null; - } - } - - public byte[] getBody() { - setBody(org.apache.thrift.TBaseHelper.rightSize(body)); - return body == null ? null : body.array(); - } - - public java.nio.ByteBuffer bufferForBody() { - return org.apache.thrift.TBaseHelper.copyBinary(body); - } - - public TPipeTransferResp setBody(byte[] body) { - this.body = body == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(body.clone()); - return this; - } - - public TPipeTransferResp setBody(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer body) { - this.body = org.apache.thrift.TBaseHelper.copyBinary(body); - return this; - } - - public void unsetBody() { - this.body = null; - } - - /** Returns true if field body is set (has been assigned a value) and false otherwise */ - public boolean isSetBody() { - return this.body != null; - } - - public void setBodyIsSet(boolean value) { - if (!value) { - this.body = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - case BODY: - if (value == null) { - unsetBody(); - } else { - if (value instanceof byte[]) { - setBody((byte[])value); - } else { - setBody((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case STATUS: - return getStatus(); - - case BODY: - return getBody(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case STATUS: - return isSetStatus(); - case BODY: - return isSetBody(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TPipeTransferResp) - return this.equals((TPipeTransferResp)that); - return false; - } - - public boolean equals(TPipeTransferResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_status = true && this.isSetStatus(); - boolean that_present_status = true && that.isSetStatus(); - if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) - return false; - if (!this.status.equals(that.status)) - return false; - } - - boolean this_present_body = true && this.isSetBody(); - boolean that_present_body = true && that.isSetBody(); - if (this_present_body || that_present_body) { - if (!(this_present_body && that_present_body)) - return false; - if (!this.body.equals(that.body)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); - if (isSetStatus()) - hashCode = hashCode * 8191 + status.hashCode(); - - hashCode = hashCode * 8191 + ((isSetBody()) ? 131071 : 524287); - if (isSetBody()) - hashCode = hashCode * 8191 + body.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TPipeTransferResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetBody(), other.isSetBody()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBody()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, other.body); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TPipeTransferResp("); - boolean first = true; - - sb.append("status:"); - if (this.status == null) { - sb.append("null"); - } else { - sb.append(this.status); - } - first = false; - if (isSetBody()) { - if (!first) sb.append(", "); - sb.append("body:"); - if (this.body == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.body, sb); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (status == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); - } - // check for sub-struct validity - if (status != null) { - status.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class TPipeTransferRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TPipeTransferRespStandardScheme getScheme() { - return new TPipeTransferRespStandardScheme(); - } - } - - private static class TPipeTransferRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TPipeTransferResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // BODY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.body = iprot.readBinary(); - struct.setBodyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TPipeTransferResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.status != null) { - oprot.writeFieldBegin(STATUS_FIELD_DESC); - struct.status.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.body != null) { - if (struct.isSetBody()) { - oprot.writeFieldBegin(BODY_FIELD_DESC); - oprot.writeBinary(struct.body); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TPipeTransferRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TPipeTransferRespTupleScheme getScheme() { - return new TPipeTransferRespTupleScheme(); - } - } - - private static class TPipeTransferRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TPipeTransferResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status.write(oprot); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetBody()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetBody()) { - oprot.writeBinary(struct.body); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TPipeTransferResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.body = iprot.readBinary(); - struct.setBodyIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSAggregationQueryReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSAggregationQueryReq.java deleted file mode 100644 index 2b6dabe86619a..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSAggregationQueryReq.java +++ /dev/null @@ -1,1478 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSAggregationQueryReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSAggregationQueryReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField AGGREGATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregations", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)6); - private static final org.apache.thrift.protocol.TField INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("interval", org.apache.thrift.protocol.TType.I64, (short)7); - private static final org.apache.thrift.protocol.TField SLIDING_STEP_FIELD_DESC = new org.apache.thrift.protocol.TField("slidingStep", org.apache.thrift.protocol.TType.I64, (short)8); - private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)9); - private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)10); - private static final org.apache.thrift.protocol.TField LEGAL_PATH_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("legalPathNodes", org.apache.thrift.protocol.TType.BOOL, (short)11); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSAggregationQueryReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSAggregationQueryReqTupleSchemeFactory(); - - public long sessionId; // required - public long statementId; // required - public @org.apache.thrift.annotation.Nullable java.util.List paths; // required - public @org.apache.thrift.annotation.Nullable java.util.List aggregations; // required - public long startTime; // optional - public long endTime; // optional - public long interval; // optional - public long slidingStep; // optional - public int fetchSize; // optional - public long timeout; // optional - public boolean legalPathNodes; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - STATEMENT_ID((short)2, "statementId"), - PATHS((short)3, "paths"), - AGGREGATIONS((short)4, "aggregations"), - START_TIME((short)5, "startTime"), - END_TIME((short)6, "endTime"), - INTERVAL((short)7, "interval"), - SLIDING_STEP((short)8, "slidingStep"), - FETCH_SIZE((short)9, "fetchSize"), - TIMEOUT((short)10, "timeout"), - LEGAL_PATH_NODES((short)11, "legalPathNodes"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // STATEMENT_ID - return STATEMENT_ID; - case 3: // PATHS - return PATHS; - case 4: // AGGREGATIONS - return AGGREGATIONS; - case 5: // START_TIME - return START_TIME; - case 6: // END_TIME - return END_TIME; - case 7: // INTERVAL - return INTERVAL; - case 8: // SLIDING_STEP - return SLIDING_STEP; - case 9: // FETCH_SIZE - return FETCH_SIZE; - case 10: // TIMEOUT - return TIMEOUT; - case 11: // LEGAL_PATH_NODES - return LEGAL_PATH_NODES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __STATEMENTID_ISSET_ID = 1; - private static final int __STARTTIME_ISSET_ID = 2; - private static final int __ENDTIME_ISSET_ID = 3; - private static final int __INTERVAL_ISSET_ID = 4; - private static final int __SLIDINGSTEP_ISSET_ID = 5; - private static final int __FETCHSIZE_ISSET_ID = 6; - private static final int __TIMEOUT_ISSET_ID = 7; - private static final int __LEGALPATHNODES_ISSET_ID = 8; - private short __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.START_TIME,_Fields.END_TIME,_Fields.INTERVAL,_Fields.SLIDING_STEP,_Fields.FETCH_SIZE,_Fields.TIMEOUT,_Fields.LEGAL_PATH_NODES}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.AGGREGATIONS, new org.apache.thrift.meta_data.FieldMetaData("aggregations", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.iotdb.common.rpc.thrift.TAggregationType.class)))); - tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.INTERVAL, new org.apache.thrift.meta_data.FieldMetaData("interval", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SLIDING_STEP, new org.apache.thrift.meta_data.FieldMetaData("slidingStep", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LEGAL_PATH_NODES, new org.apache.thrift.meta_data.FieldMetaData("legalPathNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSAggregationQueryReq.class, metaDataMap); - } - - public TSAggregationQueryReq() { - } - - public TSAggregationQueryReq( - long sessionId, - long statementId, - java.util.List paths, - java.util.List aggregations) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.statementId = statementId; - setStatementIdIsSet(true); - this.paths = paths; - this.aggregations = aggregations; - } - - /** - * Performs a deep copy on other. - */ - public TSAggregationQueryReq(TSAggregationQueryReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - this.statementId = other.statementId; - if (other.isSetPaths()) { - java.util.List __this__paths = new java.util.ArrayList(other.paths); - this.paths = __this__paths; - } - if (other.isSetAggregations()) { - java.util.List __this__aggregations = new java.util.ArrayList(other.aggregations.size()); - for (org.apache.iotdb.common.rpc.thrift.TAggregationType other_element : other.aggregations) { - __this__aggregations.add(other_element); - } - this.aggregations = __this__aggregations; - } - this.startTime = other.startTime; - this.endTime = other.endTime; - this.interval = other.interval; - this.slidingStep = other.slidingStep; - this.fetchSize = other.fetchSize; - this.timeout = other.timeout; - this.legalPathNodes = other.legalPathNodes; - } - - @Override - public TSAggregationQueryReq deepCopy() { - return new TSAggregationQueryReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - setStatementIdIsSet(false); - this.statementId = 0; - this.paths = null; - this.aggregations = null; - setStartTimeIsSet(false); - this.startTime = 0; - setEndTimeIsSet(false); - this.endTime = 0; - setIntervalIsSet(false); - this.interval = 0; - setSlidingStepIsSet(false); - this.slidingStep = 0; - setFetchSizeIsSet(false); - this.fetchSize = 0; - setTimeoutIsSet(false); - this.timeout = 0; - setLegalPathNodesIsSet(false); - this.legalPathNodes = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSAggregationQueryReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public long getStatementId() { - return this.statementId; - } - - public TSAggregationQueryReq setStatementId(long statementId) { - this.statementId = statementId; - setStatementIdIsSet(true); - return this; - } - - public void unsetStatementId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ - public boolean isSetStatementId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - public void setStatementIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); - } - - public int getPathsSize() { - return (this.paths == null) ? 0 : this.paths.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getPathsIterator() { - return (this.paths == null) ? null : this.paths.iterator(); - } - - public void addToPaths(java.lang.String elem) { - if (this.paths == null) { - this.paths = new java.util.ArrayList(); - } - this.paths.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getPaths() { - return this.paths; - } - - public TSAggregationQueryReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { - this.paths = paths; - return this; - } - - public void unsetPaths() { - this.paths = null; - } - - /** Returns true if field paths is set (has been assigned a value) and false otherwise */ - public boolean isSetPaths() { - return this.paths != null; - } - - public void setPathsIsSet(boolean value) { - if (!value) { - this.paths = null; - } - } - - public int getAggregationsSize() { - return (this.aggregations == null) ? 0 : this.aggregations.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getAggregationsIterator() { - return (this.aggregations == null) ? null : this.aggregations.iterator(); - } - - public void addToAggregations(org.apache.iotdb.common.rpc.thrift.TAggregationType elem) { - if (this.aggregations == null) { - this.aggregations = new java.util.ArrayList(); - } - this.aggregations.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getAggregations() { - return this.aggregations; - } - - public TSAggregationQueryReq setAggregations(@org.apache.thrift.annotation.Nullable java.util.List aggregations) { - this.aggregations = aggregations; - return this; - } - - public void unsetAggregations() { - this.aggregations = null; - } - - /** Returns true if field aggregations is set (has been assigned a value) and false otherwise */ - public boolean isSetAggregations() { - return this.aggregations != null; - } - - public void setAggregationsIsSet(boolean value) { - if (!value) { - this.aggregations = null; - } - } - - public long getStartTime() { - return this.startTime; - } - - public TSAggregationQueryReq setStartTime(long startTime) { - this.startTime = startTime; - setStartTimeIsSet(true); - return this; - } - - public void unsetStartTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); - } - - /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ - public boolean isSetStartTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); - } - - public void setStartTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); - } - - public long getEndTime() { - return this.endTime; - } - - public TSAggregationQueryReq setEndTime(long endTime) { - this.endTime = endTime; - setEndTimeIsSet(true); - return this; - } - - public void unsetEndTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ - public boolean isSetEndTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - public void setEndTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); - } - - public long getInterval() { - return this.interval; - } - - public TSAggregationQueryReq setInterval(long interval) { - this.interval = interval; - setIntervalIsSet(true); - return this; - } - - public void unsetInterval() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INTERVAL_ISSET_ID); - } - - /** Returns true if field interval is set (has been assigned a value) and false otherwise */ - public boolean isSetInterval() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INTERVAL_ISSET_ID); - } - - public void setIntervalIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INTERVAL_ISSET_ID, value); - } - - public long getSlidingStep() { - return this.slidingStep; - } - - public TSAggregationQueryReq setSlidingStep(long slidingStep) { - this.slidingStep = slidingStep; - setSlidingStepIsSet(true); - return this; - } - - public void unsetSlidingStep() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SLIDINGSTEP_ISSET_ID); - } - - /** Returns true if field slidingStep is set (has been assigned a value) and false otherwise */ - public boolean isSetSlidingStep() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SLIDINGSTEP_ISSET_ID); - } - - public void setSlidingStepIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SLIDINGSTEP_ISSET_ID, value); - } - - public int getFetchSize() { - return this.fetchSize; - } - - public TSAggregationQueryReq setFetchSize(int fetchSize) { - this.fetchSize = fetchSize; - setFetchSizeIsSet(true); - return this; - } - - public void unsetFetchSize() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ - public boolean isSetFetchSize() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - public void setFetchSizeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); - } - - public long getTimeout() { - return this.timeout; - } - - public TSAggregationQueryReq setTimeout(long timeout) { - this.timeout = timeout; - setTimeoutIsSet(true); - return this; - } - - public void unsetTimeout() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeout() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - public void setTimeoutIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); - } - - public boolean isLegalPathNodes() { - return this.legalPathNodes; - } - - public TSAggregationQueryReq setLegalPathNodes(boolean legalPathNodes) { - this.legalPathNodes = legalPathNodes; - setLegalPathNodesIsSet(true); - return this; - } - - public void unsetLegalPathNodes() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); - } - - /** Returns true if field legalPathNodes is set (has been assigned a value) and false otherwise */ - public boolean isSetLegalPathNodes() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); - } - - public void setLegalPathNodesIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case STATEMENT_ID: - if (value == null) { - unsetStatementId(); - } else { - setStatementId((java.lang.Long)value); - } - break; - - case PATHS: - if (value == null) { - unsetPaths(); - } else { - setPaths((java.util.List)value); - } - break; - - case AGGREGATIONS: - if (value == null) { - unsetAggregations(); - } else { - setAggregations((java.util.List)value); - } - break; - - case START_TIME: - if (value == null) { - unsetStartTime(); - } else { - setStartTime((java.lang.Long)value); - } - break; - - case END_TIME: - if (value == null) { - unsetEndTime(); - } else { - setEndTime((java.lang.Long)value); - } - break; - - case INTERVAL: - if (value == null) { - unsetInterval(); - } else { - setInterval((java.lang.Long)value); - } - break; - - case SLIDING_STEP: - if (value == null) { - unsetSlidingStep(); - } else { - setSlidingStep((java.lang.Long)value); - } - break; - - case FETCH_SIZE: - if (value == null) { - unsetFetchSize(); - } else { - setFetchSize((java.lang.Integer)value); - } - break; - - case TIMEOUT: - if (value == null) { - unsetTimeout(); - } else { - setTimeout((java.lang.Long)value); - } - break; - - case LEGAL_PATH_NODES: - if (value == null) { - unsetLegalPathNodes(); - } else { - setLegalPathNodes((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case STATEMENT_ID: - return getStatementId(); - - case PATHS: - return getPaths(); - - case AGGREGATIONS: - return getAggregations(); - - case START_TIME: - return getStartTime(); - - case END_TIME: - return getEndTime(); - - case INTERVAL: - return getInterval(); - - case SLIDING_STEP: - return getSlidingStep(); - - case FETCH_SIZE: - return getFetchSize(); - - case TIMEOUT: - return getTimeout(); - - case LEGAL_PATH_NODES: - return isLegalPathNodes(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case STATEMENT_ID: - return isSetStatementId(); - case PATHS: - return isSetPaths(); - case AGGREGATIONS: - return isSetAggregations(); - case START_TIME: - return isSetStartTime(); - case END_TIME: - return isSetEndTime(); - case INTERVAL: - return isSetInterval(); - case SLIDING_STEP: - return isSetSlidingStep(); - case FETCH_SIZE: - return isSetFetchSize(); - case TIMEOUT: - return isSetTimeout(); - case LEGAL_PATH_NODES: - return isSetLegalPathNodes(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSAggregationQueryReq) - return this.equals((TSAggregationQueryReq)that); - return false; - } - - public boolean equals(TSAggregationQueryReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_statementId = true; - boolean that_present_statementId = true; - if (this_present_statementId || that_present_statementId) { - if (!(this_present_statementId && that_present_statementId)) - return false; - if (this.statementId != that.statementId) - return false; - } - - boolean this_present_paths = true && this.isSetPaths(); - boolean that_present_paths = true && that.isSetPaths(); - if (this_present_paths || that_present_paths) { - if (!(this_present_paths && that_present_paths)) - return false; - if (!this.paths.equals(that.paths)) - return false; - } - - boolean this_present_aggregations = true && this.isSetAggregations(); - boolean that_present_aggregations = true && that.isSetAggregations(); - if (this_present_aggregations || that_present_aggregations) { - if (!(this_present_aggregations && that_present_aggregations)) - return false; - if (!this.aggregations.equals(that.aggregations)) - return false; - } - - boolean this_present_startTime = true && this.isSetStartTime(); - boolean that_present_startTime = true && that.isSetStartTime(); - if (this_present_startTime || that_present_startTime) { - if (!(this_present_startTime && that_present_startTime)) - return false; - if (this.startTime != that.startTime) - return false; - } - - boolean this_present_endTime = true && this.isSetEndTime(); - boolean that_present_endTime = true && that.isSetEndTime(); - if (this_present_endTime || that_present_endTime) { - if (!(this_present_endTime && that_present_endTime)) - return false; - if (this.endTime != that.endTime) - return false; - } - - boolean this_present_interval = true && this.isSetInterval(); - boolean that_present_interval = true && that.isSetInterval(); - if (this_present_interval || that_present_interval) { - if (!(this_present_interval && that_present_interval)) - return false; - if (this.interval != that.interval) - return false; - } - - boolean this_present_slidingStep = true && this.isSetSlidingStep(); - boolean that_present_slidingStep = true && that.isSetSlidingStep(); - if (this_present_slidingStep || that_present_slidingStep) { - if (!(this_present_slidingStep && that_present_slidingStep)) - return false; - if (this.slidingStep != that.slidingStep) - return false; - } - - boolean this_present_fetchSize = true && this.isSetFetchSize(); - boolean that_present_fetchSize = true && that.isSetFetchSize(); - if (this_present_fetchSize || that_present_fetchSize) { - if (!(this_present_fetchSize && that_present_fetchSize)) - return false; - if (this.fetchSize != that.fetchSize) - return false; - } - - boolean this_present_timeout = true && this.isSetTimeout(); - boolean that_present_timeout = true && that.isSetTimeout(); - if (this_present_timeout || that_present_timeout) { - if (!(this_present_timeout && that_present_timeout)) - return false; - if (this.timeout != that.timeout) - return false; - } - - boolean this_present_legalPathNodes = true && this.isSetLegalPathNodes(); - boolean that_present_legalPathNodes = true && that.isSetLegalPathNodes(); - if (this_present_legalPathNodes || that_present_legalPathNodes) { - if (!(this_present_legalPathNodes && that_present_legalPathNodes)) - return false; - if (this.legalPathNodes != that.legalPathNodes) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); - - hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); - if (isSetPaths()) - hashCode = hashCode * 8191 + paths.hashCode(); - - hashCode = hashCode * 8191 + ((isSetAggregations()) ? 131071 : 524287); - if (isSetAggregations()) - hashCode = hashCode * 8191 + aggregations.hashCode(); - - hashCode = hashCode * 8191 + ((isSetStartTime()) ? 131071 : 524287); - if (isSetStartTime()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime); - - hashCode = hashCode * 8191 + ((isSetEndTime()) ? 131071 : 524287); - if (isSetEndTime()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime); - - hashCode = hashCode * 8191 + ((isSetInterval()) ? 131071 : 524287); - if (isSetInterval()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(interval); - - hashCode = hashCode * 8191 + ((isSetSlidingStep()) ? 131071 : 524287); - if (isSetSlidingStep()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(slidingStep); - - hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); - if (isSetFetchSize()) - hashCode = hashCode * 8191 + fetchSize; - - hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); - if (isSetTimeout()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); - - hashCode = hashCode * 8191 + ((isSetLegalPathNodes()) ? 131071 : 524287); - if (isSetLegalPathNodes()) - hashCode = hashCode * 8191 + ((legalPathNodes) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSAggregationQueryReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatementId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPaths()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetAggregations(), other.isSetAggregations()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAggregations()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregations, other.aggregations); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEndTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetInterval(), other.isSetInterval()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInterval()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.interval, other.interval); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSlidingStep(), other.isSetSlidingStep()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSlidingStep()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slidingStep, other.slidingStep); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFetchSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetLegalPathNodes(), other.isSetLegalPathNodes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLegalPathNodes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legalPathNodes, other.legalPathNodes); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSAggregationQueryReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("statementId:"); - sb.append(this.statementId); - first = false; - if (!first) sb.append(", "); - sb.append("paths:"); - if (this.paths == null) { - sb.append("null"); - } else { - sb.append(this.paths); - } - first = false; - if (!first) sb.append(", "); - sb.append("aggregations:"); - if (this.aggregations == null) { - sb.append("null"); - } else { - sb.append(this.aggregations); - } - first = false; - if (isSetStartTime()) { - if (!first) sb.append(", "); - sb.append("startTime:"); - sb.append(this.startTime); - first = false; - } - if (isSetEndTime()) { - if (!first) sb.append(", "); - sb.append("endTime:"); - sb.append(this.endTime); - first = false; - } - if (isSetInterval()) { - if (!first) sb.append(", "); - sb.append("interval:"); - sb.append(this.interval); - first = false; - } - if (isSetSlidingStep()) { - if (!first) sb.append(", "); - sb.append("slidingStep:"); - sb.append(this.slidingStep); - first = false; - } - if (isSetFetchSize()) { - if (!first) sb.append(", "); - sb.append("fetchSize:"); - sb.append(this.fetchSize); - first = false; - } - if (isSetTimeout()) { - if (!first) sb.append(", "); - sb.append("timeout:"); - sb.append(this.timeout); - first = false; - } - if (isSetLegalPathNodes()) { - if (!first) sb.append(", "); - sb.append("legalPathNodes:"); - sb.append(this.legalPathNodes); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. - if (paths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); - } - if (aggregations == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'aggregations' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSAggregationQueryReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSAggregationQueryReqStandardScheme getScheme() { - return new TSAggregationQueryReqStandardScheme(); - } - } - - private static class TSAggregationQueryReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSAggregationQueryReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STATEMENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PATHS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list576 = iprot.readListBegin(); - struct.paths = new java.util.ArrayList(_list576.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem577; - for (int _i578 = 0; _i578 < _list576.size; ++_i578) - { - _elem577 = iprot.readString(); - struct.paths.add(_elem577); - } - iprot.readListEnd(); - } - struct.setPathsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // AGGREGATIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list579 = iprot.readListBegin(); - struct.aggregations = new java.util.ArrayList(_list579.size); - @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType _elem580; - for (int _i581 = 0; _i581 < _list579.size; ++_i581) - { - _elem580 = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32()); - if (_elem580 != null) - { - struct.aggregations.add(_elem580); - } - } - iprot.readListEnd(); - } - struct.setAggregationsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // START_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // END_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // INTERVAL - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.interval = iprot.readI64(); - struct.setIntervalIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // SLIDING_STEP - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.slidingStep = iprot.readI64(); - struct.setSlidingStepIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // FETCH_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // TIMEOUT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // LEGAL_PATH_NODES - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.legalPathNodes = iprot.readBool(); - struct.setLegalPathNodesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetStatementId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSAggregationQueryReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); - oprot.writeI64(struct.statementId); - oprot.writeFieldEnd(); - if (struct.paths != null) { - oprot.writeFieldBegin(PATHS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); - for (java.lang.String _iter582 : struct.paths) - { - oprot.writeString(_iter582); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.aggregations != null) { - oprot.writeFieldBegin(AGGREGATIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.aggregations.size())); - for (org.apache.iotdb.common.rpc.thrift.TAggregationType _iter583 : struct.aggregations) - { - oprot.writeI32(_iter583.getValue()); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetStartTime()) { - oprot.writeFieldBegin(START_TIME_FIELD_DESC); - oprot.writeI64(struct.startTime); - oprot.writeFieldEnd(); - } - if (struct.isSetEndTime()) { - oprot.writeFieldBegin(END_TIME_FIELD_DESC); - oprot.writeI64(struct.endTime); - oprot.writeFieldEnd(); - } - if (struct.isSetInterval()) { - oprot.writeFieldBegin(INTERVAL_FIELD_DESC); - oprot.writeI64(struct.interval); - oprot.writeFieldEnd(); - } - if (struct.isSetSlidingStep()) { - oprot.writeFieldBegin(SLIDING_STEP_FIELD_DESC); - oprot.writeI64(struct.slidingStep); - oprot.writeFieldEnd(); - } - if (struct.isSetFetchSize()) { - oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); - oprot.writeI32(struct.fetchSize); - oprot.writeFieldEnd(); - } - if (struct.isSetTimeout()) { - oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); - oprot.writeI64(struct.timeout); - oprot.writeFieldEnd(); - } - if (struct.isSetLegalPathNodes()) { - oprot.writeFieldBegin(LEGAL_PATH_NODES_FIELD_DESC); - oprot.writeBool(struct.legalPathNodes); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSAggregationQueryReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSAggregationQueryReqTupleScheme getScheme() { - return new TSAggregationQueryReqTupleScheme(); - } - } - - private static class TSAggregationQueryReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSAggregationQueryReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeI64(struct.statementId); - { - oprot.writeI32(struct.paths.size()); - for (java.lang.String _iter584 : struct.paths) - { - oprot.writeString(_iter584); - } - } - { - oprot.writeI32(struct.aggregations.size()); - for (org.apache.iotdb.common.rpc.thrift.TAggregationType _iter585 : struct.aggregations) - { - oprot.writeI32(_iter585.getValue()); - } - } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetStartTime()) { - optionals.set(0); - } - if (struct.isSetEndTime()) { - optionals.set(1); - } - if (struct.isSetInterval()) { - optionals.set(2); - } - if (struct.isSetSlidingStep()) { - optionals.set(3); - } - if (struct.isSetFetchSize()) { - optionals.set(4); - } - if (struct.isSetTimeout()) { - optionals.set(5); - } - if (struct.isSetLegalPathNodes()) { - optionals.set(6); - } - oprot.writeBitSet(optionals, 7); - if (struct.isSetStartTime()) { - oprot.writeI64(struct.startTime); - } - if (struct.isSetEndTime()) { - oprot.writeI64(struct.endTime); - } - if (struct.isSetInterval()) { - oprot.writeI64(struct.interval); - } - if (struct.isSetSlidingStep()) { - oprot.writeI64(struct.slidingStep); - } - if (struct.isSetFetchSize()) { - oprot.writeI32(struct.fetchSize); - } - if (struct.isSetTimeout()) { - oprot.writeI64(struct.timeout); - } - if (struct.isSetLegalPathNodes()) { - oprot.writeBool(struct.legalPathNodes); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSAggregationQueryReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - { - org.apache.thrift.protocol.TList _list586 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.paths = new java.util.ArrayList(_list586.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem587; - for (int _i588 = 0; _i588 < _list586.size; ++_i588) - { - _elem587 = iprot.readString(); - struct.paths.add(_elem587); - } - } - struct.setPathsIsSet(true); - { - org.apache.thrift.protocol.TList _list589 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.aggregations = new java.util.ArrayList(_list589.size); - @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType _elem590; - for (int _i591 = 0; _i591 < _list589.size; ++_i591) - { - _elem590 = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32()); - if (_elem590 != null) - { - struct.aggregations.add(_elem590); - } - } - } - struct.setAggregationsIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(7); - if (incoming.get(0)) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } - if (incoming.get(1)) { - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - } - if (incoming.get(2)) { - struct.interval = iprot.readI64(); - struct.setIntervalIsSet(true); - } - if (incoming.get(3)) { - struct.slidingStep = iprot.readI64(); - struct.setSlidingStepIsSet(true); - } - if (incoming.get(4)) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } - if (incoming.get(5)) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } - if (incoming.get(6)) { - struct.legalPathNodes = iprot.readBool(); - struct.setLegalPathNodesIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSAppendSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSAppendSchemaTemplateReq.java deleted file mode 100644 index b66f78e81875a..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSAppendSchemaTemplateReq.java +++ /dev/null @@ -1,1175 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSAppendSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSAppendSchemaTemplateReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)3); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField DATA_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTypes", org.apache.thrift.protocol.TType.LIST, (short)5); - private static final org.apache.thrift.protocol.TField ENCODINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("encodings", org.apache.thrift.protocol.TType.LIST, (short)6); - private static final org.apache.thrift.protocol.TField COMPRESSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("compressors", org.apache.thrift.protocol.TType.LIST, (short)7); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSAppendSchemaTemplateReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSAppendSchemaTemplateReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String name; // required - public boolean isAligned; // required - public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required - public @org.apache.thrift.annotation.Nullable java.util.List dataTypes; // required - public @org.apache.thrift.annotation.Nullable java.util.List encodings; // required - public @org.apache.thrift.annotation.Nullable java.util.List compressors; // 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 { - SESSION_ID((short)1, "sessionId"), - NAME((short)2, "name"), - IS_ALIGNED((short)3, "isAligned"), - MEASUREMENTS((short)4, "measurements"), - DATA_TYPES((short)5, "dataTypes"), - ENCODINGS((short)6, "encodings"), - COMPRESSORS((short)7, "compressors"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // NAME - return NAME; - case 3: // IS_ALIGNED - return IS_ALIGNED; - case 4: // MEASUREMENTS - return MEASUREMENTS; - case 5: // DATA_TYPES - return DATA_TYPES; - case 6: // ENCODINGS - return ENCODINGS; - case 7: // COMPRESSORS - return COMPRESSORS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __ISALIGNED_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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.DATA_TYPES, new org.apache.thrift.meta_data.FieldMetaData("dataTypes", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.ENCODINGS, new org.apache.thrift.meta_data.FieldMetaData("encodings", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.COMPRESSORS, new org.apache.thrift.meta_data.FieldMetaData("compressors", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSAppendSchemaTemplateReq.class, metaDataMap); - } - - public TSAppendSchemaTemplateReq() { - } - - public TSAppendSchemaTemplateReq( - long sessionId, - java.lang.String name, - boolean isAligned, - java.util.List measurements, - java.util.List dataTypes, - java.util.List encodings, - java.util.List compressors) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.name = name; - this.isAligned = isAligned; - setIsAlignedIsSet(true); - this.measurements = measurements; - this.dataTypes = dataTypes; - this.encodings = encodings; - this.compressors = compressors; - } - - /** - * Performs a deep copy on other. - */ - public TSAppendSchemaTemplateReq(TSAppendSchemaTemplateReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetName()) { - this.name = other.name; - } - this.isAligned = other.isAligned; - if (other.isSetMeasurements()) { - java.util.List __this__measurements = new java.util.ArrayList(other.measurements); - this.measurements = __this__measurements; - } - if (other.isSetDataTypes()) { - java.util.List __this__dataTypes = new java.util.ArrayList(other.dataTypes); - this.dataTypes = __this__dataTypes; - } - if (other.isSetEncodings()) { - java.util.List __this__encodings = new java.util.ArrayList(other.encodings); - this.encodings = __this__encodings; - } - if (other.isSetCompressors()) { - java.util.List __this__compressors = new java.util.ArrayList(other.compressors); - this.compressors = __this__compressors; - } - } - - @Override - public TSAppendSchemaTemplateReq deepCopy() { - return new TSAppendSchemaTemplateReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.name = null; - setIsAlignedIsSet(false); - this.isAligned = false; - this.measurements = null; - this.dataTypes = null; - this.encodings = null; - this.compressors = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSAppendSchemaTemplateReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getName() { - return this.name; - } - - public TSAppendSchemaTemplateReq setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public boolean isIsAligned() { - return this.isAligned; - } - - public TSAppendSchemaTemplateReq setIsAligned(boolean isAligned) { - this.isAligned = isAligned; - setIsAlignedIsSet(true); - return this; - } - - public void unsetIsAligned() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAligned() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - public void setIsAlignedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); - } - - public int getMeasurementsSize() { - return (this.measurements == null) ? 0 : this.measurements.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getMeasurementsIterator() { - return (this.measurements == null) ? null : this.measurements.iterator(); - } - - public void addToMeasurements(java.lang.String elem) { - if (this.measurements == null) { - this.measurements = new java.util.ArrayList(); - } - this.measurements.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getMeasurements() { - return this.measurements; - } - - public TSAppendSchemaTemplateReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { - this.measurements = measurements; - return this; - } - - public void unsetMeasurements() { - this.measurements = null; - } - - /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurements() { - return this.measurements != null; - } - - public void setMeasurementsIsSet(boolean value) { - if (!value) { - this.measurements = null; - } - } - - public int getDataTypesSize() { - return (this.dataTypes == null) ? 0 : this.dataTypes.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getDataTypesIterator() { - return (this.dataTypes == null) ? null : this.dataTypes.iterator(); - } - - public void addToDataTypes(int elem) { - if (this.dataTypes == null) { - this.dataTypes = new java.util.ArrayList(); - } - this.dataTypes.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getDataTypes() { - return this.dataTypes; - } - - public TSAppendSchemaTemplateReq setDataTypes(@org.apache.thrift.annotation.Nullable java.util.List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - public void unsetDataTypes() { - this.dataTypes = null; - } - - /** Returns true if field dataTypes is set (has been assigned a value) and false otherwise */ - public boolean isSetDataTypes() { - return this.dataTypes != null; - } - - public void setDataTypesIsSet(boolean value) { - if (!value) { - this.dataTypes = null; - } - } - - public int getEncodingsSize() { - return (this.encodings == null) ? 0 : this.encodings.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getEncodingsIterator() { - return (this.encodings == null) ? null : this.encodings.iterator(); - } - - public void addToEncodings(int elem) { - if (this.encodings == null) { - this.encodings = new java.util.ArrayList(); - } - this.encodings.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getEncodings() { - return this.encodings; - } - - public TSAppendSchemaTemplateReq setEncodings(@org.apache.thrift.annotation.Nullable java.util.List encodings) { - this.encodings = encodings; - return this; - } - - public void unsetEncodings() { - this.encodings = null; - } - - /** Returns true if field encodings is set (has been assigned a value) and false otherwise */ - public boolean isSetEncodings() { - return this.encodings != null; - } - - public void setEncodingsIsSet(boolean value) { - if (!value) { - this.encodings = null; - } - } - - public int getCompressorsSize() { - return (this.compressors == null) ? 0 : this.compressors.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getCompressorsIterator() { - return (this.compressors == null) ? null : this.compressors.iterator(); - } - - public void addToCompressors(int elem) { - if (this.compressors == null) { - this.compressors = new java.util.ArrayList(); - } - this.compressors.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getCompressors() { - return this.compressors; - } - - public TSAppendSchemaTemplateReq setCompressors(@org.apache.thrift.annotation.Nullable java.util.List compressors) { - this.compressors = compressors; - return this; - } - - public void unsetCompressors() { - this.compressors = null; - } - - /** Returns true if field compressors is set (has been assigned a value) and false otherwise */ - public boolean isSetCompressors() { - return this.compressors != null; - } - - public void setCompressorsIsSet(boolean value) { - if (!value) { - this.compressors = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((java.lang.String)value); - } - break; - - case IS_ALIGNED: - if (value == null) { - unsetIsAligned(); - } else { - setIsAligned((java.lang.Boolean)value); - } - break; - - case MEASUREMENTS: - if (value == null) { - unsetMeasurements(); - } else { - setMeasurements((java.util.List)value); - } - break; - - case DATA_TYPES: - if (value == null) { - unsetDataTypes(); - } else { - setDataTypes((java.util.List)value); - } - break; - - case ENCODINGS: - if (value == null) { - unsetEncodings(); - } else { - setEncodings((java.util.List)value); - } - break; - - case COMPRESSORS: - if (value == null) { - unsetCompressors(); - } else { - setCompressors((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case NAME: - return getName(); - - case IS_ALIGNED: - return isIsAligned(); - - case MEASUREMENTS: - return getMeasurements(); - - case DATA_TYPES: - return getDataTypes(); - - case ENCODINGS: - return getEncodings(); - - case COMPRESSORS: - return getCompressors(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case NAME: - return isSetName(); - case IS_ALIGNED: - return isSetIsAligned(); - case MEASUREMENTS: - return isSetMeasurements(); - case DATA_TYPES: - return isSetDataTypes(); - case ENCODINGS: - return isSetEncodings(); - case COMPRESSORS: - return isSetCompressors(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSAppendSchemaTemplateReq) - return this.equals((TSAppendSchemaTemplateReq)that); - return false; - } - - public boolean equals(TSAppendSchemaTemplateReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_isAligned = true; - boolean that_present_isAligned = true; - if (this_present_isAligned || that_present_isAligned) { - if (!(this_present_isAligned && that_present_isAligned)) - return false; - if (this.isAligned != that.isAligned) - return false; - } - - boolean this_present_measurements = true && this.isSetMeasurements(); - boolean that_present_measurements = true && that.isSetMeasurements(); - if (this_present_measurements || that_present_measurements) { - if (!(this_present_measurements && that_present_measurements)) - return false; - if (!this.measurements.equals(that.measurements)) - return false; - } - - boolean this_present_dataTypes = true && this.isSetDataTypes(); - boolean that_present_dataTypes = true && that.isSetDataTypes(); - if (this_present_dataTypes || that_present_dataTypes) { - if (!(this_present_dataTypes && that_present_dataTypes)) - return false; - if (!this.dataTypes.equals(that.dataTypes)) - return false; - } - - boolean this_present_encodings = true && this.isSetEncodings(); - boolean that_present_encodings = true && that.isSetEncodings(); - if (this_present_encodings || that_present_encodings) { - if (!(this_present_encodings && that_present_encodings)) - return false; - if (!this.encodings.equals(that.encodings)) - return false; - } - - boolean this_present_compressors = true && this.isSetCompressors(); - boolean that_present_compressors = true && that.isSetCompressors(); - if (this_present_compressors || that_present_compressors) { - if (!(this_present_compressors && that_present_compressors)) - return false; - if (!this.compressors.equals(that.compressors)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); - if (isSetName()) - hashCode = hashCode * 8191 + name.hashCode(); - - hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); - if (isSetMeasurements()) - hashCode = hashCode * 8191 + measurements.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataTypes()) ? 131071 : 524287); - if (isSetDataTypes()) - hashCode = hashCode * 8191 + dataTypes.hashCode(); - - hashCode = hashCode * 8191 + ((isSetEncodings()) ? 131071 : 524287); - if (isSetEncodings()) - hashCode = hashCode * 8191 + encodings.hashCode(); - - hashCode = hashCode * 8191 + ((isSetCompressors()) ? 131071 : 524287); - if (isSetCompressors()) - hashCode = hashCode * 8191 + compressors.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSAppendSchemaTemplateReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAligned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurements()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDataTypes(), other.isSetDataTypes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataTypes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTypes, other.dataTypes); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEncodings(), other.isSetEncodings()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEncodings()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encodings, other.encodings); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCompressors(), other.isSetCompressors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompressors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressors, other.compressors); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSAppendSchemaTemplateReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("isAligned:"); - sb.append(this.isAligned); - first = false; - if (!first) sb.append(", "); - sb.append("measurements:"); - if (this.measurements == null) { - sb.append("null"); - } else { - sb.append(this.measurements); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataTypes:"); - if (this.dataTypes == null) { - sb.append("null"); - } else { - sb.append(this.dataTypes); - } - first = false; - if (!first) sb.append(", "); - sb.append("encodings:"); - if (this.encodings == null) { - sb.append("null"); - } else { - sb.append(this.encodings); - } - first = false; - if (!first) sb.append(", "); - sb.append("compressors:"); - if (this.compressors == null) { - sb.append("null"); - } else { - sb.append(this.compressors); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (name == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); - } - // alas, we cannot check 'isAligned' because it's a primitive and you chose the non-beans generator. - if (measurements == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); - } - if (dataTypes == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataTypes' was not present! Struct: " + toString()); - } - if (encodings == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'encodings' was not present! Struct: " + toString()); - } - if (compressors == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'compressors' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSAppendSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSAppendSchemaTemplateReqStandardScheme getScheme() { - return new TSAppendSchemaTemplateReqStandardScheme(); - } - } - - private static class TSAppendSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSAppendSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // IS_ALIGNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MEASUREMENTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list694 = iprot.readListBegin(); - struct.measurements = new java.util.ArrayList(_list694.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem695; - for (int _i696 = 0; _i696 < _list694.size; ++_i696) - { - _elem695 = iprot.readString(); - struct.measurements.add(_elem695); - } - iprot.readListEnd(); - } - struct.setMeasurementsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // DATA_TYPES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list697 = iprot.readListBegin(); - struct.dataTypes = new java.util.ArrayList(_list697.size); - int _elem698; - for (int _i699 = 0; _i699 < _list697.size; ++_i699) - { - _elem698 = iprot.readI32(); - struct.dataTypes.add(_elem698); - } - iprot.readListEnd(); - } - struct.setDataTypesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // ENCODINGS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list700 = iprot.readListBegin(); - struct.encodings = new java.util.ArrayList(_list700.size); - int _elem701; - for (int _i702 = 0; _i702 < _list700.size; ++_i702) - { - _elem701 = iprot.readI32(); - struct.encodings.add(_elem701); - } - iprot.readListEnd(); - } - struct.setEncodingsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // COMPRESSORS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list703 = iprot.readListBegin(); - struct.compressors = new java.util.ArrayList(_list703.size); - int _elem704; - for (int _i705 = 0; _i705 < _list703.size; ++_i705) - { - _elem704 = iprot.readI32(); - struct.compressors.add(_elem704); - } - iprot.readListEnd(); - } - struct.setCompressorsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetIsAligned()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isAligned' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSAppendSchemaTemplateReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); - oprot.writeBool(struct.isAligned); - oprot.writeFieldEnd(); - if (struct.measurements != null) { - oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); - for (java.lang.String _iter706 : struct.measurements) - { - oprot.writeString(_iter706); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.dataTypes != null) { - oprot.writeFieldBegin(DATA_TYPES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dataTypes.size())); - for (int _iter707 : struct.dataTypes) - { - oprot.writeI32(_iter707); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.encodings != null) { - oprot.writeFieldBegin(ENCODINGS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.encodings.size())); - for (int _iter708 : struct.encodings) - { - oprot.writeI32(_iter708); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.compressors != null) { - oprot.writeFieldBegin(COMPRESSORS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.compressors.size())); - for (int _iter709 : struct.compressors) - { - oprot.writeI32(_iter709); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSAppendSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSAppendSchemaTemplateReqTupleScheme getScheme() { - return new TSAppendSchemaTemplateReqTupleScheme(); - } - } - - private static class TSAppendSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSAppendSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.name); - oprot.writeBool(struct.isAligned); - { - oprot.writeI32(struct.measurements.size()); - for (java.lang.String _iter710 : struct.measurements) - { - oprot.writeString(_iter710); - } - } - { - oprot.writeI32(struct.dataTypes.size()); - for (int _iter711 : struct.dataTypes) - { - oprot.writeI32(_iter711); - } - } - { - oprot.writeI32(struct.encodings.size()); - for (int _iter712 : struct.encodings) - { - oprot.writeI32(_iter712); - } - } - { - oprot.writeI32(struct.compressors.size()); - for (int _iter713 : struct.compressors) - { - oprot.writeI32(_iter713); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSAppendSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.name = iprot.readString(); - struct.setNameIsSet(true); - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - { - org.apache.thrift.protocol.TList _list714 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.measurements = new java.util.ArrayList(_list714.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem715; - for (int _i716 = 0; _i716 < _list714.size; ++_i716) - { - _elem715 = iprot.readString(); - struct.measurements.add(_elem715); - } - } - struct.setMeasurementsIsSet(true); - { - org.apache.thrift.protocol.TList _list717 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.dataTypes = new java.util.ArrayList(_list717.size); - int _elem718; - for (int _i719 = 0; _i719 < _list717.size; ++_i719) - { - _elem718 = iprot.readI32(); - struct.dataTypes.add(_elem718); - } - } - struct.setDataTypesIsSet(true); - { - org.apache.thrift.protocol.TList _list720 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.encodings = new java.util.ArrayList(_list720.size); - int _elem721; - for (int _i722 = 0; _i722 < _list720.size; ++_i722) - { - _elem721 = iprot.readI32(); - struct.encodings.add(_elem721); - } - } - struct.setEncodingsIsSet(true); - { - org.apache.thrift.protocol.TList _list723 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.compressors = new java.util.ArrayList(_list723.size); - int _elem724; - for (int _i725 = 0; _i725 < _list723.size; ++_i725) - { - _elem724 = iprot.readI32(); - struct.compressors.add(_elem724); - } - } - struct.setCompressorsIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSBackupConfigurationResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSBackupConfigurationResp.java deleted file mode 100644 index f64f2a999b9c0..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSBackupConfigurationResp.java +++ /dev/null @@ -1,699 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSBackupConfigurationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSBackupConfigurationResp"); - - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField ENABLE_OPERATION_SYNC_FIELD_DESC = new org.apache.thrift.protocol.TField("enableOperationSync", org.apache.thrift.protocol.TType.BOOL, (short)2); - private static final org.apache.thrift.protocol.TField SECONDARY_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("secondaryAddress", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField SECONDARY_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("secondaryPort", org.apache.thrift.protocol.TType.I32, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSBackupConfigurationRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSBackupConfigurationRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required - public boolean enableOperationSync; // optional - public @org.apache.thrift.annotation.Nullable java.lang.String secondaryAddress; // optional - public int secondaryPort; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATUS((short)1, "status"), - ENABLE_OPERATION_SYNC((short)2, "enableOperationSync"), - SECONDARY_ADDRESS((short)3, "secondaryAddress"), - SECONDARY_PORT((short)4, "secondaryPort"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATUS - return STATUS; - case 2: // ENABLE_OPERATION_SYNC - return ENABLE_OPERATION_SYNC; - case 3: // SECONDARY_ADDRESS - return SECONDARY_ADDRESS; - case 4: // SECONDARY_PORT - return SECONDARY_PORT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ENABLEOPERATIONSYNC_ISSET_ID = 0; - private static final int __SECONDARYPORT_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.ENABLE_OPERATION_SYNC,_Fields.SECONDARY_ADDRESS,_Fields.SECONDARY_PORT}; - 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - tmpMap.put(_Fields.ENABLE_OPERATION_SYNC, new org.apache.thrift.meta_data.FieldMetaData("enableOperationSync", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.SECONDARY_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("secondaryAddress", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SECONDARY_PORT, new org.apache.thrift.meta_data.FieldMetaData("secondaryPort", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSBackupConfigurationResp.class, metaDataMap); - } - - public TSBackupConfigurationResp() { - } - - public TSBackupConfigurationResp( - org.apache.iotdb.common.rpc.thrift.TSStatus status) - { - this(); - this.status = status; - } - - /** - * Performs a deep copy on other. - */ - public TSBackupConfigurationResp(TSBackupConfigurationResp other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetStatus()) { - this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); - } - this.enableOperationSync = other.enableOperationSync; - if (other.isSetSecondaryAddress()) { - this.secondaryAddress = other.secondaryAddress; - } - this.secondaryPort = other.secondaryPort; - } - - @Override - public TSBackupConfigurationResp deepCopy() { - return new TSBackupConfigurationResp(this); - } - - @Override - public void clear() { - this.status = null; - setEnableOperationSyncIsSet(false); - this.enableOperationSync = false; - this.secondaryAddress = null; - setSecondaryPortIsSet(false); - this.secondaryPort = 0; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { - return this.status; - } - - public TSBackupConfigurationResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { - this.status = status; - return this; - } - - public void unsetStatus() { - this.status = null; - } - - /** Returns true if field status is set (has been assigned a value) and false otherwise */ - public boolean isSetStatus() { - return this.status != null; - } - - public void setStatusIsSet(boolean value) { - if (!value) { - this.status = null; - } - } - - public boolean isEnableOperationSync() { - return this.enableOperationSync; - } - - public TSBackupConfigurationResp setEnableOperationSync(boolean enableOperationSync) { - this.enableOperationSync = enableOperationSync; - setEnableOperationSyncIsSet(true); - return this; - } - - public void unsetEnableOperationSync() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEOPERATIONSYNC_ISSET_ID); - } - - /** Returns true if field enableOperationSync is set (has been assigned a value) and false otherwise */ - public boolean isSetEnableOperationSync() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEOPERATIONSYNC_ISSET_ID); - } - - public void setEnableOperationSyncIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEOPERATIONSYNC_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getSecondaryAddress() { - return this.secondaryAddress; - } - - public TSBackupConfigurationResp setSecondaryAddress(@org.apache.thrift.annotation.Nullable java.lang.String secondaryAddress) { - this.secondaryAddress = secondaryAddress; - return this; - } - - public void unsetSecondaryAddress() { - this.secondaryAddress = null; - } - - /** Returns true if field secondaryAddress is set (has been assigned a value) and false otherwise */ - public boolean isSetSecondaryAddress() { - return this.secondaryAddress != null; - } - - public void setSecondaryAddressIsSet(boolean value) { - if (!value) { - this.secondaryAddress = null; - } - } - - public int getSecondaryPort() { - return this.secondaryPort; - } - - public TSBackupConfigurationResp setSecondaryPort(int secondaryPort) { - this.secondaryPort = secondaryPort; - setSecondaryPortIsSet(true); - return this; - } - - public void unsetSecondaryPort() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SECONDARYPORT_ISSET_ID); - } - - /** Returns true if field secondaryPort is set (has been assigned a value) and false otherwise */ - public boolean isSetSecondaryPort() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SECONDARYPORT_ISSET_ID); - } - - public void setSecondaryPortIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SECONDARYPORT_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - case ENABLE_OPERATION_SYNC: - if (value == null) { - unsetEnableOperationSync(); - } else { - setEnableOperationSync((java.lang.Boolean)value); - } - break; - - case SECONDARY_ADDRESS: - if (value == null) { - unsetSecondaryAddress(); - } else { - setSecondaryAddress((java.lang.String)value); - } - break; - - case SECONDARY_PORT: - if (value == null) { - unsetSecondaryPort(); - } else { - setSecondaryPort((java.lang.Integer)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case STATUS: - return getStatus(); - - case ENABLE_OPERATION_SYNC: - return isEnableOperationSync(); - - case SECONDARY_ADDRESS: - return getSecondaryAddress(); - - case SECONDARY_PORT: - return getSecondaryPort(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case STATUS: - return isSetStatus(); - case ENABLE_OPERATION_SYNC: - return isSetEnableOperationSync(); - case SECONDARY_ADDRESS: - return isSetSecondaryAddress(); - case SECONDARY_PORT: - return isSetSecondaryPort(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSBackupConfigurationResp) - return this.equals((TSBackupConfigurationResp)that); - return false; - } - - public boolean equals(TSBackupConfigurationResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_status = true && this.isSetStatus(); - boolean that_present_status = true && that.isSetStatus(); - if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) - return false; - if (!this.status.equals(that.status)) - return false; - } - - boolean this_present_enableOperationSync = true && this.isSetEnableOperationSync(); - boolean that_present_enableOperationSync = true && that.isSetEnableOperationSync(); - if (this_present_enableOperationSync || that_present_enableOperationSync) { - if (!(this_present_enableOperationSync && that_present_enableOperationSync)) - return false; - if (this.enableOperationSync != that.enableOperationSync) - return false; - } - - boolean this_present_secondaryAddress = true && this.isSetSecondaryAddress(); - boolean that_present_secondaryAddress = true && that.isSetSecondaryAddress(); - if (this_present_secondaryAddress || that_present_secondaryAddress) { - if (!(this_present_secondaryAddress && that_present_secondaryAddress)) - return false; - if (!this.secondaryAddress.equals(that.secondaryAddress)) - return false; - } - - boolean this_present_secondaryPort = true && this.isSetSecondaryPort(); - boolean that_present_secondaryPort = true && that.isSetSecondaryPort(); - if (this_present_secondaryPort || that_present_secondaryPort) { - if (!(this_present_secondaryPort && that_present_secondaryPort)) - return false; - if (this.secondaryPort != that.secondaryPort) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); - if (isSetStatus()) - hashCode = hashCode * 8191 + status.hashCode(); - - hashCode = hashCode * 8191 + ((isSetEnableOperationSync()) ? 131071 : 524287); - if (isSetEnableOperationSync()) - hashCode = hashCode * 8191 + ((enableOperationSync) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetSecondaryAddress()) ? 131071 : 524287); - if (isSetSecondaryAddress()) - hashCode = hashCode * 8191 + secondaryAddress.hashCode(); - - hashCode = hashCode * 8191 + ((isSetSecondaryPort()) ? 131071 : 524287); - if (isSetSecondaryPort()) - hashCode = hashCode * 8191 + secondaryPort; - - return hashCode; - } - - @Override - public int compareTo(TSBackupConfigurationResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEnableOperationSync(), other.isSetEnableOperationSync()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnableOperationSync()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableOperationSync, other.enableOperationSync); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSecondaryAddress(), other.isSetSecondaryAddress()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSecondaryAddress()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secondaryAddress, other.secondaryAddress); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSecondaryPort(), other.isSetSecondaryPort()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSecondaryPort()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secondaryPort, other.secondaryPort); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSBackupConfigurationResp("); - boolean first = true; - - sb.append("status:"); - if (this.status == null) { - sb.append("null"); - } else { - sb.append(this.status); - } - first = false; - if (isSetEnableOperationSync()) { - if (!first) sb.append(", "); - sb.append("enableOperationSync:"); - sb.append(this.enableOperationSync); - first = false; - } - if (isSetSecondaryAddress()) { - if (!first) sb.append(", "); - sb.append("secondaryAddress:"); - if (this.secondaryAddress == null) { - sb.append("null"); - } else { - sb.append(this.secondaryAddress); - } - first = false; - } - if (isSetSecondaryPort()) { - if (!first) sb.append(", "); - sb.append("secondaryPort:"); - sb.append(this.secondaryPort); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (status == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); - } - // check for sub-struct validity - if (status != null) { - status.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSBackupConfigurationRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSBackupConfigurationRespStandardScheme getScheme() { - return new TSBackupConfigurationRespStandardScheme(); - } - } - - private static class TSBackupConfigurationRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSBackupConfigurationResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ENABLE_OPERATION_SYNC - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.enableOperationSync = iprot.readBool(); - struct.setEnableOperationSyncIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SECONDARY_ADDRESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.secondaryAddress = iprot.readString(); - struct.setSecondaryAddressIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // SECONDARY_PORT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.secondaryPort = iprot.readI32(); - struct.setSecondaryPortIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSBackupConfigurationResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.status != null) { - oprot.writeFieldBegin(STATUS_FIELD_DESC); - struct.status.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.isSetEnableOperationSync()) { - oprot.writeFieldBegin(ENABLE_OPERATION_SYNC_FIELD_DESC); - oprot.writeBool(struct.enableOperationSync); - oprot.writeFieldEnd(); - } - if (struct.secondaryAddress != null) { - if (struct.isSetSecondaryAddress()) { - oprot.writeFieldBegin(SECONDARY_ADDRESS_FIELD_DESC); - oprot.writeString(struct.secondaryAddress); - oprot.writeFieldEnd(); - } - } - if (struct.isSetSecondaryPort()) { - oprot.writeFieldBegin(SECONDARY_PORT_FIELD_DESC); - oprot.writeI32(struct.secondaryPort); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSBackupConfigurationRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSBackupConfigurationRespTupleScheme getScheme() { - return new TSBackupConfigurationRespTupleScheme(); - } - } - - private static class TSBackupConfigurationRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSBackupConfigurationResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status.write(oprot); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetEnableOperationSync()) { - optionals.set(0); - } - if (struct.isSetSecondaryAddress()) { - optionals.set(1); - } - if (struct.isSetSecondaryPort()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetEnableOperationSync()) { - oprot.writeBool(struct.enableOperationSync); - } - if (struct.isSetSecondaryAddress()) { - oprot.writeString(struct.secondaryAddress); - } - if (struct.isSetSecondaryPort()) { - oprot.writeI32(struct.secondaryPort); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSBackupConfigurationResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.enableOperationSync = iprot.readBool(); - struct.setEnableOperationSyncIsSet(true); - } - if (incoming.get(1)) { - struct.secondaryAddress = iprot.readString(); - struct.setSecondaryAddressIsSet(true); - } - if (incoming.get(2)) { - struct.secondaryPort = iprot.readI32(); - struct.setSecondaryPortIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCancelOperationReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCancelOperationReq.java deleted file mode 100644 index a6d7b1c51583e..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCancelOperationReq.java +++ /dev/null @@ -1,470 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSCancelOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCancelOperationReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCancelOperationReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCancelOperationReqTupleSchemeFactory(); - - public long sessionId; // required - public long queryId; // 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 { - SESSION_ID((short)1, "sessionId"), - QUERY_ID((short)2, "queryId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // QUERY_ID - return QUERY_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __QUERYID_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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCancelOperationReq.class, metaDataMap); - } - - public TSCancelOperationReq() { - } - - public TSCancelOperationReq( - long sessionId, - long queryId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.queryId = queryId; - setQueryIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSCancelOperationReq(TSCancelOperationReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - this.queryId = other.queryId; - } - - @Override - public TSCancelOperationReq deepCopy() { - return new TSCancelOperationReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - setQueryIdIsSet(false); - this.queryId = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSCancelOperationReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public long getQueryId() { - return this.queryId; - } - - public TSCancelOperationReq setQueryId(long queryId) { - this.queryId = queryId; - setQueryIdIsSet(true); - return this; - } - - public void unsetQueryId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - public void setQueryIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case QUERY_ID: - if (value == null) { - unsetQueryId(); - } else { - setQueryId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case QUERY_ID: - return getQueryId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case QUERY_ID: - return isSetQueryId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSCancelOperationReq) - return this.equals((TSCancelOperationReq)that); - return false; - } - - public boolean equals(TSCancelOperationReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_queryId = true; - boolean that_present_queryId = true; - if (this_present_queryId || that_present_queryId) { - if (!(this_present_queryId && that_present_queryId)) - return false; - if (this.queryId != that.queryId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); - - return hashCode; - } - - @Override - public int compareTo(TSCancelOperationReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCancelOperationReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("queryId:"); - sb.append(this.queryId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'queryId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSCancelOperationReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCancelOperationReqStandardScheme getScheme() { - return new TSCancelOperationReqStandardScheme(); - } - } - - private static class TSCancelOperationReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSCancelOperationReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // QUERY_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetQueryId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSCancelOperationReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); - oprot.writeI64(struct.queryId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSCancelOperationReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCancelOperationReqTupleScheme getScheme() { - return new TSCancelOperationReqTupleScheme(); - } - } - - private static class TSCancelOperationReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSCancelOperationReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeI64(struct.queryId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSCancelOperationReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseOperationReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseOperationReq.java deleted file mode 100644 index b51d2c568e384..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseOperationReq.java +++ /dev/null @@ -1,579 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSCloseOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCloseOperationReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCloseOperationReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCloseOperationReqTupleSchemeFactory(); - - public long sessionId; // required - public long queryId; // optional - public long statementId; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - QUERY_ID((short)2, "queryId"), - STATEMENT_ID((short)3, "statementId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // QUERY_ID - return QUERY_ID; - case 3: // STATEMENT_ID - return STATEMENT_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __QUERYID_ISSET_ID = 1; - private static final int __STATEMENTID_ISSET_ID = 2; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.QUERY_ID,_Fields.STATEMENT_ID}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCloseOperationReq.class, metaDataMap); - } - - public TSCloseOperationReq() { - } - - public TSCloseOperationReq( - long sessionId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSCloseOperationReq(TSCloseOperationReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - this.queryId = other.queryId; - this.statementId = other.statementId; - } - - @Override - public TSCloseOperationReq deepCopy() { - return new TSCloseOperationReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - setQueryIdIsSet(false); - this.queryId = 0; - setStatementIdIsSet(false); - this.statementId = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSCloseOperationReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public long getQueryId() { - return this.queryId; - } - - public TSCloseOperationReq setQueryId(long queryId) { - this.queryId = queryId; - setQueryIdIsSet(true); - return this; - } - - public void unsetQueryId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - public void setQueryIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); - } - - public long getStatementId() { - return this.statementId; - } - - public TSCloseOperationReq setStatementId(long statementId) { - this.statementId = statementId; - setStatementIdIsSet(true); - return this; - } - - public void unsetStatementId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ - public boolean isSetStatementId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - public void setStatementIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case QUERY_ID: - if (value == null) { - unsetQueryId(); - } else { - setQueryId((java.lang.Long)value); - } - break; - - case STATEMENT_ID: - if (value == null) { - unsetStatementId(); - } else { - setStatementId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case QUERY_ID: - return getQueryId(); - - case STATEMENT_ID: - return getStatementId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case QUERY_ID: - return isSetQueryId(); - case STATEMENT_ID: - return isSetStatementId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSCloseOperationReq) - return this.equals((TSCloseOperationReq)that); - return false; - } - - public boolean equals(TSCloseOperationReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_queryId = true && this.isSetQueryId(); - boolean that_present_queryId = true && that.isSetQueryId(); - if (this_present_queryId || that_present_queryId) { - if (!(this_present_queryId && that_present_queryId)) - return false; - if (this.queryId != that.queryId) - return false; - } - - boolean this_present_statementId = true && this.isSetStatementId(); - boolean that_present_statementId = true && that.isSetStatementId(); - if (this_present_statementId || that_present_statementId) { - if (!(this_present_statementId && that_present_statementId)) - return false; - if (this.statementId != that.statementId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetQueryId()) ? 131071 : 524287); - if (isSetQueryId()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); - - hashCode = hashCode * 8191 + ((isSetStatementId()) ? 131071 : 524287); - if (isSetStatementId()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); - - return hashCode; - } - - @Override - public int compareTo(TSCloseOperationReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatementId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCloseOperationReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (isSetQueryId()) { - if (!first) sb.append(", "); - sb.append("queryId:"); - sb.append(this.queryId); - first = false; - } - if (isSetStatementId()) { - if (!first) sb.append(", "); - sb.append("statementId:"); - sb.append(this.statementId); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSCloseOperationReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCloseOperationReqStandardScheme getScheme() { - return new TSCloseOperationReqStandardScheme(); - } - } - - private static class TSCloseOperationReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSCloseOperationReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // QUERY_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // STATEMENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSCloseOperationReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.isSetQueryId()) { - oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); - oprot.writeI64(struct.queryId); - oprot.writeFieldEnd(); - } - if (struct.isSetStatementId()) { - oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); - oprot.writeI64(struct.statementId); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSCloseOperationReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCloseOperationReqTupleScheme getScheme() { - return new TSCloseOperationReqTupleScheme(); - } - } - - private static class TSCloseOperationReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSCloseOperationReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetQueryId()) { - optionals.set(0); - } - if (struct.isSetStatementId()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetQueryId()) { - oprot.writeI64(struct.queryId); - } - if (struct.isSetStatementId()) { - oprot.writeI64(struct.statementId); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSCloseOperationReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - } - if (incoming.get(1)) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseSessionReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseSessionReq.java deleted file mode 100644 index 554db74df35e8..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCloseSessionReq.java +++ /dev/null @@ -1,377 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSCloseSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCloseSessionReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCloseSessionReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCloseSessionReqTupleSchemeFactory(); - - public long sessionId; // 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 { - SESSION_ID((short)1, "sessionId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCloseSessionReq.class, metaDataMap); - } - - public TSCloseSessionReq() { - } - - public TSCloseSessionReq( - long sessionId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSCloseSessionReq(TSCloseSessionReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - } - - @Override - public TSCloseSessionReq deepCopy() { - return new TSCloseSessionReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSCloseSessionReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSCloseSessionReq) - return this.equals((TSCloseSessionReq)that); - return false; - } - - public boolean equals(TSCloseSessionReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - return hashCode; - } - - @Override - public int compareTo(TSCloseSessionReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCloseSessionReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSCloseSessionReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCloseSessionReqStandardScheme getScheme() { - return new TSCloseSessionReqStandardScheme(); - } - } - - private static class TSCloseSessionReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSCloseSessionReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSCloseSessionReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSCloseSessionReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCloseSessionReqTupleScheme getScheme() { - return new TSCloseSessionReqTupleScheme(); - } - } - - private static class TSCloseSessionReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSCloseSessionReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSCloseSessionReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfo.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfo.java deleted file mode 100644 index c308b6b8311a2..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfo.java +++ /dev/null @@ -1,696 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSConnectionInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSConnectionInfo"); - - private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField LOG_IN_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("logInTime", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField CONNECTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("connectionId", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSConnectionInfoStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSConnectionInfoTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.lang.String userName; // required - public long logInTime; // required - public @org.apache.thrift.annotation.Nullable java.lang.String connectionId; // required - /** - * - * @see TSConnectionType - */ - public @org.apache.thrift.annotation.Nullable TSConnectionType type; // 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 { - USER_NAME((short)1, "userName"), - LOG_IN_TIME((short)2, "logInTime"), - CONNECTION_ID((short)3, "connectionId"), - /** - * - * @see TSConnectionType - */ - TYPE((short)4, "type"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // USER_NAME - return USER_NAME; - case 2: // LOG_IN_TIME - return LOG_IN_TIME; - case 3: // CONNECTION_ID - return CONNECTION_ID; - case 4: // TYPE - return TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __LOGINTIME_ISSET_ID = 0; - 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.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.LOG_IN_TIME, new org.apache.thrift.meta_data.FieldMetaData("logInTime", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.CONNECTION_ID, new org.apache.thrift.meta_data.FieldMetaData("connectionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TSConnectionType.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSConnectionInfo.class, metaDataMap); - } - - public TSConnectionInfo() { - } - - public TSConnectionInfo( - java.lang.String userName, - long logInTime, - java.lang.String connectionId, - TSConnectionType type) - { - this(); - this.userName = userName; - this.logInTime = logInTime; - setLogInTimeIsSet(true); - this.connectionId = connectionId; - this.type = type; - } - - /** - * Performs a deep copy on other. - */ - public TSConnectionInfo(TSConnectionInfo other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetUserName()) { - this.userName = other.userName; - } - this.logInTime = other.logInTime; - if (other.isSetConnectionId()) { - this.connectionId = other.connectionId; - } - if (other.isSetType()) { - this.type = other.type; - } - } - - @Override - public TSConnectionInfo deepCopy() { - return new TSConnectionInfo(this); - } - - @Override - public void clear() { - this.userName = null; - setLogInTimeIsSet(false); - this.logInTime = 0; - this.connectionId = null; - this.type = null; - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getUserName() { - return this.userName; - } - - public TSConnectionInfo setUserName(@org.apache.thrift.annotation.Nullable java.lang.String userName) { - this.userName = userName; - return this; - } - - public void unsetUserName() { - this.userName = null; - } - - /** Returns true if field userName is set (has been assigned a value) and false otherwise */ - public boolean isSetUserName() { - return this.userName != null; - } - - public void setUserNameIsSet(boolean value) { - if (!value) { - this.userName = null; - } - } - - public long getLogInTime() { - return this.logInTime; - } - - public TSConnectionInfo setLogInTime(long logInTime) { - this.logInTime = logInTime; - setLogInTimeIsSet(true); - return this; - } - - public void unsetLogInTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LOGINTIME_ISSET_ID); - } - - /** Returns true if field logInTime is set (has been assigned a value) and false otherwise */ - public boolean isSetLogInTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LOGINTIME_ISSET_ID); - } - - public void setLogInTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LOGINTIME_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getConnectionId() { - return this.connectionId; - } - - public TSConnectionInfo setConnectionId(@org.apache.thrift.annotation.Nullable java.lang.String connectionId) { - this.connectionId = connectionId; - return this; - } - - public void unsetConnectionId() { - this.connectionId = null; - } - - /** Returns true if field connectionId is set (has been assigned a value) and false otherwise */ - public boolean isSetConnectionId() { - return this.connectionId != null; - } - - public void setConnectionIdIsSet(boolean value) { - if (!value) { - this.connectionId = null; - } - } - - /** - * - * @see TSConnectionType - */ - @org.apache.thrift.annotation.Nullable - public TSConnectionType getType() { - return this.type; - } - - /** - * - * @see TSConnectionType - */ - public TSConnectionInfo setType(@org.apache.thrift.annotation.Nullable TSConnectionType type) { - this.type = type; - return this; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case USER_NAME: - if (value == null) { - unsetUserName(); - } else { - setUserName((java.lang.String)value); - } - break; - - case LOG_IN_TIME: - if (value == null) { - unsetLogInTime(); - } else { - setLogInTime((java.lang.Long)value); - } - break; - - case CONNECTION_ID: - if (value == null) { - unsetConnectionId(); - } else { - setConnectionId((java.lang.String)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((TSConnectionType)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case USER_NAME: - return getUserName(); - - case LOG_IN_TIME: - return getLogInTime(); - - case CONNECTION_ID: - return getConnectionId(); - - case TYPE: - return getType(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case USER_NAME: - return isSetUserName(); - case LOG_IN_TIME: - return isSetLogInTime(); - case CONNECTION_ID: - return isSetConnectionId(); - case TYPE: - return isSetType(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSConnectionInfo) - return this.equals((TSConnectionInfo)that); - return false; - } - - public boolean equals(TSConnectionInfo that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_userName = true && this.isSetUserName(); - boolean that_present_userName = true && that.isSetUserName(); - if (this_present_userName || that_present_userName) { - if (!(this_present_userName && that_present_userName)) - return false; - if (!this.userName.equals(that.userName)) - return false; - } - - boolean this_present_logInTime = true; - boolean that_present_logInTime = true; - if (this_present_logInTime || that_present_logInTime) { - if (!(this_present_logInTime && that_present_logInTime)) - return false; - if (this.logInTime != that.logInTime) - return false; - } - - boolean this_present_connectionId = true && this.isSetConnectionId(); - boolean that_present_connectionId = true && that.isSetConnectionId(); - if (this_present_connectionId || that_present_connectionId) { - if (!(this_present_connectionId && that_present_connectionId)) - return false; - if (!this.connectionId.equals(that.connectionId)) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetUserName()) ? 131071 : 524287); - if (isSetUserName()) - hashCode = hashCode * 8191 + userName.hashCode(); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(logInTime); - - hashCode = hashCode * 8191 + ((isSetConnectionId()) ? 131071 : 524287); - if (isSetConnectionId()) - hashCode = hashCode * 8191 + connectionId.hashCode(); - - hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); - if (isSetType()) - hashCode = hashCode * 8191 + type.getValue(); - - return hashCode; - } - - @Override - public int compareTo(TSConnectionInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetUserName(), other.isSetUserName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUserName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetLogInTime(), other.isSetLogInTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLogInTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logInTime, other.logInTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetConnectionId(), other.isSetConnectionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetConnectionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.connectionId, other.connectionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSConnectionInfo("); - boolean first = true; - - sb.append("userName:"); - if (this.userName == null) { - sb.append("null"); - } else { - sb.append(this.userName); - } - first = false; - if (!first) sb.append(", "); - sb.append("logInTime:"); - sb.append(this.logInTime); - first = false; - if (!first) sb.append(", "); - sb.append("connectionId:"); - if (this.connectionId == null) { - sb.append("null"); - } else { - sb.append(this.connectionId); - } - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (userName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString()); - } - // alas, we cannot check 'logInTime' because it's a primitive and you chose the non-beans generator. - if (connectionId == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'connectionId' was not present! Struct: " + toString()); - } - if (type == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSConnectionInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSConnectionInfoStandardScheme getScheme() { - return new TSConnectionInfoStandardScheme(); - } - } - - private static class TSConnectionInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSConnectionInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // USER_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.userName = iprot.readString(); - struct.setUserNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // LOG_IN_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.logInTime = iprot.readI64(); - struct.setLogInTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // CONNECTION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.connectionId = iprot.readString(); - struct.setConnectionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = org.apache.iotdb.service.rpc.thrift.TSConnectionType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetLogInTime()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'logInTime' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSConnectionInfo struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.userName != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(struct.userName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(LOG_IN_TIME_FIELD_DESC); - oprot.writeI64(struct.logInTime); - oprot.writeFieldEnd(); - if (struct.connectionId != null) { - oprot.writeFieldBegin(CONNECTION_ID_FIELD_DESC); - oprot.writeString(struct.connectionId); - oprot.writeFieldEnd(); - } - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSConnectionInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSConnectionInfoTupleScheme getScheme() { - return new TSConnectionInfoTupleScheme(); - } - } - - private static class TSConnectionInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSConnectionInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.userName); - oprot.writeI64(struct.logInTime); - oprot.writeString(struct.connectionId); - oprot.writeI32(struct.type.getValue()); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSConnectionInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.userName = iprot.readString(); - struct.setUserNameIsSet(true); - struct.logInTime = iprot.readI64(); - struct.setLogInTimeIsSet(true); - struct.connectionId = iprot.readString(); - struct.setConnectionIdIsSet(true); - struct.type = org.apache.iotdb.service.rpc.thrift.TSConnectionType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfoResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfoResp.java deleted file mode 100644 index 032139da63ba0..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionInfoResp.java +++ /dev/null @@ -1,436 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSConnectionInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSConnectionInfoResp"); - - private static final org.apache.thrift.protocol.TField CONNECTION_INFO_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("connectionInfoList", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSConnectionInfoRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSConnectionInfoRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.util.List connectionInfoList; // 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 { - CONNECTION_INFO_LIST((short)1, "connectionInfoList"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // CONNECTION_INFO_LIST - return CONNECTION_INFO_LIST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.CONNECTION_INFO_LIST, new org.apache.thrift.meta_data.FieldMetaData("connectionInfoList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSConnectionInfo.class)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSConnectionInfoResp.class, metaDataMap); - } - - public TSConnectionInfoResp() { - } - - public TSConnectionInfoResp( - java.util.List connectionInfoList) - { - this(); - this.connectionInfoList = connectionInfoList; - } - - /** - * Performs a deep copy on other. - */ - public TSConnectionInfoResp(TSConnectionInfoResp other) { - if (other.isSetConnectionInfoList()) { - java.util.List __this__connectionInfoList = new java.util.ArrayList(other.connectionInfoList.size()); - for (TSConnectionInfo other_element : other.connectionInfoList) { - __this__connectionInfoList.add(new TSConnectionInfo(other_element)); - } - this.connectionInfoList = __this__connectionInfoList; - } - } - - @Override - public TSConnectionInfoResp deepCopy() { - return new TSConnectionInfoResp(this); - } - - @Override - public void clear() { - this.connectionInfoList = null; - } - - public int getConnectionInfoListSize() { - return (this.connectionInfoList == null) ? 0 : this.connectionInfoList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getConnectionInfoListIterator() { - return (this.connectionInfoList == null) ? null : this.connectionInfoList.iterator(); - } - - public void addToConnectionInfoList(TSConnectionInfo elem) { - if (this.connectionInfoList == null) { - this.connectionInfoList = new java.util.ArrayList(); - } - this.connectionInfoList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getConnectionInfoList() { - return this.connectionInfoList; - } - - public TSConnectionInfoResp setConnectionInfoList(@org.apache.thrift.annotation.Nullable java.util.List connectionInfoList) { - this.connectionInfoList = connectionInfoList; - return this; - } - - public void unsetConnectionInfoList() { - this.connectionInfoList = null; - } - - /** Returns true if field connectionInfoList is set (has been assigned a value) and false otherwise */ - public boolean isSetConnectionInfoList() { - return this.connectionInfoList != null; - } - - public void setConnectionInfoListIsSet(boolean value) { - if (!value) { - this.connectionInfoList = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case CONNECTION_INFO_LIST: - if (value == null) { - unsetConnectionInfoList(); - } else { - setConnectionInfoList((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case CONNECTION_INFO_LIST: - return getConnectionInfoList(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case CONNECTION_INFO_LIST: - return isSetConnectionInfoList(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSConnectionInfoResp) - return this.equals((TSConnectionInfoResp)that); - return false; - } - - public boolean equals(TSConnectionInfoResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_connectionInfoList = true && this.isSetConnectionInfoList(); - boolean that_present_connectionInfoList = true && that.isSetConnectionInfoList(); - if (this_present_connectionInfoList || that_present_connectionInfoList) { - if (!(this_present_connectionInfoList && that_present_connectionInfoList)) - return false; - if (!this.connectionInfoList.equals(that.connectionInfoList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetConnectionInfoList()) ? 131071 : 524287); - if (isSetConnectionInfoList()) - hashCode = hashCode * 8191 + connectionInfoList.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSConnectionInfoResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetConnectionInfoList(), other.isSetConnectionInfoList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetConnectionInfoList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.connectionInfoList, other.connectionInfoList); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSConnectionInfoResp("); - boolean first = true; - - sb.append("connectionInfoList:"); - if (this.connectionInfoList == null) { - sb.append("null"); - } else { - sb.append(this.connectionInfoList); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (connectionInfoList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'connectionInfoList' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class TSConnectionInfoRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSConnectionInfoRespStandardScheme getScheme() { - return new TSConnectionInfoRespStandardScheme(); - } - } - - private static class TSConnectionInfoRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSConnectionInfoResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // CONNECTION_INFO_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list750 = iprot.readListBegin(); - struct.connectionInfoList = new java.util.ArrayList(_list750.size); - @org.apache.thrift.annotation.Nullable TSConnectionInfo _elem751; - for (int _i752 = 0; _i752 < _list750.size; ++_i752) - { - _elem751 = new TSConnectionInfo(); - _elem751.read(iprot); - struct.connectionInfoList.add(_elem751); - } - iprot.readListEnd(); - } - struct.setConnectionInfoListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSConnectionInfoResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.connectionInfoList != null) { - oprot.writeFieldBegin(CONNECTION_INFO_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.connectionInfoList.size())); - for (TSConnectionInfo _iter753 : struct.connectionInfoList) - { - _iter753.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSConnectionInfoRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSConnectionInfoRespTupleScheme getScheme() { - return new TSConnectionInfoRespTupleScheme(); - } - } - - private static class TSConnectionInfoRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSConnectionInfoResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - oprot.writeI32(struct.connectionInfoList.size()); - for (TSConnectionInfo _iter754 : struct.connectionInfoList) - { - _iter754.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSConnectionInfoResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list755 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); - struct.connectionInfoList = new java.util.ArrayList(_list755.size); - @org.apache.thrift.annotation.Nullable TSConnectionInfo _elem756; - for (int _i757 = 0; _i757 < _list755.size; ++_i757) - { - _elem756 = new TSConnectionInfo(); - _elem756.read(iprot); - struct.connectionInfoList.add(_elem756); - } - } - struct.setConnectionInfoListIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java deleted file mode 100644 index eb4607a26472d..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSConnectionType.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - - -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public enum TSConnectionType implements org.apache.thrift.TEnum { - THRIFT_BASED(0), - MQTT_BASED(1), - INTERNAL(2), - REST_BASED(3); - - private final int value; - - private TSConnectionType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - @Override - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - @org.apache.thrift.annotation.Nullable - public static TSConnectionType findByValue(int value) { - switch (value) { - case 0: - return THRIFT_BASED; - case 1: - return MQTT_BASED; - case 2: - return INTERNAL; - case 3: - return REST_BASED; - default: - return null; - } - } -} diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateAlignedTimeseriesReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateAlignedTimeseriesReq.java deleted file mode 100644 index 2e7adff572358..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateAlignedTimeseriesReq.java +++ /dev/null @@ -1,1645 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSCreateAlignedTimeseriesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCreateAlignedTimeseriesReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField DATA_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTypes", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField ENCODINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("encodings", org.apache.thrift.protocol.TType.LIST, (short)5); - private static final org.apache.thrift.protocol.TField COMPRESSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("compressors", org.apache.thrift.protocol.TType.LIST, (short)6); - private static final org.apache.thrift.protocol.TField MEASUREMENT_ALIAS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementAlias", org.apache.thrift.protocol.TType.LIST, (short)7); - private static final org.apache.thrift.protocol.TField TAGS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("tagsList", org.apache.thrift.protocol.TType.LIST, (short)8); - private static final org.apache.thrift.protocol.TField ATTRIBUTES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("attributesList", org.apache.thrift.protocol.TType.LIST, (short)9); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCreateAlignedTimeseriesReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCreateAlignedTimeseriesReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required - public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required - public @org.apache.thrift.annotation.Nullable java.util.List dataTypes; // required - public @org.apache.thrift.annotation.Nullable java.util.List encodings; // required - public @org.apache.thrift.annotation.Nullable java.util.List compressors; // required - public @org.apache.thrift.annotation.Nullable java.util.List measurementAlias; // optional - public @org.apache.thrift.annotation.Nullable java.util.List> tagsList; // optional - public @org.apache.thrift.annotation.Nullable java.util.List> attributesList; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATH((short)2, "prefixPath"), - MEASUREMENTS((short)3, "measurements"), - DATA_TYPES((short)4, "dataTypes"), - ENCODINGS((short)5, "encodings"), - COMPRESSORS((short)6, "compressors"), - MEASUREMENT_ALIAS((short)7, "measurementAlias"), - TAGS_LIST((short)8, "tagsList"), - ATTRIBUTES_LIST((short)9, "attributesList"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATH - return PREFIX_PATH; - case 3: // MEASUREMENTS - return MEASUREMENTS; - case 4: // DATA_TYPES - return DATA_TYPES; - case 5: // ENCODINGS - return ENCODINGS; - case 6: // COMPRESSORS - return COMPRESSORS; - case 7: // MEASUREMENT_ALIAS - return MEASUREMENT_ALIAS; - case 8: // TAGS_LIST - return TAGS_LIST; - case 9: // ATTRIBUTES_LIST - return ATTRIBUTES_LIST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.MEASUREMENT_ALIAS,_Fields.TAGS_LIST,_Fields.ATTRIBUTES_LIST}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.DATA_TYPES, new org.apache.thrift.meta_data.FieldMetaData("dataTypes", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.ENCODINGS, new org.apache.thrift.meta_data.FieldMetaData("encodings", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.COMPRESSORS, new org.apache.thrift.meta_data.FieldMetaData("compressors", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.MEASUREMENT_ALIAS, new org.apache.thrift.meta_data.FieldMetaData("measurementAlias", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.TAGS_LIST, new org.apache.thrift.meta_data.FieldMetaData("tagsList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.ATTRIBUTES_LIST, new org.apache.thrift.meta_data.FieldMetaData("attributesList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCreateAlignedTimeseriesReq.class, metaDataMap); - } - - public TSCreateAlignedTimeseriesReq() { - } - - public TSCreateAlignedTimeseriesReq( - long sessionId, - java.lang.String prefixPath, - java.util.List measurements, - java.util.List dataTypes, - java.util.List encodings, - java.util.List compressors) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPath = prefixPath; - this.measurements = measurements; - this.dataTypes = dataTypes; - this.encodings = encodings; - this.compressors = compressors; - } - - /** - * Performs a deep copy on other. - */ - public TSCreateAlignedTimeseriesReq(TSCreateAlignedTimeseriesReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPath()) { - this.prefixPath = other.prefixPath; - } - if (other.isSetMeasurements()) { - java.util.List __this__measurements = new java.util.ArrayList(other.measurements); - this.measurements = __this__measurements; - } - if (other.isSetDataTypes()) { - java.util.List __this__dataTypes = new java.util.ArrayList(other.dataTypes); - this.dataTypes = __this__dataTypes; - } - if (other.isSetEncodings()) { - java.util.List __this__encodings = new java.util.ArrayList(other.encodings); - this.encodings = __this__encodings; - } - if (other.isSetCompressors()) { - java.util.List __this__compressors = new java.util.ArrayList(other.compressors); - this.compressors = __this__compressors; - } - if (other.isSetMeasurementAlias()) { - java.util.List __this__measurementAlias = new java.util.ArrayList(other.measurementAlias); - this.measurementAlias = __this__measurementAlias; - } - if (other.isSetTagsList()) { - java.util.List> __this__tagsList = new java.util.ArrayList>(other.tagsList.size()); - for (java.util.Map other_element : other.tagsList) { - java.util.Map __this__tagsList_copy = new java.util.HashMap(other_element); - __this__tagsList.add(__this__tagsList_copy); - } - this.tagsList = __this__tagsList; - } - if (other.isSetAttributesList()) { - java.util.List> __this__attributesList = new java.util.ArrayList>(other.attributesList.size()); - for (java.util.Map other_element : other.attributesList) { - java.util.Map __this__attributesList_copy = new java.util.HashMap(other_element); - __this__attributesList.add(__this__attributesList_copy); - } - this.attributesList = __this__attributesList; - } - } - - @Override - public TSCreateAlignedTimeseriesReq deepCopy() { - return new TSCreateAlignedTimeseriesReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPath = null; - this.measurements = null; - this.dataTypes = null; - this.encodings = null; - this.compressors = null; - this.measurementAlias = null; - this.tagsList = null; - this.attributesList = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSCreateAlignedTimeseriesReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPrefixPath() { - return this.prefixPath; - } - - public TSCreateAlignedTimeseriesReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { - this.prefixPath = prefixPath; - return this; - } - - public void unsetPrefixPath() { - this.prefixPath = null; - } - - /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPath() { - return this.prefixPath != null; - } - - public void setPrefixPathIsSet(boolean value) { - if (!value) { - this.prefixPath = null; - } - } - - public int getMeasurementsSize() { - return (this.measurements == null) ? 0 : this.measurements.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getMeasurementsIterator() { - return (this.measurements == null) ? null : this.measurements.iterator(); - } - - public void addToMeasurements(java.lang.String elem) { - if (this.measurements == null) { - this.measurements = new java.util.ArrayList(); - } - this.measurements.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getMeasurements() { - return this.measurements; - } - - public TSCreateAlignedTimeseriesReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { - this.measurements = measurements; - return this; - } - - public void unsetMeasurements() { - this.measurements = null; - } - - /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurements() { - return this.measurements != null; - } - - public void setMeasurementsIsSet(boolean value) { - if (!value) { - this.measurements = null; - } - } - - public int getDataTypesSize() { - return (this.dataTypes == null) ? 0 : this.dataTypes.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getDataTypesIterator() { - return (this.dataTypes == null) ? null : this.dataTypes.iterator(); - } - - public void addToDataTypes(int elem) { - if (this.dataTypes == null) { - this.dataTypes = new java.util.ArrayList(); - } - this.dataTypes.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getDataTypes() { - return this.dataTypes; - } - - public TSCreateAlignedTimeseriesReq setDataTypes(@org.apache.thrift.annotation.Nullable java.util.List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - public void unsetDataTypes() { - this.dataTypes = null; - } - - /** Returns true if field dataTypes is set (has been assigned a value) and false otherwise */ - public boolean isSetDataTypes() { - return this.dataTypes != null; - } - - public void setDataTypesIsSet(boolean value) { - if (!value) { - this.dataTypes = null; - } - } - - public int getEncodingsSize() { - return (this.encodings == null) ? 0 : this.encodings.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getEncodingsIterator() { - return (this.encodings == null) ? null : this.encodings.iterator(); - } - - public void addToEncodings(int elem) { - if (this.encodings == null) { - this.encodings = new java.util.ArrayList(); - } - this.encodings.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getEncodings() { - return this.encodings; - } - - public TSCreateAlignedTimeseriesReq setEncodings(@org.apache.thrift.annotation.Nullable java.util.List encodings) { - this.encodings = encodings; - return this; - } - - public void unsetEncodings() { - this.encodings = null; - } - - /** Returns true if field encodings is set (has been assigned a value) and false otherwise */ - public boolean isSetEncodings() { - return this.encodings != null; - } - - public void setEncodingsIsSet(boolean value) { - if (!value) { - this.encodings = null; - } - } - - public int getCompressorsSize() { - return (this.compressors == null) ? 0 : this.compressors.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getCompressorsIterator() { - return (this.compressors == null) ? null : this.compressors.iterator(); - } - - public void addToCompressors(int elem) { - if (this.compressors == null) { - this.compressors = new java.util.ArrayList(); - } - this.compressors.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getCompressors() { - return this.compressors; - } - - public TSCreateAlignedTimeseriesReq setCompressors(@org.apache.thrift.annotation.Nullable java.util.List compressors) { - this.compressors = compressors; - return this; - } - - public void unsetCompressors() { - this.compressors = null; - } - - /** Returns true if field compressors is set (has been assigned a value) and false otherwise */ - public boolean isSetCompressors() { - return this.compressors != null; - } - - public void setCompressorsIsSet(boolean value) { - if (!value) { - this.compressors = null; - } - } - - public int getMeasurementAliasSize() { - return (this.measurementAlias == null) ? 0 : this.measurementAlias.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getMeasurementAliasIterator() { - return (this.measurementAlias == null) ? null : this.measurementAlias.iterator(); - } - - public void addToMeasurementAlias(java.lang.String elem) { - if (this.measurementAlias == null) { - this.measurementAlias = new java.util.ArrayList(); - } - this.measurementAlias.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getMeasurementAlias() { - return this.measurementAlias; - } - - public TSCreateAlignedTimeseriesReq setMeasurementAlias(@org.apache.thrift.annotation.Nullable java.util.List measurementAlias) { - this.measurementAlias = measurementAlias; - return this; - } - - public void unsetMeasurementAlias() { - this.measurementAlias = null; - } - - /** Returns true if field measurementAlias is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurementAlias() { - return this.measurementAlias != null; - } - - public void setMeasurementAliasIsSet(boolean value) { - if (!value) { - this.measurementAlias = null; - } - } - - public int getTagsListSize() { - return (this.tagsList == null) ? 0 : this.tagsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getTagsListIterator() { - return (this.tagsList == null) ? null : this.tagsList.iterator(); - } - - public void addToTagsList(java.util.Map elem) { - if (this.tagsList == null) { - this.tagsList = new java.util.ArrayList>(); - } - this.tagsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getTagsList() { - return this.tagsList; - } - - public TSCreateAlignedTimeseriesReq setTagsList(@org.apache.thrift.annotation.Nullable java.util.List> tagsList) { - this.tagsList = tagsList; - return this; - } - - public void unsetTagsList() { - this.tagsList = null; - } - - /** Returns true if field tagsList is set (has been assigned a value) and false otherwise */ - public boolean isSetTagsList() { - return this.tagsList != null; - } - - public void setTagsListIsSet(boolean value) { - if (!value) { - this.tagsList = null; - } - } - - public int getAttributesListSize() { - return (this.attributesList == null) ? 0 : this.attributesList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getAttributesListIterator() { - return (this.attributesList == null) ? null : this.attributesList.iterator(); - } - - public void addToAttributesList(java.util.Map elem) { - if (this.attributesList == null) { - this.attributesList = new java.util.ArrayList>(); - } - this.attributesList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getAttributesList() { - return this.attributesList; - } - - public TSCreateAlignedTimeseriesReq setAttributesList(@org.apache.thrift.annotation.Nullable java.util.List> attributesList) { - this.attributesList = attributesList; - return this; - } - - public void unsetAttributesList() { - this.attributesList = null; - } - - /** Returns true if field attributesList is set (has been assigned a value) and false otherwise */ - public boolean isSetAttributesList() { - return this.attributesList != null; - } - - public void setAttributesListIsSet(boolean value) { - if (!value) { - this.attributesList = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATH: - if (value == null) { - unsetPrefixPath(); - } else { - setPrefixPath((java.lang.String)value); - } - break; - - case MEASUREMENTS: - if (value == null) { - unsetMeasurements(); - } else { - setMeasurements((java.util.List)value); - } - break; - - case DATA_TYPES: - if (value == null) { - unsetDataTypes(); - } else { - setDataTypes((java.util.List)value); - } - break; - - case ENCODINGS: - if (value == null) { - unsetEncodings(); - } else { - setEncodings((java.util.List)value); - } - break; - - case COMPRESSORS: - if (value == null) { - unsetCompressors(); - } else { - setCompressors((java.util.List)value); - } - break; - - case MEASUREMENT_ALIAS: - if (value == null) { - unsetMeasurementAlias(); - } else { - setMeasurementAlias((java.util.List)value); - } - break; - - case TAGS_LIST: - if (value == null) { - unsetTagsList(); - } else { - setTagsList((java.util.List>)value); - } - break; - - case ATTRIBUTES_LIST: - if (value == null) { - unsetAttributesList(); - } else { - setAttributesList((java.util.List>)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATH: - return getPrefixPath(); - - case MEASUREMENTS: - return getMeasurements(); - - case DATA_TYPES: - return getDataTypes(); - - case ENCODINGS: - return getEncodings(); - - case COMPRESSORS: - return getCompressors(); - - case MEASUREMENT_ALIAS: - return getMeasurementAlias(); - - case TAGS_LIST: - return getTagsList(); - - case ATTRIBUTES_LIST: - return getAttributesList(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATH: - return isSetPrefixPath(); - case MEASUREMENTS: - return isSetMeasurements(); - case DATA_TYPES: - return isSetDataTypes(); - case ENCODINGS: - return isSetEncodings(); - case COMPRESSORS: - return isSetCompressors(); - case MEASUREMENT_ALIAS: - return isSetMeasurementAlias(); - case TAGS_LIST: - return isSetTagsList(); - case ATTRIBUTES_LIST: - return isSetAttributesList(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSCreateAlignedTimeseriesReq) - return this.equals((TSCreateAlignedTimeseriesReq)that); - return false; - } - - public boolean equals(TSCreateAlignedTimeseriesReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPath = true && this.isSetPrefixPath(); - boolean that_present_prefixPath = true && that.isSetPrefixPath(); - if (this_present_prefixPath || that_present_prefixPath) { - if (!(this_present_prefixPath && that_present_prefixPath)) - return false; - if (!this.prefixPath.equals(that.prefixPath)) - return false; - } - - boolean this_present_measurements = true && this.isSetMeasurements(); - boolean that_present_measurements = true && that.isSetMeasurements(); - if (this_present_measurements || that_present_measurements) { - if (!(this_present_measurements && that_present_measurements)) - return false; - if (!this.measurements.equals(that.measurements)) - return false; - } - - boolean this_present_dataTypes = true && this.isSetDataTypes(); - boolean that_present_dataTypes = true && that.isSetDataTypes(); - if (this_present_dataTypes || that_present_dataTypes) { - if (!(this_present_dataTypes && that_present_dataTypes)) - return false; - if (!this.dataTypes.equals(that.dataTypes)) - return false; - } - - boolean this_present_encodings = true && this.isSetEncodings(); - boolean that_present_encodings = true && that.isSetEncodings(); - if (this_present_encodings || that_present_encodings) { - if (!(this_present_encodings && that_present_encodings)) - return false; - if (!this.encodings.equals(that.encodings)) - return false; - } - - boolean this_present_compressors = true && this.isSetCompressors(); - boolean that_present_compressors = true && that.isSetCompressors(); - if (this_present_compressors || that_present_compressors) { - if (!(this_present_compressors && that_present_compressors)) - return false; - if (!this.compressors.equals(that.compressors)) - return false; - } - - boolean this_present_measurementAlias = true && this.isSetMeasurementAlias(); - boolean that_present_measurementAlias = true && that.isSetMeasurementAlias(); - if (this_present_measurementAlias || that_present_measurementAlias) { - if (!(this_present_measurementAlias && that_present_measurementAlias)) - return false; - if (!this.measurementAlias.equals(that.measurementAlias)) - return false; - } - - boolean this_present_tagsList = true && this.isSetTagsList(); - boolean that_present_tagsList = true && that.isSetTagsList(); - if (this_present_tagsList || that_present_tagsList) { - if (!(this_present_tagsList && that_present_tagsList)) - return false; - if (!this.tagsList.equals(that.tagsList)) - return false; - } - - boolean this_present_attributesList = true && this.isSetAttributesList(); - boolean that_present_attributesList = true && that.isSetAttributesList(); - if (this_present_attributesList || that_present_attributesList) { - if (!(this_present_attributesList && that_present_attributesList)) - return false; - if (!this.attributesList.equals(that.attributesList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); - if (isSetPrefixPath()) - hashCode = hashCode * 8191 + prefixPath.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); - if (isSetMeasurements()) - hashCode = hashCode * 8191 + measurements.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataTypes()) ? 131071 : 524287); - if (isSetDataTypes()) - hashCode = hashCode * 8191 + dataTypes.hashCode(); - - hashCode = hashCode * 8191 + ((isSetEncodings()) ? 131071 : 524287); - if (isSetEncodings()) - hashCode = hashCode * 8191 + encodings.hashCode(); - - hashCode = hashCode * 8191 + ((isSetCompressors()) ? 131071 : 524287); - if (isSetCompressors()) - hashCode = hashCode * 8191 + compressors.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurementAlias()) ? 131071 : 524287); - if (isSetMeasurementAlias()) - hashCode = hashCode * 8191 + measurementAlias.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTagsList()) ? 131071 : 524287); - if (isSetTagsList()) - hashCode = hashCode * 8191 + tagsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetAttributesList()) ? 131071 : 524287); - if (isSetAttributesList()) - hashCode = hashCode * 8191 + attributesList.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSCreateAlignedTimeseriesReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurements()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDataTypes(), other.isSetDataTypes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataTypes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTypes, other.dataTypes); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEncodings(), other.isSetEncodings()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEncodings()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encodings, other.encodings); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCompressors(), other.isSetCompressors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompressors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressors, other.compressors); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurementAlias(), other.isSetMeasurementAlias()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurementAlias()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementAlias, other.measurementAlias); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTagsList(), other.isSetTagsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTagsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagsList, other.tagsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetAttributesList(), other.isSetAttributesList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAttributesList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributesList, other.attributesList); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCreateAlignedTimeseriesReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPath:"); - if (this.prefixPath == null) { - sb.append("null"); - } else { - sb.append(this.prefixPath); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurements:"); - if (this.measurements == null) { - sb.append("null"); - } else { - sb.append(this.measurements); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataTypes:"); - if (this.dataTypes == null) { - sb.append("null"); - } else { - sb.append(this.dataTypes); - } - first = false; - if (!first) sb.append(", "); - sb.append("encodings:"); - if (this.encodings == null) { - sb.append("null"); - } else { - sb.append(this.encodings); - } - first = false; - if (!first) sb.append(", "); - sb.append("compressors:"); - if (this.compressors == null) { - sb.append("null"); - } else { - sb.append(this.compressors); - } - first = false; - if (isSetMeasurementAlias()) { - if (!first) sb.append(", "); - sb.append("measurementAlias:"); - if (this.measurementAlias == null) { - sb.append("null"); - } else { - sb.append(this.measurementAlias); - } - first = false; - } - if (isSetTagsList()) { - if (!first) sb.append(", "); - sb.append("tagsList:"); - if (this.tagsList == null) { - sb.append("null"); - } else { - sb.append(this.tagsList); - } - first = false; - } - if (isSetAttributesList()) { - if (!first) sb.append(", "); - sb.append("attributesList:"); - if (this.attributesList == null) { - sb.append("null"); - } else { - sb.append(this.attributesList); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPath == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); - } - if (measurements == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); - } - if (dataTypes == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataTypes' was not present! Struct: " + toString()); - } - if (encodings == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'encodings' was not present! Struct: " + toString()); - } - if (compressors == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'compressors' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSCreateAlignedTimeseriesReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCreateAlignedTimeseriesReqStandardScheme getScheme() { - return new TSCreateAlignedTimeseriesReqStandardScheme(); - } - } - - private static class TSCreateAlignedTimeseriesReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSCreateAlignedTimeseriesReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MEASUREMENTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list476 = iprot.readListBegin(); - struct.measurements = new java.util.ArrayList(_list476.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem477; - for (int _i478 = 0; _i478 < _list476.size; ++_i478) - { - _elem477 = iprot.readString(); - struct.measurements.add(_elem477); - } - iprot.readListEnd(); - } - struct.setMeasurementsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DATA_TYPES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list479 = iprot.readListBegin(); - struct.dataTypes = new java.util.ArrayList(_list479.size); - int _elem480; - for (int _i481 = 0; _i481 < _list479.size; ++_i481) - { - _elem480 = iprot.readI32(); - struct.dataTypes.add(_elem480); - } - iprot.readListEnd(); - } - struct.setDataTypesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // ENCODINGS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list482 = iprot.readListBegin(); - struct.encodings = new java.util.ArrayList(_list482.size); - int _elem483; - for (int _i484 = 0; _i484 < _list482.size; ++_i484) - { - _elem483 = iprot.readI32(); - struct.encodings.add(_elem483); - } - iprot.readListEnd(); - } - struct.setEncodingsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // COMPRESSORS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list485 = iprot.readListBegin(); - struct.compressors = new java.util.ArrayList(_list485.size); - int _elem486; - for (int _i487 = 0; _i487 < _list485.size; ++_i487) - { - _elem486 = iprot.readI32(); - struct.compressors.add(_elem486); - } - iprot.readListEnd(); - } - struct.setCompressorsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // MEASUREMENT_ALIAS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list488 = iprot.readListBegin(); - struct.measurementAlias = new java.util.ArrayList(_list488.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem489; - for (int _i490 = 0; _i490 < _list488.size; ++_i490) - { - _elem489 = iprot.readString(); - struct.measurementAlias.add(_elem489); - } - iprot.readListEnd(); - } - struct.setMeasurementAliasIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // TAGS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list491 = iprot.readListBegin(); - struct.tagsList = new java.util.ArrayList>(_list491.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem492; - for (int _i493 = 0; _i493 < _list491.size; ++_i493) - { - { - org.apache.thrift.protocol.TMap _map494 = iprot.readMapBegin(); - _elem492 = new java.util.HashMap(2*_map494.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key495; - @org.apache.thrift.annotation.Nullable java.lang.String _val496; - for (int _i497 = 0; _i497 < _map494.size; ++_i497) - { - _key495 = iprot.readString(); - _val496 = iprot.readString(); - _elem492.put(_key495, _val496); - } - iprot.readMapEnd(); - } - struct.tagsList.add(_elem492); - } - iprot.readListEnd(); - } - struct.setTagsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // ATTRIBUTES_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list498 = iprot.readListBegin(); - struct.attributesList = new java.util.ArrayList>(_list498.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem499; - for (int _i500 = 0; _i500 < _list498.size; ++_i500) - { - { - org.apache.thrift.protocol.TMap _map501 = iprot.readMapBegin(); - _elem499 = new java.util.HashMap(2*_map501.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key502; - @org.apache.thrift.annotation.Nullable java.lang.String _val503; - for (int _i504 = 0; _i504 < _map501.size; ++_i504) - { - _key502 = iprot.readString(); - _val503 = iprot.readString(); - _elem499.put(_key502, _val503); - } - iprot.readMapEnd(); - } - struct.attributesList.add(_elem499); - } - iprot.readListEnd(); - } - struct.setAttributesListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSCreateAlignedTimeseriesReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPath != null) { - oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); - oprot.writeString(struct.prefixPath); - oprot.writeFieldEnd(); - } - if (struct.measurements != null) { - oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); - for (java.lang.String _iter505 : struct.measurements) - { - oprot.writeString(_iter505); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.dataTypes != null) { - oprot.writeFieldBegin(DATA_TYPES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dataTypes.size())); - for (int _iter506 : struct.dataTypes) - { - oprot.writeI32(_iter506); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.encodings != null) { - oprot.writeFieldBegin(ENCODINGS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.encodings.size())); - for (int _iter507 : struct.encodings) - { - oprot.writeI32(_iter507); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.compressors != null) { - oprot.writeFieldBegin(COMPRESSORS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.compressors.size())); - for (int _iter508 : struct.compressors) - { - oprot.writeI32(_iter508); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.measurementAlias != null) { - if (struct.isSetMeasurementAlias()) { - oprot.writeFieldBegin(MEASUREMENT_ALIAS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurementAlias.size())); - for (java.lang.String _iter509 : struct.measurementAlias) - { - oprot.writeString(_iter509); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.tagsList != null) { - if (struct.isSetTagsList()) { - oprot.writeFieldBegin(TAGS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.tagsList.size())); - for (java.util.Map _iter510 : struct.tagsList) - { - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter510.size())); - for (java.util.Map.Entry _iter511 : _iter510.entrySet()) - { - oprot.writeString(_iter511.getKey()); - oprot.writeString(_iter511.getValue()); - } - oprot.writeMapEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.attributesList != null) { - if (struct.isSetAttributesList()) { - oprot.writeFieldBegin(ATTRIBUTES_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.attributesList.size())); - for (java.util.Map _iter512 : struct.attributesList) - { - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter512.size())); - for (java.util.Map.Entry _iter513 : _iter512.entrySet()) - { - oprot.writeString(_iter513.getKey()); - oprot.writeString(_iter513.getValue()); - } - oprot.writeMapEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSCreateAlignedTimeseriesReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCreateAlignedTimeseriesReqTupleScheme getScheme() { - return new TSCreateAlignedTimeseriesReqTupleScheme(); - } - } - - private static class TSCreateAlignedTimeseriesReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSCreateAlignedTimeseriesReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.prefixPath); - { - oprot.writeI32(struct.measurements.size()); - for (java.lang.String _iter514 : struct.measurements) - { - oprot.writeString(_iter514); - } - } - { - oprot.writeI32(struct.dataTypes.size()); - for (int _iter515 : struct.dataTypes) - { - oprot.writeI32(_iter515); - } - } - { - oprot.writeI32(struct.encodings.size()); - for (int _iter516 : struct.encodings) - { - oprot.writeI32(_iter516); - } - } - { - oprot.writeI32(struct.compressors.size()); - for (int _iter517 : struct.compressors) - { - oprot.writeI32(_iter517); - } - } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetMeasurementAlias()) { - optionals.set(0); - } - if (struct.isSetTagsList()) { - optionals.set(1); - } - if (struct.isSetAttributesList()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetMeasurementAlias()) { - { - oprot.writeI32(struct.measurementAlias.size()); - for (java.lang.String _iter518 : struct.measurementAlias) - { - oprot.writeString(_iter518); - } - } - } - if (struct.isSetTagsList()) { - { - oprot.writeI32(struct.tagsList.size()); - for (java.util.Map _iter519 : struct.tagsList) - { - { - oprot.writeI32(_iter519.size()); - for (java.util.Map.Entry _iter520 : _iter519.entrySet()) - { - oprot.writeString(_iter520.getKey()); - oprot.writeString(_iter520.getValue()); - } - } - } - } - } - if (struct.isSetAttributesList()) { - { - oprot.writeI32(struct.attributesList.size()); - for (java.util.Map _iter521 : struct.attributesList) - { - { - oprot.writeI32(_iter521.size()); - for (java.util.Map.Entry _iter522 : _iter521.entrySet()) - { - oprot.writeString(_iter522.getKey()); - oprot.writeString(_iter522.getValue()); - } - } - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSCreateAlignedTimeseriesReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - { - org.apache.thrift.protocol.TList _list523 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.measurements = new java.util.ArrayList(_list523.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem524; - for (int _i525 = 0; _i525 < _list523.size; ++_i525) - { - _elem524 = iprot.readString(); - struct.measurements.add(_elem524); - } - } - struct.setMeasurementsIsSet(true); - { - org.apache.thrift.protocol.TList _list526 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.dataTypes = new java.util.ArrayList(_list526.size); - int _elem527; - for (int _i528 = 0; _i528 < _list526.size; ++_i528) - { - _elem527 = iprot.readI32(); - struct.dataTypes.add(_elem527); - } - } - struct.setDataTypesIsSet(true); - { - org.apache.thrift.protocol.TList _list529 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.encodings = new java.util.ArrayList(_list529.size); - int _elem530; - for (int _i531 = 0; _i531 < _list529.size; ++_i531) - { - _elem530 = iprot.readI32(); - struct.encodings.add(_elem530); - } - } - struct.setEncodingsIsSet(true); - { - org.apache.thrift.protocol.TList _list532 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.compressors = new java.util.ArrayList(_list532.size); - int _elem533; - for (int _i534 = 0; _i534 < _list532.size; ++_i534) - { - _elem533 = iprot.readI32(); - struct.compressors.add(_elem533); - } - } - struct.setCompressorsIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list535 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.measurementAlias = new java.util.ArrayList(_list535.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem536; - for (int _i537 = 0; _i537 < _list535.size; ++_i537) - { - _elem536 = iprot.readString(); - struct.measurementAlias.add(_elem536); - } - } - struct.setMeasurementAliasIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list538 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); - struct.tagsList = new java.util.ArrayList>(_list538.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem539; - for (int _i540 = 0; _i540 < _list538.size; ++_i540) - { - { - org.apache.thrift.protocol.TMap _map541 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - _elem539 = new java.util.HashMap(2*_map541.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key542; - @org.apache.thrift.annotation.Nullable java.lang.String _val543; - for (int _i544 = 0; _i544 < _map541.size; ++_i544) - { - _key542 = iprot.readString(); - _val543 = iprot.readString(); - _elem539.put(_key542, _val543); - } - } - struct.tagsList.add(_elem539); - } - } - struct.setTagsListIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list545 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); - struct.attributesList = new java.util.ArrayList>(_list545.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem546; - for (int _i547 = 0; _i547 < _list545.size; ++_i547) - { - { - org.apache.thrift.protocol.TMap _map548 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - _elem546 = new java.util.HashMap(2*_map548.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key549; - @org.apache.thrift.annotation.Nullable java.lang.String _val550; - for (int _i551 = 0; _i551 < _map548.size; ++_i551) - { - _key549 = iprot.readString(); - _val550 = iprot.readString(); - _elem546.put(_key549, _val550); - } - } - struct.attributesList.add(_elem546); - } - } - struct.setAttributesListIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateMultiTimeseriesReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateMultiTimeseriesReq.java deleted file mode 100644 index c902d803b87c4..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateMultiTimeseriesReq.java +++ /dev/null @@ -1,1745 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSCreateMultiTimeseriesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCreateMultiTimeseriesReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField DATA_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTypes", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField ENCODINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("encodings", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField COMPRESSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("compressors", org.apache.thrift.protocol.TType.LIST, (short)5); - private static final org.apache.thrift.protocol.TField PROPS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("propsList", org.apache.thrift.protocol.TType.LIST, (short)6); - private static final org.apache.thrift.protocol.TField TAGS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("tagsList", org.apache.thrift.protocol.TType.LIST, (short)7); - private static final org.apache.thrift.protocol.TField ATTRIBUTES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("attributesList", org.apache.thrift.protocol.TType.LIST, (short)8); - private static final org.apache.thrift.protocol.TField MEASUREMENT_ALIAS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementAliasList", org.apache.thrift.protocol.TType.LIST, (short)9); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCreateMultiTimeseriesReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCreateMultiTimeseriesReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List paths; // required - public @org.apache.thrift.annotation.Nullable java.util.List dataTypes; // required - public @org.apache.thrift.annotation.Nullable java.util.List encodings; // required - public @org.apache.thrift.annotation.Nullable java.util.List compressors; // required - public @org.apache.thrift.annotation.Nullable java.util.List> propsList; // optional - public @org.apache.thrift.annotation.Nullable java.util.List> tagsList; // optional - public @org.apache.thrift.annotation.Nullable java.util.List> attributesList; // optional - public @org.apache.thrift.annotation.Nullable java.util.List measurementAliasList; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PATHS((short)2, "paths"), - DATA_TYPES((short)3, "dataTypes"), - ENCODINGS((short)4, "encodings"), - COMPRESSORS((short)5, "compressors"), - PROPS_LIST((short)6, "propsList"), - TAGS_LIST((short)7, "tagsList"), - ATTRIBUTES_LIST((short)8, "attributesList"), - MEASUREMENT_ALIAS_LIST((short)9, "measurementAliasList"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PATHS - return PATHS; - case 3: // DATA_TYPES - return DATA_TYPES; - case 4: // ENCODINGS - return ENCODINGS; - case 5: // COMPRESSORS - return COMPRESSORS; - case 6: // PROPS_LIST - return PROPS_LIST; - case 7: // TAGS_LIST - return TAGS_LIST; - case 8: // ATTRIBUTES_LIST - return ATTRIBUTES_LIST; - case 9: // MEASUREMENT_ALIAS_LIST - return MEASUREMENT_ALIAS_LIST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PROPS_LIST,_Fields.TAGS_LIST,_Fields.ATTRIBUTES_LIST,_Fields.MEASUREMENT_ALIAS_LIST}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.DATA_TYPES, new org.apache.thrift.meta_data.FieldMetaData("dataTypes", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.ENCODINGS, new org.apache.thrift.meta_data.FieldMetaData("encodings", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.COMPRESSORS, new org.apache.thrift.meta_data.FieldMetaData("compressors", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.PROPS_LIST, new org.apache.thrift.meta_data.FieldMetaData("propsList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.TAGS_LIST, new org.apache.thrift.meta_data.FieldMetaData("tagsList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.ATTRIBUTES_LIST, new org.apache.thrift.meta_data.FieldMetaData("attributesList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.MEASUREMENT_ALIAS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementAliasList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCreateMultiTimeseriesReq.class, metaDataMap); - } - - public TSCreateMultiTimeseriesReq() { - } - - public TSCreateMultiTimeseriesReq( - long sessionId, - java.util.List paths, - java.util.List dataTypes, - java.util.List encodings, - java.util.List compressors) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.paths = paths; - this.dataTypes = dataTypes; - this.encodings = encodings; - this.compressors = compressors; - } - - /** - * Performs a deep copy on other. - */ - public TSCreateMultiTimeseriesReq(TSCreateMultiTimeseriesReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPaths()) { - java.util.List __this__paths = new java.util.ArrayList(other.paths); - this.paths = __this__paths; - } - if (other.isSetDataTypes()) { - java.util.List __this__dataTypes = new java.util.ArrayList(other.dataTypes); - this.dataTypes = __this__dataTypes; - } - if (other.isSetEncodings()) { - java.util.List __this__encodings = new java.util.ArrayList(other.encodings); - this.encodings = __this__encodings; - } - if (other.isSetCompressors()) { - java.util.List __this__compressors = new java.util.ArrayList(other.compressors); - this.compressors = __this__compressors; - } - if (other.isSetPropsList()) { - java.util.List> __this__propsList = new java.util.ArrayList>(other.propsList.size()); - for (java.util.Map other_element : other.propsList) { - java.util.Map __this__propsList_copy = new java.util.HashMap(other_element); - __this__propsList.add(__this__propsList_copy); - } - this.propsList = __this__propsList; - } - if (other.isSetTagsList()) { - java.util.List> __this__tagsList = new java.util.ArrayList>(other.tagsList.size()); - for (java.util.Map other_element : other.tagsList) { - java.util.Map __this__tagsList_copy = new java.util.HashMap(other_element); - __this__tagsList.add(__this__tagsList_copy); - } - this.tagsList = __this__tagsList; - } - if (other.isSetAttributesList()) { - java.util.List> __this__attributesList = new java.util.ArrayList>(other.attributesList.size()); - for (java.util.Map other_element : other.attributesList) { - java.util.Map __this__attributesList_copy = new java.util.HashMap(other_element); - __this__attributesList.add(__this__attributesList_copy); - } - this.attributesList = __this__attributesList; - } - if (other.isSetMeasurementAliasList()) { - java.util.List __this__measurementAliasList = new java.util.ArrayList(other.measurementAliasList); - this.measurementAliasList = __this__measurementAliasList; - } - } - - @Override - public TSCreateMultiTimeseriesReq deepCopy() { - return new TSCreateMultiTimeseriesReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.paths = null; - this.dataTypes = null; - this.encodings = null; - this.compressors = null; - this.propsList = null; - this.tagsList = null; - this.attributesList = null; - this.measurementAliasList = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSCreateMultiTimeseriesReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getPathsSize() { - return (this.paths == null) ? 0 : this.paths.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getPathsIterator() { - return (this.paths == null) ? null : this.paths.iterator(); - } - - public void addToPaths(java.lang.String elem) { - if (this.paths == null) { - this.paths = new java.util.ArrayList(); - } - this.paths.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getPaths() { - return this.paths; - } - - public TSCreateMultiTimeseriesReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { - this.paths = paths; - return this; - } - - public void unsetPaths() { - this.paths = null; - } - - /** Returns true if field paths is set (has been assigned a value) and false otherwise */ - public boolean isSetPaths() { - return this.paths != null; - } - - public void setPathsIsSet(boolean value) { - if (!value) { - this.paths = null; - } - } - - public int getDataTypesSize() { - return (this.dataTypes == null) ? 0 : this.dataTypes.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getDataTypesIterator() { - return (this.dataTypes == null) ? null : this.dataTypes.iterator(); - } - - public void addToDataTypes(int elem) { - if (this.dataTypes == null) { - this.dataTypes = new java.util.ArrayList(); - } - this.dataTypes.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getDataTypes() { - return this.dataTypes; - } - - public TSCreateMultiTimeseriesReq setDataTypes(@org.apache.thrift.annotation.Nullable java.util.List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - public void unsetDataTypes() { - this.dataTypes = null; - } - - /** Returns true if field dataTypes is set (has been assigned a value) and false otherwise */ - public boolean isSetDataTypes() { - return this.dataTypes != null; - } - - public void setDataTypesIsSet(boolean value) { - if (!value) { - this.dataTypes = null; - } - } - - public int getEncodingsSize() { - return (this.encodings == null) ? 0 : this.encodings.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getEncodingsIterator() { - return (this.encodings == null) ? null : this.encodings.iterator(); - } - - public void addToEncodings(int elem) { - if (this.encodings == null) { - this.encodings = new java.util.ArrayList(); - } - this.encodings.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getEncodings() { - return this.encodings; - } - - public TSCreateMultiTimeseriesReq setEncodings(@org.apache.thrift.annotation.Nullable java.util.List encodings) { - this.encodings = encodings; - return this; - } - - public void unsetEncodings() { - this.encodings = null; - } - - /** Returns true if field encodings is set (has been assigned a value) and false otherwise */ - public boolean isSetEncodings() { - return this.encodings != null; - } - - public void setEncodingsIsSet(boolean value) { - if (!value) { - this.encodings = null; - } - } - - public int getCompressorsSize() { - return (this.compressors == null) ? 0 : this.compressors.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getCompressorsIterator() { - return (this.compressors == null) ? null : this.compressors.iterator(); - } - - public void addToCompressors(int elem) { - if (this.compressors == null) { - this.compressors = new java.util.ArrayList(); - } - this.compressors.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getCompressors() { - return this.compressors; - } - - public TSCreateMultiTimeseriesReq setCompressors(@org.apache.thrift.annotation.Nullable java.util.List compressors) { - this.compressors = compressors; - return this; - } - - public void unsetCompressors() { - this.compressors = null; - } - - /** Returns true if field compressors is set (has been assigned a value) and false otherwise */ - public boolean isSetCompressors() { - return this.compressors != null; - } - - public void setCompressorsIsSet(boolean value) { - if (!value) { - this.compressors = null; - } - } - - public int getPropsListSize() { - return (this.propsList == null) ? 0 : this.propsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getPropsListIterator() { - return (this.propsList == null) ? null : this.propsList.iterator(); - } - - public void addToPropsList(java.util.Map elem) { - if (this.propsList == null) { - this.propsList = new java.util.ArrayList>(); - } - this.propsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getPropsList() { - return this.propsList; - } - - public TSCreateMultiTimeseriesReq setPropsList(@org.apache.thrift.annotation.Nullable java.util.List> propsList) { - this.propsList = propsList; - return this; - } - - public void unsetPropsList() { - this.propsList = null; - } - - /** Returns true if field propsList is set (has been assigned a value) and false otherwise */ - public boolean isSetPropsList() { - return this.propsList != null; - } - - public void setPropsListIsSet(boolean value) { - if (!value) { - this.propsList = null; - } - } - - public int getTagsListSize() { - return (this.tagsList == null) ? 0 : this.tagsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getTagsListIterator() { - return (this.tagsList == null) ? null : this.tagsList.iterator(); - } - - public void addToTagsList(java.util.Map elem) { - if (this.tagsList == null) { - this.tagsList = new java.util.ArrayList>(); - } - this.tagsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getTagsList() { - return this.tagsList; - } - - public TSCreateMultiTimeseriesReq setTagsList(@org.apache.thrift.annotation.Nullable java.util.List> tagsList) { - this.tagsList = tagsList; - return this; - } - - public void unsetTagsList() { - this.tagsList = null; - } - - /** Returns true if field tagsList is set (has been assigned a value) and false otherwise */ - public boolean isSetTagsList() { - return this.tagsList != null; - } - - public void setTagsListIsSet(boolean value) { - if (!value) { - this.tagsList = null; - } - } - - public int getAttributesListSize() { - return (this.attributesList == null) ? 0 : this.attributesList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getAttributesListIterator() { - return (this.attributesList == null) ? null : this.attributesList.iterator(); - } - - public void addToAttributesList(java.util.Map elem) { - if (this.attributesList == null) { - this.attributesList = new java.util.ArrayList>(); - } - this.attributesList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getAttributesList() { - return this.attributesList; - } - - public TSCreateMultiTimeseriesReq setAttributesList(@org.apache.thrift.annotation.Nullable java.util.List> attributesList) { - this.attributesList = attributesList; - return this; - } - - public void unsetAttributesList() { - this.attributesList = null; - } - - /** Returns true if field attributesList is set (has been assigned a value) and false otherwise */ - public boolean isSetAttributesList() { - return this.attributesList != null; - } - - public void setAttributesListIsSet(boolean value) { - if (!value) { - this.attributesList = null; - } - } - - public int getMeasurementAliasListSize() { - return (this.measurementAliasList == null) ? 0 : this.measurementAliasList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getMeasurementAliasListIterator() { - return (this.measurementAliasList == null) ? null : this.measurementAliasList.iterator(); - } - - public void addToMeasurementAliasList(java.lang.String elem) { - if (this.measurementAliasList == null) { - this.measurementAliasList = new java.util.ArrayList(); - } - this.measurementAliasList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getMeasurementAliasList() { - return this.measurementAliasList; - } - - public TSCreateMultiTimeseriesReq setMeasurementAliasList(@org.apache.thrift.annotation.Nullable java.util.List measurementAliasList) { - this.measurementAliasList = measurementAliasList; - return this; - } - - public void unsetMeasurementAliasList() { - this.measurementAliasList = null; - } - - /** Returns true if field measurementAliasList is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurementAliasList() { - return this.measurementAliasList != null; - } - - public void setMeasurementAliasListIsSet(boolean value) { - if (!value) { - this.measurementAliasList = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PATHS: - if (value == null) { - unsetPaths(); - } else { - setPaths((java.util.List)value); - } - break; - - case DATA_TYPES: - if (value == null) { - unsetDataTypes(); - } else { - setDataTypes((java.util.List)value); - } - break; - - case ENCODINGS: - if (value == null) { - unsetEncodings(); - } else { - setEncodings((java.util.List)value); - } - break; - - case COMPRESSORS: - if (value == null) { - unsetCompressors(); - } else { - setCompressors((java.util.List)value); - } - break; - - case PROPS_LIST: - if (value == null) { - unsetPropsList(); - } else { - setPropsList((java.util.List>)value); - } - break; - - case TAGS_LIST: - if (value == null) { - unsetTagsList(); - } else { - setTagsList((java.util.List>)value); - } - break; - - case ATTRIBUTES_LIST: - if (value == null) { - unsetAttributesList(); - } else { - setAttributesList((java.util.List>)value); - } - break; - - case MEASUREMENT_ALIAS_LIST: - if (value == null) { - unsetMeasurementAliasList(); - } else { - setMeasurementAliasList((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PATHS: - return getPaths(); - - case DATA_TYPES: - return getDataTypes(); - - case ENCODINGS: - return getEncodings(); - - case COMPRESSORS: - return getCompressors(); - - case PROPS_LIST: - return getPropsList(); - - case TAGS_LIST: - return getTagsList(); - - case ATTRIBUTES_LIST: - return getAttributesList(); - - case MEASUREMENT_ALIAS_LIST: - return getMeasurementAliasList(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PATHS: - return isSetPaths(); - case DATA_TYPES: - return isSetDataTypes(); - case ENCODINGS: - return isSetEncodings(); - case COMPRESSORS: - return isSetCompressors(); - case PROPS_LIST: - return isSetPropsList(); - case TAGS_LIST: - return isSetTagsList(); - case ATTRIBUTES_LIST: - return isSetAttributesList(); - case MEASUREMENT_ALIAS_LIST: - return isSetMeasurementAliasList(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSCreateMultiTimeseriesReq) - return this.equals((TSCreateMultiTimeseriesReq)that); - return false; - } - - public boolean equals(TSCreateMultiTimeseriesReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_paths = true && this.isSetPaths(); - boolean that_present_paths = true && that.isSetPaths(); - if (this_present_paths || that_present_paths) { - if (!(this_present_paths && that_present_paths)) - return false; - if (!this.paths.equals(that.paths)) - return false; - } - - boolean this_present_dataTypes = true && this.isSetDataTypes(); - boolean that_present_dataTypes = true && that.isSetDataTypes(); - if (this_present_dataTypes || that_present_dataTypes) { - if (!(this_present_dataTypes && that_present_dataTypes)) - return false; - if (!this.dataTypes.equals(that.dataTypes)) - return false; - } - - boolean this_present_encodings = true && this.isSetEncodings(); - boolean that_present_encodings = true && that.isSetEncodings(); - if (this_present_encodings || that_present_encodings) { - if (!(this_present_encodings && that_present_encodings)) - return false; - if (!this.encodings.equals(that.encodings)) - return false; - } - - boolean this_present_compressors = true && this.isSetCompressors(); - boolean that_present_compressors = true && that.isSetCompressors(); - if (this_present_compressors || that_present_compressors) { - if (!(this_present_compressors && that_present_compressors)) - return false; - if (!this.compressors.equals(that.compressors)) - return false; - } - - boolean this_present_propsList = true && this.isSetPropsList(); - boolean that_present_propsList = true && that.isSetPropsList(); - if (this_present_propsList || that_present_propsList) { - if (!(this_present_propsList && that_present_propsList)) - return false; - if (!this.propsList.equals(that.propsList)) - return false; - } - - boolean this_present_tagsList = true && this.isSetTagsList(); - boolean that_present_tagsList = true && that.isSetTagsList(); - if (this_present_tagsList || that_present_tagsList) { - if (!(this_present_tagsList && that_present_tagsList)) - return false; - if (!this.tagsList.equals(that.tagsList)) - return false; - } - - boolean this_present_attributesList = true && this.isSetAttributesList(); - boolean that_present_attributesList = true && that.isSetAttributesList(); - if (this_present_attributesList || that_present_attributesList) { - if (!(this_present_attributesList && that_present_attributesList)) - return false; - if (!this.attributesList.equals(that.attributesList)) - return false; - } - - boolean this_present_measurementAliasList = true && this.isSetMeasurementAliasList(); - boolean that_present_measurementAliasList = true && that.isSetMeasurementAliasList(); - if (this_present_measurementAliasList || that_present_measurementAliasList) { - if (!(this_present_measurementAliasList && that_present_measurementAliasList)) - return false; - if (!this.measurementAliasList.equals(that.measurementAliasList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); - if (isSetPaths()) - hashCode = hashCode * 8191 + paths.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataTypes()) ? 131071 : 524287); - if (isSetDataTypes()) - hashCode = hashCode * 8191 + dataTypes.hashCode(); - - hashCode = hashCode * 8191 + ((isSetEncodings()) ? 131071 : 524287); - if (isSetEncodings()) - hashCode = hashCode * 8191 + encodings.hashCode(); - - hashCode = hashCode * 8191 + ((isSetCompressors()) ? 131071 : 524287); - if (isSetCompressors()) - hashCode = hashCode * 8191 + compressors.hashCode(); - - hashCode = hashCode * 8191 + ((isSetPropsList()) ? 131071 : 524287); - if (isSetPropsList()) - hashCode = hashCode * 8191 + propsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTagsList()) ? 131071 : 524287); - if (isSetTagsList()) - hashCode = hashCode * 8191 + tagsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetAttributesList()) ? 131071 : 524287); - if (isSetAttributesList()) - hashCode = hashCode * 8191 + attributesList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurementAliasList()) ? 131071 : 524287); - if (isSetMeasurementAliasList()) - hashCode = hashCode * 8191 + measurementAliasList.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSCreateMultiTimeseriesReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPaths()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDataTypes(), other.isSetDataTypes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataTypes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTypes, other.dataTypes); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEncodings(), other.isSetEncodings()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEncodings()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encodings, other.encodings); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCompressors(), other.isSetCompressors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompressors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressors, other.compressors); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPropsList(), other.isSetPropsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPropsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propsList, other.propsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTagsList(), other.isSetTagsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTagsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagsList, other.tagsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetAttributesList(), other.isSetAttributesList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAttributesList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributesList, other.attributesList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurementAliasList(), other.isSetMeasurementAliasList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurementAliasList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementAliasList, other.measurementAliasList); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCreateMultiTimeseriesReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("paths:"); - if (this.paths == null) { - sb.append("null"); - } else { - sb.append(this.paths); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataTypes:"); - if (this.dataTypes == null) { - sb.append("null"); - } else { - sb.append(this.dataTypes); - } - first = false; - if (!first) sb.append(", "); - sb.append("encodings:"); - if (this.encodings == null) { - sb.append("null"); - } else { - sb.append(this.encodings); - } - first = false; - if (!first) sb.append(", "); - sb.append("compressors:"); - if (this.compressors == null) { - sb.append("null"); - } else { - sb.append(this.compressors); - } - first = false; - if (isSetPropsList()) { - if (!first) sb.append(", "); - sb.append("propsList:"); - if (this.propsList == null) { - sb.append("null"); - } else { - sb.append(this.propsList); - } - first = false; - } - if (isSetTagsList()) { - if (!first) sb.append(", "); - sb.append("tagsList:"); - if (this.tagsList == null) { - sb.append("null"); - } else { - sb.append(this.tagsList); - } - first = false; - } - if (isSetAttributesList()) { - if (!first) sb.append(", "); - sb.append("attributesList:"); - if (this.attributesList == null) { - sb.append("null"); - } else { - sb.append(this.attributesList); - } - first = false; - } - if (isSetMeasurementAliasList()) { - if (!first) sb.append(", "); - sb.append("measurementAliasList:"); - if (this.measurementAliasList == null) { - sb.append("null"); - } else { - sb.append(this.measurementAliasList); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (paths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); - } - if (dataTypes == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataTypes' was not present! Struct: " + toString()); - } - if (encodings == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'encodings' was not present! Struct: " + toString()); - } - if (compressors == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'compressors' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSCreateMultiTimeseriesReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCreateMultiTimeseriesReqStandardScheme getScheme() { - return new TSCreateMultiTimeseriesReqStandardScheme(); - } - } - - private static class TSCreateMultiTimeseriesReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSCreateMultiTimeseriesReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATHS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list592 = iprot.readListBegin(); - struct.paths = new java.util.ArrayList(_list592.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem593; - for (int _i594 = 0; _i594 < _list592.size; ++_i594) - { - _elem593 = iprot.readString(); - struct.paths.add(_elem593); - } - iprot.readListEnd(); - } - struct.setPathsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DATA_TYPES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list595 = iprot.readListBegin(); - struct.dataTypes = new java.util.ArrayList(_list595.size); - int _elem596; - for (int _i597 = 0; _i597 < _list595.size; ++_i597) - { - _elem596 = iprot.readI32(); - struct.dataTypes.add(_elem596); - } - iprot.readListEnd(); - } - struct.setDataTypesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // ENCODINGS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list598 = iprot.readListBegin(); - struct.encodings = new java.util.ArrayList(_list598.size); - int _elem599; - for (int _i600 = 0; _i600 < _list598.size; ++_i600) - { - _elem599 = iprot.readI32(); - struct.encodings.add(_elem599); - } - iprot.readListEnd(); - } - struct.setEncodingsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // COMPRESSORS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list601 = iprot.readListBegin(); - struct.compressors = new java.util.ArrayList(_list601.size); - int _elem602; - for (int _i603 = 0; _i603 < _list601.size; ++_i603) - { - _elem602 = iprot.readI32(); - struct.compressors.add(_elem602); - } - iprot.readListEnd(); - } - struct.setCompressorsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // PROPS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list604 = iprot.readListBegin(); - struct.propsList = new java.util.ArrayList>(_list604.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem605; - for (int _i606 = 0; _i606 < _list604.size; ++_i606) - { - { - org.apache.thrift.protocol.TMap _map607 = iprot.readMapBegin(); - _elem605 = new java.util.HashMap(2*_map607.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key608; - @org.apache.thrift.annotation.Nullable java.lang.String _val609; - for (int _i610 = 0; _i610 < _map607.size; ++_i610) - { - _key608 = iprot.readString(); - _val609 = iprot.readString(); - _elem605.put(_key608, _val609); - } - iprot.readMapEnd(); - } - struct.propsList.add(_elem605); - } - iprot.readListEnd(); - } - struct.setPropsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // TAGS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list611 = iprot.readListBegin(); - struct.tagsList = new java.util.ArrayList>(_list611.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem612; - for (int _i613 = 0; _i613 < _list611.size; ++_i613) - { - { - org.apache.thrift.protocol.TMap _map614 = iprot.readMapBegin(); - _elem612 = new java.util.HashMap(2*_map614.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key615; - @org.apache.thrift.annotation.Nullable java.lang.String _val616; - for (int _i617 = 0; _i617 < _map614.size; ++_i617) - { - _key615 = iprot.readString(); - _val616 = iprot.readString(); - _elem612.put(_key615, _val616); - } - iprot.readMapEnd(); - } - struct.tagsList.add(_elem612); - } - iprot.readListEnd(); - } - struct.setTagsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // ATTRIBUTES_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list618 = iprot.readListBegin(); - struct.attributesList = new java.util.ArrayList>(_list618.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem619; - for (int _i620 = 0; _i620 < _list618.size; ++_i620) - { - { - org.apache.thrift.protocol.TMap _map621 = iprot.readMapBegin(); - _elem619 = new java.util.HashMap(2*_map621.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key622; - @org.apache.thrift.annotation.Nullable java.lang.String _val623; - for (int _i624 = 0; _i624 < _map621.size; ++_i624) - { - _key622 = iprot.readString(); - _val623 = iprot.readString(); - _elem619.put(_key622, _val623); - } - iprot.readMapEnd(); - } - struct.attributesList.add(_elem619); - } - iprot.readListEnd(); - } - struct.setAttributesListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // MEASUREMENT_ALIAS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list625 = iprot.readListBegin(); - struct.measurementAliasList = new java.util.ArrayList(_list625.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem626; - for (int _i627 = 0; _i627 < _list625.size; ++_i627) - { - _elem626 = iprot.readString(); - struct.measurementAliasList.add(_elem626); - } - iprot.readListEnd(); - } - struct.setMeasurementAliasListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSCreateMultiTimeseriesReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.paths != null) { - oprot.writeFieldBegin(PATHS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); - for (java.lang.String _iter628 : struct.paths) - { - oprot.writeString(_iter628); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.dataTypes != null) { - oprot.writeFieldBegin(DATA_TYPES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dataTypes.size())); - for (int _iter629 : struct.dataTypes) - { - oprot.writeI32(_iter629); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.encodings != null) { - oprot.writeFieldBegin(ENCODINGS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.encodings.size())); - for (int _iter630 : struct.encodings) - { - oprot.writeI32(_iter630); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.compressors != null) { - oprot.writeFieldBegin(COMPRESSORS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.compressors.size())); - for (int _iter631 : struct.compressors) - { - oprot.writeI32(_iter631); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.propsList != null) { - if (struct.isSetPropsList()) { - oprot.writeFieldBegin(PROPS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.propsList.size())); - for (java.util.Map _iter632 : struct.propsList) - { - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter632.size())); - for (java.util.Map.Entry _iter633 : _iter632.entrySet()) - { - oprot.writeString(_iter633.getKey()); - oprot.writeString(_iter633.getValue()); - } - oprot.writeMapEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.tagsList != null) { - if (struct.isSetTagsList()) { - oprot.writeFieldBegin(TAGS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.tagsList.size())); - for (java.util.Map _iter634 : struct.tagsList) - { - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter634.size())); - for (java.util.Map.Entry _iter635 : _iter634.entrySet()) - { - oprot.writeString(_iter635.getKey()); - oprot.writeString(_iter635.getValue()); - } - oprot.writeMapEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.attributesList != null) { - if (struct.isSetAttributesList()) { - oprot.writeFieldBegin(ATTRIBUTES_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.MAP, struct.attributesList.size())); - for (java.util.Map _iter636 : struct.attributesList) - { - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter636.size())); - for (java.util.Map.Entry _iter637 : _iter636.entrySet()) - { - oprot.writeString(_iter637.getKey()); - oprot.writeString(_iter637.getValue()); - } - oprot.writeMapEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.measurementAliasList != null) { - if (struct.isSetMeasurementAliasList()) { - oprot.writeFieldBegin(MEASUREMENT_ALIAS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurementAliasList.size())); - for (java.lang.String _iter638 : struct.measurementAliasList) - { - oprot.writeString(_iter638); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSCreateMultiTimeseriesReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCreateMultiTimeseriesReqTupleScheme getScheme() { - return new TSCreateMultiTimeseriesReqTupleScheme(); - } - } - - private static class TSCreateMultiTimeseriesReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSCreateMultiTimeseriesReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - { - oprot.writeI32(struct.paths.size()); - for (java.lang.String _iter639 : struct.paths) - { - oprot.writeString(_iter639); - } - } - { - oprot.writeI32(struct.dataTypes.size()); - for (int _iter640 : struct.dataTypes) - { - oprot.writeI32(_iter640); - } - } - { - oprot.writeI32(struct.encodings.size()); - for (int _iter641 : struct.encodings) - { - oprot.writeI32(_iter641); - } - } - { - oprot.writeI32(struct.compressors.size()); - for (int _iter642 : struct.compressors) - { - oprot.writeI32(_iter642); - } - } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetPropsList()) { - optionals.set(0); - } - if (struct.isSetTagsList()) { - optionals.set(1); - } - if (struct.isSetAttributesList()) { - optionals.set(2); - } - if (struct.isSetMeasurementAliasList()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetPropsList()) { - { - oprot.writeI32(struct.propsList.size()); - for (java.util.Map _iter643 : struct.propsList) - { - { - oprot.writeI32(_iter643.size()); - for (java.util.Map.Entry _iter644 : _iter643.entrySet()) - { - oprot.writeString(_iter644.getKey()); - oprot.writeString(_iter644.getValue()); - } - } - } - } - } - if (struct.isSetTagsList()) { - { - oprot.writeI32(struct.tagsList.size()); - for (java.util.Map _iter645 : struct.tagsList) - { - { - oprot.writeI32(_iter645.size()); - for (java.util.Map.Entry _iter646 : _iter645.entrySet()) - { - oprot.writeString(_iter646.getKey()); - oprot.writeString(_iter646.getValue()); - } - } - } - } - } - if (struct.isSetAttributesList()) { - { - oprot.writeI32(struct.attributesList.size()); - for (java.util.Map _iter647 : struct.attributesList) - { - { - oprot.writeI32(_iter647.size()); - for (java.util.Map.Entry _iter648 : _iter647.entrySet()) - { - oprot.writeString(_iter648.getKey()); - oprot.writeString(_iter648.getValue()); - } - } - } - } - } - if (struct.isSetMeasurementAliasList()) { - { - oprot.writeI32(struct.measurementAliasList.size()); - for (java.lang.String _iter649 : struct.measurementAliasList) - { - oprot.writeString(_iter649); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSCreateMultiTimeseriesReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - { - org.apache.thrift.protocol.TList _list650 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.paths = new java.util.ArrayList(_list650.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem651; - for (int _i652 = 0; _i652 < _list650.size; ++_i652) - { - _elem651 = iprot.readString(); - struct.paths.add(_elem651); - } - } - struct.setPathsIsSet(true); - { - org.apache.thrift.protocol.TList _list653 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.dataTypes = new java.util.ArrayList(_list653.size); - int _elem654; - for (int _i655 = 0; _i655 < _list653.size; ++_i655) - { - _elem654 = iprot.readI32(); - struct.dataTypes.add(_elem654); - } - } - struct.setDataTypesIsSet(true); - { - org.apache.thrift.protocol.TList _list656 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.encodings = new java.util.ArrayList(_list656.size); - int _elem657; - for (int _i658 = 0; _i658 < _list656.size; ++_i658) - { - _elem657 = iprot.readI32(); - struct.encodings.add(_elem657); - } - } - struct.setEncodingsIsSet(true); - { - org.apache.thrift.protocol.TList _list659 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.compressors = new java.util.ArrayList(_list659.size); - int _elem660; - for (int _i661 = 0; _i661 < _list659.size; ++_i661) - { - _elem660 = iprot.readI32(); - struct.compressors.add(_elem660); - } - } - struct.setCompressorsIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list662 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); - struct.propsList = new java.util.ArrayList>(_list662.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem663; - for (int _i664 = 0; _i664 < _list662.size; ++_i664) - { - { - org.apache.thrift.protocol.TMap _map665 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - _elem663 = new java.util.HashMap(2*_map665.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key666; - @org.apache.thrift.annotation.Nullable java.lang.String _val667; - for (int _i668 = 0; _i668 < _map665.size; ++_i668) - { - _key666 = iprot.readString(); - _val667 = iprot.readString(); - _elem663.put(_key666, _val667); - } - } - struct.propsList.add(_elem663); - } - } - struct.setPropsListIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list669 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); - struct.tagsList = new java.util.ArrayList>(_list669.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem670; - for (int _i671 = 0; _i671 < _list669.size; ++_i671) - { - { - org.apache.thrift.protocol.TMap _map672 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - _elem670 = new java.util.HashMap(2*_map672.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key673; - @org.apache.thrift.annotation.Nullable java.lang.String _val674; - for (int _i675 = 0; _i675 < _map672.size; ++_i675) - { - _key673 = iprot.readString(); - _val674 = iprot.readString(); - _elem670.put(_key673, _val674); - } - } - struct.tagsList.add(_elem670); - } - } - struct.setTagsListIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list676 = iprot.readListBegin(org.apache.thrift.protocol.TType.MAP); - struct.attributesList = new java.util.ArrayList>(_list676.size); - @org.apache.thrift.annotation.Nullable java.util.Map _elem677; - for (int _i678 = 0; _i678 < _list676.size; ++_i678) - { - { - org.apache.thrift.protocol.TMap _map679 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - _elem677 = new java.util.HashMap(2*_map679.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key680; - @org.apache.thrift.annotation.Nullable java.lang.String _val681; - for (int _i682 = 0; _i682 < _map679.size; ++_i682) - { - _key680 = iprot.readString(); - _val681 = iprot.readString(); - _elem677.put(_key680, _val681); - } - } - struct.attributesList.add(_elem677); - } - } - struct.setAttributesListIsSet(true); - } - if (incoming.get(3)) { - { - org.apache.thrift.protocol.TList _list683 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.measurementAliasList = new java.util.ArrayList(_list683.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem684; - for (int _i685 = 0; _i685 < _list683.size; ++_i685) - { - _elem684 = iprot.readString(); - struct.measurementAliasList.add(_elem684); - } - } - struct.setMeasurementAliasListIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateSchemaTemplateReq.java deleted file mode 100644 index 23a3893aab1d5..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateSchemaTemplateReq.java +++ /dev/null @@ -1,592 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSCreateSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCreateSchemaTemplateReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField SERIALIZED_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("serializedTemplate", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCreateSchemaTemplateReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCreateSchemaTemplateReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String name; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer serializedTemplate; // 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 { - SESSION_ID((short)1, "sessionId"), - NAME((short)2, "name"), - SERIALIZED_TEMPLATE((short)3, "serializedTemplate"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // NAME - return NAME; - case 3: // SERIALIZED_TEMPLATE - return SERIALIZED_TEMPLATE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SERIALIZED_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("serializedTemplate", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCreateSchemaTemplateReq.class, metaDataMap); - } - - public TSCreateSchemaTemplateReq() { - } - - public TSCreateSchemaTemplateReq( - long sessionId, - java.lang.String name, - java.nio.ByteBuffer serializedTemplate) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.name = name; - this.serializedTemplate = org.apache.thrift.TBaseHelper.copyBinary(serializedTemplate); - } - - /** - * Performs a deep copy on other. - */ - public TSCreateSchemaTemplateReq(TSCreateSchemaTemplateReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetSerializedTemplate()) { - this.serializedTemplate = org.apache.thrift.TBaseHelper.copyBinary(other.serializedTemplate); - } - } - - @Override - public TSCreateSchemaTemplateReq deepCopy() { - return new TSCreateSchemaTemplateReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.name = null; - this.serializedTemplate = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSCreateSchemaTemplateReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getName() { - return this.name; - } - - public TSCreateSchemaTemplateReq setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public byte[] getSerializedTemplate() { - setSerializedTemplate(org.apache.thrift.TBaseHelper.rightSize(serializedTemplate)); - return serializedTemplate == null ? null : serializedTemplate.array(); - } - - public java.nio.ByteBuffer bufferForSerializedTemplate() { - return org.apache.thrift.TBaseHelper.copyBinary(serializedTemplate); - } - - public TSCreateSchemaTemplateReq setSerializedTemplate(byte[] serializedTemplate) { - this.serializedTemplate = serializedTemplate == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(serializedTemplate.clone()); - return this; - } - - public TSCreateSchemaTemplateReq setSerializedTemplate(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer serializedTemplate) { - this.serializedTemplate = org.apache.thrift.TBaseHelper.copyBinary(serializedTemplate); - return this; - } - - public void unsetSerializedTemplate() { - this.serializedTemplate = null; - } - - /** Returns true if field serializedTemplate is set (has been assigned a value) and false otherwise */ - public boolean isSetSerializedTemplate() { - return this.serializedTemplate != null; - } - - public void setSerializedTemplateIsSet(boolean value) { - if (!value) { - this.serializedTemplate = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((java.lang.String)value); - } - break; - - case SERIALIZED_TEMPLATE: - if (value == null) { - unsetSerializedTemplate(); - } else { - if (value instanceof byte[]) { - setSerializedTemplate((byte[])value); - } else { - setSerializedTemplate((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case NAME: - return getName(); - - case SERIALIZED_TEMPLATE: - return getSerializedTemplate(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case NAME: - return isSetName(); - case SERIALIZED_TEMPLATE: - return isSetSerializedTemplate(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSCreateSchemaTemplateReq) - return this.equals((TSCreateSchemaTemplateReq)that); - return false; - } - - public boolean equals(TSCreateSchemaTemplateReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_serializedTemplate = true && this.isSetSerializedTemplate(); - boolean that_present_serializedTemplate = true && that.isSetSerializedTemplate(); - if (this_present_serializedTemplate || that_present_serializedTemplate) { - if (!(this_present_serializedTemplate && that_present_serializedTemplate)) - return false; - if (!this.serializedTemplate.equals(that.serializedTemplate)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); - if (isSetName()) - hashCode = hashCode * 8191 + name.hashCode(); - - hashCode = hashCode * 8191 + ((isSetSerializedTemplate()) ? 131071 : 524287); - if (isSetSerializedTemplate()) - hashCode = hashCode * 8191 + serializedTemplate.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSCreateSchemaTemplateReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSerializedTemplate(), other.isSetSerializedTemplate()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSerializedTemplate()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serializedTemplate, other.serializedTemplate); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCreateSchemaTemplateReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("serializedTemplate:"); - if (this.serializedTemplate == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.serializedTemplate, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (name == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); - } - if (serializedTemplate == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'serializedTemplate' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSCreateSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCreateSchemaTemplateReqStandardScheme getScheme() { - return new TSCreateSchemaTemplateReqStandardScheme(); - } - } - - private static class TSCreateSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSCreateSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SERIALIZED_TEMPLATE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.serializedTemplate = iprot.readBinary(); - struct.setSerializedTemplateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSCreateSchemaTemplateReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - if (struct.serializedTemplate != null) { - oprot.writeFieldBegin(SERIALIZED_TEMPLATE_FIELD_DESC); - oprot.writeBinary(struct.serializedTemplate); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSCreateSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCreateSchemaTemplateReqTupleScheme getScheme() { - return new TSCreateSchemaTemplateReqTupleScheme(); - } - } - - private static class TSCreateSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSCreateSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.name); - oprot.writeBinary(struct.serializedTemplate); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSCreateSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.name = iprot.readString(); - struct.setNameIsSet(true); - struct.serializedTemplate = iprot.readBinary(); - struct.setSerializedTemplateIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateTimeseriesReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateTimeseriesReq.java deleted file mode 100644 index 749a5903e5656..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSCreateTimeseriesReq.java +++ /dev/null @@ -1,1345 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSCreateTimeseriesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSCreateTimeseriesReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField ENCODING_FIELD_DESC = new org.apache.thrift.protocol.TField("encoding", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField COMPRESSOR_FIELD_DESC = new org.apache.thrift.protocol.TField("compressor", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField PROPS_FIELD_DESC = new org.apache.thrift.protocol.TField("props", org.apache.thrift.protocol.TType.MAP, (short)6); - private static final org.apache.thrift.protocol.TField TAGS_FIELD_DESC = new org.apache.thrift.protocol.TField("tags", org.apache.thrift.protocol.TType.MAP, (short)7); - private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)8); - private static final org.apache.thrift.protocol.TField MEASUREMENT_ALIAS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementAlias", org.apache.thrift.protocol.TType.STRING, (short)9); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCreateTimeseriesReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCreateTimeseriesReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String path; // required - public int dataType; // required - public int encoding; // required - public int compressor; // required - public @org.apache.thrift.annotation.Nullable java.util.Map props; // optional - public @org.apache.thrift.annotation.Nullable java.util.Map tags; // optional - public @org.apache.thrift.annotation.Nullable java.util.Map attributes; // optional - public @org.apache.thrift.annotation.Nullable java.lang.String measurementAlias; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PATH((short)2, "path"), - DATA_TYPE((short)3, "dataType"), - ENCODING((short)4, "encoding"), - COMPRESSOR((short)5, "compressor"), - PROPS((short)6, "props"), - TAGS((short)7, "tags"), - ATTRIBUTES((short)8, "attributes"), - MEASUREMENT_ALIAS((short)9, "measurementAlias"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PATH - return PATH; - case 3: // DATA_TYPE - return DATA_TYPE; - case 4: // ENCODING - return ENCODING; - case 5: // COMPRESSOR - return COMPRESSOR; - case 6: // PROPS - return PROPS; - case 7: // TAGS - return TAGS; - case 8: // ATTRIBUTES - return ATTRIBUTES; - case 9: // MEASUREMENT_ALIAS - return MEASUREMENT_ALIAS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __DATATYPE_ISSET_ID = 1; - private static final int __ENCODING_ISSET_ID = 2; - private static final int __COMPRESSOR_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PROPS,_Fields.TAGS,_Fields.ATTRIBUTES,_Fields.MEASUREMENT_ALIAS}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.ENCODING, new org.apache.thrift.meta_data.FieldMetaData("encoding", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.COMPRESSOR, new org.apache.thrift.meta_data.FieldMetaData("compressor", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.PROPS, new org.apache.thrift.meta_data.FieldMetaData("props", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.TAGS, new org.apache.thrift.meta_data.FieldMetaData("tags", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.MEASUREMENT_ALIAS, new org.apache.thrift.meta_data.FieldMetaData("measurementAlias", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCreateTimeseriesReq.class, metaDataMap); - } - - public TSCreateTimeseriesReq() { - } - - public TSCreateTimeseriesReq( - long sessionId, - java.lang.String path, - int dataType, - int encoding, - int compressor) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.path = path; - this.dataType = dataType; - setDataTypeIsSet(true); - this.encoding = encoding; - setEncodingIsSet(true); - this.compressor = compressor; - setCompressorIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSCreateTimeseriesReq(TSCreateTimeseriesReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPath()) { - this.path = other.path; - } - this.dataType = other.dataType; - this.encoding = other.encoding; - this.compressor = other.compressor; - if (other.isSetProps()) { - java.util.Map __this__props = new java.util.HashMap(other.props); - this.props = __this__props; - } - if (other.isSetTags()) { - java.util.Map __this__tags = new java.util.HashMap(other.tags); - this.tags = __this__tags; - } - if (other.isSetAttributes()) { - java.util.Map __this__attributes = new java.util.HashMap(other.attributes); - this.attributes = __this__attributes; - } - if (other.isSetMeasurementAlias()) { - this.measurementAlias = other.measurementAlias; - } - } - - @Override - public TSCreateTimeseriesReq deepCopy() { - return new TSCreateTimeseriesReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.path = null; - setDataTypeIsSet(false); - this.dataType = 0; - setEncodingIsSet(false); - this.encoding = 0; - setCompressorIsSet(false); - this.compressor = 0; - this.props = null; - this.tags = null; - this.attributes = null; - this.measurementAlias = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSCreateTimeseriesReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPath() { - return this.path; - } - - public TSCreateTimeseriesReq setPath(@org.apache.thrift.annotation.Nullable java.lang.String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public int getDataType() { - return this.dataType; - } - - public TSCreateTimeseriesReq setDataType(int dataType) { - this.dataType = dataType; - setDataTypeIsSet(true); - return this; - } - - public void unsetDataType() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATATYPE_ISSET_ID); - } - - /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ - public boolean isSetDataType() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATATYPE_ISSET_ID); - } - - public void setDataTypeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATATYPE_ISSET_ID, value); - } - - public int getEncoding() { - return this.encoding; - } - - public TSCreateTimeseriesReq setEncoding(int encoding) { - this.encoding = encoding; - setEncodingIsSet(true); - return this; - } - - public void unsetEncoding() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENCODING_ISSET_ID); - } - - /** Returns true if field encoding is set (has been assigned a value) and false otherwise */ - public boolean isSetEncoding() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENCODING_ISSET_ID); - } - - public void setEncodingIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENCODING_ISSET_ID, value); - } - - public int getCompressor() { - return this.compressor; - } - - public TSCreateTimeseriesReq setCompressor(int compressor) { - this.compressor = compressor; - setCompressorIsSet(true); - return this; - } - - public void unsetCompressor() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPRESSOR_ISSET_ID); - } - - /** Returns true if field compressor is set (has been assigned a value) and false otherwise */ - public boolean isSetCompressor() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPRESSOR_ISSET_ID); - } - - public void setCompressorIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPRESSOR_ISSET_ID, value); - } - - public int getPropsSize() { - return (this.props == null) ? 0 : this.props.size(); - } - - public void putToProps(java.lang.String key, java.lang.String val) { - if (this.props == null) { - this.props = new java.util.HashMap(); - } - this.props.put(key, val); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Map getProps() { - return this.props; - } - - public TSCreateTimeseriesReq setProps(@org.apache.thrift.annotation.Nullable java.util.Map props) { - this.props = props; - return this; - } - - public void unsetProps() { - this.props = null; - } - - /** Returns true if field props is set (has been assigned a value) and false otherwise */ - public boolean isSetProps() { - return this.props != null; - } - - public void setPropsIsSet(boolean value) { - if (!value) { - this.props = null; - } - } - - public int getTagsSize() { - return (this.tags == null) ? 0 : this.tags.size(); - } - - public void putToTags(java.lang.String key, java.lang.String val) { - if (this.tags == null) { - this.tags = new java.util.HashMap(); - } - this.tags.put(key, val); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Map getTags() { - return this.tags; - } - - public TSCreateTimeseriesReq setTags(@org.apache.thrift.annotation.Nullable java.util.Map tags) { - this.tags = tags; - return this; - } - - public void unsetTags() { - this.tags = null; - } - - /** Returns true if field tags is set (has been assigned a value) and false otherwise */ - public boolean isSetTags() { - return this.tags != null; - } - - public void setTagsIsSet(boolean value) { - if (!value) { - this.tags = null; - } - } - - public int getAttributesSize() { - return (this.attributes == null) ? 0 : this.attributes.size(); - } - - public void putToAttributes(java.lang.String key, java.lang.String val) { - if (this.attributes == null) { - this.attributes = new java.util.HashMap(); - } - this.attributes.put(key, val); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Map getAttributes() { - return this.attributes; - } - - public TSCreateTimeseriesReq setAttributes(@org.apache.thrift.annotation.Nullable java.util.Map attributes) { - this.attributes = attributes; - return this; - } - - public void unsetAttributes() { - this.attributes = null; - } - - /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ - public boolean isSetAttributes() { - return this.attributes != null; - } - - public void setAttributesIsSet(boolean value) { - if (!value) { - this.attributes = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getMeasurementAlias() { - return this.measurementAlias; - } - - public TSCreateTimeseriesReq setMeasurementAlias(@org.apache.thrift.annotation.Nullable java.lang.String measurementAlias) { - this.measurementAlias = measurementAlias; - return this; - } - - public void unsetMeasurementAlias() { - this.measurementAlias = null; - } - - /** Returns true if field measurementAlias is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurementAlias() { - return this.measurementAlias != null; - } - - public void setMeasurementAliasIsSet(boolean value) { - if (!value) { - this.measurementAlias = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((java.lang.String)value); - } - break; - - case DATA_TYPE: - if (value == null) { - unsetDataType(); - } else { - setDataType((java.lang.Integer)value); - } - break; - - case ENCODING: - if (value == null) { - unsetEncoding(); - } else { - setEncoding((java.lang.Integer)value); - } - break; - - case COMPRESSOR: - if (value == null) { - unsetCompressor(); - } else { - setCompressor((java.lang.Integer)value); - } - break; - - case PROPS: - if (value == null) { - unsetProps(); - } else { - setProps((java.util.Map)value); - } - break; - - case TAGS: - if (value == null) { - unsetTags(); - } else { - setTags((java.util.Map)value); - } - break; - - case ATTRIBUTES: - if (value == null) { - unsetAttributes(); - } else { - setAttributes((java.util.Map)value); - } - break; - - case MEASUREMENT_ALIAS: - if (value == null) { - unsetMeasurementAlias(); - } else { - setMeasurementAlias((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PATH: - return getPath(); - - case DATA_TYPE: - return getDataType(); - - case ENCODING: - return getEncoding(); - - case COMPRESSOR: - return getCompressor(); - - case PROPS: - return getProps(); - - case TAGS: - return getTags(); - - case ATTRIBUTES: - return getAttributes(); - - case MEASUREMENT_ALIAS: - return getMeasurementAlias(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PATH: - return isSetPath(); - case DATA_TYPE: - return isSetDataType(); - case ENCODING: - return isSetEncoding(); - case COMPRESSOR: - return isSetCompressor(); - case PROPS: - return isSetProps(); - case TAGS: - return isSetTags(); - case ATTRIBUTES: - return isSetAttributes(); - case MEASUREMENT_ALIAS: - return isSetMeasurementAlias(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSCreateTimeseriesReq) - return this.equals((TSCreateTimeseriesReq)that); - return false; - } - - public boolean equals(TSCreateTimeseriesReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_dataType = true; - boolean that_present_dataType = true; - if (this_present_dataType || that_present_dataType) { - if (!(this_present_dataType && that_present_dataType)) - return false; - if (this.dataType != that.dataType) - return false; - } - - boolean this_present_encoding = true; - boolean that_present_encoding = true; - if (this_present_encoding || that_present_encoding) { - if (!(this_present_encoding && that_present_encoding)) - return false; - if (this.encoding != that.encoding) - return false; - } - - boolean this_present_compressor = true; - boolean that_present_compressor = true; - if (this_present_compressor || that_present_compressor) { - if (!(this_present_compressor && that_present_compressor)) - return false; - if (this.compressor != that.compressor) - return false; - } - - boolean this_present_props = true && this.isSetProps(); - boolean that_present_props = true && that.isSetProps(); - if (this_present_props || that_present_props) { - if (!(this_present_props && that_present_props)) - return false; - if (!this.props.equals(that.props)) - return false; - } - - boolean this_present_tags = true && this.isSetTags(); - boolean that_present_tags = true && that.isSetTags(); - if (this_present_tags || that_present_tags) { - if (!(this_present_tags && that_present_tags)) - return false; - if (!this.tags.equals(that.tags)) - return false; - } - - boolean this_present_attributes = true && this.isSetAttributes(); - boolean that_present_attributes = true && that.isSetAttributes(); - if (this_present_attributes || that_present_attributes) { - if (!(this_present_attributes && that_present_attributes)) - return false; - if (!this.attributes.equals(that.attributes)) - return false; - } - - boolean this_present_measurementAlias = true && this.isSetMeasurementAlias(); - boolean that_present_measurementAlias = true && that.isSetMeasurementAlias(); - if (this_present_measurementAlias || that_present_measurementAlias) { - if (!(this_present_measurementAlias && that_present_measurementAlias)) - return false; - if (!this.measurementAlias.equals(that.measurementAlias)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287); - if (isSetPath()) - hashCode = hashCode * 8191 + path.hashCode(); - - hashCode = hashCode * 8191 + dataType; - - hashCode = hashCode * 8191 + encoding; - - hashCode = hashCode * 8191 + compressor; - - hashCode = hashCode * 8191 + ((isSetProps()) ? 131071 : 524287); - if (isSetProps()) - hashCode = hashCode * 8191 + props.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTags()) ? 131071 : 524287); - if (isSetTags()) - hashCode = hashCode * 8191 + tags.hashCode(); - - hashCode = hashCode * 8191 + ((isSetAttributes()) ? 131071 : 524287); - if (isSetAttributes()) - hashCode = hashCode * 8191 + attributes.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurementAlias()) ? 131071 : 524287); - if (isSetMeasurementAlias()) - hashCode = hashCode * 8191 + measurementAlias.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSCreateTimeseriesReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPath(), other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDataType(), other.isSetDataType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, other.dataType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEncoding(), other.isSetEncoding()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEncoding()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encoding, other.encoding); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCompressor(), other.isSetCompressor()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompressor()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressor, other.compressor); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetProps(), other.isSetProps()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProps()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.props, other.props); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTags(), other.isSetTags()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTags()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tags, other.tags); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetAttributes(), other.isSetAttributes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAttributes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurementAlias(), other.isSetMeasurementAlias()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurementAlias()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementAlias, other.measurementAlias); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSCreateTimeseriesReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataType:"); - sb.append(this.dataType); - first = false; - if (!first) sb.append(", "); - sb.append("encoding:"); - sb.append(this.encoding); - first = false; - if (!first) sb.append(", "); - sb.append("compressor:"); - sb.append(this.compressor); - first = false; - if (isSetProps()) { - if (!first) sb.append(", "); - sb.append("props:"); - if (this.props == null) { - sb.append("null"); - } else { - sb.append(this.props); - } - first = false; - } - if (isSetTags()) { - if (!first) sb.append(", "); - sb.append("tags:"); - if (this.tags == null) { - sb.append("null"); - } else { - sb.append(this.tags); - } - first = false; - } - if (isSetAttributes()) { - if (!first) sb.append(", "); - sb.append("attributes:"); - if (this.attributes == null) { - sb.append("null"); - } else { - sb.append(this.attributes); - } - first = false; - } - if (isSetMeasurementAlias()) { - if (!first) sb.append(", "); - sb.append("measurementAlias:"); - if (this.measurementAlias == null) { - sb.append("null"); - } else { - sb.append(this.measurementAlias); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (path == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'path' was not present! Struct: " + toString()); - } - // alas, we cannot check 'dataType' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'encoding' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'compressor' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSCreateTimeseriesReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCreateTimeseriesReqStandardScheme getScheme() { - return new TSCreateTimeseriesReqStandardScheme(); - } - } - - private static class TSCreateTimeseriesReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DATA_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dataType = iprot.readI32(); - struct.setDataTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // ENCODING - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.encoding = iprot.readI32(); - struct.setEncodingIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // COMPRESSOR - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.compressor = iprot.readI32(); - struct.setCompressorIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // PROPS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map446 = iprot.readMapBegin(); - struct.props = new java.util.HashMap(2*_map446.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key447; - @org.apache.thrift.annotation.Nullable java.lang.String _val448; - for (int _i449 = 0; _i449 < _map446.size; ++_i449) - { - _key447 = iprot.readString(); - _val448 = iprot.readString(); - struct.props.put(_key447, _val448); - } - iprot.readMapEnd(); - } - struct.setPropsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // TAGS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map450 = iprot.readMapBegin(); - struct.tags = new java.util.HashMap(2*_map450.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key451; - @org.apache.thrift.annotation.Nullable java.lang.String _val452; - for (int _i453 = 0; _i453 < _map450.size; ++_i453) - { - _key451 = iprot.readString(); - _val452 = iprot.readString(); - struct.tags.put(_key451, _val452); - } - iprot.readMapEnd(); - } - struct.setTagsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // ATTRIBUTES - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map454 = iprot.readMapBegin(); - struct.attributes = new java.util.HashMap(2*_map454.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key455; - @org.apache.thrift.annotation.Nullable java.lang.String _val456; - for (int _i457 = 0; _i457 < _map454.size; ++_i457) - { - _key455 = iprot.readString(); - _val456 = iprot.readString(); - struct.attributes.put(_key455, _val456); - } - iprot.readMapEnd(); - } - struct.setAttributesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // MEASUREMENT_ALIAS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.measurementAlias = iprot.readString(); - struct.setMeasurementAliasIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetDataType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataType' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetEncoding()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'encoding' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetCompressor()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'compressor' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); - oprot.writeI32(struct.dataType); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(ENCODING_FIELD_DESC); - oprot.writeI32(struct.encoding); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(COMPRESSOR_FIELD_DESC); - oprot.writeI32(struct.compressor); - oprot.writeFieldEnd(); - if (struct.props != null) { - if (struct.isSetProps()) { - oprot.writeFieldBegin(PROPS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.props.size())); - for (java.util.Map.Entry _iter458 : struct.props.entrySet()) - { - oprot.writeString(_iter458.getKey()); - oprot.writeString(_iter458.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.tags != null) { - if (struct.isSetTags()) { - oprot.writeFieldBegin(TAGS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.tags.size())); - for (java.util.Map.Entry _iter459 : struct.tags.entrySet()) - { - oprot.writeString(_iter459.getKey()); - oprot.writeString(_iter459.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.attributes != null) { - if (struct.isSetAttributes()) { - oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); - for (java.util.Map.Entry _iter460 : struct.attributes.entrySet()) - { - oprot.writeString(_iter460.getKey()); - oprot.writeString(_iter460.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.measurementAlias != null) { - if (struct.isSetMeasurementAlias()) { - oprot.writeFieldBegin(MEASUREMENT_ALIAS_FIELD_DESC); - oprot.writeString(struct.measurementAlias); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSCreateTimeseriesReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSCreateTimeseriesReqTupleScheme getScheme() { - return new TSCreateTimeseriesReqTupleScheme(); - } - } - - private static class TSCreateTimeseriesReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.path); - oprot.writeI32(struct.dataType); - oprot.writeI32(struct.encoding); - oprot.writeI32(struct.compressor); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetProps()) { - optionals.set(0); - } - if (struct.isSetTags()) { - optionals.set(1); - } - if (struct.isSetAttributes()) { - optionals.set(2); - } - if (struct.isSetMeasurementAlias()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetProps()) { - { - oprot.writeI32(struct.props.size()); - for (java.util.Map.Entry _iter461 : struct.props.entrySet()) - { - oprot.writeString(_iter461.getKey()); - oprot.writeString(_iter461.getValue()); - } - } - } - if (struct.isSetTags()) { - { - oprot.writeI32(struct.tags.size()); - for (java.util.Map.Entry _iter462 : struct.tags.entrySet()) - { - oprot.writeString(_iter462.getKey()); - oprot.writeString(_iter462.getValue()); - } - } - } - if (struct.isSetAttributes()) { - { - oprot.writeI32(struct.attributes.size()); - for (java.util.Map.Entry _iter463 : struct.attributes.entrySet()) - { - oprot.writeString(_iter463.getKey()); - oprot.writeString(_iter463.getValue()); - } - } - } - if (struct.isSetMeasurementAlias()) { - oprot.writeString(struct.measurementAlias); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.path = iprot.readString(); - struct.setPathIsSet(true); - struct.dataType = iprot.readI32(); - struct.setDataTypeIsSet(true); - struct.encoding = iprot.readI32(); - struct.setEncodingIsSet(true); - struct.compressor = iprot.readI32(); - struct.setCompressorIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TMap _map464 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - struct.props = new java.util.HashMap(2*_map464.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key465; - @org.apache.thrift.annotation.Nullable java.lang.String _val466; - for (int _i467 = 0; _i467 < _map464.size; ++_i467) - { - _key465 = iprot.readString(); - _val466 = iprot.readString(); - struct.props.put(_key465, _val466); - } - } - struct.setPropsIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TMap _map468 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - struct.tags = new java.util.HashMap(2*_map468.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key469; - @org.apache.thrift.annotation.Nullable java.lang.String _val470; - for (int _i471 = 0; _i471 < _map468.size; ++_i471) - { - _key469 = iprot.readString(); - _val470 = iprot.readString(); - struct.tags.put(_key469, _val470); - } - } - struct.setTagsIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TMap _map472 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - struct.attributes = new java.util.HashMap(2*_map472.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key473; - @org.apache.thrift.annotation.Nullable java.lang.String _val474; - for (int _i475 = 0; _i475 < _map472.size; ++_i475) - { - _key473 = iprot.readString(); - _val474 = iprot.readString(); - struct.attributes.put(_key473, _val474); - } - } - struct.setAttributesIsSet(true); - } - if (incoming.get(3)) { - struct.measurementAlias = iprot.readString(); - struct.setMeasurementAliasIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSDeleteDataReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSDeleteDataReq.java deleted file mode 100644 index 6fcd77b487845..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSDeleteDataReq.java +++ /dev/null @@ -1,714 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSDeleteDataReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSDeleteDataReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSDeleteDataReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSDeleteDataReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List paths; // required - public long startTime; // required - public long endTime; // 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 { - SESSION_ID((short)1, "sessionId"), - PATHS((short)2, "paths"), - START_TIME((short)3, "startTime"), - END_TIME((short)4, "endTime"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PATHS - return PATHS; - case 3: // START_TIME - return START_TIME; - case 4: // END_TIME - return END_TIME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __STARTTIME_ISSET_ID = 1; - private static final int __ENDTIME_ISSET_ID = 2; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSDeleteDataReq.class, metaDataMap); - } - - public TSDeleteDataReq() { - } - - public TSDeleteDataReq( - long sessionId, - java.util.List paths, - long startTime, - long endTime) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.paths = paths; - this.startTime = startTime; - setStartTimeIsSet(true); - this.endTime = endTime; - setEndTimeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSDeleteDataReq(TSDeleteDataReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPaths()) { - java.util.List __this__paths = new java.util.ArrayList(other.paths); - this.paths = __this__paths; - } - this.startTime = other.startTime; - this.endTime = other.endTime; - } - - @Override - public TSDeleteDataReq deepCopy() { - return new TSDeleteDataReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.paths = null; - setStartTimeIsSet(false); - this.startTime = 0; - setEndTimeIsSet(false); - this.endTime = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSDeleteDataReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getPathsSize() { - return (this.paths == null) ? 0 : this.paths.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getPathsIterator() { - return (this.paths == null) ? null : this.paths.iterator(); - } - - public void addToPaths(java.lang.String elem) { - if (this.paths == null) { - this.paths = new java.util.ArrayList(); - } - this.paths.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getPaths() { - return this.paths; - } - - public TSDeleteDataReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { - this.paths = paths; - return this; - } - - public void unsetPaths() { - this.paths = null; - } - - /** Returns true if field paths is set (has been assigned a value) and false otherwise */ - public boolean isSetPaths() { - return this.paths != null; - } - - public void setPathsIsSet(boolean value) { - if (!value) { - this.paths = null; - } - } - - public long getStartTime() { - return this.startTime; - } - - public TSDeleteDataReq setStartTime(long startTime) { - this.startTime = startTime; - setStartTimeIsSet(true); - return this; - } - - public void unsetStartTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); - } - - /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ - public boolean isSetStartTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); - } - - public void setStartTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); - } - - public long getEndTime() { - return this.endTime; - } - - public TSDeleteDataReq setEndTime(long endTime) { - this.endTime = endTime; - setEndTimeIsSet(true); - return this; - } - - public void unsetEndTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ - public boolean isSetEndTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - public void setEndTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PATHS: - if (value == null) { - unsetPaths(); - } else { - setPaths((java.util.List)value); - } - break; - - case START_TIME: - if (value == null) { - unsetStartTime(); - } else { - setStartTime((java.lang.Long)value); - } - break; - - case END_TIME: - if (value == null) { - unsetEndTime(); - } else { - setEndTime((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PATHS: - return getPaths(); - - case START_TIME: - return getStartTime(); - - case END_TIME: - return getEndTime(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PATHS: - return isSetPaths(); - case START_TIME: - return isSetStartTime(); - case END_TIME: - return isSetEndTime(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSDeleteDataReq) - return this.equals((TSDeleteDataReq)that); - return false; - } - - public boolean equals(TSDeleteDataReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_paths = true && this.isSetPaths(); - boolean that_present_paths = true && that.isSetPaths(); - if (this_present_paths || that_present_paths) { - if (!(this_present_paths && that_present_paths)) - return false; - if (!this.paths.equals(that.paths)) - return false; - } - - boolean this_present_startTime = true; - boolean that_present_startTime = true; - if (this_present_startTime || that_present_startTime) { - if (!(this_present_startTime && that_present_startTime)) - return false; - if (this.startTime != that.startTime) - return false; - } - - boolean this_present_endTime = true; - boolean that_present_endTime = true; - if (this_present_endTime || that_present_endTime) { - if (!(this_present_endTime && that_present_endTime)) - return false; - if (this.endTime != that.endTime) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); - if (isSetPaths()) - hashCode = hashCode * 8191 + paths.hashCode(); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime); - - return hashCode; - } - - @Override - public int compareTo(TSDeleteDataReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPaths()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEndTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSDeleteDataReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("paths:"); - if (this.paths == null) { - sb.append("null"); - } else { - sb.append(this.paths); - } - first = false; - if (!first) sb.append(", "); - sb.append("startTime:"); - sb.append(this.startTime); - first = false; - if (!first) sb.append(", "); - sb.append("endTime:"); - sb.append(this.endTime); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (paths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); - } - // alas, we cannot check 'startTime' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'endTime' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSDeleteDataReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSDeleteDataReqStandardScheme getScheme() { - return new TSDeleteDataReqStandardScheme(); - } - } - - private static class TSDeleteDataReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSDeleteDataReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATHS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list438 = iprot.readListBegin(); - struct.paths = new java.util.ArrayList(_list438.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem439; - for (int _i440 = 0; _i440 < _list438.size; ++_i440) - { - _elem439 = iprot.readString(); - struct.paths.add(_elem439); - } - iprot.readListEnd(); - } - struct.setPathsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // START_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // END_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetStartTime()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'startTime' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetEndTime()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'endTime' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSDeleteDataReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.paths != null) { - oprot.writeFieldBegin(PATHS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); - for (java.lang.String _iter441 : struct.paths) - { - oprot.writeString(_iter441); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(START_TIME_FIELD_DESC); - oprot.writeI64(struct.startTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(END_TIME_FIELD_DESC); - oprot.writeI64(struct.endTime); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSDeleteDataReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSDeleteDataReqTupleScheme getScheme() { - return new TSDeleteDataReqTupleScheme(); - } - } - - private static class TSDeleteDataReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSDeleteDataReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - { - oprot.writeI32(struct.paths.size()); - for (java.lang.String _iter442 : struct.paths) - { - oprot.writeString(_iter442); - } - } - oprot.writeI64(struct.startTime); - oprot.writeI64(struct.endTime); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSDeleteDataReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - { - org.apache.thrift.protocol.TList _list443 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.paths = new java.util.ArrayList(_list443.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem444; - for (int _i445 = 0; _i445 < _list443.size; ++_i445) - { - _elem444 = iprot.readString(); - struct.paths.add(_elem444); - } - } - struct.setPathsIsSet(true); - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSDropSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSDropSchemaTemplateReq.java deleted file mode 100644 index 82a45714ff323..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSDropSchemaTemplateReq.java +++ /dev/null @@ -1,478 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSDropSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSDropSchemaTemplateReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField TEMPLATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("templateName", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSDropSchemaTemplateReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSDropSchemaTemplateReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String templateName; // 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 { - SESSION_ID((short)1, "sessionId"), - TEMPLATE_NAME((short)2, "templateName"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // TEMPLATE_NAME - return TEMPLATE_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TEMPLATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("templateName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSDropSchemaTemplateReq.class, metaDataMap); - } - - public TSDropSchemaTemplateReq() { - } - - public TSDropSchemaTemplateReq( - long sessionId, - java.lang.String templateName) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.templateName = templateName; - } - - /** - * Performs a deep copy on other. - */ - public TSDropSchemaTemplateReq(TSDropSchemaTemplateReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetTemplateName()) { - this.templateName = other.templateName; - } - } - - @Override - public TSDropSchemaTemplateReq deepCopy() { - return new TSDropSchemaTemplateReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.templateName = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSDropSchemaTemplateReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getTemplateName() { - return this.templateName; - } - - public TSDropSchemaTemplateReq setTemplateName(@org.apache.thrift.annotation.Nullable java.lang.String templateName) { - this.templateName = templateName; - return this; - } - - public void unsetTemplateName() { - this.templateName = null; - } - - /** Returns true if field templateName is set (has been assigned a value) and false otherwise */ - public boolean isSetTemplateName() { - return this.templateName != null; - } - - public void setTemplateNameIsSet(boolean value) { - if (!value) { - this.templateName = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case TEMPLATE_NAME: - if (value == null) { - unsetTemplateName(); - } else { - setTemplateName((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case TEMPLATE_NAME: - return getTemplateName(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case TEMPLATE_NAME: - return isSetTemplateName(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSDropSchemaTemplateReq) - return this.equals((TSDropSchemaTemplateReq)that); - return false; - } - - public boolean equals(TSDropSchemaTemplateReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_templateName = true && this.isSetTemplateName(); - boolean that_present_templateName = true && that.isSetTemplateName(); - if (this_present_templateName || that_present_templateName) { - if (!(this_present_templateName && that_present_templateName)) - return false; - if (!this.templateName.equals(that.templateName)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetTemplateName()) ? 131071 : 524287); - if (isSetTemplateName()) - hashCode = hashCode * 8191 + templateName.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSDropSchemaTemplateReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTemplateName(), other.isSetTemplateName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTemplateName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.templateName, other.templateName); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSDropSchemaTemplateReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("templateName:"); - if (this.templateName == null) { - sb.append("null"); - } else { - sb.append(this.templateName); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (templateName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'templateName' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSDropSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSDropSchemaTemplateReqStandardScheme getScheme() { - return new TSDropSchemaTemplateReqStandardScheme(); - } - } - - private static class TSDropSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSDropSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TEMPLATE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.templateName = iprot.readString(); - struct.setTemplateNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSDropSchemaTemplateReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.templateName != null) { - oprot.writeFieldBegin(TEMPLATE_NAME_FIELD_DESC); - oprot.writeString(struct.templateName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSDropSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSDropSchemaTemplateReqTupleScheme getScheme() { - return new TSDropSchemaTemplateReqTupleScheme(); - } - } - - private static class TSDropSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSDropSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.templateName); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSDropSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.templateName = iprot.readString(); - struct.setTemplateNameIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteBatchStatementReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteBatchStatementReq.java deleted file mode 100644 index 2a5b3e8d35004..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteBatchStatementReq.java +++ /dev/null @@ -1,528 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSExecuteBatchStatementReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSExecuteBatchStatementReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField STATEMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("statements", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSExecuteBatchStatementReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSExecuteBatchStatementReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List statements; // 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 { - SESSION_ID((short)1, "sessionId"), - STATEMENTS((short)2, "statements"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // STATEMENTS - return STATEMENTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATEMENTS, new org.apache.thrift.meta_data.FieldMetaData("statements", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSExecuteBatchStatementReq.class, metaDataMap); - } - - public TSExecuteBatchStatementReq() { - } - - public TSExecuteBatchStatementReq( - long sessionId, - java.util.List statements) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.statements = statements; - } - - /** - * Performs a deep copy on other. - */ - public TSExecuteBatchStatementReq(TSExecuteBatchStatementReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetStatements()) { - java.util.List __this__statements = new java.util.ArrayList(other.statements); - this.statements = __this__statements; - } - } - - @Override - public TSExecuteBatchStatementReq deepCopy() { - return new TSExecuteBatchStatementReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.statements = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSExecuteBatchStatementReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getStatementsSize() { - return (this.statements == null) ? 0 : this.statements.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getStatementsIterator() { - return (this.statements == null) ? null : this.statements.iterator(); - } - - public void addToStatements(java.lang.String elem) { - if (this.statements == null) { - this.statements = new java.util.ArrayList(); - } - this.statements.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getStatements() { - return this.statements; - } - - public TSExecuteBatchStatementReq setStatements(@org.apache.thrift.annotation.Nullable java.util.List statements) { - this.statements = statements; - return this; - } - - public void unsetStatements() { - this.statements = null; - } - - /** Returns true if field statements is set (has been assigned a value) and false otherwise */ - public boolean isSetStatements() { - return this.statements != null; - } - - public void setStatementsIsSet(boolean value) { - if (!value) { - this.statements = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case STATEMENTS: - if (value == null) { - unsetStatements(); - } else { - setStatements((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case STATEMENTS: - return getStatements(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case STATEMENTS: - return isSetStatements(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSExecuteBatchStatementReq) - return this.equals((TSExecuteBatchStatementReq)that); - return false; - } - - public boolean equals(TSExecuteBatchStatementReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_statements = true && this.isSetStatements(); - boolean that_present_statements = true && that.isSetStatements(); - if (this_present_statements || that_present_statements) { - if (!(this_present_statements && that_present_statements)) - return false; - if (!this.statements.equals(that.statements)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetStatements()) ? 131071 : 524287); - if (isSetStatements()) - hashCode = hashCode * 8191 + statements.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSExecuteBatchStatementReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatements(), other.isSetStatements()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatements()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statements, other.statements); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSExecuteBatchStatementReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("statements:"); - if (this.statements == null) { - sb.append("null"); - } else { - sb.append(this.statements); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (statements == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statements' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSExecuteBatchStatementReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSExecuteBatchStatementReqStandardScheme getScheme() { - return new TSExecuteBatchStatementReqStandardScheme(); - } - } - - private static class TSExecuteBatchStatementReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSExecuteBatchStatementReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STATEMENTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list126 = iprot.readListBegin(); - struct.statements = new java.util.ArrayList(_list126.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem127; - for (int _i128 = 0; _i128 < _list126.size; ++_i128) - { - _elem127 = iprot.readString(); - struct.statements.add(_elem127); - } - iprot.readListEnd(); - } - struct.setStatementsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSExecuteBatchStatementReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.statements != null) { - oprot.writeFieldBegin(STATEMENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.statements.size())); - for (java.lang.String _iter129 : struct.statements) - { - oprot.writeString(_iter129); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSExecuteBatchStatementReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSExecuteBatchStatementReqTupleScheme getScheme() { - return new TSExecuteBatchStatementReqTupleScheme(); - } - } - - private static class TSExecuteBatchStatementReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSExecuteBatchStatementReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - { - oprot.writeI32(struct.statements.size()); - for (java.lang.String _iter130 : struct.statements) - { - oprot.writeString(_iter130); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSExecuteBatchStatementReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - { - org.apache.thrift.protocol.TList _list131 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.statements = new java.util.ArrayList(_list131.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem132; - for (int _i133 = 0; _i133 < _list131.size; ++_i133) - { - _elem132 = iprot.readString(); - struct.statements.add(_elem132); - } - } - struct.setStatementsIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementReq.java deleted file mode 100644 index e914f92c37451..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementReq.java +++ /dev/null @@ -1,971 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSExecuteStatementReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSExecuteStatementReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField STATEMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("statement", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField ENABLE_REDIRECT_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("enableRedirectQuery", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField JDBC_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("jdbcQuery", org.apache.thrift.protocol.TType.BOOL, (short)7); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSExecuteStatementReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSExecuteStatementReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String statement; // required - public long statementId; // required - public int fetchSize; // optional - public long timeout; // optional - public boolean enableRedirectQuery; // optional - public boolean jdbcQuery; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - STATEMENT((short)2, "statement"), - STATEMENT_ID((short)3, "statementId"), - FETCH_SIZE((short)4, "fetchSize"), - TIMEOUT((short)5, "timeout"), - ENABLE_REDIRECT_QUERY((short)6, "enableRedirectQuery"), - JDBC_QUERY((short)7, "jdbcQuery"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // STATEMENT - return STATEMENT; - case 3: // STATEMENT_ID - return STATEMENT_ID; - case 4: // FETCH_SIZE - return FETCH_SIZE; - case 5: // TIMEOUT - return TIMEOUT; - case 6: // ENABLE_REDIRECT_QUERY - return ENABLE_REDIRECT_QUERY; - case 7: // JDBC_QUERY - return JDBC_QUERY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __STATEMENTID_ISSET_ID = 1; - private static final int __FETCHSIZE_ISSET_ID = 2; - private static final int __TIMEOUT_ISSET_ID = 3; - private static final int __ENABLEREDIRECTQUERY_ISSET_ID = 4; - private static final int __JDBCQUERY_ISSET_ID = 5; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.FETCH_SIZE,_Fields.TIMEOUT,_Fields.ENABLE_REDIRECT_QUERY,_Fields.JDBC_QUERY}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATEMENT, new org.apache.thrift.meta_data.FieldMetaData("statement", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.ENABLE_REDIRECT_QUERY, new org.apache.thrift.meta_data.FieldMetaData("enableRedirectQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.JDBC_QUERY, new org.apache.thrift.meta_data.FieldMetaData("jdbcQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSExecuteStatementReq.class, metaDataMap); - } - - public TSExecuteStatementReq() { - } - - public TSExecuteStatementReq( - long sessionId, - java.lang.String statement, - long statementId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.statement = statement; - this.statementId = statementId; - setStatementIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSExecuteStatementReq(TSExecuteStatementReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetStatement()) { - this.statement = other.statement; - } - this.statementId = other.statementId; - this.fetchSize = other.fetchSize; - this.timeout = other.timeout; - this.enableRedirectQuery = other.enableRedirectQuery; - this.jdbcQuery = other.jdbcQuery; - } - - @Override - public TSExecuteStatementReq deepCopy() { - return new TSExecuteStatementReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.statement = null; - setStatementIdIsSet(false); - this.statementId = 0; - setFetchSizeIsSet(false); - this.fetchSize = 0; - setTimeoutIsSet(false); - this.timeout = 0; - setEnableRedirectQueryIsSet(false); - this.enableRedirectQuery = false; - setJdbcQueryIsSet(false); - this.jdbcQuery = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSExecuteStatementReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getStatement() { - return this.statement; - } - - public TSExecuteStatementReq setStatement(@org.apache.thrift.annotation.Nullable java.lang.String statement) { - this.statement = statement; - return this; - } - - public void unsetStatement() { - this.statement = null; - } - - /** Returns true if field statement is set (has been assigned a value) and false otherwise */ - public boolean isSetStatement() { - return this.statement != null; - } - - public void setStatementIsSet(boolean value) { - if (!value) { - this.statement = null; - } - } - - public long getStatementId() { - return this.statementId; - } - - public TSExecuteStatementReq setStatementId(long statementId) { - this.statementId = statementId; - setStatementIdIsSet(true); - return this; - } - - public void unsetStatementId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ - public boolean isSetStatementId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - public void setStatementIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); - } - - public int getFetchSize() { - return this.fetchSize; - } - - public TSExecuteStatementReq setFetchSize(int fetchSize) { - this.fetchSize = fetchSize; - setFetchSizeIsSet(true); - return this; - } - - public void unsetFetchSize() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ - public boolean isSetFetchSize() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - public void setFetchSizeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); - } - - public long getTimeout() { - return this.timeout; - } - - public TSExecuteStatementReq setTimeout(long timeout) { - this.timeout = timeout; - setTimeoutIsSet(true); - return this; - } - - public void unsetTimeout() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeout() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - public void setTimeoutIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); - } - - public boolean isEnableRedirectQuery() { - return this.enableRedirectQuery; - } - - public TSExecuteStatementReq setEnableRedirectQuery(boolean enableRedirectQuery) { - this.enableRedirectQuery = enableRedirectQuery; - setEnableRedirectQueryIsSet(true); - return this; - } - - public void unsetEnableRedirectQuery() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); - } - - /** Returns true if field enableRedirectQuery is set (has been assigned a value) and false otherwise */ - public boolean isSetEnableRedirectQuery() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); - } - - public void setEnableRedirectQueryIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID, value); - } - - public boolean isJdbcQuery() { - return this.jdbcQuery; - } - - public TSExecuteStatementReq setJdbcQuery(boolean jdbcQuery) { - this.jdbcQuery = jdbcQuery; - setJdbcQueryIsSet(true); - return this; - } - - public void unsetJdbcQuery() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); - } - - /** Returns true if field jdbcQuery is set (has been assigned a value) and false otherwise */ - public boolean isSetJdbcQuery() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); - } - - public void setJdbcQueryIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JDBCQUERY_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case STATEMENT: - if (value == null) { - unsetStatement(); - } else { - setStatement((java.lang.String)value); - } - break; - - case STATEMENT_ID: - if (value == null) { - unsetStatementId(); - } else { - setStatementId((java.lang.Long)value); - } - break; - - case FETCH_SIZE: - if (value == null) { - unsetFetchSize(); - } else { - setFetchSize((java.lang.Integer)value); - } - break; - - case TIMEOUT: - if (value == null) { - unsetTimeout(); - } else { - setTimeout((java.lang.Long)value); - } - break; - - case ENABLE_REDIRECT_QUERY: - if (value == null) { - unsetEnableRedirectQuery(); - } else { - setEnableRedirectQuery((java.lang.Boolean)value); - } - break; - - case JDBC_QUERY: - if (value == null) { - unsetJdbcQuery(); - } else { - setJdbcQuery((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case STATEMENT: - return getStatement(); - - case STATEMENT_ID: - return getStatementId(); - - case FETCH_SIZE: - return getFetchSize(); - - case TIMEOUT: - return getTimeout(); - - case ENABLE_REDIRECT_QUERY: - return isEnableRedirectQuery(); - - case JDBC_QUERY: - return isJdbcQuery(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case STATEMENT: - return isSetStatement(); - case STATEMENT_ID: - return isSetStatementId(); - case FETCH_SIZE: - return isSetFetchSize(); - case TIMEOUT: - return isSetTimeout(); - case ENABLE_REDIRECT_QUERY: - return isSetEnableRedirectQuery(); - case JDBC_QUERY: - return isSetJdbcQuery(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSExecuteStatementReq) - return this.equals((TSExecuteStatementReq)that); - return false; - } - - public boolean equals(TSExecuteStatementReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_statement = true && this.isSetStatement(); - boolean that_present_statement = true && that.isSetStatement(); - if (this_present_statement || that_present_statement) { - if (!(this_present_statement && that_present_statement)) - return false; - if (!this.statement.equals(that.statement)) - return false; - } - - boolean this_present_statementId = true; - boolean that_present_statementId = true; - if (this_present_statementId || that_present_statementId) { - if (!(this_present_statementId && that_present_statementId)) - return false; - if (this.statementId != that.statementId) - return false; - } - - boolean this_present_fetchSize = true && this.isSetFetchSize(); - boolean that_present_fetchSize = true && that.isSetFetchSize(); - if (this_present_fetchSize || that_present_fetchSize) { - if (!(this_present_fetchSize && that_present_fetchSize)) - return false; - if (this.fetchSize != that.fetchSize) - return false; - } - - boolean this_present_timeout = true && this.isSetTimeout(); - boolean that_present_timeout = true && that.isSetTimeout(); - if (this_present_timeout || that_present_timeout) { - if (!(this_present_timeout && that_present_timeout)) - return false; - if (this.timeout != that.timeout) - return false; - } - - boolean this_present_enableRedirectQuery = true && this.isSetEnableRedirectQuery(); - boolean that_present_enableRedirectQuery = true && that.isSetEnableRedirectQuery(); - if (this_present_enableRedirectQuery || that_present_enableRedirectQuery) { - if (!(this_present_enableRedirectQuery && that_present_enableRedirectQuery)) - return false; - if (this.enableRedirectQuery != that.enableRedirectQuery) - return false; - } - - boolean this_present_jdbcQuery = true && this.isSetJdbcQuery(); - boolean that_present_jdbcQuery = true && that.isSetJdbcQuery(); - if (this_present_jdbcQuery || that_present_jdbcQuery) { - if (!(this_present_jdbcQuery && that_present_jdbcQuery)) - return false; - if (this.jdbcQuery != that.jdbcQuery) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetStatement()) ? 131071 : 524287); - if (isSetStatement()) - hashCode = hashCode * 8191 + statement.hashCode(); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); - - hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); - if (isSetFetchSize()) - hashCode = hashCode * 8191 + fetchSize; - - hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); - if (isSetTimeout()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); - - hashCode = hashCode * 8191 + ((isSetEnableRedirectQuery()) ? 131071 : 524287); - if (isSetEnableRedirectQuery()) - hashCode = hashCode * 8191 + ((enableRedirectQuery) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetJdbcQuery()) ? 131071 : 524287); - if (isSetJdbcQuery()) - hashCode = hashCode * 8191 + ((jdbcQuery) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSExecuteStatementReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatement(), other.isSetStatement()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatement()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statement, other.statement); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatementId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFetchSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEnableRedirectQuery(), other.isSetEnableRedirectQuery()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnableRedirectQuery()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableRedirectQuery, other.enableRedirectQuery); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetJdbcQuery(), other.isSetJdbcQuery()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetJdbcQuery()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jdbcQuery, other.jdbcQuery); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSExecuteStatementReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("statement:"); - if (this.statement == null) { - sb.append("null"); - } else { - sb.append(this.statement); - } - first = false; - if (!first) sb.append(", "); - sb.append("statementId:"); - sb.append(this.statementId); - first = false; - if (isSetFetchSize()) { - if (!first) sb.append(", "); - sb.append("fetchSize:"); - sb.append(this.fetchSize); - first = false; - } - if (isSetTimeout()) { - if (!first) sb.append(", "); - sb.append("timeout:"); - sb.append(this.timeout); - first = false; - } - if (isSetEnableRedirectQuery()) { - if (!first) sb.append(", "); - sb.append("enableRedirectQuery:"); - sb.append(this.enableRedirectQuery); - first = false; - } - if (isSetJdbcQuery()) { - if (!first) sb.append(", "); - sb.append("jdbcQuery:"); - sb.append(this.jdbcQuery); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (statement == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statement' was not present! Struct: " + toString()); - } - // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSExecuteStatementReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSExecuteStatementReqStandardScheme getScheme() { - return new TSExecuteStatementReqStandardScheme(); - } - } - - private static class TSExecuteStatementReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSExecuteStatementReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STATEMENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.statement = iprot.readString(); - struct.setStatementIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // STATEMENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // FETCH_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TIMEOUT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // ENABLE_REDIRECT_QUERY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.enableRedirectQuery = iprot.readBool(); - struct.setEnableRedirectQueryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // JDBC_QUERY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.jdbcQuery = iprot.readBool(); - struct.setJdbcQueryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetStatementId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSExecuteStatementReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.statement != null) { - oprot.writeFieldBegin(STATEMENT_FIELD_DESC); - oprot.writeString(struct.statement); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); - oprot.writeI64(struct.statementId); - oprot.writeFieldEnd(); - if (struct.isSetFetchSize()) { - oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); - oprot.writeI32(struct.fetchSize); - oprot.writeFieldEnd(); - } - if (struct.isSetTimeout()) { - oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); - oprot.writeI64(struct.timeout); - oprot.writeFieldEnd(); - } - if (struct.isSetEnableRedirectQuery()) { - oprot.writeFieldBegin(ENABLE_REDIRECT_QUERY_FIELD_DESC); - oprot.writeBool(struct.enableRedirectQuery); - oprot.writeFieldEnd(); - } - if (struct.isSetJdbcQuery()) { - oprot.writeFieldBegin(JDBC_QUERY_FIELD_DESC); - oprot.writeBool(struct.jdbcQuery); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSExecuteStatementReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSExecuteStatementReqTupleScheme getScheme() { - return new TSExecuteStatementReqTupleScheme(); - } - } - - private static class TSExecuteStatementReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.statement); - oprot.writeI64(struct.statementId); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetFetchSize()) { - optionals.set(0); - } - if (struct.isSetTimeout()) { - optionals.set(1); - } - if (struct.isSetEnableRedirectQuery()) { - optionals.set(2); - } - if (struct.isSetJdbcQuery()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetFetchSize()) { - oprot.writeI32(struct.fetchSize); - } - if (struct.isSetTimeout()) { - oprot.writeI64(struct.timeout); - } - if (struct.isSetEnableRedirectQuery()) { - oprot.writeBool(struct.enableRedirectQuery); - } - if (struct.isSetJdbcQuery()) { - oprot.writeBool(struct.jdbcQuery); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.statement = iprot.readString(); - struct.setStatementIsSet(true); - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } - if (incoming.get(1)) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } - if (incoming.get(2)) { - struct.enableRedirectQuery = iprot.readBool(); - struct.setEnableRedirectQueryIsSet(true); - } - if (incoming.get(3)) { - struct.jdbcQuery = iprot.readBool(); - struct.setJdbcQueryIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementResp.java deleted file mode 100644 index 898a0aeb0fdad..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSExecuteStatementResp.java +++ /dev/null @@ -1,2441 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSExecuteStatementResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSExecuteStatementResp"); - - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField IGNORE_TIME_STAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("ignoreTimeStamp", org.apache.thrift.protocol.TType.BOOL, (short)5); - private static final org.apache.thrift.protocol.TField DATA_TYPE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTypeList", org.apache.thrift.protocol.TType.LIST, (short)6); - private static final org.apache.thrift.protocol.TField QUERY_DATA_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("queryDataSet", org.apache.thrift.protocol.TType.STRUCT, (short)7); - private static final org.apache.thrift.protocol.TField NON_ALIGN_QUERY_DATA_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("nonAlignQueryDataSet", org.apache.thrift.protocol.TType.STRUCT, (short)8); - private static final org.apache.thrift.protocol.TField COLUMN_NAME_INDEX_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("columnNameIndexMap", org.apache.thrift.protocol.TType.MAP, (short)9); - private static final org.apache.thrift.protocol.TField SG_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("sgColumns", org.apache.thrift.protocol.TType.LIST, (short)10); - private static final org.apache.thrift.protocol.TField ALIAS_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("aliasColumns", org.apache.thrift.protocol.TType.LIST, (short)11); - private static final org.apache.thrift.protocol.TField TRACING_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tracingInfo", org.apache.thrift.protocol.TType.STRUCT, (short)12); - private static final org.apache.thrift.protocol.TField QUERY_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("queryResult", org.apache.thrift.protocol.TType.LIST, (short)13); - private static final org.apache.thrift.protocol.TField MORE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("moreData", org.apache.thrift.protocol.TType.BOOL, (short)14); - private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)15); - private static final org.apache.thrift.protocol.TField TABLE_MODEL_FIELD_DESC = new org.apache.thrift.protocol.TField("tableModel", org.apache.thrift.protocol.TType.BOOL, (short)16); - private static final org.apache.thrift.protocol.TField COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("columnIndex2TsBlockColumnIndexList", org.apache.thrift.protocol.TType.LIST, (short)17); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSExecuteStatementRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSExecuteStatementRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required - public long queryId; // optional - public @org.apache.thrift.annotation.Nullable java.util.List columns; // optional - public @org.apache.thrift.annotation.Nullable java.lang.String operationType; // optional - public boolean ignoreTimeStamp; // optional - public @org.apache.thrift.annotation.Nullable java.util.List dataTypeList; // optional - public @org.apache.thrift.annotation.Nullable TSQueryDataSet queryDataSet; // optional - public @org.apache.thrift.annotation.Nullable TSQueryNonAlignDataSet nonAlignQueryDataSet; // optional - public @org.apache.thrift.annotation.Nullable java.util.Map columnNameIndexMap; // optional - public @org.apache.thrift.annotation.Nullable java.util.List sgColumns; // optional - public @org.apache.thrift.annotation.Nullable java.util.List aliasColumns; // optional - public @org.apache.thrift.annotation.Nullable TSTracingInfo tracingInfo; // optional - public @org.apache.thrift.annotation.Nullable java.util.List queryResult; // optional - public boolean moreData; // optional - public @org.apache.thrift.annotation.Nullable java.lang.String database; // optional - public boolean tableModel; // optional - public @org.apache.thrift.annotation.Nullable java.util.List columnIndex2TsBlockColumnIndexList; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATUS((short)1, "status"), - QUERY_ID((short)2, "queryId"), - COLUMNS((short)3, "columns"), - OPERATION_TYPE((short)4, "operationType"), - IGNORE_TIME_STAMP((short)5, "ignoreTimeStamp"), - DATA_TYPE_LIST((short)6, "dataTypeList"), - QUERY_DATA_SET((short)7, "queryDataSet"), - NON_ALIGN_QUERY_DATA_SET((short)8, "nonAlignQueryDataSet"), - COLUMN_NAME_INDEX_MAP((short)9, "columnNameIndexMap"), - SG_COLUMNS((short)10, "sgColumns"), - ALIAS_COLUMNS((short)11, "aliasColumns"), - TRACING_INFO((short)12, "tracingInfo"), - QUERY_RESULT((short)13, "queryResult"), - MORE_DATA((short)14, "moreData"), - DATABASE((short)15, "database"), - TABLE_MODEL((short)16, "tableModel"), - COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST((short)17, "columnIndex2TsBlockColumnIndexList"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATUS - return STATUS; - case 2: // QUERY_ID - return QUERY_ID; - case 3: // COLUMNS - return COLUMNS; - case 4: // OPERATION_TYPE - return OPERATION_TYPE; - case 5: // IGNORE_TIME_STAMP - return IGNORE_TIME_STAMP; - case 6: // DATA_TYPE_LIST - return DATA_TYPE_LIST; - case 7: // QUERY_DATA_SET - return QUERY_DATA_SET; - case 8: // NON_ALIGN_QUERY_DATA_SET - return NON_ALIGN_QUERY_DATA_SET; - case 9: // COLUMN_NAME_INDEX_MAP - return COLUMN_NAME_INDEX_MAP; - case 10: // SG_COLUMNS - return SG_COLUMNS; - case 11: // ALIAS_COLUMNS - return ALIAS_COLUMNS; - case 12: // TRACING_INFO - return TRACING_INFO; - case 13: // QUERY_RESULT - return QUERY_RESULT; - case 14: // MORE_DATA - return MORE_DATA; - case 15: // DATABASE - return DATABASE; - case 16: // TABLE_MODEL - return TABLE_MODEL; - case 17: // COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST - return COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __QUERYID_ISSET_ID = 0; - private static final int __IGNORETIMESTAMP_ISSET_ID = 1; - private static final int __MOREDATA_ISSET_ID = 2; - private static final int __TABLEMODEL_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.QUERY_ID,_Fields.COLUMNS,_Fields.OPERATION_TYPE,_Fields.IGNORE_TIME_STAMP,_Fields.DATA_TYPE_LIST,_Fields.QUERY_DATA_SET,_Fields.NON_ALIGN_QUERY_DATA_SET,_Fields.COLUMN_NAME_INDEX_MAP,_Fields.SG_COLUMNS,_Fields.ALIAS_COLUMNS,_Fields.TRACING_INFO,_Fields.QUERY_RESULT,_Fields.MORE_DATA,_Fields.DATABASE,_Fields.TABLE_MODEL,_Fields.COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST}; - 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IGNORE_TIME_STAMP, new org.apache.thrift.meta_data.FieldMetaData("ignoreTimeStamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.DATA_TYPE_LIST, new org.apache.thrift.meta_data.FieldMetaData("dataTypeList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.QUERY_DATA_SET, new org.apache.thrift.meta_data.FieldMetaData("queryDataSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryDataSet.class))); - tmpMap.put(_Fields.NON_ALIGN_QUERY_DATA_SET, new org.apache.thrift.meta_data.FieldMetaData("nonAlignQueryDataSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryNonAlignDataSet.class))); - tmpMap.put(_Fields.COLUMN_NAME_INDEX_MAP, new org.apache.thrift.meta_data.FieldMetaData("columnNameIndexMap", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.SG_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("sgColumns", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.ALIAS_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("aliasColumns", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)))); - tmpMap.put(_Fields.TRACING_INFO, new org.apache.thrift.meta_data.FieldMetaData("tracingInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSTracingInfo.class))); - tmpMap.put(_Fields.QUERY_RESULT, new org.apache.thrift.meta_data.FieldMetaData("queryResult", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.MORE_DATA, new org.apache.thrift.meta_data.FieldMetaData("moreData", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_MODEL, new org.apache.thrift.meta_data.FieldMetaData("tableModel", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST, new org.apache.thrift.meta_data.FieldMetaData("columnIndex2TsBlockColumnIndexList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSExecuteStatementResp.class, metaDataMap); - } - - public TSExecuteStatementResp() { - } - - public TSExecuteStatementResp( - org.apache.iotdb.common.rpc.thrift.TSStatus status) - { - this(); - this.status = status; - } - - /** - * Performs a deep copy on other. - */ - public TSExecuteStatementResp(TSExecuteStatementResp other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetStatus()) { - this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); - } - this.queryId = other.queryId; - if (other.isSetColumns()) { - java.util.List __this__columns = new java.util.ArrayList(other.columns); - this.columns = __this__columns; - } - if (other.isSetOperationType()) { - this.operationType = other.operationType; - } - this.ignoreTimeStamp = other.ignoreTimeStamp; - if (other.isSetDataTypeList()) { - java.util.List __this__dataTypeList = new java.util.ArrayList(other.dataTypeList); - this.dataTypeList = __this__dataTypeList; - } - if (other.isSetQueryDataSet()) { - this.queryDataSet = new TSQueryDataSet(other.queryDataSet); - } - if (other.isSetNonAlignQueryDataSet()) { - this.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(other.nonAlignQueryDataSet); - } - if (other.isSetColumnNameIndexMap()) { - java.util.Map __this__columnNameIndexMap = new java.util.HashMap(other.columnNameIndexMap); - this.columnNameIndexMap = __this__columnNameIndexMap; - } - if (other.isSetSgColumns()) { - java.util.List __this__sgColumns = new java.util.ArrayList(other.sgColumns); - this.sgColumns = __this__sgColumns; - } - if (other.isSetAliasColumns()) { - java.util.List __this__aliasColumns = new java.util.ArrayList(other.aliasColumns); - this.aliasColumns = __this__aliasColumns; - } - if (other.isSetTracingInfo()) { - this.tracingInfo = new TSTracingInfo(other.tracingInfo); - } - if (other.isSetQueryResult()) { - java.util.List __this__queryResult = new java.util.ArrayList(other.queryResult); - this.queryResult = __this__queryResult; - } - this.moreData = other.moreData; - if (other.isSetDatabase()) { - this.database = other.database; - } - this.tableModel = other.tableModel; - if (other.isSetColumnIndex2TsBlockColumnIndexList()) { - java.util.List __this__columnIndex2TsBlockColumnIndexList = new java.util.ArrayList(other.columnIndex2TsBlockColumnIndexList); - this.columnIndex2TsBlockColumnIndexList = __this__columnIndex2TsBlockColumnIndexList; - } - } - - @Override - public TSExecuteStatementResp deepCopy() { - return new TSExecuteStatementResp(this); - } - - @Override - public void clear() { - this.status = null; - setQueryIdIsSet(false); - this.queryId = 0; - this.columns = null; - this.operationType = null; - setIgnoreTimeStampIsSet(false); - this.ignoreTimeStamp = false; - this.dataTypeList = null; - this.queryDataSet = null; - this.nonAlignQueryDataSet = null; - this.columnNameIndexMap = null; - this.sgColumns = null; - this.aliasColumns = null; - this.tracingInfo = null; - this.queryResult = null; - setMoreDataIsSet(false); - this.moreData = false; - this.database = null; - setTableModelIsSet(false); - this.tableModel = false; - this.columnIndex2TsBlockColumnIndexList = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { - return this.status; - } - - public TSExecuteStatementResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { - this.status = status; - return this; - } - - public void unsetStatus() { - this.status = null; - } - - /** Returns true if field status is set (has been assigned a value) and false otherwise */ - public boolean isSetStatus() { - return this.status != null; - } - - public void setStatusIsSet(boolean value) { - if (!value) { - this.status = null; - } - } - - public long getQueryId() { - return this.queryId; - } - - public TSExecuteStatementResp setQueryId(long queryId) { - this.queryId = queryId; - setQueryIdIsSet(true); - return this; - } - - public void unsetQueryId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - public void setQueryIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); - } - - public int getColumnsSize() { - return (this.columns == null) ? 0 : this.columns.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getColumnsIterator() { - return (this.columns == null) ? null : this.columns.iterator(); - } - - public void addToColumns(java.lang.String elem) { - if (this.columns == null) { - this.columns = new java.util.ArrayList(); - } - this.columns.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getColumns() { - return this.columns; - } - - public TSExecuteStatementResp setColumns(@org.apache.thrift.annotation.Nullable java.util.List columns) { - this.columns = columns; - return this; - } - - public void unsetColumns() { - this.columns = null; - } - - /** Returns true if field columns is set (has been assigned a value) and false otherwise */ - public boolean isSetColumns() { - return this.columns != null; - } - - public void setColumnsIsSet(boolean value) { - if (!value) { - this.columns = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getOperationType() { - return this.operationType; - } - - public TSExecuteStatementResp setOperationType(@org.apache.thrift.annotation.Nullable java.lang.String operationType) { - this.operationType = operationType; - return this; - } - - public void unsetOperationType() { - this.operationType = null; - } - - /** Returns true if field operationType is set (has been assigned a value) and false otherwise */ - public boolean isSetOperationType() { - return this.operationType != null; - } - - public void setOperationTypeIsSet(boolean value) { - if (!value) { - this.operationType = null; - } - } - - public boolean isIgnoreTimeStamp() { - return this.ignoreTimeStamp; - } - - public TSExecuteStatementResp setIgnoreTimeStamp(boolean ignoreTimeStamp) { - this.ignoreTimeStamp = ignoreTimeStamp; - setIgnoreTimeStampIsSet(true); - return this; - } - - public void unsetIgnoreTimeStamp() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IGNORETIMESTAMP_ISSET_ID); - } - - /** Returns true if field ignoreTimeStamp is set (has been assigned a value) and false otherwise */ - public boolean isSetIgnoreTimeStamp() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IGNORETIMESTAMP_ISSET_ID); - } - - public void setIgnoreTimeStampIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IGNORETIMESTAMP_ISSET_ID, value); - } - - public int getDataTypeListSize() { - return (this.dataTypeList == null) ? 0 : this.dataTypeList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getDataTypeListIterator() { - return (this.dataTypeList == null) ? null : this.dataTypeList.iterator(); - } - - public void addToDataTypeList(java.lang.String elem) { - if (this.dataTypeList == null) { - this.dataTypeList = new java.util.ArrayList(); - } - this.dataTypeList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getDataTypeList() { - return this.dataTypeList; - } - - public TSExecuteStatementResp setDataTypeList(@org.apache.thrift.annotation.Nullable java.util.List dataTypeList) { - this.dataTypeList = dataTypeList; - return this; - } - - public void unsetDataTypeList() { - this.dataTypeList = null; - } - - /** Returns true if field dataTypeList is set (has been assigned a value) and false otherwise */ - public boolean isSetDataTypeList() { - return this.dataTypeList != null; - } - - public void setDataTypeListIsSet(boolean value) { - if (!value) { - this.dataTypeList = null; - } - } - - @org.apache.thrift.annotation.Nullable - public TSQueryDataSet getQueryDataSet() { - return this.queryDataSet; - } - - public TSExecuteStatementResp setQueryDataSet(@org.apache.thrift.annotation.Nullable TSQueryDataSet queryDataSet) { - this.queryDataSet = queryDataSet; - return this; - } - - public void unsetQueryDataSet() { - this.queryDataSet = null; - } - - /** Returns true if field queryDataSet is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryDataSet() { - return this.queryDataSet != null; - } - - public void setQueryDataSetIsSet(boolean value) { - if (!value) { - this.queryDataSet = null; - } - } - - @org.apache.thrift.annotation.Nullable - public TSQueryNonAlignDataSet getNonAlignQueryDataSet() { - return this.nonAlignQueryDataSet; - } - - public TSExecuteStatementResp setNonAlignQueryDataSet(@org.apache.thrift.annotation.Nullable TSQueryNonAlignDataSet nonAlignQueryDataSet) { - this.nonAlignQueryDataSet = nonAlignQueryDataSet; - return this; - } - - public void unsetNonAlignQueryDataSet() { - this.nonAlignQueryDataSet = null; - } - - /** Returns true if field nonAlignQueryDataSet is set (has been assigned a value) and false otherwise */ - public boolean isSetNonAlignQueryDataSet() { - return this.nonAlignQueryDataSet != null; - } - - public void setNonAlignQueryDataSetIsSet(boolean value) { - if (!value) { - this.nonAlignQueryDataSet = null; - } - } - - public int getColumnNameIndexMapSize() { - return (this.columnNameIndexMap == null) ? 0 : this.columnNameIndexMap.size(); - } - - public void putToColumnNameIndexMap(java.lang.String key, int val) { - if (this.columnNameIndexMap == null) { - this.columnNameIndexMap = new java.util.HashMap(); - } - this.columnNameIndexMap.put(key, val); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Map getColumnNameIndexMap() { - return this.columnNameIndexMap; - } - - public TSExecuteStatementResp setColumnNameIndexMap(@org.apache.thrift.annotation.Nullable java.util.Map columnNameIndexMap) { - this.columnNameIndexMap = columnNameIndexMap; - return this; - } - - public void unsetColumnNameIndexMap() { - this.columnNameIndexMap = null; - } - - /** Returns true if field columnNameIndexMap is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnNameIndexMap() { - return this.columnNameIndexMap != null; - } - - public void setColumnNameIndexMapIsSet(boolean value) { - if (!value) { - this.columnNameIndexMap = null; - } - } - - public int getSgColumnsSize() { - return (this.sgColumns == null) ? 0 : this.sgColumns.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getSgColumnsIterator() { - return (this.sgColumns == null) ? null : this.sgColumns.iterator(); - } - - public void addToSgColumns(java.lang.String elem) { - if (this.sgColumns == null) { - this.sgColumns = new java.util.ArrayList(); - } - this.sgColumns.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getSgColumns() { - return this.sgColumns; - } - - public TSExecuteStatementResp setSgColumns(@org.apache.thrift.annotation.Nullable java.util.List sgColumns) { - this.sgColumns = sgColumns; - return this; - } - - public void unsetSgColumns() { - this.sgColumns = null; - } - - /** Returns true if field sgColumns is set (has been assigned a value) and false otherwise */ - public boolean isSetSgColumns() { - return this.sgColumns != null; - } - - public void setSgColumnsIsSet(boolean value) { - if (!value) { - this.sgColumns = null; - } - } - - public int getAliasColumnsSize() { - return (this.aliasColumns == null) ? 0 : this.aliasColumns.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getAliasColumnsIterator() { - return (this.aliasColumns == null) ? null : this.aliasColumns.iterator(); - } - - public void addToAliasColumns(byte elem) { - if (this.aliasColumns == null) { - this.aliasColumns = new java.util.ArrayList(); - } - this.aliasColumns.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getAliasColumns() { - return this.aliasColumns; - } - - public TSExecuteStatementResp setAliasColumns(@org.apache.thrift.annotation.Nullable java.util.List aliasColumns) { - this.aliasColumns = aliasColumns; - return this; - } - - public void unsetAliasColumns() { - this.aliasColumns = null; - } - - /** Returns true if field aliasColumns is set (has been assigned a value) and false otherwise */ - public boolean isSetAliasColumns() { - return this.aliasColumns != null; - } - - public void setAliasColumnsIsSet(boolean value) { - if (!value) { - this.aliasColumns = null; - } - } - - @org.apache.thrift.annotation.Nullable - public TSTracingInfo getTracingInfo() { - return this.tracingInfo; - } - - public TSExecuteStatementResp setTracingInfo(@org.apache.thrift.annotation.Nullable TSTracingInfo tracingInfo) { - this.tracingInfo = tracingInfo; - return this; - } - - public void unsetTracingInfo() { - this.tracingInfo = null; - } - - /** Returns true if field tracingInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetTracingInfo() { - return this.tracingInfo != null; - } - - public void setTracingInfoIsSet(boolean value) { - if (!value) { - this.tracingInfo = null; - } - } - - public int getQueryResultSize() { - return (this.queryResult == null) ? 0 : this.queryResult.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getQueryResultIterator() { - return (this.queryResult == null) ? null : this.queryResult.iterator(); - } - - public void addToQueryResult(java.nio.ByteBuffer elem) { - if (this.queryResult == null) { - this.queryResult = new java.util.ArrayList(); - } - this.queryResult.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getQueryResult() { - return this.queryResult; - } - - public TSExecuteStatementResp setQueryResult(@org.apache.thrift.annotation.Nullable java.util.List queryResult) { - this.queryResult = queryResult; - return this; - } - - public void unsetQueryResult() { - this.queryResult = null; - } - - /** Returns true if field queryResult is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryResult() { - return this.queryResult != null; - } - - public void setQueryResultIsSet(boolean value) { - if (!value) { - this.queryResult = null; - } - } - - public boolean isMoreData() { - return this.moreData; - } - - public TSExecuteStatementResp setMoreData(boolean moreData) { - this.moreData = moreData; - setMoreDataIsSet(true); - return this; - } - - public void unsetMoreData() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MOREDATA_ISSET_ID); - } - - /** Returns true if field moreData is set (has been assigned a value) and false otherwise */ - public boolean isSetMoreData() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MOREDATA_ISSET_ID); - } - - public void setMoreDataIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MOREDATA_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getDatabase() { - return this.database; - } - - public TSExecuteStatementResp setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) { - this.database = database; - return this; - } - - public void unsetDatabase() { - this.database = null; - } - - /** Returns true if field database is set (has been assigned a value) and false otherwise */ - public boolean isSetDatabase() { - return this.database != null; - } - - public void setDatabaseIsSet(boolean value) { - if (!value) { - this.database = null; - } - } - - public boolean isTableModel() { - return this.tableModel; - } - - public TSExecuteStatementResp setTableModel(boolean tableModel) { - this.tableModel = tableModel; - setTableModelIsSet(true); - return this; - } - - public void unsetTableModel() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLEMODEL_ISSET_ID); - } - - /** Returns true if field tableModel is set (has been assigned a value) and false otherwise */ - public boolean isSetTableModel() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLEMODEL_ISSET_ID); - } - - public void setTableModelIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLEMODEL_ISSET_ID, value); - } - - public int getColumnIndex2TsBlockColumnIndexListSize() { - return (this.columnIndex2TsBlockColumnIndexList == null) ? 0 : this.columnIndex2TsBlockColumnIndexList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getColumnIndex2TsBlockColumnIndexListIterator() { - return (this.columnIndex2TsBlockColumnIndexList == null) ? null : this.columnIndex2TsBlockColumnIndexList.iterator(); - } - - public void addToColumnIndex2TsBlockColumnIndexList(int elem) { - if (this.columnIndex2TsBlockColumnIndexList == null) { - this.columnIndex2TsBlockColumnIndexList = new java.util.ArrayList(); - } - this.columnIndex2TsBlockColumnIndexList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getColumnIndex2TsBlockColumnIndexList() { - return this.columnIndex2TsBlockColumnIndexList; - } - - public TSExecuteStatementResp setColumnIndex2TsBlockColumnIndexList(@org.apache.thrift.annotation.Nullable java.util.List columnIndex2TsBlockColumnIndexList) { - this.columnIndex2TsBlockColumnIndexList = columnIndex2TsBlockColumnIndexList; - return this; - } - - public void unsetColumnIndex2TsBlockColumnIndexList() { - this.columnIndex2TsBlockColumnIndexList = null; - } - - /** Returns true if field columnIndex2TsBlockColumnIndexList is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnIndex2TsBlockColumnIndexList() { - return this.columnIndex2TsBlockColumnIndexList != null; - } - - public void setColumnIndex2TsBlockColumnIndexListIsSet(boolean value) { - if (!value) { - this.columnIndex2TsBlockColumnIndexList = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - case QUERY_ID: - if (value == null) { - unsetQueryId(); - } else { - setQueryId((java.lang.Long)value); - } - break; - - case COLUMNS: - if (value == null) { - unsetColumns(); - } else { - setColumns((java.util.List)value); - } - break; - - case OPERATION_TYPE: - if (value == null) { - unsetOperationType(); - } else { - setOperationType((java.lang.String)value); - } - break; - - case IGNORE_TIME_STAMP: - if (value == null) { - unsetIgnoreTimeStamp(); - } else { - setIgnoreTimeStamp((java.lang.Boolean)value); - } - break; - - case DATA_TYPE_LIST: - if (value == null) { - unsetDataTypeList(); - } else { - setDataTypeList((java.util.List)value); - } - break; - - case QUERY_DATA_SET: - if (value == null) { - unsetQueryDataSet(); - } else { - setQueryDataSet((TSQueryDataSet)value); - } - break; - - case NON_ALIGN_QUERY_DATA_SET: - if (value == null) { - unsetNonAlignQueryDataSet(); - } else { - setNonAlignQueryDataSet((TSQueryNonAlignDataSet)value); - } - break; - - case COLUMN_NAME_INDEX_MAP: - if (value == null) { - unsetColumnNameIndexMap(); - } else { - setColumnNameIndexMap((java.util.Map)value); - } - break; - - case SG_COLUMNS: - if (value == null) { - unsetSgColumns(); - } else { - setSgColumns((java.util.List)value); - } - break; - - case ALIAS_COLUMNS: - if (value == null) { - unsetAliasColumns(); - } else { - setAliasColumns((java.util.List)value); - } - break; - - case TRACING_INFO: - if (value == null) { - unsetTracingInfo(); - } else { - setTracingInfo((TSTracingInfo)value); - } - break; - - case QUERY_RESULT: - if (value == null) { - unsetQueryResult(); - } else { - setQueryResult((java.util.List)value); - } - break; - - case MORE_DATA: - if (value == null) { - unsetMoreData(); - } else { - setMoreData((java.lang.Boolean)value); - } - break; - - case DATABASE: - if (value == null) { - unsetDatabase(); - } else { - setDatabase((java.lang.String)value); - } - break; - - case TABLE_MODEL: - if (value == null) { - unsetTableModel(); - } else { - setTableModel((java.lang.Boolean)value); - } - break; - - case COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST: - if (value == null) { - unsetColumnIndex2TsBlockColumnIndexList(); - } else { - setColumnIndex2TsBlockColumnIndexList((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case STATUS: - return getStatus(); - - case QUERY_ID: - return getQueryId(); - - case COLUMNS: - return getColumns(); - - case OPERATION_TYPE: - return getOperationType(); - - case IGNORE_TIME_STAMP: - return isIgnoreTimeStamp(); - - case DATA_TYPE_LIST: - return getDataTypeList(); - - case QUERY_DATA_SET: - return getQueryDataSet(); - - case NON_ALIGN_QUERY_DATA_SET: - return getNonAlignQueryDataSet(); - - case COLUMN_NAME_INDEX_MAP: - return getColumnNameIndexMap(); - - case SG_COLUMNS: - return getSgColumns(); - - case ALIAS_COLUMNS: - return getAliasColumns(); - - case TRACING_INFO: - return getTracingInfo(); - - case QUERY_RESULT: - return getQueryResult(); - - case MORE_DATA: - return isMoreData(); - - case DATABASE: - return getDatabase(); - - case TABLE_MODEL: - return isTableModel(); - - case COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST: - return getColumnIndex2TsBlockColumnIndexList(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case STATUS: - return isSetStatus(); - case QUERY_ID: - return isSetQueryId(); - case COLUMNS: - return isSetColumns(); - case OPERATION_TYPE: - return isSetOperationType(); - case IGNORE_TIME_STAMP: - return isSetIgnoreTimeStamp(); - case DATA_TYPE_LIST: - return isSetDataTypeList(); - case QUERY_DATA_SET: - return isSetQueryDataSet(); - case NON_ALIGN_QUERY_DATA_SET: - return isSetNonAlignQueryDataSet(); - case COLUMN_NAME_INDEX_MAP: - return isSetColumnNameIndexMap(); - case SG_COLUMNS: - return isSetSgColumns(); - case ALIAS_COLUMNS: - return isSetAliasColumns(); - case TRACING_INFO: - return isSetTracingInfo(); - case QUERY_RESULT: - return isSetQueryResult(); - case MORE_DATA: - return isSetMoreData(); - case DATABASE: - return isSetDatabase(); - case TABLE_MODEL: - return isSetTableModel(); - case COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST: - return isSetColumnIndex2TsBlockColumnIndexList(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSExecuteStatementResp) - return this.equals((TSExecuteStatementResp)that); - return false; - } - - public boolean equals(TSExecuteStatementResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_status = true && this.isSetStatus(); - boolean that_present_status = true && that.isSetStatus(); - if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) - return false; - if (!this.status.equals(that.status)) - return false; - } - - boolean this_present_queryId = true && this.isSetQueryId(); - boolean that_present_queryId = true && that.isSetQueryId(); - if (this_present_queryId || that_present_queryId) { - if (!(this_present_queryId && that_present_queryId)) - return false; - if (this.queryId != that.queryId) - return false; - } - - boolean this_present_columns = true && this.isSetColumns(); - boolean that_present_columns = true && that.isSetColumns(); - if (this_present_columns || that_present_columns) { - if (!(this_present_columns && that_present_columns)) - return false; - if (!this.columns.equals(that.columns)) - return false; - } - - 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)) - return false; - if (!this.operationType.equals(that.operationType)) - return false; - } - - boolean this_present_ignoreTimeStamp = true && this.isSetIgnoreTimeStamp(); - boolean that_present_ignoreTimeStamp = true && that.isSetIgnoreTimeStamp(); - if (this_present_ignoreTimeStamp || that_present_ignoreTimeStamp) { - if (!(this_present_ignoreTimeStamp && that_present_ignoreTimeStamp)) - return false; - if (this.ignoreTimeStamp != that.ignoreTimeStamp) - return false; - } - - boolean this_present_dataTypeList = true && this.isSetDataTypeList(); - boolean that_present_dataTypeList = true && that.isSetDataTypeList(); - if (this_present_dataTypeList || that_present_dataTypeList) { - if (!(this_present_dataTypeList && that_present_dataTypeList)) - return false; - if (!this.dataTypeList.equals(that.dataTypeList)) - return false; - } - - boolean this_present_queryDataSet = true && this.isSetQueryDataSet(); - boolean that_present_queryDataSet = true && that.isSetQueryDataSet(); - if (this_present_queryDataSet || that_present_queryDataSet) { - if (!(this_present_queryDataSet && that_present_queryDataSet)) - return false; - if (!this.queryDataSet.equals(that.queryDataSet)) - return false; - } - - boolean this_present_nonAlignQueryDataSet = true && this.isSetNonAlignQueryDataSet(); - boolean that_present_nonAlignQueryDataSet = true && that.isSetNonAlignQueryDataSet(); - if (this_present_nonAlignQueryDataSet || that_present_nonAlignQueryDataSet) { - if (!(this_present_nonAlignQueryDataSet && that_present_nonAlignQueryDataSet)) - return false; - if (!this.nonAlignQueryDataSet.equals(that.nonAlignQueryDataSet)) - return false; - } - - boolean this_present_columnNameIndexMap = true && this.isSetColumnNameIndexMap(); - boolean that_present_columnNameIndexMap = true && that.isSetColumnNameIndexMap(); - if (this_present_columnNameIndexMap || that_present_columnNameIndexMap) { - if (!(this_present_columnNameIndexMap && that_present_columnNameIndexMap)) - return false; - if (!this.columnNameIndexMap.equals(that.columnNameIndexMap)) - return false; - } - - boolean this_present_sgColumns = true && this.isSetSgColumns(); - boolean that_present_sgColumns = true && that.isSetSgColumns(); - if (this_present_sgColumns || that_present_sgColumns) { - if (!(this_present_sgColumns && that_present_sgColumns)) - return false; - if (!this.sgColumns.equals(that.sgColumns)) - return false; - } - - boolean this_present_aliasColumns = true && this.isSetAliasColumns(); - boolean that_present_aliasColumns = true && that.isSetAliasColumns(); - if (this_present_aliasColumns || that_present_aliasColumns) { - if (!(this_present_aliasColumns && that_present_aliasColumns)) - return false; - if (!this.aliasColumns.equals(that.aliasColumns)) - return false; - } - - boolean this_present_tracingInfo = true && this.isSetTracingInfo(); - boolean that_present_tracingInfo = true && that.isSetTracingInfo(); - if (this_present_tracingInfo || that_present_tracingInfo) { - if (!(this_present_tracingInfo && that_present_tracingInfo)) - return false; - if (!this.tracingInfo.equals(that.tracingInfo)) - return false; - } - - boolean this_present_queryResult = true && this.isSetQueryResult(); - boolean that_present_queryResult = true && that.isSetQueryResult(); - if (this_present_queryResult || that_present_queryResult) { - if (!(this_present_queryResult && that_present_queryResult)) - return false; - if (!this.queryResult.equals(that.queryResult)) - return false; - } - - boolean this_present_moreData = true && this.isSetMoreData(); - boolean that_present_moreData = true && that.isSetMoreData(); - if (this_present_moreData || that_present_moreData) { - if (!(this_present_moreData && that_present_moreData)) - return false; - if (this.moreData != that.moreData) - return false; - } - - boolean this_present_database = true && this.isSetDatabase(); - boolean that_present_database = true && that.isSetDatabase(); - if (this_present_database || that_present_database) { - if (!(this_present_database && that_present_database)) - return false; - if (!this.database.equals(that.database)) - return false; - } - - boolean this_present_tableModel = true && this.isSetTableModel(); - boolean that_present_tableModel = true && that.isSetTableModel(); - if (this_present_tableModel || that_present_tableModel) { - if (!(this_present_tableModel && that_present_tableModel)) - return false; - if (this.tableModel != that.tableModel) - return false; - } - - boolean this_present_columnIndex2TsBlockColumnIndexList = true && this.isSetColumnIndex2TsBlockColumnIndexList(); - boolean that_present_columnIndex2TsBlockColumnIndexList = true && that.isSetColumnIndex2TsBlockColumnIndexList(); - if (this_present_columnIndex2TsBlockColumnIndexList || that_present_columnIndex2TsBlockColumnIndexList) { - if (!(this_present_columnIndex2TsBlockColumnIndexList && that_present_columnIndex2TsBlockColumnIndexList)) - return false; - if (!this.columnIndex2TsBlockColumnIndexList.equals(that.columnIndex2TsBlockColumnIndexList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); - if (isSetStatus()) - hashCode = hashCode * 8191 + status.hashCode(); - - hashCode = hashCode * 8191 + ((isSetQueryId()) ? 131071 : 524287); - if (isSetQueryId()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); - - hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287); - if (isSetColumns()) - hashCode = hashCode * 8191 + columns.hashCode(); - - hashCode = hashCode * 8191 + ((isSetOperationType()) ? 131071 : 524287); - if (isSetOperationType()) - hashCode = hashCode * 8191 + operationType.hashCode(); - - hashCode = hashCode * 8191 + ((isSetIgnoreTimeStamp()) ? 131071 : 524287); - if (isSetIgnoreTimeStamp()) - hashCode = hashCode * 8191 + ((ignoreTimeStamp) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetDataTypeList()) ? 131071 : 524287); - if (isSetDataTypeList()) - hashCode = hashCode * 8191 + dataTypeList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetQueryDataSet()) ? 131071 : 524287); - if (isSetQueryDataSet()) - hashCode = hashCode * 8191 + queryDataSet.hashCode(); - - hashCode = hashCode * 8191 + ((isSetNonAlignQueryDataSet()) ? 131071 : 524287); - if (isSetNonAlignQueryDataSet()) - hashCode = hashCode * 8191 + nonAlignQueryDataSet.hashCode(); - - hashCode = hashCode * 8191 + ((isSetColumnNameIndexMap()) ? 131071 : 524287); - if (isSetColumnNameIndexMap()) - hashCode = hashCode * 8191 + columnNameIndexMap.hashCode(); - - hashCode = hashCode * 8191 + ((isSetSgColumns()) ? 131071 : 524287); - if (isSetSgColumns()) - hashCode = hashCode * 8191 + sgColumns.hashCode(); - - hashCode = hashCode * 8191 + ((isSetAliasColumns()) ? 131071 : 524287); - if (isSetAliasColumns()) - hashCode = hashCode * 8191 + aliasColumns.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTracingInfo()) ? 131071 : 524287); - if (isSetTracingInfo()) - hashCode = hashCode * 8191 + tracingInfo.hashCode(); - - hashCode = hashCode * 8191 + ((isSetQueryResult()) ? 131071 : 524287); - if (isSetQueryResult()) - hashCode = hashCode * 8191 + queryResult.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMoreData()) ? 131071 : 524287); - if (isSetMoreData()) - hashCode = hashCode * 8191 + ((moreData) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287); - if (isSetDatabase()) - hashCode = hashCode * 8191 + database.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTableModel()) ? 131071 : 524287); - if (isSetTableModel()) - hashCode = hashCode * 8191 + ((tableModel) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetColumnIndex2TsBlockColumnIndexList()) ? 131071 : 524287); - if (isSetColumnIndex2TsBlockColumnIndexList()) - hashCode = hashCode * 8191 + columnIndex2TsBlockColumnIndexList.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSExecuteStatementResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumns(), other.isSetColumns()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetOperationType(), other.isSetOperationType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOperationType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIgnoreTimeStamp(), other.isSetIgnoreTimeStamp()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIgnoreTimeStamp()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ignoreTimeStamp, other.ignoreTimeStamp); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDataTypeList(), other.isSetDataTypeList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataTypeList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTypeList, other.dataTypeList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryDataSet(), other.isSetQueryDataSet()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryDataSet()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryDataSet, other.queryDataSet); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetNonAlignQueryDataSet(), other.isSetNonAlignQueryDataSet()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNonAlignQueryDataSet()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonAlignQueryDataSet, other.nonAlignQueryDataSet); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnNameIndexMap(), other.isSetColumnNameIndexMap()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnNameIndexMap()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnNameIndexMap, other.columnNameIndexMap); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSgColumns(), other.isSetSgColumns()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSgColumns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sgColumns, other.sgColumns); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetAliasColumns(), other.isSetAliasColumns()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAliasColumns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aliasColumns, other.aliasColumns); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTracingInfo(), other.isSetTracingInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTracingInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tracingInfo, other.tracingInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryResult(), other.isSetQueryResult()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryResult()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryResult, other.queryResult); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMoreData(), other.isSetMoreData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMoreData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.moreData, other.moreData); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDatabase(), other.isSetDatabase()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDatabase()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTableModel(), other.isSetTableModel()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableModel()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableModel, other.tableModel); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnIndex2TsBlockColumnIndexList(), other.isSetColumnIndex2TsBlockColumnIndexList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnIndex2TsBlockColumnIndexList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnIndex2TsBlockColumnIndexList, other.columnIndex2TsBlockColumnIndexList); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSExecuteStatementResp("); - boolean first = true; - - sb.append("status:"); - if (this.status == null) { - sb.append("null"); - } else { - sb.append(this.status); - } - first = false; - if (isSetQueryId()) { - if (!first) sb.append(", "); - sb.append("queryId:"); - sb.append(this.queryId); - first = false; - } - if (isSetColumns()) { - if (!first) sb.append(", "); - sb.append("columns:"); - if (this.columns == null) { - sb.append("null"); - } else { - sb.append(this.columns); - } - first = false; - } - if (isSetOperationType()) { - if (!first) sb.append(", "); - sb.append("operationType:"); - if (this.operationType == null) { - sb.append("null"); - } else { - sb.append(this.operationType); - } - first = false; - } - if (isSetIgnoreTimeStamp()) { - if (!first) sb.append(", "); - sb.append("ignoreTimeStamp:"); - sb.append(this.ignoreTimeStamp); - first = false; - } - if (isSetDataTypeList()) { - if (!first) sb.append(", "); - sb.append("dataTypeList:"); - if (this.dataTypeList == null) { - sb.append("null"); - } else { - sb.append(this.dataTypeList); - } - first = false; - } - if (isSetQueryDataSet()) { - if (!first) sb.append(", "); - sb.append("queryDataSet:"); - if (this.queryDataSet == null) { - sb.append("null"); - } else { - sb.append(this.queryDataSet); - } - first = false; - } - if (isSetNonAlignQueryDataSet()) { - if (!first) sb.append(", "); - sb.append("nonAlignQueryDataSet:"); - if (this.nonAlignQueryDataSet == null) { - sb.append("null"); - } else { - sb.append(this.nonAlignQueryDataSet); - } - first = false; - } - if (isSetColumnNameIndexMap()) { - if (!first) sb.append(", "); - sb.append("columnNameIndexMap:"); - if (this.columnNameIndexMap == null) { - sb.append("null"); - } else { - sb.append(this.columnNameIndexMap); - } - first = false; - } - if (isSetSgColumns()) { - if (!first) sb.append(", "); - sb.append("sgColumns:"); - if (this.sgColumns == null) { - sb.append("null"); - } else { - sb.append(this.sgColumns); - } - first = false; - } - if (isSetAliasColumns()) { - if (!first) sb.append(", "); - sb.append("aliasColumns:"); - if (this.aliasColumns == null) { - sb.append("null"); - } else { - sb.append(this.aliasColumns); - } - first = false; - } - if (isSetTracingInfo()) { - if (!first) sb.append(", "); - sb.append("tracingInfo:"); - if (this.tracingInfo == null) { - sb.append("null"); - } else { - sb.append(this.tracingInfo); - } - first = false; - } - if (isSetQueryResult()) { - if (!first) sb.append(", "); - sb.append("queryResult:"); - if (this.queryResult == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.queryResult, sb); - } - first = false; - } - if (isSetMoreData()) { - if (!first) sb.append(", "); - sb.append("moreData:"); - sb.append(this.moreData); - first = false; - } - if (isSetDatabase()) { - if (!first) sb.append(", "); - sb.append("database:"); - if (this.database == null) { - sb.append("null"); - } else { - sb.append(this.database); - } - first = false; - } - if (isSetTableModel()) { - if (!first) sb.append(", "); - sb.append("tableModel:"); - sb.append(this.tableModel); - first = false; - } - if (isSetColumnIndex2TsBlockColumnIndexList()) { - if (!first) sb.append(", "); - sb.append("columnIndex2TsBlockColumnIndexList:"); - if (this.columnIndex2TsBlockColumnIndexList == null) { - sb.append("null"); - } else { - sb.append(this.columnIndex2TsBlockColumnIndexList); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (status == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); - } - // check for sub-struct validity - if (status != null) { - status.validate(); - } - if (queryDataSet != null) { - queryDataSet.validate(); - } - if (nonAlignQueryDataSet != null) { - nonAlignQueryDataSet.validate(); - } - if (tracingInfo != null) { - tracingInfo.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSExecuteStatementRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSExecuteStatementRespStandardScheme getScheme() { - return new TSExecuteStatementRespStandardScheme(); - } - } - - private static class TSExecuteStatementRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSExecuteStatementResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // QUERY_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // COLUMNS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list48 = iprot.readListBegin(); - struct.columns = new java.util.ArrayList(_list48.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem49; - for (int _i50 = 0; _i50 < _list48.size; ++_i50) - { - _elem49 = iprot.readString(); - struct.columns.add(_elem49); - } - iprot.readListEnd(); - } - struct.setColumnsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // OPERATION_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.operationType = iprot.readString(); - struct.setOperationTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // IGNORE_TIME_STAMP - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.ignoreTimeStamp = iprot.readBool(); - struct.setIgnoreTimeStampIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // DATA_TYPE_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list51 = iprot.readListBegin(); - struct.dataTypeList = new java.util.ArrayList(_list51.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem52; - for (int _i53 = 0; _i53 < _list51.size; ++_i53) - { - _elem52 = iprot.readString(); - struct.dataTypeList.add(_elem52); - } - iprot.readListEnd(); - } - struct.setDataTypeListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // QUERY_DATA_SET - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.queryDataSet = new TSQueryDataSet(); - struct.queryDataSet.read(iprot); - struct.setQueryDataSetIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // NON_ALIGN_QUERY_DATA_SET - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(); - struct.nonAlignQueryDataSet.read(iprot); - struct.setNonAlignQueryDataSetIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // COLUMN_NAME_INDEX_MAP - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map54 = iprot.readMapBegin(); - struct.columnNameIndexMap = new java.util.HashMap(2*_map54.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key55; - int _val56; - for (int _i57 = 0; _i57 < _map54.size; ++_i57) - { - _key55 = iprot.readString(); - _val56 = iprot.readI32(); - struct.columnNameIndexMap.put(_key55, _val56); - } - iprot.readMapEnd(); - } - struct.setColumnNameIndexMapIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // SG_COLUMNS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(); - struct.sgColumns = new java.util.ArrayList(_list58.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem59; - for (int _i60 = 0; _i60 < _list58.size; ++_i60) - { - _elem59 = iprot.readString(); - struct.sgColumns.add(_elem59); - } - iprot.readListEnd(); - } - struct.setSgColumnsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // ALIAS_COLUMNS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list61 = iprot.readListBegin(); - struct.aliasColumns = new java.util.ArrayList(_list61.size); - byte _elem62; - for (int _i63 = 0; _i63 < _list61.size; ++_i63) - { - _elem62 = iprot.readByte(); - struct.aliasColumns.add(_elem62); - } - iprot.readListEnd(); - } - struct.setAliasColumnsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // TRACING_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tracingInfo = new TSTracingInfo(); - struct.tracingInfo.read(iprot); - struct.setTracingInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // QUERY_RESULT - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); - struct.queryResult = new java.util.ArrayList(_list64.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem65; - for (int _i66 = 0; _i66 < _list64.size; ++_i66) - { - _elem65 = iprot.readBinary(); - struct.queryResult.add(_elem65); - } - iprot.readListEnd(); - } - struct.setQueryResultIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 14: // MORE_DATA - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.moreData = iprot.readBool(); - struct.setMoreDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 15: // DATABASE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.database = iprot.readString(); - struct.setDatabaseIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 16: // TABLE_MODEL - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.tableModel = iprot.readBool(); - struct.setTableModelIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 17: // COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list67 = iprot.readListBegin(); - struct.columnIndex2TsBlockColumnIndexList = new java.util.ArrayList(_list67.size); - int _elem68; - for (int _i69 = 0; _i69 < _list67.size; ++_i69) - { - _elem68 = iprot.readI32(); - struct.columnIndex2TsBlockColumnIndexList.add(_elem68); - } - iprot.readListEnd(); - } - struct.setColumnIndex2TsBlockColumnIndexListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSExecuteStatementResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.status != null) { - oprot.writeFieldBegin(STATUS_FIELD_DESC); - struct.status.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.isSetQueryId()) { - oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); - oprot.writeI64(struct.queryId); - oprot.writeFieldEnd(); - } - if (struct.columns != null) { - if (struct.isSetColumns()) { - oprot.writeFieldBegin(COLUMNS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); - for (java.lang.String _iter70 : struct.columns) - { - oprot.writeString(_iter70); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.operationType != null) { - if (struct.isSetOperationType()) { - oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC); - oprot.writeString(struct.operationType); - oprot.writeFieldEnd(); - } - } - if (struct.isSetIgnoreTimeStamp()) { - oprot.writeFieldBegin(IGNORE_TIME_STAMP_FIELD_DESC); - oprot.writeBool(struct.ignoreTimeStamp); - oprot.writeFieldEnd(); - } - if (struct.dataTypeList != null) { - if (struct.isSetDataTypeList()) { - oprot.writeFieldBegin(DATA_TYPE_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.dataTypeList.size())); - for (java.lang.String _iter71 : struct.dataTypeList) - { - oprot.writeString(_iter71); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.queryDataSet != null) { - if (struct.isSetQueryDataSet()) { - oprot.writeFieldBegin(QUERY_DATA_SET_FIELD_DESC); - struct.queryDataSet.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.nonAlignQueryDataSet != null) { - if (struct.isSetNonAlignQueryDataSet()) { - oprot.writeFieldBegin(NON_ALIGN_QUERY_DATA_SET_FIELD_DESC); - struct.nonAlignQueryDataSet.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.columnNameIndexMap != null) { - if (struct.isSetColumnNameIndexMap()) { - oprot.writeFieldBegin(COLUMN_NAME_INDEX_MAP_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.columnNameIndexMap.size())); - for (java.util.Map.Entry _iter72 : struct.columnNameIndexMap.entrySet()) - { - oprot.writeString(_iter72.getKey()); - oprot.writeI32(_iter72.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.sgColumns != null) { - if (struct.isSetSgColumns()) { - oprot.writeFieldBegin(SG_COLUMNS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.sgColumns.size())); - for (java.lang.String _iter73 : struct.sgColumns) - { - oprot.writeString(_iter73); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.aliasColumns != null) { - if (struct.isSetAliasColumns()) { - oprot.writeFieldBegin(ALIAS_COLUMNS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, struct.aliasColumns.size())); - for (byte _iter74 : struct.aliasColumns) - { - oprot.writeByte(_iter74); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.tracingInfo != null) { - if (struct.isSetTracingInfo()) { - oprot.writeFieldBegin(TRACING_INFO_FIELD_DESC); - struct.tracingInfo.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.queryResult != null) { - if (struct.isSetQueryResult()) { - oprot.writeFieldBegin(QUERY_RESULT_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.queryResult.size())); - for (java.nio.ByteBuffer _iter75 : struct.queryResult) - { - oprot.writeBinary(_iter75); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.isSetMoreData()) { - oprot.writeFieldBegin(MORE_DATA_FIELD_DESC); - oprot.writeBool(struct.moreData); - oprot.writeFieldEnd(); - } - if (struct.database != null) { - if (struct.isSetDatabase()) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - oprot.writeString(struct.database); - oprot.writeFieldEnd(); - } - } - if (struct.isSetTableModel()) { - oprot.writeFieldBegin(TABLE_MODEL_FIELD_DESC); - oprot.writeBool(struct.tableModel); - oprot.writeFieldEnd(); - } - if (struct.columnIndex2TsBlockColumnIndexList != null) { - if (struct.isSetColumnIndex2TsBlockColumnIndexList()) { - oprot.writeFieldBegin(COLUMN_INDEX2_TS_BLOCK_COLUMN_INDEX_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.columnIndex2TsBlockColumnIndexList.size())); - for (int _iter76 : struct.columnIndex2TsBlockColumnIndexList) - { - oprot.writeI32(_iter76); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSExecuteStatementRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSExecuteStatementRespTupleScheme getScheme() { - return new TSExecuteStatementRespTupleScheme(); - } - } - - private static class TSExecuteStatementRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status.write(oprot); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetQueryId()) { - optionals.set(0); - } - if (struct.isSetColumns()) { - optionals.set(1); - } - if (struct.isSetOperationType()) { - optionals.set(2); - } - if (struct.isSetIgnoreTimeStamp()) { - optionals.set(3); - } - if (struct.isSetDataTypeList()) { - optionals.set(4); - } - if (struct.isSetQueryDataSet()) { - optionals.set(5); - } - if (struct.isSetNonAlignQueryDataSet()) { - optionals.set(6); - } - if (struct.isSetColumnNameIndexMap()) { - optionals.set(7); - } - if (struct.isSetSgColumns()) { - optionals.set(8); - } - if (struct.isSetAliasColumns()) { - optionals.set(9); - } - if (struct.isSetTracingInfo()) { - optionals.set(10); - } - if (struct.isSetQueryResult()) { - optionals.set(11); - } - if (struct.isSetMoreData()) { - optionals.set(12); - } - if (struct.isSetDatabase()) { - optionals.set(13); - } - if (struct.isSetTableModel()) { - optionals.set(14); - } - if (struct.isSetColumnIndex2TsBlockColumnIndexList()) { - optionals.set(15); - } - oprot.writeBitSet(optionals, 16); - if (struct.isSetQueryId()) { - oprot.writeI64(struct.queryId); - } - if (struct.isSetColumns()) { - { - oprot.writeI32(struct.columns.size()); - for (java.lang.String _iter77 : struct.columns) - { - oprot.writeString(_iter77); - } - } - } - if (struct.isSetOperationType()) { - oprot.writeString(struct.operationType); - } - if (struct.isSetIgnoreTimeStamp()) { - oprot.writeBool(struct.ignoreTimeStamp); - } - if (struct.isSetDataTypeList()) { - { - oprot.writeI32(struct.dataTypeList.size()); - for (java.lang.String _iter78 : struct.dataTypeList) - { - oprot.writeString(_iter78); - } - } - } - if (struct.isSetQueryDataSet()) { - struct.queryDataSet.write(oprot); - } - if (struct.isSetNonAlignQueryDataSet()) { - struct.nonAlignQueryDataSet.write(oprot); - } - if (struct.isSetColumnNameIndexMap()) { - { - oprot.writeI32(struct.columnNameIndexMap.size()); - for (java.util.Map.Entry _iter79 : struct.columnNameIndexMap.entrySet()) - { - oprot.writeString(_iter79.getKey()); - oprot.writeI32(_iter79.getValue()); - } - } - } - if (struct.isSetSgColumns()) { - { - oprot.writeI32(struct.sgColumns.size()); - for (java.lang.String _iter80 : struct.sgColumns) - { - oprot.writeString(_iter80); - } - } - } - if (struct.isSetAliasColumns()) { - { - oprot.writeI32(struct.aliasColumns.size()); - for (byte _iter81 : struct.aliasColumns) - { - oprot.writeByte(_iter81); - } - } - } - if (struct.isSetTracingInfo()) { - struct.tracingInfo.write(oprot); - } - if (struct.isSetQueryResult()) { - { - oprot.writeI32(struct.queryResult.size()); - for (java.nio.ByteBuffer _iter82 : struct.queryResult) - { - oprot.writeBinary(_iter82); - } - } - } - if (struct.isSetMoreData()) { - oprot.writeBool(struct.moreData); - } - if (struct.isSetDatabase()) { - oprot.writeString(struct.database); - } - if (struct.isSetTableModel()) { - oprot.writeBool(struct.tableModel); - } - if (struct.isSetColumnIndex2TsBlockColumnIndexList()) { - { - oprot.writeI32(struct.columnIndex2TsBlockColumnIndexList.size()); - for (int _iter83 : struct.columnIndex2TsBlockColumnIndexList) - { - oprot.writeI32(_iter83); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(16); - if (incoming.get(0)) { - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list84 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.columns = new java.util.ArrayList(_list84.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem85; - for (int _i86 = 0; _i86 < _list84.size; ++_i86) - { - _elem85 = iprot.readString(); - struct.columns.add(_elem85); - } - } - struct.setColumnsIsSet(true); - } - if (incoming.get(2)) { - struct.operationType = iprot.readString(); - struct.setOperationTypeIsSet(true); - } - if (incoming.get(3)) { - struct.ignoreTimeStamp = iprot.readBool(); - struct.setIgnoreTimeStampIsSet(true); - } - if (incoming.get(4)) { - { - org.apache.thrift.protocol.TList _list87 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.dataTypeList = new java.util.ArrayList(_list87.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem88; - for (int _i89 = 0; _i89 < _list87.size; ++_i89) - { - _elem88 = iprot.readString(); - struct.dataTypeList.add(_elem88); - } - } - struct.setDataTypeListIsSet(true); - } - if (incoming.get(5)) { - struct.queryDataSet = new TSQueryDataSet(); - struct.queryDataSet.read(iprot); - struct.setQueryDataSetIsSet(true); - } - if (incoming.get(6)) { - struct.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(); - struct.nonAlignQueryDataSet.read(iprot); - struct.setNonAlignQueryDataSetIsSet(true); - } - if (incoming.get(7)) { - { - org.apache.thrift.protocol.TMap _map90 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32); - struct.columnNameIndexMap = new java.util.HashMap(2*_map90.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key91; - int _val92; - for (int _i93 = 0; _i93 < _map90.size; ++_i93) - { - _key91 = iprot.readString(); - _val92 = iprot.readI32(); - struct.columnNameIndexMap.put(_key91, _val92); - } - } - struct.setColumnNameIndexMapIsSet(true); - } - if (incoming.get(8)) { - { - org.apache.thrift.protocol.TList _list94 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.sgColumns = new java.util.ArrayList(_list94.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem95; - for (int _i96 = 0; _i96 < _list94.size; ++_i96) - { - _elem95 = iprot.readString(); - struct.sgColumns.add(_elem95); - } - } - struct.setSgColumnsIsSet(true); - } - if (incoming.get(9)) { - { - org.apache.thrift.protocol.TList _list97 = iprot.readListBegin(org.apache.thrift.protocol.TType.BYTE); - struct.aliasColumns = new java.util.ArrayList(_list97.size); - byte _elem98; - for (int _i99 = 0; _i99 < _list97.size; ++_i99) - { - _elem98 = iprot.readByte(); - struct.aliasColumns.add(_elem98); - } - } - struct.setAliasColumnsIsSet(true); - } - if (incoming.get(10)) { - struct.tracingInfo = new TSTracingInfo(); - struct.tracingInfo.read(iprot); - struct.setTracingInfoIsSet(true); - } - if (incoming.get(11)) { - { - org.apache.thrift.protocol.TList _list100 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.queryResult = new java.util.ArrayList(_list100.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem101; - for (int _i102 = 0; _i102 < _list100.size; ++_i102) - { - _elem101 = iprot.readBinary(); - struct.queryResult.add(_elem101); - } - } - struct.setQueryResultIsSet(true); - } - if (incoming.get(12)) { - struct.moreData = iprot.readBool(); - struct.setMoreDataIsSet(true); - } - if (incoming.get(13)) { - struct.database = iprot.readString(); - struct.setDatabaseIsSet(true); - } - if (incoming.get(14)) { - struct.tableModel = iprot.readBool(); - struct.setTableModelIsSet(true); - } - if (incoming.get(15)) { - { - org.apache.thrift.protocol.TList _list103 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.columnIndex2TsBlockColumnIndexList = new java.util.ArrayList(_list103.size); - int _elem104; - for (int _i105 = 0; _i105 < _list103.size; ++_i105) - { - _elem104 = iprot.readI32(); - struct.columnIndex2TsBlockColumnIndexList.add(_elem104); - } - } - struct.setColumnIndex2TsBlockColumnIndexListIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFastLastDataQueryForOneDeviceReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFastLastDataQueryForOneDeviceReq.java deleted file mode 100644 index 1e84ff057b5a1..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFastLastDataQueryForOneDeviceReq.java +++ /dev/null @@ -1,1322 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSFastLastDataQueryForOneDeviceReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFastLastDataQueryForOneDeviceReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField DEVICE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("deviceId", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField SENSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("sensors", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)6); - private static final org.apache.thrift.protocol.TField ENABLE_REDIRECT_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("enableRedirectQuery", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField JDBC_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("jdbcQuery", org.apache.thrift.protocol.TType.BOOL, (short)8); - private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)9); - private static final org.apache.thrift.protocol.TField LEGAL_PATH_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("legalPathNodes", org.apache.thrift.protocol.TType.BOOL, (short)10); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFastLastDataQueryForOneDeviceReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFastLastDataQueryForOneDeviceReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String db; // required - public @org.apache.thrift.annotation.Nullable java.lang.String deviceId; // required - public @org.apache.thrift.annotation.Nullable java.util.List sensors; // required - public int fetchSize; // optional - public long statementId; // required - public boolean enableRedirectQuery; // optional - public boolean jdbcQuery; // optional - public long timeout; // optional - public boolean legalPathNodes; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - DB((short)2, "db"), - DEVICE_ID((short)3, "deviceId"), - SENSORS((short)4, "sensors"), - FETCH_SIZE((short)5, "fetchSize"), - STATEMENT_ID((short)6, "statementId"), - ENABLE_REDIRECT_QUERY((short)7, "enableRedirectQuery"), - JDBC_QUERY((short)8, "jdbcQuery"), - TIMEOUT((short)9, "timeout"), - LEGAL_PATH_NODES((short)10, "legalPathNodes"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // DB - return DB; - case 3: // DEVICE_ID - return DEVICE_ID; - case 4: // SENSORS - return SENSORS; - case 5: // FETCH_SIZE - return FETCH_SIZE; - case 6: // STATEMENT_ID - return STATEMENT_ID; - case 7: // ENABLE_REDIRECT_QUERY - return ENABLE_REDIRECT_QUERY; - case 8: // JDBC_QUERY - return JDBC_QUERY; - case 9: // TIMEOUT - return TIMEOUT; - case 10: // LEGAL_PATH_NODES - return LEGAL_PATH_NODES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __FETCHSIZE_ISSET_ID = 1; - private static final int __STATEMENTID_ISSET_ID = 2; - private static final int __ENABLEREDIRECTQUERY_ISSET_ID = 3; - private static final int __JDBCQUERY_ISSET_ID = 4; - private static final int __TIMEOUT_ISSET_ID = 5; - private static final int __LEGALPATHNODES_ISSET_ID = 6; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.FETCH_SIZE,_Fields.ENABLE_REDIRECT_QUERY,_Fields.JDBC_QUERY,_Fields.TIMEOUT,_Fields.LEGAL_PATH_NODES}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DEVICE_ID, new org.apache.thrift.meta_data.FieldMetaData("deviceId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SENSORS, new org.apache.thrift.meta_data.FieldMetaData("sensors", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.ENABLE_REDIRECT_QUERY, new org.apache.thrift.meta_data.FieldMetaData("enableRedirectQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.JDBC_QUERY, new org.apache.thrift.meta_data.FieldMetaData("jdbcQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LEGAL_PATH_NODES, new org.apache.thrift.meta_data.FieldMetaData("legalPathNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFastLastDataQueryForOneDeviceReq.class, metaDataMap); - } - - public TSFastLastDataQueryForOneDeviceReq() { - } - - public TSFastLastDataQueryForOneDeviceReq( - long sessionId, - java.lang.String db, - java.lang.String deviceId, - java.util.List sensors, - long statementId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.db = db; - this.deviceId = deviceId; - this.sensors = sensors; - this.statementId = statementId; - setStatementIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSFastLastDataQueryForOneDeviceReq(TSFastLastDataQueryForOneDeviceReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetDb()) { - this.db = other.db; - } - if (other.isSetDeviceId()) { - this.deviceId = other.deviceId; - } - if (other.isSetSensors()) { - java.util.List __this__sensors = new java.util.ArrayList(other.sensors); - this.sensors = __this__sensors; - } - this.fetchSize = other.fetchSize; - this.statementId = other.statementId; - this.enableRedirectQuery = other.enableRedirectQuery; - this.jdbcQuery = other.jdbcQuery; - this.timeout = other.timeout; - this.legalPathNodes = other.legalPathNodes; - } - - @Override - public TSFastLastDataQueryForOneDeviceReq deepCopy() { - return new TSFastLastDataQueryForOneDeviceReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.db = null; - this.deviceId = null; - this.sensors = null; - setFetchSizeIsSet(false); - this.fetchSize = 0; - setStatementIdIsSet(false); - this.statementId = 0; - setEnableRedirectQueryIsSet(false); - this.enableRedirectQuery = false; - setJdbcQueryIsSet(false); - this.jdbcQuery = false; - setTimeoutIsSet(false); - this.timeout = 0; - setLegalPathNodesIsSet(false); - this.legalPathNodes = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSFastLastDataQueryForOneDeviceReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getDb() { - return this.db; - } - - public TSFastLastDataQueryForOneDeviceReq setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) { - this.db = db; - return this; - } - - public void unsetDb() { - this.db = null; - } - - /** Returns true if field db is set (has been assigned a value) and false otherwise */ - public boolean isSetDb() { - return this.db != null; - } - - public void setDbIsSet(boolean value) { - if (!value) { - this.db = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getDeviceId() { - return this.deviceId; - } - - public TSFastLastDataQueryForOneDeviceReq setDeviceId(@org.apache.thrift.annotation.Nullable java.lang.String deviceId) { - this.deviceId = deviceId; - return this; - } - - public void unsetDeviceId() { - this.deviceId = null; - } - - /** Returns true if field deviceId is set (has been assigned a value) and false otherwise */ - public boolean isSetDeviceId() { - return this.deviceId != null; - } - - public void setDeviceIdIsSet(boolean value) { - if (!value) { - this.deviceId = null; - } - } - - public int getSensorsSize() { - return (this.sensors == null) ? 0 : this.sensors.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getSensorsIterator() { - return (this.sensors == null) ? null : this.sensors.iterator(); - } - - public void addToSensors(java.lang.String elem) { - if (this.sensors == null) { - this.sensors = new java.util.ArrayList(); - } - this.sensors.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getSensors() { - return this.sensors; - } - - public TSFastLastDataQueryForOneDeviceReq setSensors(@org.apache.thrift.annotation.Nullable java.util.List sensors) { - this.sensors = sensors; - return this; - } - - public void unsetSensors() { - this.sensors = null; - } - - /** Returns true if field sensors is set (has been assigned a value) and false otherwise */ - public boolean isSetSensors() { - return this.sensors != null; - } - - public void setSensorsIsSet(boolean value) { - if (!value) { - this.sensors = null; - } - } - - public int getFetchSize() { - return this.fetchSize; - } - - public TSFastLastDataQueryForOneDeviceReq setFetchSize(int fetchSize) { - this.fetchSize = fetchSize; - setFetchSizeIsSet(true); - return this; - } - - public void unsetFetchSize() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ - public boolean isSetFetchSize() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - public void setFetchSizeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); - } - - public long getStatementId() { - return this.statementId; - } - - public TSFastLastDataQueryForOneDeviceReq setStatementId(long statementId) { - this.statementId = statementId; - setStatementIdIsSet(true); - return this; - } - - public void unsetStatementId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ - public boolean isSetStatementId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - public void setStatementIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); - } - - public boolean isEnableRedirectQuery() { - return this.enableRedirectQuery; - } - - public TSFastLastDataQueryForOneDeviceReq setEnableRedirectQuery(boolean enableRedirectQuery) { - this.enableRedirectQuery = enableRedirectQuery; - setEnableRedirectQueryIsSet(true); - return this; - } - - public void unsetEnableRedirectQuery() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); - } - - /** Returns true if field enableRedirectQuery is set (has been assigned a value) and false otherwise */ - public boolean isSetEnableRedirectQuery() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); - } - - public void setEnableRedirectQueryIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID, value); - } - - public boolean isJdbcQuery() { - return this.jdbcQuery; - } - - public TSFastLastDataQueryForOneDeviceReq setJdbcQuery(boolean jdbcQuery) { - this.jdbcQuery = jdbcQuery; - setJdbcQueryIsSet(true); - return this; - } - - public void unsetJdbcQuery() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); - } - - /** Returns true if field jdbcQuery is set (has been assigned a value) and false otherwise */ - public boolean isSetJdbcQuery() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); - } - - public void setJdbcQueryIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JDBCQUERY_ISSET_ID, value); - } - - public long getTimeout() { - return this.timeout; - } - - public TSFastLastDataQueryForOneDeviceReq setTimeout(long timeout) { - this.timeout = timeout; - setTimeoutIsSet(true); - return this; - } - - public void unsetTimeout() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeout() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - public void setTimeoutIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); - } - - public boolean isLegalPathNodes() { - return this.legalPathNodes; - } - - public TSFastLastDataQueryForOneDeviceReq setLegalPathNodes(boolean legalPathNodes) { - this.legalPathNodes = legalPathNodes; - setLegalPathNodesIsSet(true); - return this; - } - - public void unsetLegalPathNodes() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); - } - - /** Returns true if field legalPathNodes is set (has been assigned a value) and false otherwise */ - public boolean isSetLegalPathNodes() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); - } - - public void setLegalPathNodesIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case DB: - if (value == null) { - unsetDb(); - } else { - setDb((java.lang.String)value); - } - break; - - case DEVICE_ID: - if (value == null) { - unsetDeviceId(); - } else { - setDeviceId((java.lang.String)value); - } - break; - - case SENSORS: - if (value == null) { - unsetSensors(); - } else { - setSensors((java.util.List)value); - } - break; - - case FETCH_SIZE: - if (value == null) { - unsetFetchSize(); - } else { - setFetchSize((java.lang.Integer)value); - } - break; - - case STATEMENT_ID: - if (value == null) { - unsetStatementId(); - } else { - setStatementId((java.lang.Long)value); - } - break; - - case ENABLE_REDIRECT_QUERY: - if (value == null) { - unsetEnableRedirectQuery(); - } else { - setEnableRedirectQuery((java.lang.Boolean)value); - } - break; - - case JDBC_QUERY: - if (value == null) { - unsetJdbcQuery(); - } else { - setJdbcQuery((java.lang.Boolean)value); - } - break; - - case TIMEOUT: - if (value == null) { - unsetTimeout(); - } else { - setTimeout((java.lang.Long)value); - } - break; - - case LEGAL_PATH_NODES: - if (value == null) { - unsetLegalPathNodes(); - } else { - setLegalPathNodes((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case DB: - return getDb(); - - case DEVICE_ID: - return getDeviceId(); - - case SENSORS: - return getSensors(); - - case FETCH_SIZE: - return getFetchSize(); - - case STATEMENT_ID: - return getStatementId(); - - case ENABLE_REDIRECT_QUERY: - return isEnableRedirectQuery(); - - case JDBC_QUERY: - return isJdbcQuery(); - - case TIMEOUT: - return getTimeout(); - - case LEGAL_PATH_NODES: - return isLegalPathNodes(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case DB: - return isSetDb(); - case DEVICE_ID: - return isSetDeviceId(); - case SENSORS: - return isSetSensors(); - case FETCH_SIZE: - return isSetFetchSize(); - case STATEMENT_ID: - return isSetStatementId(); - case ENABLE_REDIRECT_QUERY: - return isSetEnableRedirectQuery(); - case JDBC_QUERY: - return isSetJdbcQuery(); - case TIMEOUT: - return isSetTimeout(); - case LEGAL_PATH_NODES: - return isSetLegalPathNodes(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSFastLastDataQueryForOneDeviceReq) - return this.equals((TSFastLastDataQueryForOneDeviceReq)that); - return false; - } - - public boolean equals(TSFastLastDataQueryForOneDeviceReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_db = true && this.isSetDb(); - boolean that_present_db = true && that.isSetDb(); - if (this_present_db || that_present_db) { - if (!(this_present_db && that_present_db)) - return false; - if (!this.db.equals(that.db)) - return false; - } - - boolean this_present_deviceId = true && this.isSetDeviceId(); - boolean that_present_deviceId = true && that.isSetDeviceId(); - if (this_present_deviceId || that_present_deviceId) { - if (!(this_present_deviceId && that_present_deviceId)) - return false; - if (!this.deviceId.equals(that.deviceId)) - return false; - } - - boolean this_present_sensors = true && this.isSetSensors(); - boolean that_present_sensors = true && that.isSetSensors(); - if (this_present_sensors || that_present_sensors) { - if (!(this_present_sensors && that_present_sensors)) - return false; - if (!this.sensors.equals(that.sensors)) - return false; - } - - boolean this_present_fetchSize = true && this.isSetFetchSize(); - boolean that_present_fetchSize = true && that.isSetFetchSize(); - if (this_present_fetchSize || that_present_fetchSize) { - if (!(this_present_fetchSize && that_present_fetchSize)) - return false; - if (this.fetchSize != that.fetchSize) - return false; - } - - boolean this_present_statementId = true; - boolean that_present_statementId = true; - if (this_present_statementId || that_present_statementId) { - if (!(this_present_statementId && that_present_statementId)) - return false; - if (this.statementId != that.statementId) - return false; - } - - boolean this_present_enableRedirectQuery = true && this.isSetEnableRedirectQuery(); - boolean that_present_enableRedirectQuery = true && that.isSetEnableRedirectQuery(); - if (this_present_enableRedirectQuery || that_present_enableRedirectQuery) { - if (!(this_present_enableRedirectQuery && that_present_enableRedirectQuery)) - return false; - if (this.enableRedirectQuery != that.enableRedirectQuery) - return false; - } - - boolean this_present_jdbcQuery = true && this.isSetJdbcQuery(); - boolean that_present_jdbcQuery = true && that.isSetJdbcQuery(); - if (this_present_jdbcQuery || that_present_jdbcQuery) { - if (!(this_present_jdbcQuery && that_present_jdbcQuery)) - return false; - if (this.jdbcQuery != that.jdbcQuery) - return false; - } - - boolean this_present_timeout = true && this.isSetTimeout(); - boolean that_present_timeout = true && that.isSetTimeout(); - if (this_present_timeout || that_present_timeout) { - if (!(this_present_timeout && that_present_timeout)) - return false; - if (this.timeout != that.timeout) - return false; - } - - boolean this_present_legalPathNodes = true && this.isSetLegalPathNodes(); - boolean that_present_legalPathNodes = true && that.isSetLegalPathNodes(); - if (this_present_legalPathNodes || that_present_legalPathNodes) { - if (!(this_present_legalPathNodes && that_present_legalPathNodes)) - return false; - if (this.legalPathNodes != that.legalPathNodes) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287); - if (isSetDb()) - hashCode = hashCode * 8191 + db.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDeviceId()) ? 131071 : 524287); - if (isSetDeviceId()) - hashCode = hashCode * 8191 + deviceId.hashCode(); - - hashCode = hashCode * 8191 + ((isSetSensors()) ? 131071 : 524287); - if (isSetSensors()) - hashCode = hashCode * 8191 + sensors.hashCode(); - - hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); - if (isSetFetchSize()) - hashCode = hashCode * 8191 + fetchSize; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); - - hashCode = hashCode * 8191 + ((isSetEnableRedirectQuery()) ? 131071 : 524287); - if (isSetEnableRedirectQuery()) - hashCode = hashCode * 8191 + ((enableRedirectQuery) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetJdbcQuery()) ? 131071 : 524287); - if (isSetJdbcQuery()) - hashCode = hashCode * 8191 + ((jdbcQuery) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); - if (isSetTimeout()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); - - hashCode = hashCode * 8191 + ((isSetLegalPathNodes()) ? 131071 : 524287); - if (isSetLegalPathNodes()) - hashCode = hashCode * 8191 + ((legalPathNodes) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSFastLastDataQueryForOneDeviceReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDb(), other.isSetDb()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDeviceId(), other.isSetDeviceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeviceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deviceId, other.deviceId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSensors(), other.isSetSensors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSensors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sensors, other.sensors); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFetchSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatementId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEnableRedirectQuery(), other.isSetEnableRedirectQuery()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnableRedirectQuery()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableRedirectQuery, other.enableRedirectQuery); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetJdbcQuery(), other.isSetJdbcQuery()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetJdbcQuery()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jdbcQuery, other.jdbcQuery); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetLegalPathNodes(), other.isSetLegalPathNodes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLegalPathNodes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legalPathNodes, other.legalPathNodes); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFastLastDataQueryForOneDeviceReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("db:"); - if (this.db == null) { - sb.append("null"); - } else { - sb.append(this.db); - } - first = false; - if (!first) sb.append(", "); - sb.append("deviceId:"); - if (this.deviceId == null) { - sb.append("null"); - } else { - sb.append(this.deviceId); - } - first = false; - if (!first) sb.append(", "); - sb.append("sensors:"); - if (this.sensors == null) { - sb.append("null"); - } else { - sb.append(this.sensors); - } - first = false; - if (isSetFetchSize()) { - if (!first) sb.append(", "); - sb.append("fetchSize:"); - sb.append(this.fetchSize); - first = false; - } - if (!first) sb.append(", "); - sb.append("statementId:"); - sb.append(this.statementId); - first = false; - if (isSetEnableRedirectQuery()) { - if (!first) sb.append(", "); - sb.append("enableRedirectQuery:"); - sb.append(this.enableRedirectQuery); - first = false; - } - if (isSetJdbcQuery()) { - if (!first) sb.append(", "); - sb.append("jdbcQuery:"); - sb.append(this.jdbcQuery); - first = false; - } - if (isSetTimeout()) { - if (!first) sb.append(", "); - sb.append("timeout:"); - sb.append(this.timeout); - first = false; - } - if (isSetLegalPathNodes()) { - if (!first) sb.append(", "); - sb.append("legalPathNodes:"); - sb.append(this.legalPathNodes); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (db == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'db' was not present! Struct: " + toString()); - } - if (deviceId == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'deviceId' was not present! Struct: " + toString()); - } - if (sensors == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sensors' was not present! Struct: " + toString()); - } - // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSFastLastDataQueryForOneDeviceReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFastLastDataQueryForOneDeviceReqStandardScheme getScheme() { - return new TSFastLastDataQueryForOneDeviceReqStandardScheme(); - } - } - - private static class TSFastLastDataQueryForOneDeviceReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSFastLastDataQueryForOneDeviceReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.db = iprot.readString(); - struct.setDbIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DEVICE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.deviceId = iprot.readString(); - struct.setDeviceIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // SENSORS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list568 = iprot.readListBegin(); - struct.sensors = new java.util.ArrayList(_list568.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem569; - for (int _i570 = 0; _i570 < _list568.size; ++_i570) - { - _elem569 = iprot.readString(); - struct.sensors.add(_elem569); - } - iprot.readListEnd(); - } - struct.setSensorsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // FETCH_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // STATEMENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // ENABLE_REDIRECT_QUERY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.enableRedirectQuery = iprot.readBool(); - struct.setEnableRedirectQueryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // JDBC_QUERY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.jdbcQuery = iprot.readBool(); - struct.setJdbcQueryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // TIMEOUT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // LEGAL_PATH_NODES - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.legalPathNodes = iprot.readBool(); - struct.setLegalPathNodesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetStatementId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSFastLastDataQueryForOneDeviceReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.db != null) { - oprot.writeFieldBegin(DB_FIELD_DESC); - oprot.writeString(struct.db); - oprot.writeFieldEnd(); - } - if (struct.deviceId != null) { - oprot.writeFieldBegin(DEVICE_ID_FIELD_DESC); - oprot.writeString(struct.deviceId); - oprot.writeFieldEnd(); - } - if (struct.sensors != null) { - oprot.writeFieldBegin(SENSORS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.sensors.size())); - for (java.lang.String _iter571 : struct.sensors) - { - oprot.writeString(_iter571); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetFetchSize()) { - oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); - oprot.writeI32(struct.fetchSize); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); - oprot.writeI64(struct.statementId); - oprot.writeFieldEnd(); - if (struct.isSetEnableRedirectQuery()) { - oprot.writeFieldBegin(ENABLE_REDIRECT_QUERY_FIELD_DESC); - oprot.writeBool(struct.enableRedirectQuery); - oprot.writeFieldEnd(); - } - if (struct.isSetJdbcQuery()) { - oprot.writeFieldBegin(JDBC_QUERY_FIELD_DESC); - oprot.writeBool(struct.jdbcQuery); - oprot.writeFieldEnd(); - } - if (struct.isSetTimeout()) { - oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); - oprot.writeI64(struct.timeout); - oprot.writeFieldEnd(); - } - if (struct.isSetLegalPathNodes()) { - oprot.writeFieldBegin(LEGAL_PATH_NODES_FIELD_DESC); - oprot.writeBool(struct.legalPathNodes); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSFastLastDataQueryForOneDeviceReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFastLastDataQueryForOneDeviceReqTupleScheme getScheme() { - return new TSFastLastDataQueryForOneDeviceReqTupleScheme(); - } - } - - private static class TSFastLastDataQueryForOneDeviceReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSFastLastDataQueryForOneDeviceReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.db); - oprot.writeString(struct.deviceId); - { - oprot.writeI32(struct.sensors.size()); - for (java.lang.String _iter572 : struct.sensors) - { - oprot.writeString(_iter572); - } - } - oprot.writeI64(struct.statementId); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetFetchSize()) { - optionals.set(0); - } - if (struct.isSetEnableRedirectQuery()) { - optionals.set(1); - } - if (struct.isSetJdbcQuery()) { - optionals.set(2); - } - if (struct.isSetTimeout()) { - optionals.set(3); - } - if (struct.isSetLegalPathNodes()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetFetchSize()) { - oprot.writeI32(struct.fetchSize); - } - if (struct.isSetEnableRedirectQuery()) { - oprot.writeBool(struct.enableRedirectQuery); - } - if (struct.isSetJdbcQuery()) { - oprot.writeBool(struct.jdbcQuery); - } - if (struct.isSetTimeout()) { - oprot.writeI64(struct.timeout); - } - if (struct.isSetLegalPathNodes()) { - oprot.writeBool(struct.legalPathNodes); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSFastLastDataQueryForOneDeviceReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.db = iprot.readString(); - struct.setDbIsSet(true); - struct.deviceId = iprot.readString(); - struct.setDeviceIdIsSet(true); - { - org.apache.thrift.protocol.TList _list573 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.sensors = new java.util.ArrayList(_list573.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem574; - for (int _i575 = 0; _i575 < _list573.size; ++_i575) - { - _elem574 = iprot.readString(); - struct.sensors.add(_elem574); - } - } - struct.setSensorsIsSet(true); - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } - if (incoming.get(1)) { - struct.enableRedirectQuery = iprot.readBool(); - struct.setEnableRedirectQueryIsSet(true); - } - if (incoming.get(2)) { - struct.jdbcQuery = iprot.readBool(); - struct.setJdbcQueryIsSet(true); - } - if (incoming.get(3)) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } - if (incoming.get(4)) { - struct.legalPathNodes = iprot.readBool(); - struct.setLegalPathNodesIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataReq.java deleted file mode 100644 index bf60f2409daad..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataReq.java +++ /dev/null @@ -1,589 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSFetchMetadataReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFetchMetadataReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField COLUMN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("columnPath", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFetchMetadataReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFetchMetadataReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String type; // required - public @org.apache.thrift.annotation.Nullable java.lang.String columnPath; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - TYPE((short)2, "type"), - COLUMN_PATH((short)3, "columnPath"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // TYPE - return TYPE; - case 3: // COLUMN_PATH - return COLUMN_PATH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.COLUMN_PATH}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COLUMN_PATH, new org.apache.thrift.meta_data.FieldMetaData("columnPath", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFetchMetadataReq.class, metaDataMap); - } - - public TSFetchMetadataReq() { - } - - public TSFetchMetadataReq( - long sessionId, - java.lang.String type) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.type = type; - } - - /** - * Performs a deep copy on other. - */ - public TSFetchMetadataReq(TSFetchMetadataReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetType()) { - this.type = other.type; - } - if (other.isSetColumnPath()) { - this.columnPath = other.columnPath; - } - } - - @Override - public TSFetchMetadataReq deepCopy() { - return new TSFetchMetadataReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.type = null; - this.columnPath = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSFetchMetadataReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getType() { - return this.type; - } - - public TSFetchMetadataReq setType(@org.apache.thrift.annotation.Nullable java.lang.String type) { - this.type = type; - return this; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getColumnPath() { - return this.columnPath; - } - - public TSFetchMetadataReq setColumnPath(@org.apache.thrift.annotation.Nullable java.lang.String columnPath) { - this.columnPath = columnPath; - return this; - } - - public void unsetColumnPath() { - this.columnPath = null; - } - - /** Returns true if field columnPath is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnPath() { - return this.columnPath != null; - } - - public void setColumnPathIsSet(boolean value) { - if (!value) { - this.columnPath = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((java.lang.String)value); - } - break; - - case COLUMN_PATH: - if (value == null) { - unsetColumnPath(); - } else { - setColumnPath((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case TYPE: - return getType(); - - case COLUMN_PATH: - return getColumnPath(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case TYPE: - return isSetType(); - case COLUMN_PATH: - return isSetColumnPath(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSFetchMetadataReq) - return this.equals((TSFetchMetadataReq)that); - return false; - } - - public boolean equals(TSFetchMetadataReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_columnPath = true && this.isSetColumnPath(); - boolean that_present_columnPath = true && that.isSetColumnPath(); - if (this_present_columnPath || that_present_columnPath) { - if (!(this_present_columnPath && that_present_columnPath)) - return false; - if (!this.columnPath.equals(that.columnPath)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); - if (isSetType()) - hashCode = hashCode * 8191 + type.hashCode(); - - hashCode = hashCode * 8191 + ((isSetColumnPath()) ? 131071 : 524287); - if (isSetColumnPath()) - hashCode = hashCode * 8191 + columnPath.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSFetchMetadataReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnPath(), other.isSetColumnPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnPath, other.columnPath); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFetchMetadataReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (isSetColumnPath()) { - if (!first) sb.append(", "); - sb.append("columnPath:"); - if (this.columnPath == null) { - sb.append("null"); - } else { - sb.append(this.columnPath); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (type == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSFetchMetadataReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFetchMetadataReqStandardScheme getScheme() { - return new TSFetchMetadataReqStandardScheme(); - } - } - - private static class TSFetchMetadataReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSFetchMetadataReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.type = iprot.readString(); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // COLUMN_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.columnPath = iprot.readString(); - struct.setColumnPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSFetchMetadataReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeString(struct.type); - oprot.writeFieldEnd(); - } - if (struct.columnPath != null) { - if (struct.isSetColumnPath()) { - oprot.writeFieldBegin(COLUMN_PATH_FIELD_DESC); - oprot.writeString(struct.columnPath); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSFetchMetadataReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFetchMetadataReqTupleScheme getScheme() { - return new TSFetchMetadataReqTupleScheme(); - } - } - - private static class TSFetchMetadataReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.type); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetColumnPath()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetColumnPath()) { - oprot.writeString(struct.columnPath); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.type = iprot.readString(); - struct.setTypeIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.columnPath = iprot.readString(); - struct.setColumnPathIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataResp.java deleted file mode 100644 index 6de48c6db1d35..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchMetadataResp.java +++ /dev/null @@ -1,761 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSFetchMetadataResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFetchMetadataResp"); - - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField METADATA_IN_JSON_FIELD_DESC = new org.apache.thrift.protocol.TField("metadataInJson", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField COLUMNS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("columnsList", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFetchMetadataRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFetchMetadataRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required - public @org.apache.thrift.annotation.Nullable java.lang.String metadataInJson; // optional - public @org.apache.thrift.annotation.Nullable java.util.List columnsList; // optional - public @org.apache.thrift.annotation.Nullable java.lang.String dataType; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATUS((short)1, "status"), - METADATA_IN_JSON((short)2, "metadataInJson"), - COLUMNS_LIST((short)3, "columnsList"), - DATA_TYPE((short)4, "dataType"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATUS - return STATUS; - case 2: // METADATA_IN_JSON - return METADATA_IN_JSON; - case 3: // COLUMNS_LIST - return COLUMNS_LIST; - case 4: // DATA_TYPE - return DATA_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.METADATA_IN_JSON,_Fields.COLUMNS_LIST,_Fields.DATA_TYPE}; - 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - tmpMap.put(_Fields.METADATA_IN_JSON, new org.apache.thrift.meta_data.FieldMetaData("metadataInJson", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COLUMNS_LIST, new org.apache.thrift.meta_data.FieldMetaData("columnsList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFetchMetadataResp.class, metaDataMap); - } - - public TSFetchMetadataResp() { - } - - public TSFetchMetadataResp( - org.apache.iotdb.common.rpc.thrift.TSStatus status) - { - this(); - this.status = status; - } - - /** - * Performs a deep copy on other. - */ - public TSFetchMetadataResp(TSFetchMetadataResp other) { - if (other.isSetStatus()) { - this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); - } - if (other.isSetMetadataInJson()) { - this.metadataInJson = other.metadataInJson; - } - if (other.isSetColumnsList()) { - java.util.List __this__columnsList = new java.util.ArrayList(other.columnsList); - this.columnsList = __this__columnsList; - } - if (other.isSetDataType()) { - this.dataType = other.dataType; - } - } - - @Override - public TSFetchMetadataResp deepCopy() { - return new TSFetchMetadataResp(this); - } - - @Override - public void clear() { - this.status = null; - this.metadataInJson = null; - this.columnsList = null; - this.dataType = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { - return this.status; - } - - public TSFetchMetadataResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { - this.status = status; - return this; - } - - public void unsetStatus() { - this.status = null; - } - - /** Returns true if field status is set (has been assigned a value) and false otherwise */ - public boolean isSetStatus() { - return this.status != null; - } - - public void setStatusIsSet(boolean value) { - if (!value) { - this.status = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getMetadataInJson() { - return this.metadataInJson; - } - - public TSFetchMetadataResp setMetadataInJson(@org.apache.thrift.annotation.Nullable java.lang.String metadataInJson) { - this.metadataInJson = metadataInJson; - return this; - } - - public void unsetMetadataInJson() { - this.metadataInJson = null; - } - - /** Returns true if field metadataInJson is set (has been assigned a value) and false otherwise */ - public boolean isSetMetadataInJson() { - return this.metadataInJson != null; - } - - public void setMetadataInJsonIsSet(boolean value) { - if (!value) { - this.metadataInJson = null; - } - } - - public int getColumnsListSize() { - return (this.columnsList == null) ? 0 : this.columnsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getColumnsListIterator() { - return (this.columnsList == null) ? null : this.columnsList.iterator(); - } - - public void addToColumnsList(java.lang.String elem) { - if (this.columnsList == null) { - this.columnsList = new java.util.ArrayList(); - } - this.columnsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getColumnsList() { - return this.columnsList; - } - - public TSFetchMetadataResp setColumnsList(@org.apache.thrift.annotation.Nullable java.util.List columnsList) { - this.columnsList = columnsList; - return this; - } - - public void unsetColumnsList() { - this.columnsList = null; - } - - /** Returns true if field columnsList is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnsList() { - return this.columnsList != null; - } - - public void setColumnsListIsSet(boolean value) { - if (!value) { - this.columnsList = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getDataType() { - return this.dataType; - } - - public TSFetchMetadataResp setDataType(@org.apache.thrift.annotation.Nullable java.lang.String dataType) { - this.dataType = dataType; - return this; - } - - public void unsetDataType() { - this.dataType = null; - } - - /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ - public boolean isSetDataType() { - return this.dataType != null; - } - - public void setDataTypeIsSet(boolean value) { - if (!value) { - this.dataType = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - case METADATA_IN_JSON: - if (value == null) { - unsetMetadataInJson(); - } else { - setMetadataInJson((java.lang.String)value); - } - break; - - case COLUMNS_LIST: - if (value == null) { - unsetColumnsList(); - } else { - setColumnsList((java.util.List)value); - } - break; - - case DATA_TYPE: - if (value == null) { - unsetDataType(); - } else { - setDataType((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case STATUS: - return getStatus(); - - case METADATA_IN_JSON: - return getMetadataInJson(); - - case COLUMNS_LIST: - return getColumnsList(); - - case DATA_TYPE: - return getDataType(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case STATUS: - return isSetStatus(); - case METADATA_IN_JSON: - return isSetMetadataInJson(); - case COLUMNS_LIST: - return isSetColumnsList(); - case DATA_TYPE: - return isSetDataType(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSFetchMetadataResp) - return this.equals((TSFetchMetadataResp)that); - return false; - } - - public boolean equals(TSFetchMetadataResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_status = true && this.isSetStatus(); - boolean that_present_status = true && that.isSetStatus(); - if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) - return false; - if (!this.status.equals(that.status)) - return false; - } - - boolean this_present_metadataInJson = true && this.isSetMetadataInJson(); - boolean that_present_metadataInJson = true && that.isSetMetadataInJson(); - if (this_present_metadataInJson || that_present_metadataInJson) { - if (!(this_present_metadataInJson && that_present_metadataInJson)) - return false; - if (!this.metadataInJson.equals(that.metadataInJson)) - return false; - } - - boolean this_present_columnsList = true && this.isSetColumnsList(); - boolean that_present_columnsList = true && that.isSetColumnsList(); - if (this_present_columnsList || that_present_columnsList) { - if (!(this_present_columnsList && that_present_columnsList)) - return false; - if (!this.columnsList.equals(that.columnsList)) - return false; - } - - boolean this_present_dataType = true && this.isSetDataType(); - boolean that_present_dataType = true && that.isSetDataType(); - if (this_present_dataType || that_present_dataType) { - if (!(this_present_dataType && that_present_dataType)) - return false; - if (!this.dataType.equals(that.dataType)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); - if (isSetStatus()) - hashCode = hashCode * 8191 + status.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMetadataInJson()) ? 131071 : 524287); - if (isSetMetadataInJson()) - hashCode = hashCode * 8191 + metadataInJson.hashCode(); - - hashCode = hashCode * 8191 + ((isSetColumnsList()) ? 131071 : 524287); - if (isSetColumnsList()) - hashCode = hashCode * 8191 + columnsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataType()) ? 131071 : 524287); - if (isSetDataType()) - hashCode = hashCode * 8191 + dataType.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSFetchMetadataResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMetadataInJson(), other.isSetMetadataInJson()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMetadataInJson()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadataInJson, other.metadataInJson); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnsList(), other.isSetColumnsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnsList, other.columnsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDataType(), other.isSetDataType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, other.dataType); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFetchMetadataResp("); - boolean first = true; - - sb.append("status:"); - if (this.status == null) { - sb.append("null"); - } else { - sb.append(this.status); - } - first = false; - if (isSetMetadataInJson()) { - if (!first) sb.append(", "); - sb.append("metadataInJson:"); - if (this.metadataInJson == null) { - sb.append("null"); - } else { - sb.append(this.metadataInJson); - } - first = false; - } - if (isSetColumnsList()) { - if (!first) sb.append(", "); - sb.append("columnsList:"); - if (this.columnsList == null) { - sb.append("null"); - } else { - sb.append(this.columnsList); - } - first = false; - } - if (isSetDataType()) { - if (!first) sb.append(", "); - sb.append("dataType:"); - if (this.dataType == null) { - sb.append("null"); - } else { - sb.append(this.dataType); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (status == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); - } - // check for sub-struct validity - if (status != null) { - status.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class TSFetchMetadataRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFetchMetadataRespStandardScheme getScheme() { - return new TSFetchMetadataRespStandardScheme(); - } - } - - private static class TSFetchMetadataRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSFetchMetadataResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // METADATA_IN_JSON - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.metadataInJson = iprot.readString(); - struct.setMetadataInJsonIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // COLUMNS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list142 = iprot.readListBegin(); - struct.columnsList = new java.util.ArrayList(_list142.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem143; - for (int _i144 = 0; _i144 < _list142.size; ++_i144) - { - _elem143 = iprot.readString(); - struct.columnsList.add(_elem143); - } - iprot.readListEnd(); - } - struct.setColumnsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DATA_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.dataType = iprot.readString(); - struct.setDataTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSFetchMetadataResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.status != null) { - oprot.writeFieldBegin(STATUS_FIELD_DESC); - struct.status.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.metadataInJson != null) { - if (struct.isSetMetadataInJson()) { - oprot.writeFieldBegin(METADATA_IN_JSON_FIELD_DESC); - oprot.writeString(struct.metadataInJson); - oprot.writeFieldEnd(); - } - } - if (struct.columnsList != null) { - if (struct.isSetColumnsList()) { - oprot.writeFieldBegin(COLUMNS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columnsList.size())); - for (java.lang.String _iter145 : struct.columnsList) - { - oprot.writeString(_iter145); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.dataType != null) { - if (struct.isSetDataType()) { - oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); - oprot.writeString(struct.dataType); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSFetchMetadataRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFetchMetadataRespTupleScheme getScheme() { - return new TSFetchMetadataRespTupleScheme(); - } - } - - private static class TSFetchMetadataRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status.write(oprot); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetMetadataInJson()) { - optionals.set(0); - } - if (struct.isSetColumnsList()) { - optionals.set(1); - } - if (struct.isSetDataType()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetMetadataInJson()) { - oprot.writeString(struct.metadataInJson); - } - if (struct.isSetColumnsList()) { - { - oprot.writeI32(struct.columnsList.size()); - for (java.lang.String _iter146 : struct.columnsList) - { - oprot.writeString(_iter146); - } - } - } - if (struct.isSetDataType()) { - oprot.writeString(struct.dataType); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.metadataInJson = iprot.readString(); - struct.setMetadataInJsonIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list147 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.columnsList = new java.util.ArrayList(_list147.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem148; - for (int _i149 = 0; _i149 < _list147.size; ++_i149) - { - _elem148 = iprot.readString(); - struct.columnsList.add(_elem148); - } - } - struct.setColumnsListIsSet(true); - } - if (incoming.get(2)) { - struct.dataType = iprot.readString(); - struct.setDataTypeIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsReq.java deleted file mode 100644 index 30128ee169d0f..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsReq.java +++ /dev/null @@ -1,959 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSFetchResultsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFetchResultsReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField STATEMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("statement", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField IS_ALIGN_FIELD_DESC = new org.apache.thrift.protocol.TField("isAlign", org.apache.thrift.protocol.TType.BOOL, (short)5); - private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)6); - private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)7); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFetchResultsReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFetchResultsReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String statement; // required - public int fetchSize; // required - public long queryId; // required - public boolean isAlign; // required - public long timeout; // optional - public long statementId; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - STATEMENT((short)2, "statement"), - FETCH_SIZE((short)3, "fetchSize"), - QUERY_ID((short)4, "queryId"), - IS_ALIGN((short)5, "isAlign"), - TIMEOUT((short)6, "timeout"), - STATEMENT_ID((short)7, "statementId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // STATEMENT - return STATEMENT; - case 3: // FETCH_SIZE - return FETCH_SIZE; - case 4: // QUERY_ID - return QUERY_ID; - case 5: // IS_ALIGN - return IS_ALIGN; - case 6: // TIMEOUT - return TIMEOUT; - case 7: // STATEMENT_ID - return STATEMENT_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __FETCHSIZE_ISSET_ID = 1; - private static final int __QUERYID_ISSET_ID = 2; - private static final int __ISALIGN_ISSET_ID = 3; - private static final int __TIMEOUT_ISSET_ID = 4; - private static final int __STATEMENTID_ISSET_ID = 5; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.TIMEOUT,_Fields.STATEMENT_ID}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATEMENT, new org.apache.thrift.meta_data.FieldMetaData("statement", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.IS_ALIGN, new org.apache.thrift.meta_data.FieldMetaData("isAlign", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFetchResultsReq.class, metaDataMap); - } - - public TSFetchResultsReq() { - } - - public TSFetchResultsReq( - long sessionId, - java.lang.String statement, - int fetchSize, - long queryId, - boolean isAlign) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.statement = statement; - this.fetchSize = fetchSize; - setFetchSizeIsSet(true); - this.queryId = queryId; - setQueryIdIsSet(true); - this.isAlign = isAlign; - setIsAlignIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSFetchResultsReq(TSFetchResultsReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetStatement()) { - this.statement = other.statement; - } - this.fetchSize = other.fetchSize; - this.queryId = other.queryId; - this.isAlign = other.isAlign; - this.timeout = other.timeout; - this.statementId = other.statementId; - } - - @Override - public TSFetchResultsReq deepCopy() { - return new TSFetchResultsReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.statement = null; - setFetchSizeIsSet(false); - this.fetchSize = 0; - setQueryIdIsSet(false); - this.queryId = 0; - setIsAlignIsSet(false); - this.isAlign = false; - setTimeoutIsSet(false); - this.timeout = 0; - setStatementIdIsSet(false); - this.statementId = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSFetchResultsReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getStatement() { - return this.statement; - } - - public TSFetchResultsReq setStatement(@org.apache.thrift.annotation.Nullable java.lang.String statement) { - this.statement = statement; - return this; - } - - public void unsetStatement() { - this.statement = null; - } - - /** Returns true if field statement is set (has been assigned a value) and false otherwise */ - public boolean isSetStatement() { - return this.statement != null; - } - - public void setStatementIsSet(boolean value) { - if (!value) { - this.statement = null; - } - } - - public int getFetchSize() { - return this.fetchSize; - } - - public TSFetchResultsReq setFetchSize(int fetchSize) { - this.fetchSize = fetchSize; - setFetchSizeIsSet(true); - return this; - } - - public void unsetFetchSize() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ - public boolean isSetFetchSize() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - public void setFetchSizeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); - } - - public long getQueryId() { - return this.queryId; - } - - public TSFetchResultsReq setQueryId(long queryId) { - this.queryId = queryId; - setQueryIdIsSet(true); - return this; - } - - public void unsetQueryId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - public void setQueryIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); - } - - public boolean isIsAlign() { - return this.isAlign; - } - - public TSFetchResultsReq setIsAlign(boolean isAlign) { - this.isAlign = isAlign; - setIsAlignIsSet(true); - return this; - } - - public void unsetIsAlign() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGN_ISSET_ID); - } - - /** Returns true if field isAlign is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAlign() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGN_ISSET_ID); - } - - public void setIsAlignIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGN_ISSET_ID, value); - } - - public long getTimeout() { - return this.timeout; - } - - public TSFetchResultsReq setTimeout(long timeout) { - this.timeout = timeout; - setTimeoutIsSet(true); - return this; - } - - public void unsetTimeout() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeout() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - public void setTimeoutIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); - } - - public long getStatementId() { - return this.statementId; - } - - public TSFetchResultsReq setStatementId(long statementId) { - this.statementId = statementId; - setStatementIdIsSet(true); - return this; - } - - public void unsetStatementId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ - public boolean isSetStatementId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - public void setStatementIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case STATEMENT: - if (value == null) { - unsetStatement(); - } else { - setStatement((java.lang.String)value); - } - break; - - case FETCH_SIZE: - if (value == null) { - unsetFetchSize(); - } else { - setFetchSize((java.lang.Integer)value); - } - break; - - case QUERY_ID: - if (value == null) { - unsetQueryId(); - } else { - setQueryId((java.lang.Long)value); - } - break; - - case IS_ALIGN: - if (value == null) { - unsetIsAlign(); - } else { - setIsAlign((java.lang.Boolean)value); - } - break; - - case TIMEOUT: - if (value == null) { - unsetTimeout(); - } else { - setTimeout((java.lang.Long)value); - } - break; - - case STATEMENT_ID: - if (value == null) { - unsetStatementId(); - } else { - setStatementId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case STATEMENT: - return getStatement(); - - case FETCH_SIZE: - return getFetchSize(); - - case QUERY_ID: - return getQueryId(); - - case IS_ALIGN: - return isIsAlign(); - - case TIMEOUT: - return getTimeout(); - - case STATEMENT_ID: - return getStatementId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case STATEMENT: - return isSetStatement(); - case FETCH_SIZE: - return isSetFetchSize(); - case QUERY_ID: - return isSetQueryId(); - case IS_ALIGN: - return isSetIsAlign(); - case TIMEOUT: - return isSetTimeout(); - case STATEMENT_ID: - return isSetStatementId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSFetchResultsReq) - return this.equals((TSFetchResultsReq)that); - return false; - } - - public boolean equals(TSFetchResultsReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_statement = true && this.isSetStatement(); - boolean that_present_statement = true && that.isSetStatement(); - if (this_present_statement || that_present_statement) { - if (!(this_present_statement && that_present_statement)) - return false; - if (!this.statement.equals(that.statement)) - return false; - } - - boolean this_present_fetchSize = true; - boolean that_present_fetchSize = true; - if (this_present_fetchSize || that_present_fetchSize) { - if (!(this_present_fetchSize && that_present_fetchSize)) - return false; - if (this.fetchSize != that.fetchSize) - return false; - } - - boolean this_present_queryId = true; - boolean that_present_queryId = true; - if (this_present_queryId || that_present_queryId) { - if (!(this_present_queryId && that_present_queryId)) - return false; - if (this.queryId != that.queryId) - return false; - } - - boolean this_present_isAlign = true; - boolean that_present_isAlign = true; - if (this_present_isAlign || that_present_isAlign) { - if (!(this_present_isAlign && that_present_isAlign)) - return false; - if (this.isAlign != that.isAlign) - return false; - } - - boolean this_present_timeout = true && this.isSetTimeout(); - boolean that_present_timeout = true && that.isSetTimeout(); - if (this_present_timeout || that_present_timeout) { - if (!(this_present_timeout && that_present_timeout)) - return false; - if (this.timeout != that.timeout) - return false; - } - - boolean this_present_statementId = true && this.isSetStatementId(); - boolean that_present_statementId = true && that.isSetStatementId(); - if (this_present_statementId || that_present_statementId) { - if (!(this_present_statementId && that_present_statementId)) - return false; - if (this.statementId != that.statementId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetStatement()) ? 131071 : 524287); - if (isSetStatement()) - hashCode = hashCode * 8191 + statement.hashCode(); - - hashCode = hashCode * 8191 + fetchSize; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); - - hashCode = hashCode * 8191 + ((isAlign) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); - if (isSetTimeout()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); - - hashCode = hashCode * 8191 + ((isSetStatementId()) ? 131071 : 524287); - if (isSetStatementId()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); - - return hashCode; - } - - @Override - public int compareTo(TSFetchResultsReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatement(), other.isSetStatement()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatement()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statement, other.statement); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFetchSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAlign(), other.isSetIsAlign()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAlign()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAlign, other.isAlign); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatementId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFetchResultsReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("statement:"); - if (this.statement == null) { - sb.append("null"); - } else { - sb.append(this.statement); - } - first = false; - if (!first) sb.append(", "); - sb.append("fetchSize:"); - sb.append(this.fetchSize); - first = false; - if (!first) sb.append(", "); - sb.append("queryId:"); - sb.append(this.queryId); - first = false; - if (!first) sb.append(", "); - sb.append("isAlign:"); - sb.append(this.isAlign); - first = false; - if (isSetTimeout()) { - if (!first) sb.append(", "); - sb.append("timeout:"); - sb.append(this.timeout); - first = false; - } - if (isSetStatementId()) { - if (!first) sb.append(", "); - sb.append("statementId:"); - sb.append(this.statementId); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (statement == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statement' was not present! Struct: " + toString()); - } - // alas, we cannot check 'fetchSize' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'queryId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'isAlign' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSFetchResultsReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFetchResultsReqStandardScheme getScheme() { - return new TSFetchResultsReqStandardScheme(); - } - } - - private static class TSFetchResultsReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSFetchResultsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STATEMENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.statement = iprot.readString(); - struct.setStatementIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FETCH_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // QUERY_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // IS_ALIGN - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAlign = iprot.readBool(); - struct.setIsAlignIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // TIMEOUT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // STATEMENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetFetchSize()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'fetchSize' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetQueryId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetIsAlign()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isAlign' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSFetchResultsReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.statement != null) { - oprot.writeFieldBegin(STATEMENT_FIELD_DESC); - oprot.writeString(struct.statement); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); - oprot.writeI32(struct.fetchSize); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); - oprot.writeI64(struct.queryId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(IS_ALIGN_FIELD_DESC); - oprot.writeBool(struct.isAlign); - oprot.writeFieldEnd(); - if (struct.isSetTimeout()) { - oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); - oprot.writeI64(struct.timeout); - oprot.writeFieldEnd(); - } - if (struct.isSetStatementId()) { - oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); - oprot.writeI64(struct.statementId); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSFetchResultsReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFetchResultsReqTupleScheme getScheme() { - return new TSFetchResultsReqTupleScheme(); - } - } - - private static class TSFetchResultsReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchResultsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.statement); - oprot.writeI32(struct.fetchSize); - oprot.writeI64(struct.queryId); - oprot.writeBool(struct.isAlign); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetTimeout()) { - optionals.set(0); - } - if (struct.isSetStatementId()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetTimeout()) { - oprot.writeI64(struct.timeout); - } - if (struct.isSetStatementId()) { - oprot.writeI64(struct.statementId); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSFetchResultsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.statement = iprot.readString(); - struct.setStatementIsSet(true); - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - struct.isAlign = iprot.readBool(); - struct.setIsAlignIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } - if (incoming.get(1)) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsResp.java deleted file mode 100644 index 75307ccb55064..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSFetchResultsResp.java +++ /dev/null @@ -1,1060 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSFetchResultsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFetchResultsResp"); - - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField HAS_RESULT_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("hasResultSet", org.apache.thrift.protocol.TType.BOOL, (short)2); - private static final org.apache.thrift.protocol.TField IS_ALIGN_FIELD_DESC = new org.apache.thrift.protocol.TField("isAlign", org.apache.thrift.protocol.TType.BOOL, (short)3); - private static final org.apache.thrift.protocol.TField QUERY_DATA_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("queryDataSet", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private static final org.apache.thrift.protocol.TField NON_ALIGN_QUERY_DATA_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("nonAlignQueryDataSet", org.apache.thrift.protocol.TType.STRUCT, (short)5); - private static final org.apache.thrift.protocol.TField QUERY_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("queryResult", org.apache.thrift.protocol.TType.LIST, (short)6); - private static final org.apache.thrift.protocol.TField MORE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("moreData", org.apache.thrift.protocol.TType.BOOL, (short)7); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSFetchResultsRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSFetchResultsRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required - public boolean hasResultSet; // required - public boolean isAlign; // required - public @org.apache.thrift.annotation.Nullable TSQueryDataSet queryDataSet; // optional - public @org.apache.thrift.annotation.Nullable TSQueryNonAlignDataSet nonAlignQueryDataSet; // optional - public @org.apache.thrift.annotation.Nullable java.util.List queryResult; // optional - public boolean moreData; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATUS((short)1, "status"), - HAS_RESULT_SET((short)2, "hasResultSet"), - IS_ALIGN((short)3, "isAlign"), - QUERY_DATA_SET((short)4, "queryDataSet"), - NON_ALIGN_QUERY_DATA_SET((short)5, "nonAlignQueryDataSet"), - QUERY_RESULT((short)6, "queryResult"), - MORE_DATA((short)7, "moreData"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATUS - return STATUS; - case 2: // HAS_RESULT_SET - return HAS_RESULT_SET; - case 3: // IS_ALIGN - return IS_ALIGN; - case 4: // QUERY_DATA_SET - return QUERY_DATA_SET; - case 5: // NON_ALIGN_QUERY_DATA_SET - return NON_ALIGN_QUERY_DATA_SET; - case 6: // QUERY_RESULT - return QUERY_RESULT; - case 7: // MORE_DATA - return MORE_DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __HASRESULTSET_ISSET_ID = 0; - private static final int __ISALIGN_ISSET_ID = 1; - private static final int __MOREDATA_ISSET_ID = 2; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.QUERY_DATA_SET,_Fields.NON_ALIGN_QUERY_DATA_SET,_Fields.QUERY_RESULT,_Fields.MORE_DATA}; - 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - tmpMap.put(_Fields.HAS_RESULT_SET, new org.apache.thrift.meta_data.FieldMetaData("hasResultSet", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.IS_ALIGN, new org.apache.thrift.meta_data.FieldMetaData("isAlign", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.QUERY_DATA_SET, new org.apache.thrift.meta_data.FieldMetaData("queryDataSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryDataSet.class))); - tmpMap.put(_Fields.NON_ALIGN_QUERY_DATA_SET, new org.apache.thrift.meta_data.FieldMetaData("nonAlignQueryDataSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSQueryNonAlignDataSet.class))); - tmpMap.put(_Fields.QUERY_RESULT, new org.apache.thrift.meta_data.FieldMetaData("queryResult", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.MORE_DATA, new org.apache.thrift.meta_data.FieldMetaData("moreData", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSFetchResultsResp.class, metaDataMap); - } - - public TSFetchResultsResp() { - } - - public TSFetchResultsResp( - org.apache.iotdb.common.rpc.thrift.TSStatus status, - boolean hasResultSet, - boolean isAlign) - { - this(); - this.status = status; - this.hasResultSet = hasResultSet; - setHasResultSetIsSet(true); - this.isAlign = isAlign; - setIsAlignIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSFetchResultsResp(TSFetchResultsResp other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetStatus()) { - this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); - } - this.hasResultSet = other.hasResultSet; - this.isAlign = other.isAlign; - if (other.isSetQueryDataSet()) { - this.queryDataSet = new TSQueryDataSet(other.queryDataSet); - } - if (other.isSetNonAlignQueryDataSet()) { - this.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(other.nonAlignQueryDataSet); - } - if (other.isSetQueryResult()) { - java.util.List __this__queryResult = new java.util.ArrayList(other.queryResult); - this.queryResult = __this__queryResult; - } - this.moreData = other.moreData; - } - - @Override - public TSFetchResultsResp deepCopy() { - return new TSFetchResultsResp(this); - } - - @Override - public void clear() { - this.status = null; - setHasResultSetIsSet(false); - this.hasResultSet = false; - setIsAlignIsSet(false); - this.isAlign = false; - this.queryDataSet = null; - this.nonAlignQueryDataSet = null; - this.queryResult = null; - setMoreDataIsSet(false); - this.moreData = false; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { - return this.status; - } - - public TSFetchResultsResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { - this.status = status; - return this; - } - - public void unsetStatus() { - this.status = null; - } - - /** Returns true if field status is set (has been assigned a value) and false otherwise */ - public boolean isSetStatus() { - return this.status != null; - } - - public void setStatusIsSet(boolean value) { - if (!value) { - this.status = null; - } - } - - public boolean isHasResultSet() { - return this.hasResultSet; - } - - public TSFetchResultsResp setHasResultSet(boolean hasResultSet) { - this.hasResultSet = hasResultSet; - setHasResultSetIsSet(true); - return this; - } - - public void unsetHasResultSet() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASRESULTSET_ISSET_ID); - } - - /** Returns true if field hasResultSet is set (has been assigned a value) and false otherwise */ - public boolean isSetHasResultSet() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASRESULTSET_ISSET_ID); - } - - public void setHasResultSetIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASRESULTSET_ISSET_ID, value); - } - - public boolean isIsAlign() { - return this.isAlign; - } - - public TSFetchResultsResp setIsAlign(boolean isAlign) { - this.isAlign = isAlign; - setIsAlignIsSet(true); - return this; - } - - public void unsetIsAlign() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGN_ISSET_ID); - } - - /** Returns true if field isAlign is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAlign() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGN_ISSET_ID); - } - - public void setIsAlignIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGN_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public TSQueryDataSet getQueryDataSet() { - return this.queryDataSet; - } - - public TSFetchResultsResp setQueryDataSet(@org.apache.thrift.annotation.Nullable TSQueryDataSet queryDataSet) { - this.queryDataSet = queryDataSet; - return this; - } - - public void unsetQueryDataSet() { - this.queryDataSet = null; - } - - /** Returns true if field queryDataSet is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryDataSet() { - return this.queryDataSet != null; - } - - public void setQueryDataSetIsSet(boolean value) { - if (!value) { - this.queryDataSet = null; - } - } - - @org.apache.thrift.annotation.Nullable - public TSQueryNonAlignDataSet getNonAlignQueryDataSet() { - return this.nonAlignQueryDataSet; - } - - public TSFetchResultsResp setNonAlignQueryDataSet(@org.apache.thrift.annotation.Nullable TSQueryNonAlignDataSet nonAlignQueryDataSet) { - this.nonAlignQueryDataSet = nonAlignQueryDataSet; - return this; - } - - public void unsetNonAlignQueryDataSet() { - this.nonAlignQueryDataSet = null; - } - - /** Returns true if field nonAlignQueryDataSet is set (has been assigned a value) and false otherwise */ - public boolean isSetNonAlignQueryDataSet() { - return this.nonAlignQueryDataSet != null; - } - - public void setNonAlignQueryDataSetIsSet(boolean value) { - if (!value) { - this.nonAlignQueryDataSet = null; - } - } - - public int getQueryResultSize() { - return (this.queryResult == null) ? 0 : this.queryResult.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getQueryResultIterator() { - return (this.queryResult == null) ? null : this.queryResult.iterator(); - } - - public void addToQueryResult(java.nio.ByteBuffer elem) { - if (this.queryResult == null) { - this.queryResult = new java.util.ArrayList(); - } - this.queryResult.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getQueryResult() { - return this.queryResult; - } - - public TSFetchResultsResp setQueryResult(@org.apache.thrift.annotation.Nullable java.util.List queryResult) { - this.queryResult = queryResult; - return this; - } - - public void unsetQueryResult() { - this.queryResult = null; - } - - /** Returns true if field queryResult is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryResult() { - return this.queryResult != null; - } - - public void setQueryResultIsSet(boolean value) { - if (!value) { - this.queryResult = null; - } - } - - public boolean isMoreData() { - return this.moreData; - } - - public TSFetchResultsResp setMoreData(boolean moreData) { - this.moreData = moreData; - setMoreDataIsSet(true); - return this; - } - - public void unsetMoreData() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MOREDATA_ISSET_ID); - } - - /** Returns true if field moreData is set (has been assigned a value) and false otherwise */ - public boolean isSetMoreData() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MOREDATA_ISSET_ID); - } - - public void setMoreDataIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MOREDATA_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - case HAS_RESULT_SET: - if (value == null) { - unsetHasResultSet(); - } else { - setHasResultSet((java.lang.Boolean)value); - } - break; - - case IS_ALIGN: - if (value == null) { - unsetIsAlign(); - } else { - setIsAlign((java.lang.Boolean)value); - } - break; - - case QUERY_DATA_SET: - if (value == null) { - unsetQueryDataSet(); - } else { - setQueryDataSet((TSQueryDataSet)value); - } - break; - - case NON_ALIGN_QUERY_DATA_SET: - if (value == null) { - unsetNonAlignQueryDataSet(); - } else { - setNonAlignQueryDataSet((TSQueryNonAlignDataSet)value); - } - break; - - case QUERY_RESULT: - if (value == null) { - unsetQueryResult(); - } else { - setQueryResult((java.util.List)value); - } - break; - - case MORE_DATA: - if (value == null) { - unsetMoreData(); - } else { - setMoreData((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case STATUS: - return getStatus(); - - case HAS_RESULT_SET: - return isHasResultSet(); - - case IS_ALIGN: - return isIsAlign(); - - case QUERY_DATA_SET: - return getQueryDataSet(); - - case NON_ALIGN_QUERY_DATA_SET: - return getNonAlignQueryDataSet(); - - case QUERY_RESULT: - return getQueryResult(); - - case MORE_DATA: - return isMoreData(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case STATUS: - return isSetStatus(); - case HAS_RESULT_SET: - return isSetHasResultSet(); - case IS_ALIGN: - return isSetIsAlign(); - case QUERY_DATA_SET: - return isSetQueryDataSet(); - case NON_ALIGN_QUERY_DATA_SET: - return isSetNonAlignQueryDataSet(); - case QUERY_RESULT: - return isSetQueryResult(); - case MORE_DATA: - return isSetMoreData(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSFetchResultsResp) - return this.equals((TSFetchResultsResp)that); - return false; - } - - public boolean equals(TSFetchResultsResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_status = true && this.isSetStatus(); - boolean that_present_status = true && that.isSetStatus(); - if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) - return false; - if (!this.status.equals(that.status)) - return false; - } - - boolean this_present_hasResultSet = true; - boolean that_present_hasResultSet = true; - if (this_present_hasResultSet || that_present_hasResultSet) { - if (!(this_present_hasResultSet && that_present_hasResultSet)) - return false; - if (this.hasResultSet != that.hasResultSet) - return false; - } - - boolean this_present_isAlign = true; - boolean that_present_isAlign = true; - if (this_present_isAlign || that_present_isAlign) { - if (!(this_present_isAlign && that_present_isAlign)) - return false; - if (this.isAlign != that.isAlign) - return false; - } - - boolean this_present_queryDataSet = true && this.isSetQueryDataSet(); - boolean that_present_queryDataSet = true && that.isSetQueryDataSet(); - if (this_present_queryDataSet || that_present_queryDataSet) { - if (!(this_present_queryDataSet && that_present_queryDataSet)) - return false; - if (!this.queryDataSet.equals(that.queryDataSet)) - return false; - } - - boolean this_present_nonAlignQueryDataSet = true && this.isSetNonAlignQueryDataSet(); - boolean that_present_nonAlignQueryDataSet = true && that.isSetNonAlignQueryDataSet(); - if (this_present_nonAlignQueryDataSet || that_present_nonAlignQueryDataSet) { - if (!(this_present_nonAlignQueryDataSet && that_present_nonAlignQueryDataSet)) - return false; - if (!this.nonAlignQueryDataSet.equals(that.nonAlignQueryDataSet)) - return false; - } - - boolean this_present_queryResult = true && this.isSetQueryResult(); - boolean that_present_queryResult = true && that.isSetQueryResult(); - if (this_present_queryResult || that_present_queryResult) { - if (!(this_present_queryResult && that_present_queryResult)) - return false; - if (!this.queryResult.equals(that.queryResult)) - return false; - } - - boolean this_present_moreData = true && this.isSetMoreData(); - boolean that_present_moreData = true && that.isSetMoreData(); - if (this_present_moreData || that_present_moreData) { - if (!(this_present_moreData && that_present_moreData)) - return false; - if (this.moreData != that.moreData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); - if (isSetStatus()) - hashCode = hashCode * 8191 + status.hashCode(); - - hashCode = hashCode * 8191 + ((hasResultSet) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isAlign) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetQueryDataSet()) ? 131071 : 524287); - if (isSetQueryDataSet()) - hashCode = hashCode * 8191 + queryDataSet.hashCode(); - - hashCode = hashCode * 8191 + ((isSetNonAlignQueryDataSet()) ? 131071 : 524287); - if (isSetNonAlignQueryDataSet()) - hashCode = hashCode * 8191 + nonAlignQueryDataSet.hashCode(); - - hashCode = hashCode * 8191 + ((isSetQueryResult()) ? 131071 : 524287); - if (isSetQueryResult()) - hashCode = hashCode * 8191 + queryResult.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMoreData()) ? 131071 : 524287); - if (isSetMoreData()) - hashCode = hashCode * 8191 + ((moreData) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSFetchResultsResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetHasResultSet(), other.isSetHasResultSet()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHasResultSet()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAlign(), other.isSetIsAlign()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAlign()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAlign, other.isAlign); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryDataSet(), other.isSetQueryDataSet()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryDataSet()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryDataSet, other.queryDataSet); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetNonAlignQueryDataSet(), other.isSetNonAlignQueryDataSet()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNonAlignQueryDataSet()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nonAlignQueryDataSet, other.nonAlignQueryDataSet); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryResult(), other.isSetQueryResult()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryResult()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryResult, other.queryResult); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMoreData(), other.isSetMoreData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMoreData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.moreData, other.moreData); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSFetchResultsResp("); - boolean first = true; - - sb.append("status:"); - if (this.status == null) { - sb.append("null"); - } else { - sb.append(this.status); - } - first = false; - if (!first) sb.append(", "); - sb.append("hasResultSet:"); - sb.append(this.hasResultSet); - first = false; - if (!first) sb.append(", "); - sb.append("isAlign:"); - sb.append(this.isAlign); - first = false; - if (isSetQueryDataSet()) { - if (!first) sb.append(", "); - sb.append("queryDataSet:"); - if (this.queryDataSet == null) { - sb.append("null"); - } else { - sb.append(this.queryDataSet); - } - first = false; - } - if (isSetNonAlignQueryDataSet()) { - if (!first) sb.append(", "); - sb.append("nonAlignQueryDataSet:"); - if (this.nonAlignQueryDataSet == null) { - sb.append("null"); - } else { - sb.append(this.nonAlignQueryDataSet); - } - first = false; - } - if (isSetQueryResult()) { - if (!first) sb.append(", "); - sb.append("queryResult:"); - if (this.queryResult == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.queryResult, sb); - } - first = false; - } - if (isSetMoreData()) { - if (!first) sb.append(", "); - sb.append("moreData:"); - sb.append(this.moreData); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (status == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); - } - // alas, we cannot check 'hasResultSet' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'isAlign' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - if (status != null) { - status.validate(); - } - if (queryDataSet != null) { - queryDataSet.validate(); - } - if (nonAlignQueryDataSet != null) { - nonAlignQueryDataSet.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSFetchResultsRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFetchResultsRespStandardScheme getScheme() { - return new TSFetchResultsRespStandardScheme(); - } - } - - private static class TSFetchResultsRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSFetchResultsResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // HAS_RESULT_SET - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.hasResultSet = iprot.readBool(); - struct.setHasResultSetIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // IS_ALIGN - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAlign = iprot.readBool(); - struct.setIsAlignIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // QUERY_DATA_SET - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.queryDataSet = new TSQueryDataSet(); - struct.queryDataSet.read(iprot); - struct.setQueryDataSetIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // NON_ALIGN_QUERY_DATA_SET - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(); - struct.nonAlignQueryDataSet.read(iprot); - struct.setNonAlignQueryDataSetIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // QUERY_RESULT - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list134 = iprot.readListBegin(); - struct.queryResult = new java.util.ArrayList(_list134.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem135; - for (int _i136 = 0; _i136 < _list134.size; ++_i136) - { - _elem135 = iprot.readBinary(); - struct.queryResult.add(_elem135); - } - iprot.readListEnd(); - } - struct.setQueryResultIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // MORE_DATA - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.moreData = iprot.readBool(); - struct.setMoreDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetHasResultSet()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasResultSet' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetIsAlign()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isAlign' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSFetchResultsResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.status != null) { - oprot.writeFieldBegin(STATUS_FIELD_DESC); - struct.status.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(HAS_RESULT_SET_FIELD_DESC); - oprot.writeBool(struct.hasResultSet); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(IS_ALIGN_FIELD_DESC); - oprot.writeBool(struct.isAlign); - oprot.writeFieldEnd(); - if (struct.queryDataSet != null) { - if (struct.isSetQueryDataSet()) { - oprot.writeFieldBegin(QUERY_DATA_SET_FIELD_DESC); - struct.queryDataSet.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.nonAlignQueryDataSet != null) { - if (struct.isSetNonAlignQueryDataSet()) { - oprot.writeFieldBegin(NON_ALIGN_QUERY_DATA_SET_FIELD_DESC); - struct.nonAlignQueryDataSet.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.queryResult != null) { - if (struct.isSetQueryResult()) { - oprot.writeFieldBegin(QUERY_RESULT_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.queryResult.size())); - for (java.nio.ByteBuffer _iter137 : struct.queryResult) - { - oprot.writeBinary(_iter137); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.isSetMoreData()) { - oprot.writeFieldBegin(MORE_DATA_FIELD_DESC); - oprot.writeBool(struct.moreData); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSFetchResultsRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSFetchResultsRespTupleScheme getScheme() { - return new TSFetchResultsRespTupleScheme(); - } - } - - private static class TSFetchResultsRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchResultsResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status.write(oprot); - oprot.writeBool(struct.hasResultSet); - oprot.writeBool(struct.isAlign); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetQueryDataSet()) { - optionals.set(0); - } - if (struct.isSetNonAlignQueryDataSet()) { - optionals.set(1); - } - if (struct.isSetQueryResult()) { - optionals.set(2); - } - if (struct.isSetMoreData()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetQueryDataSet()) { - struct.queryDataSet.write(oprot); - } - if (struct.isSetNonAlignQueryDataSet()) { - struct.nonAlignQueryDataSet.write(oprot); - } - if (struct.isSetQueryResult()) { - { - oprot.writeI32(struct.queryResult.size()); - for (java.nio.ByteBuffer _iter138 : struct.queryResult) - { - oprot.writeBinary(_iter138); - } - } - } - if (struct.isSetMoreData()) { - oprot.writeBool(struct.moreData); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSFetchResultsResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - struct.hasResultSet = iprot.readBool(); - struct.setHasResultSetIsSet(true); - struct.isAlign = iprot.readBool(); - struct.setIsAlignIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.queryDataSet = new TSQueryDataSet(); - struct.queryDataSet.read(iprot); - struct.setQueryDataSetIsSet(true); - } - if (incoming.get(1)) { - struct.nonAlignQueryDataSet = new TSQueryNonAlignDataSet(); - struct.nonAlignQueryDataSet.read(iprot); - struct.setNonAlignQueryDataSetIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list139 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.queryResult = new java.util.ArrayList(_list139.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem140; - for (int _i141 = 0; _i141 < _list139.size; ++_i141) - { - _elem140 = iprot.readBinary(); - struct.queryResult.add(_elem140); - } - } - struct.setQueryResultIsSet(true); - } - if (incoming.get(3)) { - struct.moreData = iprot.readBool(); - struct.setMoreDataIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetOperationStatusReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetOperationStatusReq.java deleted file mode 100644 index 366f0800da662..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetOperationStatusReq.java +++ /dev/null @@ -1,470 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSGetOperationStatusReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSGetOperationStatusReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSGetOperationStatusReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSGetOperationStatusReqTupleSchemeFactory(); - - public long sessionId; // required - public long queryId; // 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 { - SESSION_ID((short)1, "sessionId"), - QUERY_ID((short)2, "queryId"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // QUERY_ID - return QUERY_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __QUERYID_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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSGetOperationStatusReq.class, metaDataMap); - } - - public TSGetOperationStatusReq() { - } - - public TSGetOperationStatusReq( - long sessionId, - long queryId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.queryId = queryId; - setQueryIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSGetOperationStatusReq(TSGetOperationStatusReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - this.queryId = other.queryId; - } - - @Override - public TSGetOperationStatusReq deepCopy() { - return new TSGetOperationStatusReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - setQueryIdIsSet(false); - this.queryId = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSGetOperationStatusReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public long getQueryId() { - return this.queryId; - } - - public TSGetOperationStatusReq setQueryId(long queryId) { - this.queryId = queryId; - setQueryIdIsSet(true); - return this; - } - - public void unsetQueryId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - /** Returns true if field queryId is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID); - } - - public void setQueryIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case QUERY_ID: - if (value == null) { - unsetQueryId(); - } else { - setQueryId((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case QUERY_ID: - return getQueryId(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case QUERY_ID: - return isSetQueryId(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSGetOperationStatusReq) - return this.equals((TSGetOperationStatusReq)that); - return false; - } - - public boolean equals(TSGetOperationStatusReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_queryId = true; - boolean that_present_queryId = true; - if (this_present_queryId || that_present_queryId) { - if (!(this_present_queryId && that_present_queryId)) - return false; - if (this.queryId != that.queryId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId); - - return hashCode; - } - - @Override - public int compareTo(TSGetOperationStatusReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSGetOperationStatusReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("queryId:"); - sb.append(this.queryId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'queryId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSGetOperationStatusReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSGetOperationStatusReqStandardScheme getScheme() { - return new TSGetOperationStatusReqStandardScheme(); - } - } - - private static class TSGetOperationStatusReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSGetOperationStatusReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // QUERY_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetQueryId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSGetOperationStatusReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); - oprot.writeI64(struct.queryId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSGetOperationStatusReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSGetOperationStatusReqTupleScheme getScheme() { - return new TSGetOperationStatusReqTupleScheme(); - } - } - - private static class TSGetOperationStatusReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSGetOperationStatusReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeI64(struct.queryId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSGetOperationStatusReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.queryId = iprot.readI64(); - struct.setQueryIdIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetTimeZoneResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetTimeZoneResp.java deleted file mode 100644 index 113b06fe2636d..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSGetTimeZoneResp.java +++ /dev/null @@ -1,487 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSGetTimeZoneResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSGetTimeZoneResp"); - - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField TIME_ZONE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeZone", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSGetTimeZoneRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSGetTimeZoneRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required - public @org.apache.thrift.annotation.Nullable java.lang.String timeZone; // 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 { - STATUS((short)1, "status"), - TIME_ZONE((short)2, "timeZone"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATUS - return STATUS; - case 2: // TIME_ZONE - return TIME_ZONE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - tmpMap.put(_Fields.TIME_ZONE, new org.apache.thrift.meta_data.FieldMetaData("timeZone", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSGetTimeZoneResp.class, metaDataMap); - } - - public TSGetTimeZoneResp() { - } - - public TSGetTimeZoneResp( - org.apache.iotdb.common.rpc.thrift.TSStatus status, - java.lang.String timeZone) - { - this(); - this.status = status; - this.timeZone = timeZone; - } - - /** - * Performs a deep copy on other. - */ - public TSGetTimeZoneResp(TSGetTimeZoneResp other) { - if (other.isSetStatus()) { - this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); - } - if (other.isSetTimeZone()) { - this.timeZone = other.timeZone; - } - } - - @Override - public TSGetTimeZoneResp deepCopy() { - return new TSGetTimeZoneResp(this); - } - - @Override - public void clear() { - this.status = null; - this.timeZone = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { - return this.status; - } - - public TSGetTimeZoneResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { - this.status = status; - return this; - } - - public void unsetStatus() { - this.status = null; - } - - /** Returns true if field status is set (has been assigned a value) and false otherwise */ - public boolean isSetStatus() { - return this.status != null; - } - - public void setStatusIsSet(boolean value) { - if (!value) { - this.status = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getTimeZone() { - return this.timeZone; - } - - public TSGetTimeZoneResp setTimeZone(@org.apache.thrift.annotation.Nullable java.lang.String timeZone) { - this.timeZone = timeZone; - return this; - } - - public void unsetTimeZone() { - this.timeZone = null; - } - - /** Returns true if field timeZone is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeZone() { - return this.timeZone != null; - } - - public void setTimeZoneIsSet(boolean value) { - if (!value) { - this.timeZone = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - case TIME_ZONE: - if (value == null) { - unsetTimeZone(); - } else { - setTimeZone((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case STATUS: - return getStatus(); - - case TIME_ZONE: - return getTimeZone(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case STATUS: - return isSetStatus(); - case TIME_ZONE: - return isSetTimeZone(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSGetTimeZoneResp) - return this.equals((TSGetTimeZoneResp)that); - return false; - } - - public boolean equals(TSGetTimeZoneResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_status = true && this.isSetStatus(); - boolean that_present_status = true && that.isSetStatus(); - if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) - return false; - if (!this.status.equals(that.status)) - return false; - } - - boolean this_present_timeZone = true && this.isSetTimeZone(); - boolean that_present_timeZone = true && that.isSetTimeZone(); - if (this_present_timeZone || that_present_timeZone) { - if (!(this_present_timeZone && that_present_timeZone)) - return false; - if (!this.timeZone.equals(that.timeZone)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); - if (isSetStatus()) - hashCode = hashCode * 8191 + status.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTimeZone()) ? 131071 : 524287); - if (isSetTimeZone()) - hashCode = hashCode * 8191 + timeZone.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSGetTimeZoneResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeZone(), other.isSetTimeZone()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeZone()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeZone, other.timeZone); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSGetTimeZoneResp("); - boolean first = true; - - sb.append("status:"); - if (this.status == null) { - sb.append("null"); - } else { - sb.append(this.status); - } - first = false; - if (!first) sb.append(", "); - sb.append("timeZone:"); - if (this.timeZone == null) { - sb.append("null"); - } else { - sb.append(this.timeZone); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (status == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); - } - if (timeZone == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeZone' was not present! Struct: " + toString()); - } - // check for sub-struct validity - if (status != null) { - status.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class TSGetTimeZoneRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSGetTimeZoneRespStandardScheme getScheme() { - return new TSGetTimeZoneRespStandardScheme(); - } - } - - private static class TSGetTimeZoneRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TIME_ZONE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.timeZone = iprot.readString(); - struct.setTimeZoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.status != null) { - oprot.writeFieldBegin(STATUS_FIELD_DESC); - struct.status.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.timeZone != null) { - oprot.writeFieldBegin(TIME_ZONE_FIELD_DESC); - oprot.writeString(struct.timeZone); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSGetTimeZoneRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSGetTimeZoneRespTupleScheme getScheme() { - return new TSGetTimeZoneRespTupleScheme(); - } - } - - private static class TSGetTimeZoneRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status.write(oprot); - oprot.writeString(struct.timeZone); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - struct.timeZone = iprot.readString(); - struct.setTimeZoneIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSGroupByQueryIntervalReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSGroupByQueryIntervalReq.java deleted file mode 100644 index 754bebd94f211..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSGroupByQueryIntervalReq.java +++ /dev/null @@ -1,1488 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSGroupByQueryIntervalReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSGroupByQueryIntervalReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField DEVICE_FIELD_DESC = new org.apache.thrift.protocol.TField("device", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField MEASUREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("measurement", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField AGGREGATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregationType", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)8); - private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)9); - private static final org.apache.thrift.protocol.TField INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("interval", org.apache.thrift.protocol.TType.I64, (short)10); - private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)11); - private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)12); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSGroupByQueryIntervalReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSGroupByQueryIntervalReqTupleSchemeFactory(); - - public long sessionId; // required - public long statementId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String device; // required - public @org.apache.thrift.annotation.Nullable java.lang.String measurement; // required - public int dataType; // required - /** - * - * @see org.apache.iotdb.common.rpc.thrift.TAggregationType - */ - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType aggregationType; // required - public @org.apache.thrift.annotation.Nullable java.lang.String database; // optional - public long startTime; // optional - public long endTime; // optional - public long interval; // optional - public int fetchSize; // optional - public long timeout; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - STATEMENT_ID((short)2, "statementId"), - DEVICE((short)3, "device"), - MEASUREMENT((short)4, "measurement"), - DATA_TYPE((short)5, "dataType"), - /** - * - * @see org.apache.iotdb.common.rpc.thrift.TAggregationType - */ - AGGREGATION_TYPE((short)6, "aggregationType"), - DATABASE((short)7, "database"), - START_TIME((short)8, "startTime"), - END_TIME((short)9, "endTime"), - INTERVAL((short)10, "interval"), - FETCH_SIZE((short)11, "fetchSize"), - TIMEOUT((short)12, "timeout"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // STATEMENT_ID - return STATEMENT_ID; - case 3: // DEVICE - return DEVICE; - case 4: // MEASUREMENT - return MEASUREMENT; - case 5: // DATA_TYPE - return DATA_TYPE; - case 6: // AGGREGATION_TYPE - return AGGREGATION_TYPE; - case 7: // DATABASE - return DATABASE; - case 8: // START_TIME - return START_TIME; - case 9: // END_TIME - return END_TIME; - case 10: // INTERVAL - return INTERVAL; - case 11: // FETCH_SIZE - return FETCH_SIZE; - case 12: // TIMEOUT - return TIMEOUT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __STATEMENTID_ISSET_ID = 1; - private static final int __DATATYPE_ISSET_ID = 2; - private static final int __STARTTIME_ISSET_ID = 3; - private static final int __ENDTIME_ISSET_ID = 4; - private static final int __INTERVAL_ISSET_ID = 5; - private static final int __FETCHSIZE_ISSET_ID = 6; - private static final int __TIMEOUT_ISSET_ID = 7; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.DATABASE,_Fields.START_TIME,_Fields.END_TIME,_Fields.INTERVAL,_Fields.FETCH_SIZE,_Fields.TIMEOUT}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.DEVICE, new org.apache.thrift.meta_data.FieldMetaData("device", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MEASUREMENT, new org.apache.thrift.meta_data.FieldMetaData("measurement", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.AGGREGATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("aggregationType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.iotdb.common.rpc.thrift.TAggregationType.class))); - tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.INTERVAL, new org.apache.thrift.meta_data.FieldMetaData("interval", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSGroupByQueryIntervalReq.class, metaDataMap); - } - - public TSGroupByQueryIntervalReq() { - } - - public TSGroupByQueryIntervalReq( - long sessionId, - long statementId, - java.lang.String device, - java.lang.String measurement, - int dataType, - org.apache.iotdb.common.rpc.thrift.TAggregationType aggregationType) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.statementId = statementId; - setStatementIdIsSet(true); - this.device = device; - this.measurement = measurement; - this.dataType = dataType; - setDataTypeIsSet(true); - this.aggregationType = aggregationType; - } - - /** - * Performs a deep copy on other. - */ - public TSGroupByQueryIntervalReq(TSGroupByQueryIntervalReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - this.statementId = other.statementId; - if (other.isSetDevice()) { - this.device = other.device; - } - if (other.isSetMeasurement()) { - this.measurement = other.measurement; - } - this.dataType = other.dataType; - if (other.isSetAggregationType()) { - this.aggregationType = other.aggregationType; - } - if (other.isSetDatabase()) { - this.database = other.database; - } - this.startTime = other.startTime; - this.endTime = other.endTime; - this.interval = other.interval; - this.fetchSize = other.fetchSize; - this.timeout = other.timeout; - } - - @Override - public TSGroupByQueryIntervalReq deepCopy() { - return new TSGroupByQueryIntervalReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - setStatementIdIsSet(false); - this.statementId = 0; - this.device = null; - this.measurement = null; - setDataTypeIsSet(false); - this.dataType = 0; - this.aggregationType = null; - this.database = null; - setStartTimeIsSet(false); - this.startTime = 0; - setEndTimeIsSet(false); - this.endTime = 0; - setIntervalIsSet(false); - this.interval = 0; - setFetchSizeIsSet(false); - this.fetchSize = 0; - setTimeoutIsSet(false); - this.timeout = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSGroupByQueryIntervalReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public long getStatementId() { - return this.statementId; - } - - public TSGroupByQueryIntervalReq setStatementId(long statementId) { - this.statementId = statementId; - setStatementIdIsSet(true); - return this; - } - - public void unsetStatementId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ - public boolean isSetStatementId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - public void setStatementIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getDevice() { - return this.device; - } - - public TSGroupByQueryIntervalReq setDevice(@org.apache.thrift.annotation.Nullable java.lang.String device) { - this.device = device; - return this; - } - - public void unsetDevice() { - this.device = null; - } - - /** Returns true if field device is set (has been assigned a value) and false otherwise */ - public boolean isSetDevice() { - return this.device != null; - } - - public void setDeviceIsSet(boolean value) { - if (!value) { - this.device = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getMeasurement() { - return this.measurement; - } - - public TSGroupByQueryIntervalReq setMeasurement(@org.apache.thrift.annotation.Nullable java.lang.String measurement) { - this.measurement = measurement; - return this; - } - - public void unsetMeasurement() { - this.measurement = null; - } - - /** Returns true if field measurement is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurement() { - return this.measurement != null; - } - - public void setMeasurementIsSet(boolean value) { - if (!value) { - this.measurement = null; - } - } - - public int getDataType() { - return this.dataType; - } - - public TSGroupByQueryIntervalReq setDataType(int dataType) { - this.dataType = dataType; - setDataTypeIsSet(true); - return this; - } - - public void unsetDataType() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATATYPE_ISSET_ID); - } - - /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ - public boolean isSetDataType() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATATYPE_ISSET_ID); - } - - public void setDataTypeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATATYPE_ISSET_ID, value); - } - - /** - * - * @see org.apache.iotdb.common.rpc.thrift.TAggregationType - */ - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TAggregationType getAggregationType() { - return this.aggregationType; - } - - /** - * - * @see org.apache.iotdb.common.rpc.thrift.TAggregationType - */ - public TSGroupByQueryIntervalReq setAggregationType(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType aggregationType) { - this.aggregationType = aggregationType; - return this; - } - - public void unsetAggregationType() { - this.aggregationType = null; - } - - /** Returns true if field aggregationType is set (has been assigned a value) and false otherwise */ - public boolean isSetAggregationType() { - return this.aggregationType != null; - } - - public void setAggregationTypeIsSet(boolean value) { - if (!value) { - this.aggregationType = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getDatabase() { - return this.database; - } - - public TSGroupByQueryIntervalReq setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) { - this.database = database; - return this; - } - - public void unsetDatabase() { - this.database = null; - } - - /** Returns true if field database is set (has been assigned a value) and false otherwise */ - public boolean isSetDatabase() { - return this.database != null; - } - - public void setDatabaseIsSet(boolean value) { - if (!value) { - this.database = null; - } - } - - public long getStartTime() { - return this.startTime; - } - - public TSGroupByQueryIntervalReq setStartTime(long startTime) { - this.startTime = startTime; - setStartTimeIsSet(true); - return this; - } - - public void unsetStartTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); - } - - /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ - public boolean isSetStartTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); - } - - public void setStartTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); - } - - public long getEndTime() { - return this.endTime; - } - - public TSGroupByQueryIntervalReq setEndTime(long endTime) { - this.endTime = endTime; - setEndTimeIsSet(true); - return this; - } - - public void unsetEndTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ - public boolean isSetEndTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - public void setEndTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); - } - - public long getInterval() { - return this.interval; - } - - public TSGroupByQueryIntervalReq setInterval(long interval) { - this.interval = interval; - setIntervalIsSet(true); - return this; - } - - public void unsetInterval() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INTERVAL_ISSET_ID); - } - - /** Returns true if field interval is set (has been assigned a value) and false otherwise */ - public boolean isSetInterval() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INTERVAL_ISSET_ID); - } - - public void setIntervalIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INTERVAL_ISSET_ID, value); - } - - public int getFetchSize() { - return this.fetchSize; - } - - public TSGroupByQueryIntervalReq setFetchSize(int fetchSize) { - this.fetchSize = fetchSize; - setFetchSizeIsSet(true); - return this; - } - - public void unsetFetchSize() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ - public boolean isSetFetchSize() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - public void setFetchSizeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); - } - - public long getTimeout() { - return this.timeout; - } - - public TSGroupByQueryIntervalReq setTimeout(long timeout) { - this.timeout = timeout; - setTimeoutIsSet(true); - return this; - } - - public void unsetTimeout() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeout() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - public void setTimeoutIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case STATEMENT_ID: - if (value == null) { - unsetStatementId(); - } else { - setStatementId((java.lang.Long)value); - } - break; - - case DEVICE: - if (value == null) { - unsetDevice(); - } else { - setDevice((java.lang.String)value); - } - break; - - case MEASUREMENT: - if (value == null) { - unsetMeasurement(); - } else { - setMeasurement((java.lang.String)value); - } - break; - - case DATA_TYPE: - if (value == null) { - unsetDataType(); - } else { - setDataType((java.lang.Integer)value); - } - break; - - case AGGREGATION_TYPE: - if (value == null) { - unsetAggregationType(); - } else { - setAggregationType((org.apache.iotdb.common.rpc.thrift.TAggregationType)value); - } - break; - - case DATABASE: - if (value == null) { - unsetDatabase(); - } else { - setDatabase((java.lang.String)value); - } - break; - - case START_TIME: - if (value == null) { - unsetStartTime(); - } else { - setStartTime((java.lang.Long)value); - } - break; - - case END_TIME: - if (value == null) { - unsetEndTime(); - } else { - setEndTime((java.lang.Long)value); - } - break; - - case INTERVAL: - if (value == null) { - unsetInterval(); - } else { - setInterval((java.lang.Long)value); - } - break; - - case FETCH_SIZE: - if (value == null) { - unsetFetchSize(); - } else { - setFetchSize((java.lang.Integer)value); - } - break; - - case TIMEOUT: - if (value == null) { - unsetTimeout(); - } else { - setTimeout((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case STATEMENT_ID: - return getStatementId(); - - case DEVICE: - return getDevice(); - - case MEASUREMENT: - return getMeasurement(); - - case DATA_TYPE: - return getDataType(); - - case AGGREGATION_TYPE: - return getAggregationType(); - - case DATABASE: - return getDatabase(); - - case START_TIME: - return getStartTime(); - - case END_TIME: - return getEndTime(); - - case INTERVAL: - return getInterval(); - - case FETCH_SIZE: - return getFetchSize(); - - case TIMEOUT: - return getTimeout(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case STATEMENT_ID: - return isSetStatementId(); - case DEVICE: - return isSetDevice(); - case MEASUREMENT: - return isSetMeasurement(); - case DATA_TYPE: - return isSetDataType(); - case AGGREGATION_TYPE: - return isSetAggregationType(); - case DATABASE: - return isSetDatabase(); - case START_TIME: - return isSetStartTime(); - case END_TIME: - return isSetEndTime(); - case INTERVAL: - return isSetInterval(); - case FETCH_SIZE: - return isSetFetchSize(); - case TIMEOUT: - return isSetTimeout(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSGroupByQueryIntervalReq) - return this.equals((TSGroupByQueryIntervalReq)that); - return false; - } - - public boolean equals(TSGroupByQueryIntervalReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_statementId = true; - boolean that_present_statementId = true; - if (this_present_statementId || that_present_statementId) { - if (!(this_present_statementId && that_present_statementId)) - return false; - if (this.statementId != that.statementId) - return false; - } - - boolean this_present_device = true && this.isSetDevice(); - boolean that_present_device = true && that.isSetDevice(); - if (this_present_device || that_present_device) { - if (!(this_present_device && that_present_device)) - return false; - if (!this.device.equals(that.device)) - return false; - } - - boolean this_present_measurement = true && this.isSetMeasurement(); - boolean that_present_measurement = true && that.isSetMeasurement(); - if (this_present_measurement || that_present_measurement) { - if (!(this_present_measurement && that_present_measurement)) - return false; - if (!this.measurement.equals(that.measurement)) - return false; - } - - boolean this_present_dataType = true; - boolean that_present_dataType = true; - if (this_present_dataType || that_present_dataType) { - if (!(this_present_dataType && that_present_dataType)) - return false; - if (this.dataType != that.dataType) - return false; - } - - boolean this_present_aggregationType = true && this.isSetAggregationType(); - boolean that_present_aggregationType = true && that.isSetAggregationType(); - if (this_present_aggregationType || that_present_aggregationType) { - if (!(this_present_aggregationType && that_present_aggregationType)) - return false; - if (!this.aggregationType.equals(that.aggregationType)) - return false; - } - - boolean this_present_database = true && this.isSetDatabase(); - boolean that_present_database = true && that.isSetDatabase(); - if (this_present_database || that_present_database) { - if (!(this_present_database && that_present_database)) - return false; - if (!this.database.equals(that.database)) - return false; - } - - boolean this_present_startTime = true && this.isSetStartTime(); - boolean that_present_startTime = true && that.isSetStartTime(); - if (this_present_startTime || that_present_startTime) { - if (!(this_present_startTime && that_present_startTime)) - return false; - if (this.startTime != that.startTime) - return false; - } - - boolean this_present_endTime = true && this.isSetEndTime(); - boolean that_present_endTime = true && that.isSetEndTime(); - if (this_present_endTime || that_present_endTime) { - if (!(this_present_endTime && that_present_endTime)) - return false; - if (this.endTime != that.endTime) - return false; - } - - boolean this_present_interval = true && this.isSetInterval(); - boolean that_present_interval = true && that.isSetInterval(); - if (this_present_interval || that_present_interval) { - if (!(this_present_interval && that_present_interval)) - return false; - if (this.interval != that.interval) - return false; - } - - boolean this_present_fetchSize = true && this.isSetFetchSize(); - boolean that_present_fetchSize = true && that.isSetFetchSize(); - if (this_present_fetchSize || that_present_fetchSize) { - if (!(this_present_fetchSize && that_present_fetchSize)) - return false; - if (this.fetchSize != that.fetchSize) - return false; - } - - boolean this_present_timeout = true && this.isSetTimeout(); - boolean that_present_timeout = true && that.isSetTimeout(); - if (this_present_timeout || that_present_timeout) { - if (!(this_present_timeout && that_present_timeout)) - return false; - if (this.timeout != that.timeout) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); - - hashCode = hashCode * 8191 + ((isSetDevice()) ? 131071 : 524287); - if (isSetDevice()) - hashCode = hashCode * 8191 + device.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurement()) ? 131071 : 524287); - if (isSetMeasurement()) - hashCode = hashCode * 8191 + measurement.hashCode(); - - hashCode = hashCode * 8191 + dataType; - - hashCode = hashCode * 8191 + ((isSetAggregationType()) ? 131071 : 524287); - if (isSetAggregationType()) - hashCode = hashCode * 8191 + aggregationType.getValue(); - - hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287); - if (isSetDatabase()) - hashCode = hashCode * 8191 + database.hashCode(); - - hashCode = hashCode * 8191 + ((isSetStartTime()) ? 131071 : 524287); - if (isSetStartTime()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime); - - hashCode = hashCode * 8191 + ((isSetEndTime()) ? 131071 : 524287); - if (isSetEndTime()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime); - - hashCode = hashCode * 8191 + ((isSetInterval()) ? 131071 : 524287); - if (isSetInterval()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(interval); - - hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); - if (isSetFetchSize()) - hashCode = hashCode * 8191 + fetchSize; - - hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); - if (isSetTimeout()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); - - return hashCode; - } - - @Override - public int compareTo(TSGroupByQueryIntervalReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatementId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDevice(), other.isSetDevice()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDevice()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device, other.device); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurement(), other.isSetMeasurement()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurement()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurement, other.measurement); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDataType(), other.isSetDataType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, other.dataType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetAggregationType(), other.isSetAggregationType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAggregationType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregationType, other.aggregationType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDatabase(), other.isSetDatabase()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDatabase()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEndTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetInterval(), other.isSetInterval()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInterval()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.interval, other.interval); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFetchSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSGroupByQueryIntervalReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("statementId:"); - sb.append(this.statementId); - first = false; - if (!first) sb.append(", "); - sb.append("device:"); - if (this.device == null) { - sb.append("null"); - } else { - sb.append(this.device); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurement:"); - if (this.measurement == null) { - sb.append("null"); - } else { - sb.append(this.measurement); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataType:"); - sb.append(this.dataType); - first = false; - if (!first) sb.append(", "); - sb.append("aggregationType:"); - if (this.aggregationType == null) { - sb.append("null"); - } else { - sb.append(this.aggregationType); - } - first = false; - if (isSetDatabase()) { - if (!first) sb.append(", "); - sb.append("database:"); - if (this.database == null) { - sb.append("null"); - } else { - sb.append(this.database); - } - first = false; - } - if (isSetStartTime()) { - if (!first) sb.append(", "); - sb.append("startTime:"); - sb.append(this.startTime); - first = false; - } - if (isSetEndTime()) { - if (!first) sb.append(", "); - sb.append("endTime:"); - sb.append(this.endTime); - first = false; - } - if (isSetInterval()) { - if (!first) sb.append(", "); - sb.append("interval:"); - sb.append(this.interval); - first = false; - } - if (isSetFetchSize()) { - if (!first) sb.append(", "); - sb.append("fetchSize:"); - sb.append(this.fetchSize); - first = false; - } - if (isSetTimeout()) { - if (!first) sb.append(", "); - sb.append("timeout:"); - sb.append(this.timeout); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. - if (device == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'device' was not present! Struct: " + toString()); - } - if (measurement == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurement' was not present! Struct: " + toString()); - } - // alas, we cannot check 'dataType' because it's a primitive and you chose the non-beans generator. - if (aggregationType == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'aggregationType' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSGroupByQueryIntervalReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSGroupByQueryIntervalReqStandardScheme getScheme() { - return new TSGroupByQueryIntervalReqStandardScheme(); - } - } - - private static class TSGroupByQueryIntervalReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STATEMENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DEVICE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.device = iprot.readString(); - struct.setDeviceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MEASUREMENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.measurement = iprot.readString(); - struct.setMeasurementIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // DATA_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dataType = iprot.readI32(); - struct.setDataTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // AGGREGATION_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.aggregationType = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32()); - struct.setAggregationTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // DATABASE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.database = iprot.readString(); - struct.setDatabaseIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // START_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // END_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // INTERVAL - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.interval = iprot.readI64(); - struct.setIntervalIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // FETCH_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // TIMEOUT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetStatementId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetDataType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataType' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); - oprot.writeI64(struct.statementId); - oprot.writeFieldEnd(); - if (struct.device != null) { - oprot.writeFieldBegin(DEVICE_FIELD_DESC); - oprot.writeString(struct.device); - oprot.writeFieldEnd(); - } - if (struct.measurement != null) { - oprot.writeFieldBegin(MEASUREMENT_FIELD_DESC); - oprot.writeString(struct.measurement); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); - oprot.writeI32(struct.dataType); - oprot.writeFieldEnd(); - if (struct.aggregationType != null) { - oprot.writeFieldBegin(AGGREGATION_TYPE_FIELD_DESC); - oprot.writeI32(struct.aggregationType.getValue()); - oprot.writeFieldEnd(); - } - if (struct.database != null) { - if (struct.isSetDatabase()) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - oprot.writeString(struct.database); - oprot.writeFieldEnd(); - } - } - if (struct.isSetStartTime()) { - oprot.writeFieldBegin(START_TIME_FIELD_DESC); - oprot.writeI64(struct.startTime); - oprot.writeFieldEnd(); - } - if (struct.isSetEndTime()) { - oprot.writeFieldBegin(END_TIME_FIELD_DESC); - oprot.writeI64(struct.endTime); - oprot.writeFieldEnd(); - } - if (struct.isSetInterval()) { - oprot.writeFieldBegin(INTERVAL_FIELD_DESC); - oprot.writeI64(struct.interval); - oprot.writeFieldEnd(); - } - if (struct.isSetFetchSize()) { - oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); - oprot.writeI32(struct.fetchSize); - oprot.writeFieldEnd(); - } - if (struct.isSetTimeout()) { - oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); - oprot.writeI64(struct.timeout); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSGroupByQueryIntervalReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSGroupByQueryIntervalReqTupleScheme getScheme() { - return new TSGroupByQueryIntervalReqTupleScheme(); - } - } - - private static class TSGroupByQueryIntervalReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeI64(struct.statementId); - oprot.writeString(struct.device); - oprot.writeString(struct.measurement); - oprot.writeI32(struct.dataType); - oprot.writeI32(struct.aggregationType.getValue()); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetDatabase()) { - optionals.set(0); - } - if (struct.isSetStartTime()) { - optionals.set(1); - } - if (struct.isSetEndTime()) { - optionals.set(2); - } - if (struct.isSetInterval()) { - optionals.set(3); - } - if (struct.isSetFetchSize()) { - optionals.set(4); - } - if (struct.isSetTimeout()) { - optionals.set(5); - } - oprot.writeBitSet(optionals, 6); - if (struct.isSetDatabase()) { - oprot.writeString(struct.database); - } - if (struct.isSetStartTime()) { - oprot.writeI64(struct.startTime); - } - if (struct.isSetEndTime()) { - oprot.writeI64(struct.endTime); - } - if (struct.isSetInterval()) { - oprot.writeI64(struct.interval); - } - if (struct.isSetFetchSize()) { - oprot.writeI32(struct.fetchSize); - } - if (struct.isSetTimeout()) { - oprot.writeI64(struct.timeout); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - struct.device = iprot.readString(); - struct.setDeviceIsSet(true); - struct.measurement = iprot.readString(); - struct.setMeasurementIsSet(true); - struct.dataType = iprot.readI32(); - struct.setDataTypeIsSet(true); - struct.aggregationType = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32()); - struct.setAggregationTypeIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(6); - if (incoming.get(0)) { - struct.database = iprot.readString(); - struct.setDatabaseIsSet(true); - } - if (incoming.get(1)) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } - if (incoming.get(2)) { - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - } - if (incoming.get(3)) { - struct.interval = iprot.readI64(); - struct.setIntervalIsSet(true); - } - if (incoming.get(4)) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } - if (incoming.get(5)) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordReq.java deleted file mode 100644 index 5780ac4976651..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordReq.java +++ /dev/null @@ -1,1195 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSInsertRecordReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertRecordReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField IS_WRITE_TO_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("isWriteToTable", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField COLUMN_CATEGORYIES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnCategoryies", org.apache.thrift.protocol.TType.LIST, (short)8); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertRecordReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertRecordReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required - public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer values; // required - public long timestamp; // required - public boolean isAligned; // optional - public boolean isWriteToTable; // optional - public @org.apache.thrift.annotation.Nullable java.util.List columnCategoryies; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATH((short)2, "prefixPath"), - MEASUREMENTS((short)3, "measurements"), - VALUES((short)4, "values"), - TIMESTAMP((short)5, "timestamp"), - IS_ALIGNED((short)6, "isAligned"), - IS_WRITE_TO_TABLE((short)7, "isWriteToTable"), - COLUMN_CATEGORYIES((short)8, "columnCategoryies"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATH - return PREFIX_PATH; - case 3: // MEASUREMENTS - return MEASUREMENTS; - case 4: // VALUES - return VALUES; - case 5: // TIMESTAMP - return TIMESTAMP; - case 6: // IS_ALIGNED - return IS_ALIGNED; - case 7: // IS_WRITE_TO_TABLE - return IS_WRITE_TO_TABLE; - case 8: // COLUMN_CATEGORYIES - return COLUMN_CATEGORYIES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __TIMESTAMP_ISSET_ID = 1; - private static final int __ISALIGNED_ISSET_ID = 2; - private static final int __ISWRITETOTABLE_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.IS_ALIGNED,_Fields.IS_WRITE_TO_TABLE,_Fields.COLUMN_CATEGORYIES}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.IS_WRITE_TO_TABLE, new org.apache.thrift.meta_data.FieldMetaData("isWriteToTable", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.COLUMN_CATEGORYIES, new org.apache.thrift.meta_data.FieldMetaData("columnCategoryies", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertRecordReq.class, metaDataMap); - } - - public TSInsertRecordReq() { - } - - public TSInsertRecordReq( - long sessionId, - java.lang.String prefixPath, - java.util.List measurements, - java.nio.ByteBuffer values, - long timestamp) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPath = prefixPath; - this.measurements = measurements; - this.values = org.apache.thrift.TBaseHelper.copyBinary(values); - this.timestamp = timestamp; - setTimestampIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSInsertRecordReq(TSInsertRecordReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPath()) { - this.prefixPath = other.prefixPath; - } - if (other.isSetMeasurements()) { - java.util.List __this__measurements = new java.util.ArrayList(other.measurements); - this.measurements = __this__measurements; - } - if (other.isSetValues()) { - this.values = org.apache.thrift.TBaseHelper.copyBinary(other.values); - } - this.timestamp = other.timestamp; - this.isAligned = other.isAligned; - this.isWriteToTable = other.isWriteToTable; - if (other.isSetColumnCategoryies()) { - java.util.List __this__columnCategoryies = new java.util.ArrayList(other.columnCategoryies); - this.columnCategoryies = __this__columnCategoryies; - } - } - - @Override - public TSInsertRecordReq deepCopy() { - return new TSInsertRecordReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPath = null; - this.measurements = null; - this.values = null; - setTimestampIsSet(false); - this.timestamp = 0; - setIsAlignedIsSet(false); - this.isAligned = false; - setIsWriteToTableIsSet(false); - this.isWriteToTable = false; - this.columnCategoryies = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSInsertRecordReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPrefixPath() { - return this.prefixPath; - } - - public TSInsertRecordReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { - this.prefixPath = prefixPath; - return this; - } - - public void unsetPrefixPath() { - this.prefixPath = null; - } - - /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPath() { - return this.prefixPath != null; - } - - public void setPrefixPathIsSet(boolean value) { - if (!value) { - this.prefixPath = null; - } - } - - public int getMeasurementsSize() { - return (this.measurements == null) ? 0 : this.measurements.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getMeasurementsIterator() { - return (this.measurements == null) ? null : this.measurements.iterator(); - } - - public void addToMeasurements(java.lang.String elem) { - if (this.measurements == null) { - this.measurements = new java.util.ArrayList(); - } - this.measurements.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getMeasurements() { - return this.measurements; - } - - public TSInsertRecordReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { - this.measurements = measurements; - return this; - } - - public void unsetMeasurements() { - this.measurements = null; - } - - /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurements() { - return this.measurements != null; - } - - public void setMeasurementsIsSet(boolean value) { - if (!value) { - this.measurements = null; - } - } - - public byte[] getValues() { - setValues(org.apache.thrift.TBaseHelper.rightSize(values)); - return values == null ? null : values.array(); - } - - public java.nio.ByteBuffer bufferForValues() { - return org.apache.thrift.TBaseHelper.copyBinary(values); - } - - public TSInsertRecordReq setValues(byte[] values) { - this.values = values == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(values.clone()); - return this; - } - - public TSInsertRecordReq setValues(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer values) { - this.values = org.apache.thrift.TBaseHelper.copyBinary(values); - return this; - } - - public void unsetValues() { - this.values = null; - } - - /** Returns true if field values is set (has been assigned a value) and false otherwise */ - public boolean isSetValues() { - return this.values != null; - } - - public void setValuesIsSet(boolean value) { - if (!value) { - this.values = null; - } - } - - public long getTimestamp() { - return this.timestamp; - } - - public TSInsertRecordReq setTimestamp(long timestamp) { - this.timestamp = timestamp; - setTimestampIsSet(true); - return this; - } - - public void unsetTimestamp() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); - } - - /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestamp() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); - } - - public void setTimestampIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); - } - - public boolean isIsAligned() { - return this.isAligned; - } - - public TSInsertRecordReq setIsAligned(boolean isAligned) { - this.isAligned = isAligned; - setIsAlignedIsSet(true); - return this; - } - - public void unsetIsAligned() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAligned() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - public void setIsAlignedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); - } - - public boolean isIsWriteToTable() { - return this.isWriteToTable; - } - - public TSInsertRecordReq setIsWriteToTable(boolean isWriteToTable) { - this.isWriteToTable = isWriteToTable; - setIsWriteToTableIsSet(true); - return this; - } - - public void unsetIsWriteToTable() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISWRITETOTABLE_ISSET_ID); - } - - /** Returns true if field isWriteToTable is set (has been assigned a value) and false otherwise */ - public boolean isSetIsWriteToTable() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISWRITETOTABLE_ISSET_ID); - } - - public void setIsWriteToTableIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISWRITETOTABLE_ISSET_ID, value); - } - - public int getColumnCategoryiesSize() { - return (this.columnCategoryies == null) ? 0 : this.columnCategoryies.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getColumnCategoryiesIterator() { - return (this.columnCategoryies == null) ? null : this.columnCategoryies.iterator(); - } - - public void addToColumnCategoryies(byte elem) { - if (this.columnCategoryies == null) { - this.columnCategoryies = new java.util.ArrayList(); - } - this.columnCategoryies.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getColumnCategoryies() { - return this.columnCategoryies; - } - - public TSInsertRecordReq setColumnCategoryies(@org.apache.thrift.annotation.Nullable java.util.List columnCategoryies) { - this.columnCategoryies = columnCategoryies; - return this; - } - - public void unsetColumnCategoryies() { - this.columnCategoryies = null; - } - - /** Returns true if field columnCategoryies is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnCategoryies() { - return this.columnCategoryies != null; - } - - public void setColumnCategoryiesIsSet(boolean value) { - if (!value) { - this.columnCategoryies = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATH: - if (value == null) { - unsetPrefixPath(); - } else { - setPrefixPath((java.lang.String)value); - } - break; - - case MEASUREMENTS: - if (value == null) { - unsetMeasurements(); - } else { - setMeasurements((java.util.List)value); - } - break; - - case VALUES: - if (value == null) { - unsetValues(); - } else { - if (value instanceof byte[]) { - setValues((byte[])value); - } else { - setValues((java.nio.ByteBuffer)value); - } - } - break; - - case TIMESTAMP: - if (value == null) { - unsetTimestamp(); - } else { - setTimestamp((java.lang.Long)value); - } - break; - - case IS_ALIGNED: - if (value == null) { - unsetIsAligned(); - } else { - setIsAligned((java.lang.Boolean)value); - } - break; - - case IS_WRITE_TO_TABLE: - if (value == null) { - unsetIsWriteToTable(); - } else { - setIsWriteToTable((java.lang.Boolean)value); - } - break; - - case COLUMN_CATEGORYIES: - if (value == null) { - unsetColumnCategoryies(); - } else { - setColumnCategoryies((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATH: - return getPrefixPath(); - - case MEASUREMENTS: - return getMeasurements(); - - case VALUES: - return getValues(); - - case TIMESTAMP: - return getTimestamp(); - - case IS_ALIGNED: - return isIsAligned(); - - case IS_WRITE_TO_TABLE: - return isIsWriteToTable(); - - case COLUMN_CATEGORYIES: - return getColumnCategoryies(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATH: - return isSetPrefixPath(); - case MEASUREMENTS: - return isSetMeasurements(); - case VALUES: - return isSetValues(); - case TIMESTAMP: - return isSetTimestamp(); - case IS_ALIGNED: - return isSetIsAligned(); - case IS_WRITE_TO_TABLE: - return isSetIsWriteToTable(); - case COLUMN_CATEGORYIES: - return isSetColumnCategoryies(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSInsertRecordReq) - return this.equals((TSInsertRecordReq)that); - return false; - } - - public boolean equals(TSInsertRecordReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPath = true && this.isSetPrefixPath(); - boolean that_present_prefixPath = true && that.isSetPrefixPath(); - if (this_present_prefixPath || that_present_prefixPath) { - if (!(this_present_prefixPath && that_present_prefixPath)) - return false; - if (!this.prefixPath.equals(that.prefixPath)) - return false; - } - - boolean this_present_measurements = true && this.isSetMeasurements(); - boolean that_present_measurements = true && that.isSetMeasurements(); - if (this_present_measurements || that_present_measurements) { - if (!(this_present_measurements && that_present_measurements)) - return false; - if (!this.measurements.equals(that.measurements)) - return false; - } - - boolean this_present_values = true && this.isSetValues(); - boolean that_present_values = true && that.isSetValues(); - if (this_present_values || that_present_values) { - if (!(this_present_values && that_present_values)) - return false; - if (!this.values.equals(that.values)) - return false; - } - - boolean this_present_timestamp = true; - boolean that_present_timestamp = true; - if (this_present_timestamp || that_present_timestamp) { - if (!(this_present_timestamp && that_present_timestamp)) - return false; - if (this.timestamp != that.timestamp) - return false; - } - - boolean this_present_isAligned = true && this.isSetIsAligned(); - boolean that_present_isAligned = true && that.isSetIsAligned(); - if (this_present_isAligned || that_present_isAligned) { - if (!(this_present_isAligned && that_present_isAligned)) - return false; - if (this.isAligned != that.isAligned) - return false; - } - - boolean this_present_isWriteToTable = true && this.isSetIsWriteToTable(); - boolean that_present_isWriteToTable = true && that.isSetIsWriteToTable(); - if (this_present_isWriteToTable || that_present_isWriteToTable) { - if (!(this_present_isWriteToTable && that_present_isWriteToTable)) - return false; - if (this.isWriteToTable != that.isWriteToTable) - return false; - } - - boolean this_present_columnCategoryies = true && this.isSetColumnCategoryies(); - boolean that_present_columnCategoryies = true && that.isSetColumnCategoryies(); - if (this_present_columnCategoryies || that_present_columnCategoryies) { - if (!(this_present_columnCategoryies && that_present_columnCategoryies)) - return false; - if (!this.columnCategoryies.equals(that.columnCategoryies)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); - if (isSetPrefixPath()) - hashCode = hashCode * 8191 + prefixPath.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); - if (isSetMeasurements()) - hashCode = hashCode * 8191 + measurements.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValues()) ? 131071 : 524287); - if (isSetValues()) - hashCode = hashCode * 8191 + values.hashCode(); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp); - - hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); - if (isSetIsAligned()) - hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetIsWriteToTable()) ? 131071 : 524287); - if (isSetIsWriteToTable()) - hashCode = hashCode * 8191 + ((isWriteToTable) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetColumnCategoryies()) ? 131071 : 524287); - if (isSetColumnCategoryies()) - hashCode = hashCode * 8191 + columnCategoryies.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSInsertRecordReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurements()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValues(), other.isSetValues()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimestamp(), other.isSetTimestamp()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestamp()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAligned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsWriteToTable(), other.isSetIsWriteToTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsWriteToTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isWriteToTable, other.isWriteToTable); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnCategoryies(), other.isSetColumnCategoryies()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnCategoryies()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnCategoryies, other.columnCategoryies); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertRecordReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPath:"); - if (this.prefixPath == null) { - sb.append("null"); - } else { - sb.append(this.prefixPath); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurements:"); - if (this.measurements == null) { - sb.append("null"); - } else { - sb.append(this.measurements); - } - first = false; - if (!first) sb.append(", "); - sb.append("values:"); - if (this.values == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.values, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("timestamp:"); - sb.append(this.timestamp); - first = false; - if (isSetIsAligned()) { - if (!first) sb.append(", "); - sb.append("isAligned:"); - sb.append(this.isAligned); - first = false; - } - if (isSetIsWriteToTable()) { - if (!first) sb.append(", "); - sb.append("isWriteToTable:"); - sb.append(this.isWriteToTable); - first = false; - } - if (isSetColumnCategoryies()) { - if (!first) sb.append(", "); - sb.append("columnCategoryies:"); - if (this.columnCategoryies == null) { - sb.append("null"); - } else { - sb.append(this.columnCategoryies); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPath == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); - } - if (measurements == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); - } - if (values == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); - } - // alas, we cannot check 'timestamp' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSInsertRecordReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertRecordReqStandardScheme getScheme() { - return new TSInsertRecordReqStandardScheme(); - } - } - - private static class TSInsertRecordReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertRecordReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MEASUREMENTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list150 = iprot.readListBegin(); - struct.measurements = new java.util.ArrayList(_list150.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem151; - for (int _i152 = 0; _i152 < _list150.size; ++_i152) - { - _elem151 = iprot.readString(); - struct.measurements.add(_elem151); - } - iprot.readListEnd(); - } - struct.setMeasurementsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUES - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.values = iprot.readBinary(); - struct.setValuesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TIMESTAMP - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timestamp = iprot.readI64(); - struct.setTimestampIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // IS_ALIGNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // IS_WRITE_TO_TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isWriteToTable = iprot.readBool(); - struct.setIsWriteToTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // COLUMN_CATEGORYIES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list153 = iprot.readListBegin(); - struct.columnCategoryies = new java.util.ArrayList(_list153.size); - byte _elem154; - for (int _i155 = 0; _i155 < _list153.size; ++_i155) - { - _elem154 = iprot.readByte(); - struct.columnCategoryies.add(_elem154); - } - iprot.readListEnd(); - } - struct.setColumnCategoryiesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetTimestamp()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamp' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertRecordReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPath != null) { - oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); - oprot.writeString(struct.prefixPath); - oprot.writeFieldEnd(); - } - if (struct.measurements != null) { - oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); - for (java.lang.String _iter156 : struct.measurements) - { - oprot.writeString(_iter156); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.values != null) { - oprot.writeFieldBegin(VALUES_FIELD_DESC); - oprot.writeBinary(struct.values); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); - oprot.writeI64(struct.timestamp); - oprot.writeFieldEnd(); - if (struct.isSetIsAligned()) { - oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); - oprot.writeBool(struct.isAligned); - oprot.writeFieldEnd(); - } - if (struct.isSetIsWriteToTable()) { - oprot.writeFieldBegin(IS_WRITE_TO_TABLE_FIELD_DESC); - oprot.writeBool(struct.isWriteToTable); - oprot.writeFieldEnd(); - } - if (struct.columnCategoryies != null) { - if (struct.isSetColumnCategoryies()) { - oprot.writeFieldBegin(COLUMN_CATEGORYIES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, struct.columnCategoryies.size())); - for (byte _iter157 : struct.columnCategoryies) - { - oprot.writeByte(_iter157); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSInsertRecordReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertRecordReqTupleScheme getScheme() { - return new TSInsertRecordReqTupleScheme(); - } - } - - private static class TSInsertRecordReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.prefixPath); - { - oprot.writeI32(struct.measurements.size()); - for (java.lang.String _iter158 : struct.measurements) - { - oprot.writeString(_iter158); - } - } - oprot.writeBinary(struct.values); - oprot.writeI64(struct.timestamp); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetIsAligned()) { - optionals.set(0); - } - if (struct.isSetIsWriteToTable()) { - optionals.set(1); - } - if (struct.isSetColumnCategoryies()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetIsAligned()) { - oprot.writeBool(struct.isAligned); - } - if (struct.isSetIsWriteToTable()) { - oprot.writeBool(struct.isWriteToTable); - } - if (struct.isSetColumnCategoryies()) { - { - oprot.writeI32(struct.columnCategoryies.size()); - for (byte _iter159 : struct.columnCategoryies) - { - oprot.writeByte(_iter159); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - { - org.apache.thrift.protocol.TList _list160 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.measurements = new java.util.ArrayList(_list160.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem161; - for (int _i162 = 0; _i162 < _list160.size; ++_i162) - { - _elem161 = iprot.readString(); - struct.measurements.add(_elem161); - } - } - struct.setMeasurementsIsSet(true); - struct.values = iprot.readBinary(); - struct.setValuesIsSet(true); - struct.timestamp = iprot.readI64(); - struct.setTimestampIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } - if (incoming.get(1)) { - struct.isWriteToTable = iprot.readBool(); - struct.setIsWriteToTableIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list163 = iprot.readListBegin(org.apache.thrift.protocol.TType.BYTE); - struct.columnCategoryies = new java.util.ArrayList(_list163.size); - byte _elem164; - for (int _i165 = 0; _i165 < _list163.size; ++_i165) - { - _elem164 = iprot.readByte(); - struct.columnCategoryies.add(_elem164); - } - } - struct.setColumnCategoryiesIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsOfOneDeviceReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsOfOneDeviceReq.java deleted file mode 100644 index ce6c992aa6a58..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsOfOneDeviceReq.java +++ /dev/null @@ -1,1071 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSInsertRecordsOfOneDeviceReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertRecordsOfOneDeviceReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.LIST, (short)5); - private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertRecordsOfOneDeviceReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertRecordsOfOneDeviceReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required - public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required - public @org.apache.thrift.annotation.Nullable java.util.List valuesList; // required - public @org.apache.thrift.annotation.Nullable java.util.List timestamps; // required - public boolean isAligned; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATH((short)2, "prefixPath"), - MEASUREMENTS_LIST((short)3, "measurementsList"), - VALUES_LIST((short)4, "valuesList"), - TIMESTAMPS((short)5, "timestamps"), - IS_ALIGNED((short)6, "isAligned"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATH - return PREFIX_PATH; - case 3: // MEASUREMENTS_LIST - return MEASUREMENTS_LIST; - case 4: // VALUES_LIST - return VALUES_LIST; - case 5: // TIMESTAMPS - return TIMESTAMPS; - case 6: // IS_ALIGNED - return IS_ALIGNED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __ISALIGNED_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertRecordsOfOneDeviceReq.class, metaDataMap); - } - - public TSInsertRecordsOfOneDeviceReq() { - } - - public TSInsertRecordsOfOneDeviceReq( - long sessionId, - java.lang.String prefixPath, - java.util.List> measurementsList, - java.util.List valuesList, - java.util.List timestamps) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPath = prefixPath; - this.measurementsList = measurementsList; - this.valuesList = valuesList; - this.timestamps = timestamps; - } - - /** - * Performs a deep copy on other. - */ - public TSInsertRecordsOfOneDeviceReq(TSInsertRecordsOfOneDeviceReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPath()) { - this.prefixPath = other.prefixPath; - } - if (other.isSetMeasurementsList()) { - java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); - for (java.util.List other_element : other.measurementsList) { - java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); - __this__measurementsList.add(__this__measurementsList_copy); - } - this.measurementsList = __this__measurementsList; - } - if (other.isSetValuesList()) { - java.util.List __this__valuesList = new java.util.ArrayList(other.valuesList); - this.valuesList = __this__valuesList; - } - if (other.isSetTimestamps()) { - java.util.List __this__timestamps = new java.util.ArrayList(other.timestamps); - this.timestamps = __this__timestamps; - } - this.isAligned = other.isAligned; - } - - @Override - public TSInsertRecordsOfOneDeviceReq deepCopy() { - return new TSInsertRecordsOfOneDeviceReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPath = null; - this.measurementsList = null; - this.valuesList = null; - this.timestamps = null; - setIsAlignedIsSet(false); - this.isAligned = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSInsertRecordsOfOneDeviceReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPrefixPath() { - return this.prefixPath; - } - - public TSInsertRecordsOfOneDeviceReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { - this.prefixPath = prefixPath; - return this; - } - - public void unsetPrefixPath() { - this.prefixPath = null; - } - - /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPath() { - return this.prefixPath != null; - } - - public void setPrefixPathIsSet(boolean value) { - if (!value) { - this.prefixPath = null; - } - } - - public int getMeasurementsListSize() { - return (this.measurementsList == null) ? 0 : this.measurementsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getMeasurementsListIterator() { - return (this.measurementsList == null) ? null : this.measurementsList.iterator(); - } - - public void addToMeasurementsList(java.util.List elem) { - if (this.measurementsList == null) { - this.measurementsList = new java.util.ArrayList>(); - } - this.measurementsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getMeasurementsList() { - return this.measurementsList; - } - - public TSInsertRecordsOfOneDeviceReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { - this.measurementsList = measurementsList; - return this; - } - - public void unsetMeasurementsList() { - this.measurementsList = null; - } - - /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurementsList() { - return this.measurementsList != null; - } - - public void setMeasurementsListIsSet(boolean value) { - if (!value) { - this.measurementsList = null; - } - } - - public int getValuesListSize() { - return (this.valuesList == null) ? 0 : this.valuesList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getValuesListIterator() { - return (this.valuesList == null) ? null : this.valuesList.iterator(); - } - - public void addToValuesList(java.nio.ByteBuffer elem) { - if (this.valuesList == null) { - this.valuesList = new java.util.ArrayList(); - } - this.valuesList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getValuesList() { - return this.valuesList; - } - - public TSInsertRecordsOfOneDeviceReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List valuesList) { - this.valuesList = valuesList; - return this; - } - - public void unsetValuesList() { - this.valuesList = null; - } - - /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ - public boolean isSetValuesList() { - return this.valuesList != null; - } - - public void setValuesListIsSet(boolean value) { - if (!value) { - this.valuesList = null; - } - } - - public int getTimestampsSize() { - return (this.timestamps == null) ? 0 : this.timestamps.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getTimestampsIterator() { - return (this.timestamps == null) ? null : this.timestamps.iterator(); - } - - public void addToTimestamps(long elem) { - if (this.timestamps == null) { - this.timestamps = new java.util.ArrayList(); - } - this.timestamps.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getTimestamps() { - return this.timestamps; - } - - public TSInsertRecordsOfOneDeviceReq setTimestamps(@org.apache.thrift.annotation.Nullable java.util.List timestamps) { - this.timestamps = timestamps; - return this; - } - - public void unsetTimestamps() { - this.timestamps = null; - } - - /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestamps() { - return this.timestamps != null; - } - - public void setTimestampsIsSet(boolean value) { - if (!value) { - this.timestamps = null; - } - } - - public boolean isIsAligned() { - return this.isAligned; - } - - public TSInsertRecordsOfOneDeviceReq setIsAligned(boolean isAligned) { - this.isAligned = isAligned; - setIsAlignedIsSet(true); - return this; - } - - public void unsetIsAligned() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAligned() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - public void setIsAlignedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATH: - if (value == null) { - unsetPrefixPath(); - } else { - setPrefixPath((java.lang.String)value); - } - break; - - case MEASUREMENTS_LIST: - if (value == null) { - unsetMeasurementsList(); - } else { - setMeasurementsList((java.util.List>)value); - } - break; - - case VALUES_LIST: - if (value == null) { - unsetValuesList(); - } else { - setValuesList((java.util.List)value); - } - break; - - case TIMESTAMPS: - if (value == null) { - unsetTimestamps(); - } else { - setTimestamps((java.util.List)value); - } - break; - - case IS_ALIGNED: - if (value == null) { - unsetIsAligned(); - } else { - setIsAligned((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATH: - return getPrefixPath(); - - case MEASUREMENTS_LIST: - return getMeasurementsList(); - - case VALUES_LIST: - return getValuesList(); - - case TIMESTAMPS: - return getTimestamps(); - - case IS_ALIGNED: - return isIsAligned(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATH: - return isSetPrefixPath(); - case MEASUREMENTS_LIST: - return isSetMeasurementsList(); - case VALUES_LIST: - return isSetValuesList(); - case TIMESTAMPS: - return isSetTimestamps(); - case IS_ALIGNED: - return isSetIsAligned(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSInsertRecordsOfOneDeviceReq) - return this.equals((TSInsertRecordsOfOneDeviceReq)that); - return false; - } - - public boolean equals(TSInsertRecordsOfOneDeviceReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPath = true && this.isSetPrefixPath(); - boolean that_present_prefixPath = true && that.isSetPrefixPath(); - if (this_present_prefixPath || that_present_prefixPath) { - if (!(this_present_prefixPath && that_present_prefixPath)) - return false; - if (!this.prefixPath.equals(that.prefixPath)) - return false; - } - - boolean this_present_measurementsList = true && this.isSetMeasurementsList(); - boolean that_present_measurementsList = true && that.isSetMeasurementsList(); - if (this_present_measurementsList || that_present_measurementsList) { - if (!(this_present_measurementsList && that_present_measurementsList)) - return false; - if (!this.measurementsList.equals(that.measurementsList)) - return false; - } - - boolean this_present_valuesList = true && this.isSetValuesList(); - boolean that_present_valuesList = true && that.isSetValuesList(); - if (this_present_valuesList || that_present_valuesList) { - if (!(this_present_valuesList && that_present_valuesList)) - return false; - if (!this.valuesList.equals(that.valuesList)) - return false; - } - - boolean this_present_timestamps = true && this.isSetTimestamps(); - boolean that_present_timestamps = true && that.isSetTimestamps(); - if (this_present_timestamps || that_present_timestamps) { - if (!(this_present_timestamps && that_present_timestamps)) - return false; - if (!this.timestamps.equals(that.timestamps)) - return false; - } - - boolean this_present_isAligned = true && this.isSetIsAligned(); - boolean that_present_isAligned = true && that.isSetIsAligned(); - if (this_present_isAligned || that_present_isAligned) { - if (!(this_present_isAligned && that_present_isAligned)) - return false; - if (this.isAligned != that.isAligned) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); - if (isSetPrefixPath()) - hashCode = hashCode * 8191 + prefixPath.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); - if (isSetMeasurementsList()) - hashCode = hashCode * 8191 + measurementsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); - if (isSetValuesList()) - hashCode = hashCode * 8191 + valuesList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); - if (isSetTimestamps()) - hashCode = hashCode * 8191 + timestamps.hashCode(); - - hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); - if (isSetIsAligned()) - hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSInsertRecordsOfOneDeviceReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurementsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValuesList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestamps()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAligned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertRecordsOfOneDeviceReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPath:"); - if (this.prefixPath == null) { - sb.append("null"); - } else { - sb.append(this.prefixPath); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurementsList:"); - if (this.measurementsList == null) { - sb.append("null"); - } else { - sb.append(this.measurementsList); - } - first = false; - if (!first) sb.append(", "); - sb.append("valuesList:"); - if (this.valuesList == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.valuesList, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("timestamps:"); - if (this.timestamps == null) { - sb.append("null"); - } else { - sb.append(this.timestamps); - } - first = false; - if (isSetIsAligned()) { - if (!first) sb.append(", "); - sb.append("isAligned:"); - sb.append(this.isAligned); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPath == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); - } - if (measurementsList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); - } - if (valuesList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); - } - if (timestamps == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSInsertRecordsOfOneDeviceReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertRecordsOfOneDeviceReqStandardScheme getScheme() { - return new TSInsertRecordsOfOneDeviceReqStandardScheme(); - } - } - - private static class TSInsertRecordsOfOneDeviceReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MEASUREMENTS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list318 = iprot.readListBegin(); - struct.measurementsList = new java.util.ArrayList>(_list318.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem319; - for (int _i320 = 0; _i320 < _list318.size; ++_i320) - { - { - org.apache.thrift.protocol.TList _list321 = iprot.readListBegin(); - _elem319 = new java.util.ArrayList(_list321.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem322; - for (int _i323 = 0; _i323 < _list321.size; ++_i323) - { - _elem322 = iprot.readString(); - _elem319.add(_elem322); - } - iprot.readListEnd(); - } - struct.measurementsList.add(_elem319); - } - iprot.readListEnd(); - } - struct.setMeasurementsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUES_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list324 = iprot.readListBegin(); - struct.valuesList = new java.util.ArrayList(_list324.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem325; - for (int _i326 = 0; _i326 < _list324.size; ++_i326) - { - _elem325 = iprot.readBinary(); - struct.valuesList.add(_elem325); - } - iprot.readListEnd(); - } - struct.setValuesListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TIMESTAMPS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list327 = iprot.readListBegin(); - struct.timestamps = new java.util.ArrayList(_list327.size); - long _elem328; - for (int _i329 = 0; _i329 < _list327.size; ++_i329) - { - _elem328 = iprot.readI64(); - struct.timestamps.add(_elem328); - } - iprot.readListEnd(); - } - struct.setTimestampsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // IS_ALIGNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPath != null) { - oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); - oprot.writeString(struct.prefixPath); - oprot.writeFieldEnd(); - } - if (struct.measurementsList != null) { - oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); - for (java.util.List _iter330 : struct.measurementsList) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter330.size())); - for (java.lang.String _iter331 : _iter330) - { - oprot.writeString(_iter331); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.valuesList != null) { - oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valuesList.size())); - for (java.nio.ByteBuffer _iter332 : struct.valuesList) - { - oprot.writeBinary(_iter332); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.timestamps != null) { - oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.timestamps.size())); - for (long _iter333 : struct.timestamps) - { - oprot.writeI64(_iter333); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetIsAligned()) { - oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); - oprot.writeBool(struct.isAligned); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSInsertRecordsOfOneDeviceReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertRecordsOfOneDeviceReqTupleScheme getScheme() { - return new TSInsertRecordsOfOneDeviceReqTupleScheme(); - } - } - - private static class TSInsertRecordsOfOneDeviceReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.prefixPath); - { - oprot.writeI32(struct.measurementsList.size()); - for (java.util.List _iter334 : struct.measurementsList) - { - { - oprot.writeI32(_iter334.size()); - for (java.lang.String _iter335 : _iter334) - { - oprot.writeString(_iter335); - } - } - } - } - { - oprot.writeI32(struct.valuesList.size()); - for (java.nio.ByteBuffer _iter336 : struct.valuesList) - { - oprot.writeBinary(_iter336); - } - } - { - oprot.writeI32(struct.timestamps.size()); - for (long _iter337 : struct.timestamps) - { - oprot.writeI64(_iter337); - } - } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetIsAligned()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetIsAligned()) { - oprot.writeBool(struct.isAligned); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - { - org.apache.thrift.protocol.TList _list338 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); - struct.measurementsList = new java.util.ArrayList>(_list338.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem339; - for (int _i340 = 0; _i340 < _list338.size; ++_i340) - { - { - org.apache.thrift.protocol.TList _list341 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - _elem339 = new java.util.ArrayList(_list341.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem342; - for (int _i343 = 0; _i343 < _list341.size; ++_i343) - { - _elem342 = iprot.readString(); - _elem339.add(_elem342); - } - } - struct.measurementsList.add(_elem339); - } - } - struct.setMeasurementsListIsSet(true); - { - org.apache.thrift.protocol.TList _list344 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.valuesList = new java.util.ArrayList(_list344.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem345; - for (int _i346 = 0; _i346 < _list344.size; ++_i346) - { - _elem345 = iprot.readBinary(); - struct.valuesList.add(_elem345); - } - } - struct.setValuesListIsSet(true); - { - org.apache.thrift.protocol.TList _list347 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); - struct.timestamps = new java.util.ArrayList(_list347.size); - long _elem348; - for (int _i349 = 0; _i349 < _list347.size; ++_i349) - { - _elem348 = iprot.readI64(); - struct.timestamps.add(_elem348); - } - } - struct.setTimestampsIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsReq.java deleted file mode 100644 index da6c98755e705..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertRecordsReq.java +++ /dev/null @@ -1,1121 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSInsertRecordsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertRecordsReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPaths", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.LIST, (short)5); - private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertRecordsReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertRecordsReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List prefixPaths; // required - public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required - public @org.apache.thrift.annotation.Nullable java.util.List valuesList; // required - public @org.apache.thrift.annotation.Nullable java.util.List timestamps; // required - public boolean isAligned; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATHS((short)2, "prefixPaths"), - MEASUREMENTS_LIST((short)3, "measurementsList"), - VALUES_LIST((short)4, "valuesList"), - TIMESTAMPS((short)5, "timestamps"), - IS_ALIGNED((short)6, "isAligned"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATHS - return PREFIX_PATHS; - case 3: // MEASUREMENTS_LIST - return MEASUREMENTS_LIST; - case 4: // VALUES_LIST - return VALUES_LIST; - case 5: // TIMESTAMPS - return TIMESTAMPS; - case 6: // IS_ALIGNED - return IS_ALIGNED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __ISALIGNED_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATHS, new org.apache.thrift.meta_data.FieldMetaData("prefixPaths", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertRecordsReq.class, metaDataMap); - } - - public TSInsertRecordsReq() { - } - - public TSInsertRecordsReq( - long sessionId, - java.util.List prefixPaths, - java.util.List> measurementsList, - java.util.List valuesList, - java.util.List timestamps) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPaths = prefixPaths; - this.measurementsList = measurementsList; - this.valuesList = valuesList; - this.timestamps = timestamps; - } - - /** - * Performs a deep copy on other. - */ - public TSInsertRecordsReq(TSInsertRecordsReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPaths()) { - java.util.List __this__prefixPaths = new java.util.ArrayList(other.prefixPaths); - this.prefixPaths = __this__prefixPaths; - } - if (other.isSetMeasurementsList()) { - java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); - for (java.util.List other_element : other.measurementsList) { - java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); - __this__measurementsList.add(__this__measurementsList_copy); - } - this.measurementsList = __this__measurementsList; - } - if (other.isSetValuesList()) { - java.util.List __this__valuesList = new java.util.ArrayList(other.valuesList); - this.valuesList = __this__valuesList; - } - if (other.isSetTimestamps()) { - java.util.List __this__timestamps = new java.util.ArrayList(other.timestamps); - this.timestamps = __this__timestamps; - } - this.isAligned = other.isAligned; - } - - @Override - public TSInsertRecordsReq deepCopy() { - return new TSInsertRecordsReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPaths = null; - this.measurementsList = null; - this.valuesList = null; - this.timestamps = null; - setIsAlignedIsSet(false); - this.isAligned = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSInsertRecordsReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getPrefixPathsSize() { - return (this.prefixPaths == null) ? 0 : this.prefixPaths.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getPrefixPathsIterator() { - return (this.prefixPaths == null) ? null : this.prefixPaths.iterator(); - } - - public void addToPrefixPaths(java.lang.String elem) { - if (this.prefixPaths == null) { - this.prefixPaths = new java.util.ArrayList(); - } - this.prefixPaths.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getPrefixPaths() { - return this.prefixPaths; - } - - public TSInsertRecordsReq setPrefixPaths(@org.apache.thrift.annotation.Nullable java.util.List prefixPaths) { - this.prefixPaths = prefixPaths; - return this; - } - - public void unsetPrefixPaths() { - this.prefixPaths = null; - } - - /** Returns true if field prefixPaths is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPaths() { - return this.prefixPaths != null; - } - - public void setPrefixPathsIsSet(boolean value) { - if (!value) { - this.prefixPaths = null; - } - } - - public int getMeasurementsListSize() { - return (this.measurementsList == null) ? 0 : this.measurementsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getMeasurementsListIterator() { - return (this.measurementsList == null) ? null : this.measurementsList.iterator(); - } - - public void addToMeasurementsList(java.util.List elem) { - if (this.measurementsList == null) { - this.measurementsList = new java.util.ArrayList>(); - } - this.measurementsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getMeasurementsList() { - return this.measurementsList; - } - - public TSInsertRecordsReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { - this.measurementsList = measurementsList; - return this; - } - - public void unsetMeasurementsList() { - this.measurementsList = null; - } - - /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurementsList() { - return this.measurementsList != null; - } - - public void setMeasurementsListIsSet(boolean value) { - if (!value) { - this.measurementsList = null; - } - } - - public int getValuesListSize() { - return (this.valuesList == null) ? 0 : this.valuesList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getValuesListIterator() { - return (this.valuesList == null) ? null : this.valuesList.iterator(); - } - - public void addToValuesList(java.nio.ByteBuffer elem) { - if (this.valuesList == null) { - this.valuesList = new java.util.ArrayList(); - } - this.valuesList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getValuesList() { - return this.valuesList; - } - - public TSInsertRecordsReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List valuesList) { - this.valuesList = valuesList; - return this; - } - - public void unsetValuesList() { - this.valuesList = null; - } - - /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ - public boolean isSetValuesList() { - return this.valuesList != null; - } - - public void setValuesListIsSet(boolean value) { - if (!value) { - this.valuesList = null; - } - } - - public int getTimestampsSize() { - return (this.timestamps == null) ? 0 : this.timestamps.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getTimestampsIterator() { - return (this.timestamps == null) ? null : this.timestamps.iterator(); - } - - public void addToTimestamps(long elem) { - if (this.timestamps == null) { - this.timestamps = new java.util.ArrayList(); - } - this.timestamps.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getTimestamps() { - return this.timestamps; - } - - public TSInsertRecordsReq setTimestamps(@org.apache.thrift.annotation.Nullable java.util.List timestamps) { - this.timestamps = timestamps; - return this; - } - - public void unsetTimestamps() { - this.timestamps = null; - } - - /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestamps() { - return this.timestamps != null; - } - - public void setTimestampsIsSet(boolean value) { - if (!value) { - this.timestamps = null; - } - } - - public boolean isIsAligned() { - return this.isAligned; - } - - public TSInsertRecordsReq setIsAligned(boolean isAligned) { - this.isAligned = isAligned; - setIsAlignedIsSet(true); - return this; - } - - public void unsetIsAligned() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAligned() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - public void setIsAlignedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATHS: - if (value == null) { - unsetPrefixPaths(); - } else { - setPrefixPaths((java.util.List)value); - } - break; - - case MEASUREMENTS_LIST: - if (value == null) { - unsetMeasurementsList(); - } else { - setMeasurementsList((java.util.List>)value); - } - break; - - case VALUES_LIST: - if (value == null) { - unsetValuesList(); - } else { - setValuesList((java.util.List)value); - } - break; - - case TIMESTAMPS: - if (value == null) { - unsetTimestamps(); - } else { - setTimestamps((java.util.List)value); - } - break; - - case IS_ALIGNED: - if (value == null) { - unsetIsAligned(); - } else { - setIsAligned((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATHS: - return getPrefixPaths(); - - case MEASUREMENTS_LIST: - return getMeasurementsList(); - - case VALUES_LIST: - return getValuesList(); - - case TIMESTAMPS: - return getTimestamps(); - - case IS_ALIGNED: - return isIsAligned(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATHS: - return isSetPrefixPaths(); - case MEASUREMENTS_LIST: - return isSetMeasurementsList(); - case VALUES_LIST: - return isSetValuesList(); - case TIMESTAMPS: - return isSetTimestamps(); - case IS_ALIGNED: - return isSetIsAligned(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSInsertRecordsReq) - return this.equals((TSInsertRecordsReq)that); - return false; - } - - public boolean equals(TSInsertRecordsReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPaths = true && this.isSetPrefixPaths(); - boolean that_present_prefixPaths = true && that.isSetPrefixPaths(); - if (this_present_prefixPaths || that_present_prefixPaths) { - if (!(this_present_prefixPaths && that_present_prefixPaths)) - return false; - if (!this.prefixPaths.equals(that.prefixPaths)) - return false; - } - - boolean this_present_measurementsList = true && this.isSetMeasurementsList(); - boolean that_present_measurementsList = true && that.isSetMeasurementsList(); - if (this_present_measurementsList || that_present_measurementsList) { - if (!(this_present_measurementsList && that_present_measurementsList)) - return false; - if (!this.measurementsList.equals(that.measurementsList)) - return false; - } - - boolean this_present_valuesList = true && this.isSetValuesList(); - boolean that_present_valuesList = true && that.isSetValuesList(); - if (this_present_valuesList || that_present_valuesList) { - if (!(this_present_valuesList && that_present_valuesList)) - return false; - if (!this.valuesList.equals(that.valuesList)) - return false; - } - - boolean this_present_timestamps = true && this.isSetTimestamps(); - boolean that_present_timestamps = true && that.isSetTimestamps(); - if (this_present_timestamps || that_present_timestamps) { - if (!(this_present_timestamps && that_present_timestamps)) - return false; - if (!this.timestamps.equals(that.timestamps)) - return false; - } - - boolean this_present_isAligned = true && this.isSetIsAligned(); - boolean that_present_isAligned = true && that.isSetIsAligned(); - if (this_present_isAligned || that_present_isAligned) { - if (!(this_present_isAligned && that_present_isAligned)) - return false; - if (this.isAligned != that.isAligned) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPaths()) ? 131071 : 524287); - if (isSetPrefixPaths()) - hashCode = hashCode * 8191 + prefixPaths.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); - if (isSetMeasurementsList()) - hashCode = hashCode * 8191 + measurementsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); - if (isSetValuesList()) - hashCode = hashCode * 8191 + valuesList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); - if (isSetTimestamps()) - hashCode = hashCode * 8191 + timestamps.hashCode(); - - hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); - if (isSetIsAligned()) - hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSInsertRecordsReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPaths(), other.isSetPrefixPaths()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPaths()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPaths, other.prefixPaths); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurementsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValuesList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestamps()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAligned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertRecordsReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPaths:"); - if (this.prefixPaths == null) { - sb.append("null"); - } else { - sb.append(this.prefixPaths); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurementsList:"); - if (this.measurementsList == null) { - sb.append("null"); - } else { - sb.append(this.measurementsList); - } - first = false; - if (!first) sb.append(", "); - sb.append("valuesList:"); - if (this.valuesList == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.valuesList, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("timestamps:"); - if (this.timestamps == null) { - sb.append("null"); - } else { - sb.append(this.timestamps); - } - first = false; - if (isSetIsAligned()) { - if (!first) sb.append(", "); - sb.append("isAligned:"); - sb.append(this.isAligned); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPaths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPaths' was not present! Struct: " + toString()); - } - if (measurementsList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); - } - if (valuesList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); - } - if (timestamps == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSInsertRecordsReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertRecordsReqStandardScheme getScheme() { - return new TSInsertRecordsReqStandardScheme(); - } - } - - private static class TSInsertRecordsReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertRecordsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATHS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list278 = iprot.readListBegin(); - struct.prefixPaths = new java.util.ArrayList(_list278.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem279; - for (int _i280 = 0; _i280 < _list278.size; ++_i280) - { - _elem279 = iprot.readString(); - struct.prefixPaths.add(_elem279); - } - iprot.readListEnd(); - } - struct.setPrefixPathsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MEASUREMENTS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list281 = iprot.readListBegin(); - struct.measurementsList = new java.util.ArrayList>(_list281.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem282; - for (int _i283 = 0; _i283 < _list281.size; ++_i283) - { - { - org.apache.thrift.protocol.TList _list284 = iprot.readListBegin(); - _elem282 = new java.util.ArrayList(_list284.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem285; - for (int _i286 = 0; _i286 < _list284.size; ++_i286) - { - _elem285 = iprot.readString(); - _elem282.add(_elem285); - } - iprot.readListEnd(); - } - struct.measurementsList.add(_elem282); - } - iprot.readListEnd(); - } - struct.setMeasurementsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUES_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list287 = iprot.readListBegin(); - struct.valuesList = new java.util.ArrayList(_list287.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem288; - for (int _i289 = 0; _i289 < _list287.size; ++_i289) - { - _elem288 = iprot.readBinary(); - struct.valuesList.add(_elem288); - } - iprot.readListEnd(); - } - struct.setValuesListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TIMESTAMPS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list290 = iprot.readListBegin(); - struct.timestamps = new java.util.ArrayList(_list290.size); - long _elem291; - for (int _i292 = 0; _i292 < _list290.size; ++_i292) - { - _elem291 = iprot.readI64(); - struct.timestamps.add(_elem291); - } - iprot.readListEnd(); - } - struct.setTimestampsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // IS_ALIGNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertRecordsReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPaths != null) { - oprot.writeFieldBegin(PREFIX_PATHS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.prefixPaths.size())); - for (java.lang.String _iter293 : struct.prefixPaths) - { - oprot.writeString(_iter293); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.measurementsList != null) { - oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); - for (java.util.List _iter294 : struct.measurementsList) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter294.size())); - for (java.lang.String _iter295 : _iter294) - { - oprot.writeString(_iter295); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.valuesList != null) { - oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valuesList.size())); - for (java.nio.ByteBuffer _iter296 : struct.valuesList) - { - oprot.writeBinary(_iter296); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.timestamps != null) { - oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.timestamps.size())); - for (long _iter297 : struct.timestamps) - { - oprot.writeI64(_iter297); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetIsAligned()) { - oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); - oprot.writeBool(struct.isAligned); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSInsertRecordsReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertRecordsReqTupleScheme getScheme() { - return new TSInsertRecordsReqTupleScheme(); - } - } - - private static class TSInsertRecordsReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - { - oprot.writeI32(struct.prefixPaths.size()); - for (java.lang.String _iter298 : struct.prefixPaths) - { - oprot.writeString(_iter298); - } - } - { - oprot.writeI32(struct.measurementsList.size()); - for (java.util.List _iter299 : struct.measurementsList) - { - { - oprot.writeI32(_iter299.size()); - for (java.lang.String _iter300 : _iter299) - { - oprot.writeString(_iter300); - } - } - } - } - { - oprot.writeI32(struct.valuesList.size()); - for (java.nio.ByteBuffer _iter301 : struct.valuesList) - { - oprot.writeBinary(_iter301); - } - } - { - oprot.writeI32(struct.timestamps.size()); - for (long _iter302 : struct.timestamps) - { - oprot.writeI64(_iter302); - } - } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetIsAligned()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetIsAligned()) { - oprot.writeBool(struct.isAligned); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertRecordsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - { - org.apache.thrift.protocol.TList _list303 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.prefixPaths = new java.util.ArrayList(_list303.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem304; - for (int _i305 = 0; _i305 < _list303.size; ++_i305) - { - _elem304 = iprot.readString(); - struct.prefixPaths.add(_elem304); - } - } - struct.setPrefixPathsIsSet(true); - { - org.apache.thrift.protocol.TList _list306 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); - struct.measurementsList = new java.util.ArrayList>(_list306.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem307; - for (int _i308 = 0; _i308 < _list306.size; ++_i308) - { - { - org.apache.thrift.protocol.TList _list309 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - _elem307 = new java.util.ArrayList(_list309.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem310; - for (int _i311 = 0; _i311 < _list309.size; ++_i311) - { - _elem310 = iprot.readString(); - _elem307.add(_elem310); - } - } - struct.measurementsList.add(_elem307); - } - } - struct.setMeasurementsListIsSet(true); - { - org.apache.thrift.protocol.TList _list312 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.valuesList = new java.util.ArrayList(_list312.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem313; - for (int _i314 = 0; _i314 < _list312.size; ++_i314) - { - _elem313 = iprot.readBinary(); - struct.valuesList.add(_elem313); - } - } - struct.setValuesListIsSet(true); - { - org.apache.thrift.protocol.TList _list315 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); - struct.timestamps = new java.util.ArrayList(_list315.size); - long _elem316; - for (int _i317 = 0; _i317 < _list315.size; ++_i317) - { - _elem316 = iprot.readI64(); - struct.timestamps.add(_elem316); - } - } - struct.setTimestampsIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordReq.java deleted file mode 100644 index 0e71f8432d566..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordReq.java +++ /dev/null @@ -1,1075 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSInsertStringRecordReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertStringRecordReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)7); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertStringRecordReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertStringRecordReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required - public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required - public @org.apache.thrift.annotation.Nullable java.util.List values; // required - public long timestamp; // required - public boolean isAligned; // optional - public long timeout; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATH((short)2, "prefixPath"), - MEASUREMENTS((short)3, "measurements"), - VALUES((short)4, "values"), - TIMESTAMP((short)5, "timestamp"), - IS_ALIGNED((short)6, "isAligned"), - TIMEOUT((short)7, "timeout"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATH - return PREFIX_PATH; - case 3: // MEASUREMENTS - return MEASUREMENTS; - case 4: // VALUES - return VALUES; - case 5: // TIMESTAMP - return TIMESTAMP; - case 6: // IS_ALIGNED - return IS_ALIGNED; - case 7: // TIMEOUT - return TIMEOUT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __TIMESTAMP_ISSET_ID = 1; - private static final int __ISALIGNED_ISSET_ID = 2; - private static final int __TIMEOUT_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.IS_ALIGNED,_Fields.TIMEOUT}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertStringRecordReq.class, metaDataMap); - } - - public TSInsertStringRecordReq() { - } - - public TSInsertStringRecordReq( - long sessionId, - java.lang.String prefixPath, - java.util.List measurements, - java.util.List values, - long timestamp) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPath = prefixPath; - this.measurements = measurements; - this.values = values; - this.timestamp = timestamp; - setTimestampIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSInsertStringRecordReq(TSInsertStringRecordReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPath()) { - this.prefixPath = other.prefixPath; - } - if (other.isSetMeasurements()) { - java.util.List __this__measurements = new java.util.ArrayList(other.measurements); - this.measurements = __this__measurements; - } - if (other.isSetValues()) { - java.util.List __this__values = new java.util.ArrayList(other.values); - this.values = __this__values; - } - this.timestamp = other.timestamp; - this.isAligned = other.isAligned; - this.timeout = other.timeout; - } - - @Override - public TSInsertStringRecordReq deepCopy() { - return new TSInsertStringRecordReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPath = null; - this.measurements = null; - this.values = null; - setTimestampIsSet(false); - this.timestamp = 0; - setIsAlignedIsSet(false); - this.isAligned = false; - setTimeoutIsSet(false); - this.timeout = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSInsertStringRecordReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPrefixPath() { - return this.prefixPath; - } - - public TSInsertStringRecordReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { - this.prefixPath = prefixPath; - return this; - } - - public void unsetPrefixPath() { - this.prefixPath = null; - } - - /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPath() { - return this.prefixPath != null; - } - - public void setPrefixPathIsSet(boolean value) { - if (!value) { - this.prefixPath = null; - } - } - - public int getMeasurementsSize() { - return (this.measurements == null) ? 0 : this.measurements.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getMeasurementsIterator() { - return (this.measurements == null) ? null : this.measurements.iterator(); - } - - public void addToMeasurements(java.lang.String elem) { - if (this.measurements == null) { - this.measurements = new java.util.ArrayList(); - } - this.measurements.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getMeasurements() { - return this.measurements; - } - - public TSInsertStringRecordReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { - this.measurements = measurements; - return this; - } - - public void unsetMeasurements() { - this.measurements = null; - } - - /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurements() { - return this.measurements != null; - } - - public void setMeasurementsIsSet(boolean value) { - if (!value) { - this.measurements = null; - } - } - - public int getValuesSize() { - return (this.values == null) ? 0 : this.values.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getValuesIterator() { - return (this.values == null) ? null : this.values.iterator(); - } - - public void addToValues(java.lang.String elem) { - if (this.values == null) { - this.values = new java.util.ArrayList(); - } - this.values.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getValues() { - return this.values; - } - - public TSInsertStringRecordReq setValues(@org.apache.thrift.annotation.Nullable java.util.List values) { - this.values = values; - return this; - } - - public void unsetValues() { - this.values = null; - } - - /** Returns true if field values is set (has been assigned a value) and false otherwise */ - public boolean isSetValues() { - return this.values != null; - } - - public void setValuesIsSet(boolean value) { - if (!value) { - this.values = null; - } - } - - public long getTimestamp() { - return this.timestamp; - } - - public TSInsertStringRecordReq setTimestamp(long timestamp) { - this.timestamp = timestamp; - setTimestampIsSet(true); - return this; - } - - public void unsetTimestamp() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); - } - - /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestamp() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); - } - - public void setTimestampIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); - } - - public boolean isIsAligned() { - return this.isAligned; - } - - public TSInsertStringRecordReq setIsAligned(boolean isAligned) { - this.isAligned = isAligned; - setIsAlignedIsSet(true); - return this; - } - - public void unsetIsAligned() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAligned() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - public void setIsAlignedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); - } - - public long getTimeout() { - return this.timeout; - } - - public TSInsertStringRecordReq setTimeout(long timeout) { - this.timeout = timeout; - setTimeoutIsSet(true); - return this; - } - - public void unsetTimeout() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeout() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - public void setTimeoutIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATH: - if (value == null) { - unsetPrefixPath(); - } else { - setPrefixPath((java.lang.String)value); - } - break; - - case MEASUREMENTS: - if (value == null) { - unsetMeasurements(); - } else { - setMeasurements((java.util.List)value); - } - break; - - case VALUES: - if (value == null) { - unsetValues(); - } else { - setValues((java.util.List)value); - } - break; - - case TIMESTAMP: - if (value == null) { - unsetTimestamp(); - } else { - setTimestamp((java.lang.Long)value); - } - break; - - case IS_ALIGNED: - if (value == null) { - unsetIsAligned(); - } else { - setIsAligned((java.lang.Boolean)value); - } - break; - - case TIMEOUT: - if (value == null) { - unsetTimeout(); - } else { - setTimeout((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATH: - return getPrefixPath(); - - case MEASUREMENTS: - return getMeasurements(); - - case VALUES: - return getValues(); - - case TIMESTAMP: - return getTimestamp(); - - case IS_ALIGNED: - return isIsAligned(); - - case TIMEOUT: - return getTimeout(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATH: - return isSetPrefixPath(); - case MEASUREMENTS: - return isSetMeasurements(); - case VALUES: - return isSetValues(); - case TIMESTAMP: - return isSetTimestamp(); - case IS_ALIGNED: - return isSetIsAligned(); - case TIMEOUT: - return isSetTimeout(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSInsertStringRecordReq) - return this.equals((TSInsertStringRecordReq)that); - return false; - } - - public boolean equals(TSInsertStringRecordReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPath = true && this.isSetPrefixPath(); - boolean that_present_prefixPath = true && that.isSetPrefixPath(); - if (this_present_prefixPath || that_present_prefixPath) { - if (!(this_present_prefixPath && that_present_prefixPath)) - return false; - if (!this.prefixPath.equals(that.prefixPath)) - return false; - } - - boolean this_present_measurements = true && this.isSetMeasurements(); - boolean that_present_measurements = true && that.isSetMeasurements(); - if (this_present_measurements || that_present_measurements) { - if (!(this_present_measurements && that_present_measurements)) - return false; - if (!this.measurements.equals(that.measurements)) - return false; - } - - boolean this_present_values = true && this.isSetValues(); - boolean that_present_values = true && that.isSetValues(); - if (this_present_values || that_present_values) { - if (!(this_present_values && that_present_values)) - return false; - if (!this.values.equals(that.values)) - return false; - } - - boolean this_present_timestamp = true; - boolean that_present_timestamp = true; - if (this_present_timestamp || that_present_timestamp) { - if (!(this_present_timestamp && that_present_timestamp)) - return false; - if (this.timestamp != that.timestamp) - return false; - } - - boolean this_present_isAligned = true && this.isSetIsAligned(); - boolean that_present_isAligned = true && that.isSetIsAligned(); - if (this_present_isAligned || that_present_isAligned) { - if (!(this_present_isAligned && that_present_isAligned)) - return false; - if (this.isAligned != that.isAligned) - return false; - } - - boolean this_present_timeout = true && this.isSetTimeout(); - boolean that_present_timeout = true && that.isSetTimeout(); - if (this_present_timeout || that_present_timeout) { - if (!(this_present_timeout && that_present_timeout)) - return false; - if (this.timeout != that.timeout) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); - if (isSetPrefixPath()) - hashCode = hashCode * 8191 + prefixPath.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); - if (isSetMeasurements()) - hashCode = hashCode * 8191 + measurements.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValues()) ? 131071 : 524287); - if (isSetValues()) - hashCode = hashCode * 8191 + values.hashCode(); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp); - - hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); - if (isSetIsAligned()) - hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); - if (isSetTimeout()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); - - return hashCode; - } - - @Override - public int compareTo(TSInsertStringRecordReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurements()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValues(), other.isSetValues()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimestamp(), other.isSetTimestamp()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestamp()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAligned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertStringRecordReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPath:"); - if (this.prefixPath == null) { - sb.append("null"); - } else { - sb.append(this.prefixPath); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurements:"); - if (this.measurements == null) { - sb.append("null"); - } else { - sb.append(this.measurements); - } - first = false; - if (!first) sb.append(", "); - sb.append("values:"); - if (this.values == null) { - sb.append("null"); - } else { - sb.append(this.values); - } - first = false; - if (!first) sb.append(", "); - sb.append("timestamp:"); - sb.append(this.timestamp); - first = false; - if (isSetIsAligned()) { - if (!first) sb.append(", "); - sb.append("isAligned:"); - sb.append(this.isAligned); - first = false; - } - if (isSetTimeout()) { - if (!first) sb.append(", "); - sb.append("timeout:"); - sb.append(this.timeout); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPath == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); - } - if (measurements == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); - } - if (values == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); - } - // alas, we cannot check 'timestamp' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSInsertStringRecordReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertStringRecordReqStandardScheme getScheme() { - return new TSInsertStringRecordReqStandardScheme(); - } - } - - private static class TSInsertStringRecordReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertStringRecordReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MEASUREMENTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list166 = iprot.readListBegin(); - struct.measurements = new java.util.ArrayList(_list166.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem167; - for (int _i168 = 0; _i168 < _list166.size; ++_i168) - { - _elem167 = iprot.readString(); - struct.measurements.add(_elem167); - } - iprot.readListEnd(); - } - struct.setMeasurementsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list169 = iprot.readListBegin(); - struct.values = new java.util.ArrayList(_list169.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem170; - for (int _i171 = 0; _i171 < _list169.size; ++_i171) - { - _elem170 = iprot.readString(); - struct.values.add(_elem170); - } - iprot.readListEnd(); - } - struct.setValuesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TIMESTAMP - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timestamp = iprot.readI64(); - struct.setTimestampIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // IS_ALIGNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // TIMEOUT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetTimestamp()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamp' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertStringRecordReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPath != null) { - oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); - oprot.writeString(struct.prefixPath); - oprot.writeFieldEnd(); - } - if (struct.measurements != null) { - oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); - for (java.lang.String _iter172 : struct.measurements) - { - oprot.writeString(_iter172); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.values != null) { - oprot.writeFieldBegin(VALUES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size())); - for (java.lang.String _iter173 : struct.values) - { - oprot.writeString(_iter173); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); - oprot.writeI64(struct.timestamp); - oprot.writeFieldEnd(); - if (struct.isSetIsAligned()) { - oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); - oprot.writeBool(struct.isAligned); - oprot.writeFieldEnd(); - } - if (struct.isSetTimeout()) { - oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); - oprot.writeI64(struct.timeout); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSInsertStringRecordReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertStringRecordReqTupleScheme getScheme() { - return new TSInsertStringRecordReqTupleScheme(); - } - } - - private static class TSInsertStringRecordReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.prefixPath); - { - oprot.writeI32(struct.measurements.size()); - for (java.lang.String _iter174 : struct.measurements) - { - oprot.writeString(_iter174); - } - } - { - oprot.writeI32(struct.values.size()); - for (java.lang.String _iter175 : struct.values) - { - oprot.writeString(_iter175); - } - } - oprot.writeI64(struct.timestamp); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetIsAligned()) { - optionals.set(0); - } - if (struct.isSetTimeout()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetIsAligned()) { - oprot.writeBool(struct.isAligned); - } - if (struct.isSetTimeout()) { - oprot.writeI64(struct.timeout); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - { - org.apache.thrift.protocol.TList _list176 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.measurements = new java.util.ArrayList(_list176.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem177; - for (int _i178 = 0; _i178 < _list176.size; ++_i178) - { - _elem177 = iprot.readString(); - struct.measurements.add(_elem177); - } - } - struct.setMeasurementsIsSet(true); - { - org.apache.thrift.protocol.TList _list179 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.values = new java.util.ArrayList(_list179.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem180; - for (int _i181 = 0; _i181 < _list179.size; ++_i181) - { - _elem180 = iprot.readString(); - struct.values.add(_elem180); - } - } - struct.setValuesIsSet(true); - struct.timestamp = iprot.readI64(); - struct.setTimestampIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } - if (incoming.get(1)) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsOfOneDeviceReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsOfOneDeviceReq.java deleted file mode 100644 index a6f8a01ba9eeb..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsOfOneDeviceReq.java +++ /dev/null @@ -1,1108 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSInsertStringRecordsOfOneDeviceReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertStringRecordsOfOneDeviceReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.LIST, (short)5); - private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertStringRecordsOfOneDeviceReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertStringRecordsOfOneDeviceReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required - public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required - public @org.apache.thrift.annotation.Nullable java.util.List> valuesList; // required - public @org.apache.thrift.annotation.Nullable java.util.List timestamps; // required - public boolean isAligned; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATH((short)2, "prefixPath"), - MEASUREMENTS_LIST((short)3, "measurementsList"), - VALUES_LIST((short)4, "valuesList"), - TIMESTAMPS((short)5, "timestamps"), - IS_ALIGNED((short)6, "isAligned"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATH - return PREFIX_PATH; - case 3: // MEASUREMENTS_LIST - return MEASUREMENTS_LIST; - case 4: // VALUES_LIST - return VALUES_LIST; - case 5: // TIMESTAMPS - return TIMESTAMPS; - case 6: // IS_ALIGNED - return IS_ALIGNED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __ISALIGNED_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertStringRecordsOfOneDeviceReq.class, metaDataMap); - } - - public TSInsertStringRecordsOfOneDeviceReq() { - } - - public TSInsertStringRecordsOfOneDeviceReq( - long sessionId, - java.lang.String prefixPath, - java.util.List> measurementsList, - java.util.List> valuesList, - java.util.List timestamps) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPath = prefixPath; - this.measurementsList = measurementsList; - this.valuesList = valuesList; - this.timestamps = timestamps; - } - - /** - * Performs a deep copy on other. - */ - public TSInsertStringRecordsOfOneDeviceReq(TSInsertStringRecordsOfOneDeviceReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPath()) { - this.prefixPath = other.prefixPath; - } - if (other.isSetMeasurementsList()) { - java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); - for (java.util.List other_element : other.measurementsList) { - java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); - __this__measurementsList.add(__this__measurementsList_copy); - } - this.measurementsList = __this__measurementsList; - } - if (other.isSetValuesList()) { - java.util.List> __this__valuesList = new java.util.ArrayList>(other.valuesList.size()); - for (java.util.List other_element : other.valuesList) { - java.util.List __this__valuesList_copy = new java.util.ArrayList(other_element); - __this__valuesList.add(__this__valuesList_copy); - } - this.valuesList = __this__valuesList; - } - if (other.isSetTimestamps()) { - java.util.List __this__timestamps = new java.util.ArrayList(other.timestamps); - this.timestamps = __this__timestamps; - } - this.isAligned = other.isAligned; - } - - @Override - public TSInsertStringRecordsOfOneDeviceReq deepCopy() { - return new TSInsertStringRecordsOfOneDeviceReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPath = null; - this.measurementsList = null; - this.valuesList = null; - this.timestamps = null; - setIsAlignedIsSet(false); - this.isAligned = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSInsertStringRecordsOfOneDeviceReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPrefixPath() { - return this.prefixPath; - } - - public TSInsertStringRecordsOfOneDeviceReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { - this.prefixPath = prefixPath; - return this; - } - - public void unsetPrefixPath() { - this.prefixPath = null; - } - - /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPath() { - return this.prefixPath != null; - } - - public void setPrefixPathIsSet(boolean value) { - if (!value) { - this.prefixPath = null; - } - } - - public int getMeasurementsListSize() { - return (this.measurementsList == null) ? 0 : this.measurementsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getMeasurementsListIterator() { - return (this.measurementsList == null) ? null : this.measurementsList.iterator(); - } - - public void addToMeasurementsList(java.util.List elem) { - if (this.measurementsList == null) { - this.measurementsList = new java.util.ArrayList>(); - } - this.measurementsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getMeasurementsList() { - return this.measurementsList; - } - - public TSInsertStringRecordsOfOneDeviceReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { - this.measurementsList = measurementsList; - return this; - } - - public void unsetMeasurementsList() { - this.measurementsList = null; - } - - /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurementsList() { - return this.measurementsList != null; - } - - public void setMeasurementsListIsSet(boolean value) { - if (!value) { - this.measurementsList = null; - } - } - - public int getValuesListSize() { - return (this.valuesList == null) ? 0 : this.valuesList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getValuesListIterator() { - return (this.valuesList == null) ? null : this.valuesList.iterator(); - } - - public void addToValuesList(java.util.List elem) { - if (this.valuesList == null) { - this.valuesList = new java.util.ArrayList>(); - } - this.valuesList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getValuesList() { - return this.valuesList; - } - - public TSInsertStringRecordsOfOneDeviceReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List> valuesList) { - this.valuesList = valuesList; - return this; - } - - public void unsetValuesList() { - this.valuesList = null; - } - - /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ - public boolean isSetValuesList() { - return this.valuesList != null; - } - - public void setValuesListIsSet(boolean value) { - if (!value) { - this.valuesList = null; - } - } - - public int getTimestampsSize() { - return (this.timestamps == null) ? 0 : this.timestamps.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getTimestampsIterator() { - return (this.timestamps == null) ? null : this.timestamps.iterator(); - } - - public void addToTimestamps(long elem) { - if (this.timestamps == null) { - this.timestamps = new java.util.ArrayList(); - } - this.timestamps.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getTimestamps() { - return this.timestamps; - } - - public TSInsertStringRecordsOfOneDeviceReq setTimestamps(@org.apache.thrift.annotation.Nullable java.util.List timestamps) { - this.timestamps = timestamps; - return this; - } - - public void unsetTimestamps() { - this.timestamps = null; - } - - /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestamps() { - return this.timestamps != null; - } - - public void setTimestampsIsSet(boolean value) { - if (!value) { - this.timestamps = null; - } - } - - public boolean isIsAligned() { - return this.isAligned; - } - - public TSInsertStringRecordsOfOneDeviceReq setIsAligned(boolean isAligned) { - this.isAligned = isAligned; - setIsAlignedIsSet(true); - return this; - } - - public void unsetIsAligned() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAligned() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - public void setIsAlignedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATH: - if (value == null) { - unsetPrefixPath(); - } else { - setPrefixPath((java.lang.String)value); - } - break; - - case MEASUREMENTS_LIST: - if (value == null) { - unsetMeasurementsList(); - } else { - setMeasurementsList((java.util.List>)value); - } - break; - - case VALUES_LIST: - if (value == null) { - unsetValuesList(); - } else { - setValuesList((java.util.List>)value); - } - break; - - case TIMESTAMPS: - if (value == null) { - unsetTimestamps(); - } else { - setTimestamps((java.util.List)value); - } - break; - - case IS_ALIGNED: - if (value == null) { - unsetIsAligned(); - } else { - setIsAligned((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATH: - return getPrefixPath(); - - case MEASUREMENTS_LIST: - return getMeasurementsList(); - - case VALUES_LIST: - return getValuesList(); - - case TIMESTAMPS: - return getTimestamps(); - - case IS_ALIGNED: - return isIsAligned(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATH: - return isSetPrefixPath(); - case MEASUREMENTS_LIST: - return isSetMeasurementsList(); - case VALUES_LIST: - return isSetValuesList(); - case TIMESTAMPS: - return isSetTimestamps(); - case IS_ALIGNED: - return isSetIsAligned(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSInsertStringRecordsOfOneDeviceReq) - return this.equals((TSInsertStringRecordsOfOneDeviceReq)that); - return false; - } - - public boolean equals(TSInsertStringRecordsOfOneDeviceReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPath = true && this.isSetPrefixPath(); - boolean that_present_prefixPath = true && that.isSetPrefixPath(); - if (this_present_prefixPath || that_present_prefixPath) { - if (!(this_present_prefixPath && that_present_prefixPath)) - return false; - if (!this.prefixPath.equals(that.prefixPath)) - return false; - } - - boolean this_present_measurementsList = true && this.isSetMeasurementsList(); - boolean that_present_measurementsList = true && that.isSetMeasurementsList(); - if (this_present_measurementsList || that_present_measurementsList) { - if (!(this_present_measurementsList && that_present_measurementsList)) - return false; - if (!this.measurementsList.equals(that.measurementsList)) - return false; - } - - boolean this_present_valuesList = true && this.isSetValuesList(); - boolean that_present_valuesList = true && that.isSetValuesList(); - if (this_present_valuesList || that_present_valuesList) { - if (!(this_present_valuesList && that_present_valuesList)) - return false; - if (!this.valuesList.equals(that.valuesList)) - return false; - } - - boolean this_present_timestamps = true && this.isSetTimestamps(); - boolean that_present_timestamps = true && that.isSetTimestamps(); - if (this_present_timestamps || that_present_timestamps) { - if (!(this_present_timestamps && that_present_timestamps)) - return false; - if (!this.timestamps.equals(that.timestamps)) - return false; - } - - boolean this_present_isAligned = true && this.isSetIsAligned(); - boolean that_present_isAligned = true && that.isSetIsAligned(); - if (this_present_isAligned || that_present_isAligned) { - if (!(this_present_isAligned && that_present_isAligned)) - return false; - if (this.isAligned != that.isAligned) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); - if (isSetPrefixPath()) - hashCode = hashCode * 8191 + prefixPath.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); - if (isSetMeasurementsList()) - hashCode = hashCode * 8191 + measurementsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); - if (isSetValuesList()) - hashCode = hashCode * 8191 + valuesList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); - if (isSetTimestamps()) - hashCode = hashCode * 8191 + timestamps.hashCode(); - - hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); - if (isSetIsAligned()) - hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSInsertStringRecordsOfOneDeviceReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurementsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValuesList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestamps()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAligned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertStringRecordsOfOneDeviceReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPath:"); - if (this.prefixPath == null) { - sb.append("null"); - } else { - sb.append(this.prefixPath); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurementsList:"); - if (this.measurementsList == null) { - sb.append("null"); - } else { - sb.append(this.measurementsList); - } - first = false; - if (!first) sb.append(", "); - sb.append("valuesList:"); - if (this.valuesList == null) { - sb.append("null"); - } else { - sb.append(this.valuesList); - } - first = false; - if (!first) sb.append(", "); - sb.append("timestamps:"); - if (this.timestamps == null) { - sb.append("null"); - } else { - sb.append(this.timestamps); - } - first = false; - if (isSetIsAligned()) { - if (!first) sb.append(", "); - sb.append("isAligned:"); - sb.append(this.isAligned); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPath == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); - } - if (measurementsList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); - } - if (valuesList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); - } - if (timestamps == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSInsertStringRecordsOfOneDeviceReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertStringRecordsOfOneDeviceReqStandardScheme getScheme() { - return new TSInsertStringRecordsOfOneDeviceReqStandardScheme(); - } - } - - private static class TSInsertStringRecordsOfOneDeviceReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertStringRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MEASUREMENTS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list350 = iprot.readListBegin(); - struct.measurementsList = new java.util.ArrayList>(_list350.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem351; - for (int _i352 = 0; _i352 < _list350.size; ++_i352) - { - { - org.apache.thrift.protocol.TList _list353 = iprot.readListBegin(); - _elem351 = new java.util.ArrayList(_list353.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem354; - for (int _i355 = 0; _i355 < _list353.size; ++_i355) - { - _elem354 = iprot.readString(); - _elem351.add(_elem354); - } - iprot.readListEnd(); - } - struct.measurementsList.add(_elem351); - } - iprot.readListEnd(); - } - struct.setMeasurementsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUES_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list356 = iprot.readListBegin(); - struct.valuesList = new java.util.ArrayList>(_list356.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem357; - for (int _i358 = 0; _i358 < _list356.size; ++_i358) - { - { - org.apache.thrift.protocol.TList _list359 = iprot.readListBegin(); - _elem357 = new java.util.ArrayList(_list359.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem360; - for (int _i361 = 0; _i361 < _list359.size; ++_i361) - { - _elem360 = iprot.readString(); - _elem357.add(_elem360); - } - iprot.readListEnd(); - } - struct.valuesList.add(_elem357); - } - iprot.readListEnd(); - } - struct.setValuesListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TIMESTAMPS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list362 = iprot.readListBegin(); - struct.timestamps = new java.util.ArrayList(_list362.size); - long _elem363; - for (int _i364 = 0; _i364 < _list362.size; ++_i364) - { - _elem363 = iprot.readI64(); - struct.timestamps.add(_elem363); - } - iprot.readListEnd(); - } - struct.setTimestampsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // IS_ALIGNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertStringRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPath != null) { - oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); - oprot.writeString(struct.prefixPath); - oprot.writeFieldEnd(); - } - if (struct.measurementsList != null) { - oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); - for (java.util.List _iter365 : struct.measurementsList) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter365.size())); - for (java.lang.String _iter366 : _iter365) - { - oprot.writeString(_iter366); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.valuesList != null) { - oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.valuesList.size())); - for (java.util.List _iter367 : struct.valuesList) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter367.size())); - for (java.lang.String _iter368 : _iter367) - { - oprot.writeString(_iter368); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.timestamps != null) { - oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.timestamps.size())); - for (long _iter369 : struct.timestamps) - { - oprot.writeI64(_iter369); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetIsAligned()) { - oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); - oprot.writeBool(struct.isAligned); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSInsertStringRecordsOfOneDeviceReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertStringRecordsOfOneDeviceReqTupleScheme getScheme() { - return new TSInsertStringRecordsOfOneDeviceReqTupleScheme(); - } - } - - private static class TSInsertStringRecordsOfOneDeviceReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.prefixPath); - { - oprot.writeI32(struct.measurementsList.size()); - for (java.util.List _iter370 : struct.measurementsList) - { - { - oprot.writeI32(_iter370.size()); - for (java.lang.String _iter371 : _iter370) - { - oprot.writeString(_iter371); - } - } - } - } - { - oprot.writeI32(struct.valuesList.size()); - for (java.util.List _iter372 : struct.valuesList) - { - { - oprot.writeI32(_iter372.size()); - for (java.lang.String _iter373 : _iter372) - { - oprot.writeString(_iter373); - } - } - } - } - { - oprot.writeI32(struct.timestamps.size()); - for (long _iter374 : struct.timestamps) - { - oprot.writeI64(_iter374); - } - } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetIsAligned()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetIsAligned()) { - oprot.writeBool(struct.isAligned); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordsOfOneDeviceReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - { - org.apache.thrift.protocol.TList _list375 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); - struct.measurementsList = new java.util.ArrayList>(_list375.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem376; - for (int _i377 = 0; _i377 < _list375.size; ++_i377) - { - { - org.apache.thrift.protocol.TList _list378 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - _elem376 = new java.util.ArrayList(_list378.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem379; - for (int _i380 = 0; _i380 < _list378.size; ++_i380) - { - _elem379 = iprot.readString(); - _elem376.add(_elem379); - } - } - struct.measurementsList.add(_elem376); - } - } - struct.setMeasurementsListIsSet(true); - { - org.apache.thrift.protocol.TList _list381 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); - struct.valuesList = new java.util.ArrayList>(_list381.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem382; - for (int _i383 = 0; _i383 < _list381.size; ++_i383) - { - { - org.apache.thrift.protocol.TList _list384 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - _elem382 = new java.util.ArrayList(_list384.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem385; - for (int _i386 = 0; _i386 < _list384.size; ++_i386) - { - _elem385 = iprot.readString(); - _elem382.add(_elem385); - } - } - struct.valuesList.add(_elem382); - } - } - struct.setValuesListIsSet(true); - { - org.apache.thrift.protocol.TList _list387 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); - struct.timestamps = new java.util.ArrayList(_list387.size); - long _elem388; - for (int _i389 = 0; _i389 < _list387.size; ++_i389) - { - _elem388 = iprot.readI64(); - struct.timestamps.add(_elem388); - } - } - struct.setTimestampsIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsReq.java deleted file mode 100644 index d741f2830301d..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertStringRecordsReq.java +++ /dev/null @@ -1,1158 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSInsertStringRecordsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertStringRecordsReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPaths", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.LIST, (short)5); - private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)6); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertStringRecordsReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertStringRecordsReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List prefixPaths; // required - public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required - public @org.apache.thrift.annotation.Nullable java.util.List> valuesList; // required - public @org.apache.thrift.annotation.Nullable java.util.List timestamps; // required - public boolean isAligned; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATHS((short)2, "prefixPaths"), - MEASUREMENTS_LIST((short)3, "measurementsList"), - VALUES_LIST((short)4, "valuesList"), - TIMESTAMPS((short)5, "timestamps"), - IS_ALIGNED((short)6, "isAligned"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATHS - return PREFIX_PATHS; - case 3: // MEASUREMENTS_LIST - return MEASUREMENTS_LIST; - case 4: // VALUES_LIST - return VALUES_LIST; - case 5: // TIMESTAMPS - return TIMESTAMPS; - case 6: // IS_ALIGNED - return IS_ALIGNED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __ISALIGNED_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATHS, new org.apache.thrift.meta_data.FieldMetaData("prefixPaths", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertStringRecordsReq.class, metaDataMap); - } - - public TSInsertStringRecordsReq() { - } - - public TSInsertStringRecordsReq( - long sessionId, - java.util.List prefixPaths, - java.util.List> measurementsList, - java.util.List> valuesList, - java.util.List timestamps) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPaths = prefixPaths; - this.measurementsList = measurementsList; - this.valuesList = valuesList; - this.timestamps = timestamps; - } - - /** - * Performs a deep copy on other. - */ - public TSInsertStringRecordsReq(TSInsertStringRecordsReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPaths()) { - java.util.List __this__prefixPaths = new java.util.ArrayList(other.prefixPaths); - this.prefixPaths = __this__prefixPaths; - } - if (other.isSetMeasurementsList()) { - java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); - for (java.util.List other_element : other.measurementsList) { - java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); - __this__measurementsList.add(__this__measurementsList_copy); - } - this.measurementsList = __this__measurementsList; - } - if (other.isSetValuesList()) { - java.util.List> __this__valuesList = new java.util.ArrayList>(other.valuesList.size()); - for (java.util.List other_element : other.valuesList) { - java.util.List __this__valuesList_copy = new java.util.ArrayList(other_element); - __this__valuesList.add(__this__valuesList_copy); - } - this.valuesList = __this__valuesList; - } - if (other.isSetTimestamps()) { - java.util.List __this__timestamps = new java.util.ArrayList(other.timestamps); - this.timestamps = __this__timestamps; - } - this.isAligned = other.isAligned; - } - - @Override - public TSInsertStringRecordsReq deepCopy() { - return new TSInsertStringRecordsReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPaths = null; - this.measurementsList = null; - this.valuesList = null; - this.timestamps = null; - setIsAlignedIsSet(false); - this.isAligned = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSInsertStringRecordsReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getPrefixPathsSize() { - return (this.prefixPaths == null) ? 0 : this.prefixPaths.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getPrefixPathsIterator() { - return (this.prefixPaths == null) ? null : this.prefixPaths.iterator(); - } - - public void addToPrefixPaths(java.lang.String elem) { - if (this.prefixPaths == null) { - this.prefixPaths = new java.util.ArrayList(); - } - this.prefixPaths.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getPrefixPaths() { - return this.prefixPaths; - } - - public TSInsertStringRecordsReq setPrefixPaths(@org.apache.thrift.annotation.Nullable java.util.List prefixPaths) { - this.prefixPaths = prefixPaths; - return this; - } - - public void unsetPrefixPaths() { - this.prefixPaths = null; - } - - /** Returns true if field prefixPaths is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPaths() { - return this.prefixPaths != null; - } - - public void setPrefixPathsIsSet(boolean value) { - if (!value) { - this.prefixPaths = null; - } - } - - public int getMeasurementsListSize() { - return (this.measurementsList == null) ? 0 : this.measurementsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getMeasurementsListIterator() { - return (this.measurementsList == null) ? null : this.measurementsList.iterator(); - } - - public void addToMeasurementsList(java.util.List elem) { - if (this.measurementsList == null) { - this.measurementsList = new java.util.ArrayList>(); - } - this.measurementsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getMeasurementsList() { - return this.measurementsList; - } - - public TSInsertStringRecordsReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { - this.measurementsList = measurementsList; - return this; - } - - public void unsetMeasurementsList() { - this.measurementsList = null; - } - - /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurementsList() { - return this.measurementsList != null; - } - - public void setMeasurementsListIsSet(boolean value) { - if (!value) { - this.measurementsList = null; - } - } - - public int getValuesListSize() { - return (this.valuesList == null) ? 0 : this.valuesList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getValuesListIterator() { - return (this.valuesList == null) ? null : this.valuesList.iterator(); - } - - public void addToValuesList(java.util.List elem) { - if (this.valuesList == null) { - this.valuesList = new java.util.ArrayList>(); - } - this.valuesList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getValuesList() { - return this.valuesList; - } - - public TSInsertStringRecordsReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List> valuesList) { - this.valuesList = valuesList; - return this; - } - - public void unsetValuesList() { - this.valuesList = null; - } - - /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ - public boolean isSetValuesList() { - return this.valuesList != null; - } - - public void setValuesListIsSet(boolean value) { - if (!value) { - this.valuesList = null; - } - } - - public int getTimestampsSize() { - return (this.timestamps == null) ? 0 : this.timestamps.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getTimestampsIterator() { - return (this.timestamps == null) ? null : this.timestamps.iterator(); - } - - public void addToTimestamps(long elem) { - if (this.timestamps == null) { - this.timestamps = new java.util.ArrayList(); - } - this.timestamps.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getTimestamps() { - return this.timestamps; - } - - public TSInsertStringRecordsReq setTimestamps(@org.apache.thrift.annotation.Nullable java.util.List timestamps) { - this.timestamps = timestamps; - return this; - } - - public void unsetTimestamps() { - this.timestamps = null; - } - - /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestamps() { - return this.timestamps != null; - } - - public void setTimestampsIsSet(boolean value) { - if (!value) { - this.timestamps = null; - } - } - - public boolean isIsAligned() { - return this.isAligned; - } - - public TSInsertStringRecordsReq setIsAligned(boolean isAligned) { - this.isAligned = isAligned; - setIsAlignedIsSet(true); - return this; - } - - public void unsetIsAligned() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAligned() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - public void setIsAlignedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATHS: - if (value == null) { - unsetPrefixPaths(); - } else { - setPrefixPaths((java.util.List)value); - } - break; - - case MEASUREMENTS_LIST: - if (value == null) { - unsetMeasurementsList(); - } else { - setMeasurementsList((java.util.List>)value); - } - break; - - case VALUES_LIST: - if (value == null) { - unsetValuesList(); - } else { - setValuesList((java.util.List>)value); - } - break; - - case TIMESTAMPS: - if (value == null) { - unsetTimestamps(); - } else { - setTimestamps((java.util.List)value); - } - break; - - case IS_ALIGNED: - if (value == null) { - unsetIsAligned(); - } else { - setIsAligned((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATHS: - return getPrefixPaths(); - - case MEASUREMENTS_LIST: - return getMeasurementsList(); - - case VALUES_LIST: - return getValuesList(); - - case TIMESTAMPS: - return getTimestamps(); - - case IS_ALIGNED: - return isIsAligned(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATHS: - return isSetPrefixPaths(); - case MEASUREMENTS_LIST: - return isSetMeasurementsList(); - case VALUES_LIST: - return isSetValuesList(); - case TIMESTAMPS: - return isSetTimestamps(); - case IS_ALIGNED: - return isSetIsAligned(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSInsertStringRecordsReq) - return this.equals((TSInsertStringRecordsReq)that); - return false; - } - - public boolean equals(TSInsertStringRecordsReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPaths = true && this.isSetPrefixPaths(); - boolean that_present_prefixPaths = true && that.isSetPrefixPaths(); - if (this_present_prefixPaths || that_present_prefixPaths) { - if (!(this_present_prefixPaths && that_present_prefixPaths)) - return false; - if (!this.prefixPaths.equals(that.prefixPaths)) - return false; - } - - boolean this_present_measurementsList = true && this.isSetMeasurementsList(); - boolean that_present_measurementsList = true && that.isSetMeasurementsList(); - if (this_present_measurementsList || that_present_measurementsList) { - if (!(this_present_measurementsList && that_present_measurementsList)) - return false; - if (!this.measurementsList.equals(that.measurementsList)) - return false; - } - - boolean this_present_valuesList = true && this.isSetValuesList(); - boolean that_present_valuesList = true && that.isSetValuesList(); - if (this_present_valuesList || that_present_valuesList) { - if (!(this_present_valuesList && that_present_valuesList)) - return false; - if (!this.valuesList.equals(that.valuesList)) - return false; - } - - boolean this_present_timestamps = true && this.isSetTimestamps(); - boolean that_present_timestamps = true && that.isSetTimestamps(); - if (this_present_timestamps || that_present_timestamps) { - if (!(this_present_timestamps && that_present_timestamps)) - return false; - if (!this.timestamps.equals(that.timestamps)) - return false; - } - - boolean this_present_isAligned = true && this.isSetIsAligned(); - boolean that_present_isAligned = true && that.isSetIsAligned(); - if (this_present_isAligned || that_present_isAligned) { - if (!(this_present_isAligned && that_present_isAligned)) - return false; - if (this.isAligned != that.isAligned) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPaths()) ? 131071 : 524287); - if (isSetPrefixPaths()) - hashCode = hashCode * 8191 + prefixPaths.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); - if (isSetMeasurementsList()) - hashCode = hashCode * 8191 + measurementsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); - if (isSetValuesList()) - hashCode = hashCode * 8191 + valuesList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); - if (isSetTimestamps()) - hashCode = hashCode * 8191 + timestamps.hashCode(); - - hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); - if (isSetIsAligned()) - hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSInsertStringRecordsReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPaths(), other.isSetPrefixPaths()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPaths()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPaths, other.prefixPaths); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurementsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValuesList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestamps()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAligned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertStringRecordsReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPaths:"); - if (this.prefixPaths == null) { - sb.append("null"); - } else { - sb.append(this.prefixPaths); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurementsList:"); - if (this.measurementsList == null) { - sb.append("null"); - } else { - sb.append(this.measurementsList); - } - first = false; - if (!first) sb.append(", "); - sb.append("valuesList:"); - if (this.valuesList == null) { - sb.append("null"); - } else { - sb.append(this.valuesList); - } - first = false; - if (!first) sb.append(", "); - sb.append("timestamps:"); - if (this.timestamps == null) { - sb.append("null"); - } else { - sb.append(this.timestamps); - } - first = false; - if (isSetIsAligned()) { - if (!first) sb.append(", "); - sb.append("isAligned:"); - sb.append(this.isAligned); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPaths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPaths' was not present! Struct: " + toString()); - } - if (measurementsList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); - } - if (valuesList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); - } - if (timestamps == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSInsertStringRecordsReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertStringRecordsReqStandardScheme getScheme() { - return new TSInsertStringRecordsReqStandardScheme(); - } - } - - private static class TSInsertStringRecordsReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertStringRecordsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATHS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list390 = iprot.readListBegin(); - struct.prefixPaths = new java.util.ArrayList(_list390.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem391; - for (int _i392 = 0; _i392 < _list390.size; ++_i392) - { - _elem391 = iprot.readString(); - struct.prefixPaths.add(_elem391); - } - iprot.readListEnd(); - } - struct.setPrefixPathsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MEASUREMENTS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list393 = iprot.readListBegin(); - struct.measurementsList = new java.util.ArrayList>(_list393.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem394; - for (int _i395 = 0; _i395 < _list393.size; ++_i395) - { - { - org.apache.thrift.protocol.TList _list396 = iprot.readListBegin(); - _elem394 = new java.util.ArrayList(_list396.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem397; - for (int _i398 = 0; _i398 < _list396.size; ++_i398) - { - _elem397 = iprot.readString(); - _elem394.add(_elem397); - } - iprot.readListEnd(); - } - struct.measurementsList.add(_elem394); - } - iprot.readListEnd(); - } - struct.setMeasurementsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUES_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list399 = iprot.readListBegin(); - struct.valuesList = new java.util.ArrayList>(_list399.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem400; - for (int _i401 = 0; _i401 < _list399.size; ++_i401) - { - { - org.apache.thrift.protocol.TList _list402 = iprot.readListBegin(); - _elem400 = new java.util.ArrayList(_list402.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem403; - for (int _i404 = 0; _i404 < _list402.size; ++_i404) - { - _elem403 = iprot.readString(); - _elem400.add(_elem403); - } - iprot.readListEnd(); - } - struct.valuesList.add(_elem400); - } - iprot.readListEnd(); - } - struct.setValuesListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TIMESTAMPS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list405 = iprot.readListBegin(); - struct.timestamps = new java.util.ArrayList(_list405.size); - long _elem406; - for (int _i407 = 0; _i407 < _list405.size; ++_i407) - { - _elem406 = iprot.readI64(); - struct.timestamps.add(_elem406); - } - iprot.readListEnd(); - } - struct.setTimestampsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // IS_ALIGNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertStringRecordsReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPaths != null) { - oprot.writeFieldBegin(PREFIX_PATHS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.prefixPaths.size())); - for (java.lang.String _iter408 : struct.prefixPaths) - { - oprot.writeString(_iter408); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.measurementsList != null) { - oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); - for (java.util.List _iter409 : struct.measurementsList) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter409.size())); - for (java.lang.String _iter410 : _iter409) - { - oprot.writeString(_iter410); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.valuesList != null) { - oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.valuesList.size())); - for (java.util.List _iter411 : struct.valuesList) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter411.size())); - for (java.lang.String _iter412 : _iter411) - { - oprot.writeString(_iter412); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.timestamps != null) { - oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.timestamps.size())); - for (long _iter413 : struct.timestamps) - { - oprot.writeI64(_iter413); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetIsAligned()) { - oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); - oprot.writeBool(struct.isAligned); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSInsertStringRecordsReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertStringRecordsReqTupleScheme getScheme() { - return new TSInsertStringRecordsReqTupleScheme(); - } - } - - private static class TSInsertStringRecordsReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - { - oprot.writeI32(struct.prefixPaths.size()); - for (java.lang.String _iter414 : struct.prefixPaths) - { - oprot.writeString(_iter414); - } - } - { - oprot.writeI32(struct.measurementsList.size()); - for (java.util.List _iter415 : struct.measurementsList) - { - { - oprot.writeI32(_iter415.size()); - for (java.lang.String _iter416 : _iter415) - { - oprot.writeString(_iter416); - } - } - } - } - { - oprot.writeI32(struct.valuesList.size()); - for (java.util.List _iter417 : struct.valuesList) - { - { - oprot.writeI32(_iter417.size()); - for (java.lang.String _iter418 : _iter417) - { - oprot.writeString(_iter418); - } - } - } - } - { - oprot.writeI32(struct.timestamps.size()); - for (long _iter419 : struct.timestamps) - { - oprot.writeI64(_iter419); - } - } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetIsAligned()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetIsAligned()) { - oprot.writeBool(struct.isAligned); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertStringRecordsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - { - org.apache.thrift.protocol.TList _list420 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.prefixPaths = new java.util.ArrayList(_list420.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem421; - for (int _i422 = 0; _i422 < _list420.size; ++_i422) - { - _elem421 = iprot.readString(); - struct.prefixPaths.add(_elem421); - } - } - struct.setPrefixPathsIsSet(true); - { - org.apache.thrift.protocol.TList _list423 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); - struct.measurementsList = new java.util.ArrayList>(_list423.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem424; - for (int _i425 = 0; _i425 < _list423.size; ++_i425) - { - { - org.apache.thrift.protocol.TList _list426 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - _elem424 = new java.util.ArrayList(_list426.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem427; - for (int _i428 = 0; _i428 < _list426.size; ++_i428) - { - _elem427 = iprot.readString(); - _elem424.add(_elem427); - } - } - struct.measurementsList.add(_elem424); - } - } - struct.setMeasurementsListIsSet(true); - { - org.apache.thrift.protocol.TList _list429 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); - struct.valuesList = new java.util.ArrayList>(_list429.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem430; - for (int _i431 = 0; _i431 < _list429.size; ++_i431) - { - { - org.apache.thrift.protocol.TList _list432 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - _elem430 = new java.util.ArrayList(_list432.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem433; - for (int _i434 = 0; _i434 < _list432.size; ++_i434) - { - _elem433 = iprot.readString(); - _elem430.add(_elem433); - } - } - struct.valuesList.add(_elem430); - } - } - struct.setValuesListIsSet(true); - { - org.apache.thrift.protocol.TList _list435 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); - struct.timestamps = new java.util.ArrayList(_list435.size); - long _elem436; - for (int _i437 = 0; _i437 < _list435.size; ++_i437) - { - _elem436 = iprot.readI64(); - struct.timestamps.add(_elem436); - } - } - struct.setTimestampsIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletReq.java deleted file mode 100644 index a7d8682a8ad2a..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletReq.java +++ /dev/null @@ -1,1815 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSInsertTabletReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertTabletReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamps", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("types", org.apache.thrift.protocol.TType.LIST, (short)6); - private static final org.apache.thrift.protocol.TField SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("size", org.apache.thrift.protocol.TType.I32, (short)7); - private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)8); - private static final org.apache.thrift.protocol.TField WRITE_TO_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToTable", org.apache.thrift.protocol.TType.BOOL, (short)9); - private static final org.apache.thrift.protocol.TField COLUMN_CATEGORIES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnCategories", org.apache.thrift.protocol.TType.LIST, (short)10); - private static final org.apache.thrift.protocol.TField IS_COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("isCompressed", org.apache.thrift.protocol.TType.BOOL, (short)11); - private static final org.apache.thrift.protocol.TField ENCODING_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("encodingTypes", org.apache.thrift.protocol.TType.LIST, (short)12); - private static final org.apache.thrift.protocol.TField COMPRESS_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("compressType", org.apache.thrift.protocol.TType.I32, (short)13); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertTabletReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertTabletReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required - public @org.apache.thrift.annotation.Nullable java.util.List measurements; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer values; // required - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer timestamps; // required - public @org.apache.thrift.annotation.Nullable java.util.List types; // required - public int size; // required - public boolean isAligned; // optional - public boolean writeToTable; // optional - public @org.apache.thrift.annotation.Nullable java.util.List columnCategories; // optional - public boolean isCompressed; // optional - public @org.apache.thrift.annotation.Nullable java.util.List encodingTypes; // optional - public int compressType; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATH((short)2, "prefixPath"), - MEASUREMENTS((short)3, "measurements"), - VALUES((short)4, "values"), - TIMESTAMPS((short)5, "timestamps"), - TYPES((short)6, "types"), - SIZE((short)7, "size"), - IS_ALIGNED((short)8, "isAligned"), - WRITE_TO_TABLE((short)9, "writeToTable"), - COLUMN_CATEGORIES((short)10, "columnCategories"), - IS_COMPRESSED((short)11, "isCompressed"), - ENCODING_TYPES((short)12, "encodingTypes"), - COMPRESS_TYPE((short)13, "compressType"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATH - return PREFIX_PATH; - case 3: // MEASUREMENTS - return MEASUREMENTS; - case 4: // VALUES - return VALUES; - case 5: // TIMESTAMPS - return TIMESTAMPS; - case 6: // TYPES - return TYPES; - case 7: // SIZE - return SIZE; - case 8: // IS_ALIGNED - return IS_ALIGNED; - case 9: // WRITE_TO_TABLE - return WRITE_TO_TABLE; - case 10: // COLUMN_CATEGORIES - return COLUMN_CATEGORIES; - case 11: // IS_COMPRESSED - return IS_COMPRESSED; - case 12: // ENCODING_TYPES - return ENCODING_TYPES; - case 13: // COMPRESS_TYPE - return COMPRESS_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __SIZE_ISSET_ID = 1; - private static final int __ISALIGNED_ISSET_ID = 2; - private static final int __WRITETOTABLE_ISSET_ID = 3; - private static final int __ISCOMPRESSED_ISSET_ID = 4; - private static final int __COMPRESSTYPE_ISSET_ID = 5; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.IS_ALIGNED,_Fields.WRITE_TO_TABLE,_Fields.COLUMN_CATEGORIES,_Fields.IS_COMPRESSED,_Fields.ENCODING_TYPES,_Fields.COMPRESS_TYPE}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("timestamps", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TYPES, new org.apache.thrift.meta_data.FieldMetaData("types", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.SIZE, new org.apache.thrift.meta_data.FieldMetaData("size", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.WRITE_TO_TABLE, new org.apache.thrift.meta_data.FieldMetaData("writeToTable", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.COLUMN_CATEGORIES, new org.apache.thrift.meta_data.FieldMetaData("columnCategories", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)))); - tmpMap.put(_Fields.IS_COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("isCompressed", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ENCODING_TYPES, new org.apache.thrift.meta_data.FieldMetaData("encodingTypes", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.COMPRESS_TYPE, new org.apache.thrift.meta_data.FieldMetaData("compressType", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertTabletReq.class, metaDataMap); - } - - public TSInsertTabletReq() { - } - - public TSInsertTabletReq( - long sessionId, - java.lang.String prefixPath, - java.util.List measurements, - java.nio.ByteBuffer values, - java.nio.ByteBuffer timestamps, - java.util.List types, - int size) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPath = prefixPath; - this.measurements = measurements; - this.values = org.apache.thrift.TBaseHelper.copyBinary(values); - this.timestamps = org.apache.thrift.TBaseHelper.copyBinary(timestamps); - this.types = types; - this.size = size; - setSizeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSInsertTabletReq(TSInsertTabletReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPath()) { - this.prefixPath = other.prefixPath; - } - if (other.isSetMeasurements()) { - java.util.List __this__measurements = new java.util.ArrayList(other.measurements); - this.measurements = __this__measurements; - } - if (other.isSetValues()) { - this.values = org.apache.thrift.TBaseHelper.copyBinary(other.values); - } - if (other.isSetTimestamps()) { - this.timestamps = org.apache.thrift.TBaseHelper.copyBinary(other.timestamps); - } - if (other.isSetTypes()) { - java.util.List __this__types = new java.util.ArrayList(other.types); - this.types = __this__types; - } - this.size = other.size; - this.isAligned = other.isAligned; - this.writeToTable = other.writeToTable; - if (other.isSetColumnCategories()) { - java.util.List __this__columnCategories = new java.util.ArrayList(other.columnCategories); - this.columnCategories = __this__columnCategories; - } - this.isCompressed = other.isCompressed; - if (other.isSetEncodingTypes()) { - java.util.List __this__encodingTypes = new java.util.ArrayList(other.encodingTypes); - this.encodingTypes = __this__encodingTypes; - } - this.compressType = other.compressType; - } - - @Override - public TSInsertTabletReq deepCopy() { - return new TSInsertTabletReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPath = null; - this.measurements = null; - this.values = null; - this.timestamps = null; - this.types = null; - setSizeIsSet(false); - this.size = 0; - setIsAlignedIsSet(false); - this.isAligned = false; - setWriteToTableIsSet(false); - this.writeToTable = false; - this.columnCategories = null; - setIsCompressedIsSet(false); - this.isCompressed = false; - this.encodingTypes = null; - setCompressTypeIsSet(false); - this.compressType = 0; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSInsertTabletReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPrefixPath() { - return this.prefixPath; - } - - public TSInsertTabletReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { - this.prefixPath = prefixPath; - return this; - } - - public void unsetPrefixPath() { - this.prefixPath = null; - } - - /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPath() { - return this.prefixPath != null; - } - - public void setPrefixPathIsSet(boolean value) { - if (!value) { - this.prefixPath = null; - } - } - - public int getMeasurementsSize() { - return (this.measurements == null) ? 0 : this.measurements.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getMeasurementsIterator() { - return (this.measurements == null) ? null : this.measurements.iterator(); - } - - public void addToMeasurements(java.lang.String elem) { - if (this.measurements == null) { - this.measurements = new java.util.ArrayList(); - } - this.measurements.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getMeasurements() { - return this.measurements; - } - - public TSInsertTabletReq setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { - this.measurements = measurements; - return this; - } - - public void unsetMeasurements() { - this.measurements = null; - } - - /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurements() { - return this.measurements != null; - } - - public void setMeasurementsIsSet(boolean value) { - if (!value) { - this.measurements = null; - } - } - - public byte[] getValues() { - setValues(org.apache.thrift.TBaseHelper.rightSize(values)); - return values == null ? null : values.array(); - } - - public java.nio.ByteBuffer bufferForValues() { - return org.apache.thrift.TBaseHelper.copyBinary(values); - } - - public TSInsertTabletReq setValues(byte[] values) { - this.values = values == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(values.clone()); - return this; - } - - public TSInsertTabletReq setValues(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer values) { - this.values = org.apache.thrift.TBaseHelper.copyBinary(values); - return this; - } - - public void unsetValues() { - this.values = null; - } - - /** Returns true if field values is set (has been assigned a value) and false otherwise */ - public boolean isSetValues() { - return this.values != null; - } - - public void setValuesIsSet(boolean value) { - if (!value) { - this.values = null; - } - } - - public byte[] getTimestamps() { - setTimestamps(org.apache.thrift.TBaseHelper.rightSize(timestamps)); - return timestamps == null ? null : timestamps.array(); - } - - public java.nio.ByteBuffer bufferForTimestamps() { - return org.apache.thrift.TBaseHelper.copyBinary(timestamps); - } - - public TSInsertTabletReq setTimestamps(byte[] timestamps) { - this.timestamps = timestamps == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(timestamps.clone()); - return this; - } - - public TSInsertTabletReq setTimestamps(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer timestamps) { - this.timestamps = org.apache.thrift.TBaseHelper.copyBinary(timestamps); - return this; - } - - public void unsetTimestamps() { - this.timestamps = null; - } - - /** Returns true if field timestamps is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestamps() { - return this.timestamps != null; - } - - public void setTimestampsIsSet(boolean value) { - if (!value) { - this.timestamps = null; - } - } - - public int getTypesSize() { - return (this.types == null) ? 0 : this.types.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getTypesIterator() { - return (this.types == null) ? null : this.types.iterator(); - } - - public void addToTypes(int elem) { - if (this.types == null) { - this.types = new java.util.ArrayList(); - } - this.types.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getTypes() { - return this.types; - } - - public TSInsertTabletReq setTypes(@org.apache.thrift.annotation.Nullable java.util.List types) { - this.types = types; - return this; - } - - public void unsetTypes() { - this.types = null; - } - - /** Returns true if field types is set (has been assigned a value) and false otherwise */ - public boolean isSetTypes() { - return this.types != null; - } - - public void setTypesIsSet(boolean value) { - if (!value) { - this.types = null; - } - } - - public int getSize() { - return this.size; - } - - public TSInsertTabletReq setSize(int size) { - this.size = size; - setSizeIsSet(true); - return this; - } - - public void unsetSize() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SIZE_ISSET_ID); - } - - /** Returns true if field size is set (has been assigned a value) and false otherwise */ - public boolean isSetSize() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SIZE_ISSET_ID); - } - - public void setSizeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SIZE_ISSET_ID, value); - } - - public boolean isIsAligned() { - return this.isAligned; - } - - public TSInsertTabletReq setIsAligned(boolean isAligned) { - this.isAligned = isAligned; - setIsAlignedIsSet(true); - return this; - } - - public void unsetIsAligned() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAligned() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - public void setIsAlignedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); - } - - public boolean isWriteToTable() { - return this.writeToTable; - } - - public TSInsertTabletReq setWriteToTable(boolean writeToTable) { - this.writeToTable = writeToTable; - setWriteToTableIsSet(true); - return this; - } - - public void unsetWriteToTable() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WRITETOTABLE_ISSET_ID); - } - - /** Returns true if field writeToTable is set (has been assigned a value) and false otherwise */ - public boolean isSetWriteToTable() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WRITETOTABLE_ISSET_ID); - } - - public void setWriteToTableIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WRITETOTABLE_ISSET_ID, value); - } - - public int getColumnCategoriesSize() { - return (this.columnCategories == null) ? 0 : this.columnCategories.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getColumnCategoriesIterator() { - return (this.columnCategories == null) ? null : this.columnCategories.iterator(); - } - - public void addToColumnCategories(byte elem) { - if (this.columnCategories == null) { - this.columnCategories = new java.util.ArrayList(); - } - this.columnCategories.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getColumnCategories() { - return this.columnCategories; - } - - public TSInsertTabletReq setColumnCategories(@org.apache.thrift.annotation.Nullable java.util.List columnCategories) { - this.columnCategories = columnCategories; - return this; - } - - public void unsetColumnCategories() { - this.columnCategories = null; - } - - /** Returns true if field columnCategories is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnCategories() { - return this.columnCategories != null; - } - - public void setColumnCategoriesIsSet(boolean value) { - if (!value) { - this.columnCategories = null; - } - } - - public boolean isIsCompressed() { - return this.isCompressed; - } - - public TSInsertTabletReq setIsCompressed(boolean isCompressed) { - this.isCompressed = isCompressed; - setIsCompressedIsSet(true); - return this; - } - - public void unsetIsCompressed() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISCOMPRESSED_ISSET_ID); - } - - /** Returns true if field isCompressed is set (has been assigned a value) and false otherwise */ - public boolean isSetIsCompressed() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISCOMPRESSED_ISSET_ID); - } - - public void setIsCompressedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISCOMPRESSED_ISSET_ID, value); - } - - public int getEncodingTypesSize() { - return (this.encodingTypes == null) ? 0 : this.encodingTypes.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getEncodingTypesIterator() { - return (this.encodingTypes == null) ? null : this.encodingTypes.iterator(); - } - - public void addToEncodingTypes(int elem) { - if (this.encodingTypes == null) { - this.encodingTypes = new java.util.ArrayList(); - } - this.encodingTypes.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getEncodingTypes() { - return this.encodingTypes; - } - - public TSInsertTabletReq setEncodingTypes(@org.apache.thrift.annotation.Nullable java.util.List encodingTypes) { - this.encodingTypes = encodingTypes; - return this; - } - - public void unsetEncodingTypes() { - this.encodingTypes = null; - } - - /** Returns true if field encodingTypes is set (has been assigned a value) and false otherwise */ - public boolean isSetEncodingTypes() { - return this.encodingTypes != null; - } - - public void setEncodingTypesIsSet(boolean value) { - if (!value) { - this.encodingTypes = null; - } - } - - public int getCompressType() { - return this.compressType; - } - - public TSInsertTabletReq setCompressType(int compressType) { - this.compressType = compressType; - setCompressTypeIsSet(true); - return this; - } - - public void unsetCompressType() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPRESSTYPE_ISSET_ID); - } - - /** Returns true if field compressType is set (has been assigned a value) and false otherwise */ - public boolean isSetCompressType() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPRESSTYPE_ISSET_ID); - } - - public void setCompressTypeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPRESSTYPE_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATH: - if (value == null) { - unsetPrefixPath(); - } else { - setPrefixPath((java.lang.String)value); - } - break; - - case MEASUREMENTS: - if (value == null) { - unsetMeasurements(); - } else { - setMeasurements((java.util.List)value); - } - break; - - case VALUES: - if (value == null) { - unsetValues(); - } else { - if (value instanceof byte[]) { - setValues((byte[])value); - } else { - setValues((java.nio.ByteBuffer)value); - } - } - break; - - case TIMESTAMPS: - if (value == null) { - unsetTimestamps(); - } else { - if (value instanceof byte[]) { - setTimestamps((byte[])value); - } else { - setTimestamps((java.nio.ByteBuffer)value); - } - } - break; - - case TYPES: - if (value == null) { - unsetTypes(); - } else { - setTypes((java.util.List)value); - } - break; - - case SIZE: - if (value == null) { - unsetSize(); - } else { - setSize((java.lang.Integer)value); - } - break; - - case IS_ALIGNED: - if (value == null) { - unsetIsAligned(); - } else { - setIsAligned((java.lang.Boolean)value); - } - break; - - case WRITE_TO_TABLE: - if (value == null) { - unsetWriteToTable(); - } else { - setWriteToTable((java.lang.Boolean)value); - } - break; - - case COLUMN_CATEGORIES: - if (value == null) { - unsetColumnCategories(); - } else { - setColumnCategories((java.util.List)value); - } - break; - - case IS_COMPRESSED: - if (value == null) { - unsetIsCompressed(); - } else { - setIsCompressed((java.lang.Boolean)value); - } - break; - - case ENCODING_TYPES: - if (value == null) { - unsetEncodingTypes(); - } else { - setEncodingTypes((java.util.List)value); - } - break; - - case COMPRESS_TYPE: - if (value == null) { - unsetCompressType(); - } else { - setCompressType((java.lang.Integer)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATH: - return getPrefixPath(); - - case MEASUREMENTS: - return getMeasurements(); - - case VALUES: - return getValues(); - - case TIMESTAMPS: - return getTimestamps(); - - case TYPES: - return getTypes(); - - case SIZE: - return getSize(); - - case IS_ALIGNED: - return isIsAligned(); - - case WRITE_TO_TABLE: - return isWriteToTable(); - - case COLUMN_CATEGORIES: - return getColumnCategories(); - - case IS_COMPRESSED: - return isIsCompressed(); - - case ENCODING_TYPES: - return getEncodingTypes(); - - case COMPRESS_TYPE: - return getCompressType(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATH: - return isSetPrefixPath(); - case MEASUREMENTS: - return isSetMeasurements(); - case VALUES: - return isSetValues(); - case TIMESTAMPS: - return isSetTimestamps(); - case TYPES: - return isSetTypes(); - case SIZE: - return isSetSize(); - case IS_ALIGNED: - return isSetIsAligned(); - case WRITE_TO_TABLE: - return isSetWriteToTable(); - case COLUMN_CATEGORIES: - return isSetColumnCategories(); - case IS_COMPRESSED: - return isSetIsCompressed(); - case ENCODING_TYPES: - return isSetEncodingTypes(); - case COMPRESS_TYPE: - return isSetCompressType(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSInsertTabletReq) - return this.equals((TSInsertTabletReq)that); - return false; - } - - public boolean equals(TSInsertTabletReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPath = true && this.isSetPrefixPath(); - boolean that_present_prefixPath = true && that.isSetPrefixPath(); - if (this_present_prefixPath || that_present_prefixPath) { - if (!(this_present_prefixPath && that_present_prefixPath)) - return false; - if (!this.prefixPath.equals(that.prefixPath)) - return false; - } - - boolean this_present_measurements = true && this.isSetMeasurements(); - boolean that_present_measurements = true && that.isSetMeasurements(); - if (this_present_measurements || that_present_measurements) { - if (!(this_present_measurements && that_present_measurements)) - return false; - if (!this.measurements.equals(that.measurements)) - return false; - } - - boolean this_present_values = true && this.isSetValues(); - boolean that_present_values = true && that.isSetValues(); - if (this_present_values || that_present_values) { - if (!(this_present_values && that_present_values)) - return false; - if (!this.values.equals(that.values)) - return false; - } - - boolean this_present_timestamps = true && this.isSetTimestamps(); - boolean that_present_timestamps = true && that.isSetTimestamps(); - if (this_present_timestamps || that_present_timestamps) { - if (!(this_present_timestamps && that_present_timestamps)) - return false; - if (!this.timestamps.equals(that.timestamps)) - return false; - } - - boolean this_present_types = true && this.isSetTypes(); - boolean that_present_types = true && that.isSetTypes(); - if (this_present_types || that_present_types) { - if (!(this_present_types && that_present_types)) - return false; - if (!this.types.equals(that.types)) - return false; - } - - boolean this_present_size = true; - boolean that_present_size = true; - if (this_present_size || that_present_size) { - if (!(this_present_size && that_present_size)) - return false; - if (this.size != that.size) - return false; - } - - boolean this_present_isAligned = true && this.isSetIsAligned(); - boolean that_present_isAligned = true && that.isSetIsAligned(); - if (this_present_isAligned || that_present_isAligned) { - if (!(this_present_isAligned && that_present_isAligned)) - return false; - if (this.isAligned != that.isAligned) - return false; - } - - boolean this_present_writeToTable = true && this.isSetWriteToTable(); - boolean that_present_writeToTable = true && that.isSetWriteToTable(); - if (this_present_writeToTable || that_present_writeToTable) { - if (!(this_present_writeToTable && that_present_writeToTable)) - return false; - if (this.writeToTable != that.writeToTable) - return false; - } - - boolean this_present_columnCategories = true && this.isSetColumnCategories(); - boolean that_present_columnCategories = true && that.isSetColumnCategories(); - if (this_present_columnCategories || that_present_columnCategories) { - if (!(this_present_columnCategories && that_present_columnCategories)) - return false; - if (!this.columnCategories.equals(that.columnCategories)) - return false; - } - - boolean this_present_isCompressed = true && this.isSetIsCompressed(); - boolean that_present_isCompressed = true && that.isSetIsCompressed(); - if (this_present_isCompressed || that_present_isCompressed) { - if (!(this_present_isCompressed && that_present_isCompressed)) - return false; - if (this.isCompressed != that.isCompressed) - return false; - } - - boolean this_present_encodingTypes = true && this.isSetEncodingTypes(); - boolean that_present_encodingTypes = true && that.isSetEncodingTypes(); - if (this_present_encodingTypes || that_present_encodingTypes) { - if (!(this_present_encodingTypes && that_present_encodingTypes)) - return false; - if (!this.encodingTypes.equals(that.encodingTypes)) - return false; - } - - boolean this_present_compressType = true && this.isSetCompressType(); - boolean that_present_compressType = true && that.isSetCompressType(); - if (this_present_compressType || that_present_compressType) { - if (!(this_present_compressType && that_present_compressType)) - return false; - if (this.compressType != that.compressType) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); - if (isSetPrefixPath()) - hashCode = hashCode * 8191 + prefixPath.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); - if (isSetMeasurements()) - hashCode = hashCode * 8191 + measurements.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValues()) ? 131071 : 524287); - if (isSetValues()) - hashCode = hashCode * 8191 + values.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTimestamps()) ? 131071 : 524287); - if (isSetTimestamps()) - hashCode = hashCode * 8191 + timestamps.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTypes()) ? 131071 : 524287); - if (isSetTypes()) - hashCode = hashCode * 8191 + types.hashCode(); - - hashCode = hashCode * 8191 + size; - - hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); - if (isSetIsAligned()) - hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetWriteToTable()) ? 131071 : 524287); - if (isSetWriteToTable()) - hashCode = hashCode * 8191 + ((writeToTable) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetColumnCategories()) ? 131071 : 524287); - if (isSetColumnCategories()) - hashCode = hashCode * 8191 + columnCategories.hashCode(); - - hashCode = hashCode * 8191 + ((isSetIsCompressed()) ? 131071 : 524287); - if (isSetIsCompressed()) - hashCode = hashCode * 8191 + ((isCompressed) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetEncodingTypes()) ? 131071 : 524287); - if (isSetEncodingTypes()) - hashCode = hashCode * 8191 + encodingTypes.hashCode(); - - hashCode = hashCode * 8191 + ((isSetCompressType()) ? 131071 : 524287); - if (isSetCompressType()) - hashCode = hashCode * 8191 + compressType; - - return hashCode; - } - - @Override - public int compareTo(TSInsertTabletReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurements()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValues(), other.isSetValues()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimestamps(), other.isSetTimestamps()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestamps()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamps, other.timestamps); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTypes(), other.isSetTypes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTypes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.types, other.types); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSize(), other.isSetSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.size, other.size); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAligned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetWriteToTable(), other.isSetWriteToTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWriteToTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeToTable, other.writeToTable); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetColumnCategories(), other.isSetColumnCategories()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnCategories()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnCategories, other.columnCategories); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsCompressed(), other.isSetIsCompressed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsCompressed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isCompressed, other.isCompressed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEncodingTypes(), other.isSetEncodingTypes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEncodingTypes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encodingTypes, other.encodingTypes); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCompressType(), other.isSetCompressType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompressType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressType, other.compressType); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertTabletReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPath:"); - if (this.prefixPath == null) { - sb.append("null"); - } else { - sb.append(this.prefixPath); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurements:"); - if (this.measurements == null) { - sb.append("null"); - } else { - sb.append(this.measurements); - } - first = false; - if (!first) sb.append(", "); - sb.append("values:"); - if (this.values == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.values, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("timestamps:"); - if (this.timestamps == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.timestamps, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("types:"); - if (this.types == null) { - sb.append("null"); - } else { - sb.append(this.types); - } - first = false; - if (!first) sb.append(", "); - sb.append("size:"); - sb.append(this.size); - first = false; - if (isSetIsAligned()) { - if (!first) sb.append(", "); - sb.append("isAligned:"); - sb.append(this.isAligned); - first = false; - } - if (isSetWriteToTable()) { - if (!first) sb.append(", "); - sb.append("writeToTable:"); - sb.append(this.writeToTable); - first = false; - } - if (isSetColumnCategories()) { - if (!first) sb.append(", "); - sb.append("columnCategories:"); - if (this.columnCategories == null) { - sb.append("null"); - } else { - sb.append(this.columnCategories); - } - first = false; - } - if (isSetIsCompressed()) { - if (!first) sb.append(", "); - sb.append("isCompressed:"); - sb.append(this.isCompressed); - first = false; - } - if (isSetEncodingTypes()) { - if (!first) sb.append(", "); - sb.append("encodingTypes:"); - if (this.encodingTypes == null) { - sb.append("null"); - } else { - sb.append(this.encodingTypes); - } - first = false; - } - if (isSetCompressType()) { - if (!first) sb.append(", "); - sb.append("compressType:"); - sb.append(this.compressType); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPath == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); - } - if (measurements == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurements' was not present! Struct: " + toString()); - } - if (values == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); - } - if (timestamps == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamps' was not present! Struct: " + toString()); - } - if (types == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'types' was not present! Struct: " + toString()); - } - // alas, we cannot check 'size' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSInsertTabletReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertTabletReqStandardScheme getScheme() { - return new TSInsertTabletReqStandardScheme(); - } - } - - private static class TSInsertTabletReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertTabletReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MEASUREMENTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list182 = iprot.readListBegin(); - struct.measurements = new java.util.ArrayList(_list182.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem183; - for (int _i184 = 0; _i184 < _list182.size; ++_i184) - { - _elem183 = iprot.readString(); - struct.measurements.add(_elem183); - } - iprot.readListEnd(); - } - struct.setMeasurementsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUES - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.values = iprot.readBinary(); - struct.setValuesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TIMESTAMPS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.timestamps = iprot.readBinary(); - struct.setTimestampsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // TYPES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list185 = iprot.readListBegin(); - struct.types = new java.util.ArrayList(_list185.size); - int _elem186; - for (int _i187 = 0; _i187 < _list185.size; ++_i187) - { - _elem186 = iprot.readI32(); - struct.types.add(_elem186); - } - iprot.readListEnd(); - } - struct.setTypesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.size = iprot.readI32(); - struct.setSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // IS_ALIGNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // WRITE_TO_TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.writeToTable = iprot.readBool(); - struct.setWriteToTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // COLUMN_CATEGORIES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list188 = iprot.readListBegin(); - struct.columnCategories = new java.util.ArrayList(_list188.size); - byte _elem189; - for (int _i190 = 0; _i190 < _list188.size; ++_i190) - { - _elem189 = iprot.readByte(); - struct.columnCategories.add(_elem189); - } - iprot.readListEnd(); - } - struct.setColumnCategoriesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // IS_COMPRESSED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isCompressed = iprot.readBool(); - struct.setIsCompressedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // ENCODING_TYPES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list191 = iprot.readListBegin(); - struct.encodingTypes = new java.util.ArrayList(_list191.size); - int _elem192; - for (int _i193 = 0; _i193 < _list191.size; ++_i193) - { - _elem192 = iprot.readI32(); - struct.encodingTypes.add(_elem192); - } - iprot.readListEnd(); - } - struct.setEncodingTypesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // COMPRESS_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.compressType = iprot.readI32(); - struct.setCompressTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetSize()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'size' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertTabletReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPath != null) { - oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); - oprot.writeString(struct.prefixPath); - oprot.writeFieldEnd(); - } - if (struct.measurements != null) { - oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); - for (java.lang.String _iter194 : struct.measurements) - { - oprot.writeString(_iter194); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.values != null) { - oprot.writeFieldBegin(VALUES_FIELD_DESC); - oprot.writeBinary(struct.values); - oprot.writeFieldEnd(); - } - if (struct.timestamps != null) { - oprot.writeFieldBegin(TIMESTAMPS_FIELD_DESC); - oprot.writeBinary(struct.timestamps); - oprot.writeFieldEnd(); - } - if (struct.types != null) { - oprot.writeFieldBegin(TYPES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.types.size())); - for (int _iter195 : struct.types) - { - oprot.writeI32(_iter195); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(SIZE_FIELD_DESC); - oprot.writeI32(struct.size); - oprot.writeFieldEnd(); - if (struct.isSetIsAligned()) { - oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); - oprot.writeBool(struct.isAligned); - oprot.writeFieldEnd(); - } - if (struct.isSetWriteToTable()) { - oprot.writeFieldBegin(WRITE_TO_TABLE_FIELD_DESC); - oprot.writeBool(struct.writeToTable); - oprot.writeFieldEnd(); - } - if (struct.columnCategories != null) { - if (struct.isSetColumnCategories()) { - oprot.writeFieldBegin(COLUMN_CATEGORIES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, struct.columnCategories.size())); - for (byte _iter196 : struct.columnCategories) - { - oprot.writeByte(_iter196); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.isSetIsCompressed()) { - oprot.writeFieldBegin(IS_COMPRESSED_FIELD_DESC); - oprot.writeBool(struct.isCompressed); - oprot.writeFieldEnd(); - } - if (struct.encodingTypes != null) { - if (struct.isSetEncodingTypes()) { - oprot.writeFieldBegin(ENCODING_TYPES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.encodingTypes.size())); - for (int _iter197 : struct.encodingTypes) - { - oprot.writeI32(_iter197); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.isSetCompressType()) { - oprot.writeFieldBegin(COMPRESS_TYPE_FIELD_DESC); - oprot.writeI32(struct.compressType); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSInsertTabletReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertTabletReqTupleScheme getScheme() { - return new TSInsertTabletReqTupleScheme(); - } - } - - private static class TSInsertTabletReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertTabletReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.prefixPath); - { - oprot.writeI32(struct.measurements.size()); - for (java.lang.String _iter198 : struct.measurements) - { - oprot.writeString(_iter198); - } - } - oprot.writeBinary(struct.values); - oprot.writeBinary(struct.timestamps); - { - oprot.writeI32(struct.types.size()); - for (int _iter199 : struct.types) - { - oprot.writeI32(_iter199); - } - } - oprot.writeI32(struct.size); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetIsAligned()) { - optionals.set(0); - } - if (struct.isSetWriteToTable()) { - optionals.set(1); - } - if (struct.isSetColumnCategories()) { - optionals.set(2); - } - if (struct.isSetIsCompressed()) { - optionals.set(3); - } - if (struct.isSetEncodingTypes()) { - optionals.set(4); - } - if (struct.isSetCompressType()) { - optionals.set(5); - } - oprot.writeBitSet(optionals, 6); - if (struct.isSetIsAligned()) { - oprot.writeBool(struct.isAligned); - } - if (struct.isSetWriteToTable()) { - oprot.writeBool(struct.writeToTable); - } - if (struct.isSetColumnCategories()) { - { - oprot.writeI32(struct.columnCategories.size()); - for (byte _iter200 : struct.columnCategories) - { - oprot.writeByte(_iter200); - } - } - } - if (struct.isSetIsCompressed()) { - oprot.writeBool(struct.isCompressed); - } - if (struct.isSetEncodingTypes()) { - { - oprot.writeI32(struct.encodingTypes.size()); - for (int _iter201 : struct.encodingTypes) - { - oprot.writeI32(_iter201); - } - } - } - if (struct.isSetCompressType()) { - oprot.writeI32(struct.compressType); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertTabletReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - { - org.apache.thrift.protocol.TList _list202 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.measurements = new java.util.ArrayList(_list202.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem203; - for (int _i204 = 0; _i204 < _list202.size; ++_i204) - { - _elem203 = iprot.readString(); - struct.measurements.add(_elem203); - } - } - struct.setMeasurementsIsSet(true); - struct.values = iprot.readBinary(); - struct.setValuesIsSet(true); - struct.timestamps = iprot.readBinary(); - struct.setTimestampsIsSet(true); - { - org.apache.thrift.protocol.TList _list205 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.types = new java.util.ArrayList(_list205.size); - int _elem206; - for (int _i207 = 0; _i207 < _list205.size; ++_i207) - { - _elem206 = iprot.readI32(); - struct.types.add(_elem206); - } - } - struct.setTypesIsSet(true); - struct.size = iprot.readI32(); - struct.setSizeIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(6); - if (incoming.get(0)) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } - if (incoming.get(1)) { - struct.writeToTable = iprot.readBool(); - struct.setWriteToTableIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list208 = iprot.readListBegin(org.apache.thrift.protocol.TType.BYTE); - struct.columnCategories = new java.util.ArrayList(_list208.size); - byte _elem209; - for (int _i210 = 0; _i210 < _list208.size; ++_i210) - { - _elem209 = iprot.readByte(); - struct.columnCategories.add(_elem209); - } - } - struct.setColumnCategoriesIsSet(true); - } - if (incoming.get(3)) { - struct.isCompressed = iprot.readBool(); - struct.setIsCompressedIsSet(true); - } - if (incoming.get(4)) { - { - org.apache.thrift.protocol.TList _list211 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.encodingTypes = new java.util.ArrayList(_list211.size); - int _elem212; - for (int _i213 = 0; _i213 < _list211.size; ++_i213) - { - _elem212 = iprot.readI32(); - struct.encodingTypes.add(_elem212); - } - } - struct.setEncodingTypesIsSet(true); - } - if (incoming.get(5)) { - struct.compressType = iprot.readI32(); - struct.setCompressTypeIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletsReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletsReq.java deleted file mode 100644 index 619488d73230a..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSInsertTabletsReq.java +++ /dev/null @@ -1,1460 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSInsertTabletsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSInsertTabletsReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPaths", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementsList", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField VALUES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valuesList", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField TIMESTAMPS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("timestampsList", org.apache.thrift.protocol.TType.LIST, (short)5); - private static final org.apache.thrift.protocol.TField TYPES_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("typesList", org.apache.thrift.protocol.TType.LIST, (short)6); - private static final org.apache.thrift.protocol.TField SIZE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("sizeList", org.apache.thrift.protocol.TType.LIST, (short)7); - private static final org.apache.thrift.protocol.TField IS_ALIGNED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAligned", org.apache.thrift.protocol.TType.BOOL, (short)8); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSInsertTabletsReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSInsertTabletsReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List prefixPaths; // required - public @org.apache.thrift.annotation.Nullable java.util.List> measurementsList; // required - public @org.apache.thrift.annotation.Nullable java.util.List valuesList; // required - public @org.apache.thrift.annotation.Nullable java.util.List timestampsList; // required - public @org.apache.thrift.annotation.Nullable java.util.List> typesList; // required - public @org.apache.thrift.annotation.Nullable java.util.List sizeList; // required - public boolean isAligned; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATHS((short)2, "prefixPaths"), - MEASUREMENTS_LIST((short)3, "measurementsList"), - VALUES_LIST((short)4, "valuesList"), - TIMESTAMPS_LIST((short)5, "timestampsList"), - TYPES_LIST((short)6, "typesList"), - SIZE_LIST((short)7, "sizeList"), - IS_ALIGNED((short)8, "isAligned"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATHS - return PREFIX_PATHS; - case 3: // MEASUREMENTS_LIST - return MEASUREMENTS_LIST; - case 4: // VALUES_LIST - return VALUES_LIST; - case 5: // TIMESTAMPS_LIST - return TIMESTAMPS_LIST; - case 6: // TYPES_LIST - return TYPES_LIST; - case 7: // SIZE_LIST - return SIZE_LIST; - case 8: // IS_ALIGNED - return IS_ALIGNED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __ISALIGNED_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.IS_ALIGNED}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATHS, new org.apache.thrift.meta_data.FieldMetaData("prefixPaths", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.MEASUREMENTS_LIST, new org.apache.thrift.meta_data.FieldMetaData("measurementsList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.VALUES_LIST, new org.apache.thrift.meta_data.FieldMetaData("valuesList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.TIMESTAMPS_LIST, new org.apache.thrift.meta_data.FieldMetaData("timestampsList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.TYPES_LIST, new org.apache.thrift.meta_data.FieldMetaData("typesList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))))); - tmpMap.put(_Fields.SIZE_LIST, new org.apache.thrift.meta_data.FieldMetaData("sizeList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); - tmpMap.put(_Fields.IS_ALIGNED, new org.apache.thrift.meta_data.FieldMetaData("isAligned", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSInsertTabletsReq.class, metaDataMap); - } - - public TSInsertTabletsReq() { - } - - public TSInsertTabletsReq( - long sessionId, - java.util.List prefixPaths, - java.util.List> measurementsList, - java.util.List valuesList, - java.util.List timestampsList, - java.util.List> typesList, - java.util.List sizeList) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPaths = prefixPaths; - this.measurementsList = measurementsList; - this.valuesList = valuesList; - this.timestampsList = timestampsList; - this.typesList = typesList; - this.sizeList = sizeList; - } - - /** - * Performs a deep copy on other. - */ - public TSInsertTabletsReq(TSInsertTabletsReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPaths()) { - java.util.List __this__prefixPaths = new java.util.ArrayList(other.prefixPaths); - this.prefixPaths = __this__prefixPaths; - } - if (other.isSetMeasurementsList()) { - java.util.List> __this__measurementsList = new java.util.ArrayList>(other.measurementsList.size()); - for (java.util.List other_element : other.measurementsList) { - java.util.List __this__measurementsList_copy = new java.util.ArrayList(other_element); - __this__measurementsList.add(__this__measurementsList_copy); - } - this.measurementsList = __this__measurementsList; - } - if (other.isSetValuesList()) { - java.util.List __this__valuesList = new java.util.ArrayList(other.valuesList); - this.valuesList = __this__valuesList; - } - if (other.isSetTimestampsList()) { - java.util.List __this__timestampsList = new java.util.ArrayList(other.timestampsList); - this.timestampsList = __this__timestampsList; - } - if (other.isSetTypesList()) { - java.util.List> __this__typesList = new java.util.ArrayList>(other.typesList.size()); - for (java.util.List other_element : other.typesList) { - java.util.List __this__typesList_copy = new java.util.ArrayList(other_element); - __this__typesList.add(__this__typesList_copy); - } - this.typesList = __this__typesList; - } - if (other.isSetSizeList()) { - java.util.List __this__sizeList = new java.util.ArrayList(other.sizeList); - this.sizeList = __this__sizeList; - } - this.isAligned = other.isAligned; - } - - @Override - public TSInsertTabletsReq deepCopy() { - return new TSInsertTabletsReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPaths = null; - this.measurementsList = null; - this.valuesList = null; - this.timestampsList = null; - this.typesList = null; - this.sizeList = null; - setIsAlignedIsSet(false); - this.isAligned = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSInsertTabletsReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getPrefixPathsSize() { - return (this.prefixPaths == null) ? 0 : this.prefixPaths.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getPrefixPathsIterator() { - return (this.prefixPaths == null) ? null : this.prefixPaths.iterator(); - } - - public void addToPrefixPaths(java.lang.String elem) { - if (this.prefixPaths == null) { - this.prefixPaths = new java.util.ArrayList(); - } - this.prefixPaths.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getPrefixPaths() { - return this.prefixPaths; - } - - public TSInsertTabletsReq setPrefixPaths(@org.apache.thrift.annotation.Nullable java.util.List prefixPaths) { - this.prefixPaths = prefixPaths; - return this; - } - - public void unsetPrefixPaths() { - this.prefixPaths = null; - } - - /** Returns true if field prefixPaths is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPaths() { - return this.prefixPaths != null; - } - - public void setPrefixPathsIsSet(boolean value) { - if (!value) { - this.prefixPaths = null; - } - } - - public int getMeasurementsListSize() { - return (this.measurementsList == null) ? 0 : this.measurementsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getMeasurementsListIterator() { - return (this.measurementsList == null) ? null : this.measurementsList.iterator(); - } - - public void addToMeasurementsList(java.util.List elem) { - if (this.measurementsList == null) { - this.measurementsList = new java.util.ArrayList>(); - } - this.measurementsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getMeasurementsList() { - return this.measurementsList; - } - - public TSInsertTabletsReq setMeasurementsList(@org.apache.thrift.annotation.Nullable java.util.List> measurementsList) { - this.measurementsList = measurementsList; - return this; - } - - public void unsetMeasurementsList() { - this.measurementsList = null; - } - - /** Returns true if field measurementsList is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurementsList() { - return this.measurementsList != null; - } - - public void setMeasurementsListIsSet(boolean value) { - if (!value) { - this.measurementsList = null; - } - } - - public int getValuesListSize() { - return (this.valuesList == null) ? 0 : this.valuesList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getValuesListIterator() { - return (this.valuesList == null) ? null : this.valuesList.iterator(); - } - - public void addToValuesList(java.nio.ByteBuffer elem) { - if (this.valuesList == null) { - this.valuesList = new java.util.ArrayList(); - } - this.valuesList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getValuesList() { - return this.valuesList; - } - - public TSInsertTabletsReq setValuesList(@org.apache.thrift.annotation.Nullable java.util.List valuesList) { - this.valuesList = valuesList; - return this; - } - - public void unsetValuesList() { - this.valuesList = null; - } - - /** Returns true if field valuesList is set (has been assigned a value) and false otherwise */ - public boolean isSetValuesList() { - return this.valuesList != null; - } - - public void setValuesListIsSet(boolean value) { - if (!value) { - this.valuesList = null; - } - } - - public int getTimestampsListSize() { - return (this.timestampsList == null) ? 0 : this.timestampsList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getTimestampsListIterator() { - return (this.timestampsList == null) ? null : this.timestampsList.iterator(); - } - - public void addToTimestampsList(java.nio.ByteBuffer elem) { - if (this.timestampsList == null) { - this.timestampsList = new java.util.ArrayList(); - } - this.timestampsList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getTimestampsList() { - return this.timestampsList; - } - - public TSInsertTabletsReq setTimestampsList(@org.apache.thrift.annotation.Nullable java.util.List timestampsList) { - this.timestampsList = timestampsList; - return this; - } - - public void unsetTimestampsList() { - this.timestampsList = null; - } - - /** Returns true if field timestampsList is set (has been assigned a value) and false otherwise */ - public boolean isSetTimestampsList() { - return this.timestampsList != null; - } - - public void setTimestampsListIsSet(boolean value) { - if (!value) { - this.timestampsList = null; - } - } - - public int getTypesListSize() { - return (this.typesList == null) ? 0 : this.typesList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator> getTypesListIterator() { - return (this.typesList == null) ? null : this.typesList.iterator(); - } - - public void addToTypesList(java.util.List elem) { - if (this.typesList == null) { - this.typesList = new java.util.ArrayList>(); - } - this.typesList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List> getTypesList() { - return this.typesList; - } - - public TSInsertTabletsReq setTypesList(@org.apache.thrift.annotation.Nullable java.util.List> typesList) { - this.typesList = typesList; - return this; - } - - public void unsetTypesList() { - this.typesList = null; - } - - /** Returns true if field typesList is set (has been assigned a value) and false otherwise */ - public boolean isSetTypesList() { - return this.typesList != null; - } - - public void setTypesListIsSet(boolean value) { - if (!value) { - this.typesList = null; - } - } - - public int getSizeListSize() { - return (this.sizeList == null) ? 0 : this.sizeList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getSizeListIterator() { - return (this.sizeList == null) ? null : this.sizeList.iterator(); - } - - public void addToSizeList(int elem) { - if (this.sizeList == null) { - this.sizeList = new java.util.ArrayList(); - } - this.sizeList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getSizeList() { - return this.sizeList; - } - - public TSInsertTabletsReq setSizeList(@org.apache.thrift.annotation.Nullable java.util.List sizeList) { - this.sizeList = sizeList; - return this; - } - - public void unsetSizeList() { - this.sizeList = null; - } - - /** Returns true if field sizeList is set (has been assigned a value) and false otherwise */ - public boolean isSetSizeList() { - return this.sizeList != null; - } - - public void setSizeListIsSet(boolean value) { - if (!value) { - this.sizeList = null; - } - } - - public boolean isIsAligned() { - return this.isAligned; - } - - public TSInsertTabletsReq setIsAligned(boolean isAligned) { - this.isAligned = isAligned; - setIsAlignedIsSet(true); - return this; - } - - public void unsetIsAligned() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - /** Returns true if field isAligned is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAligned() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISALIGNED_ISSET_ID); - } - - public void setIsAlignedIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISALIGNED_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATHS: - if (value == null) { - unsetPrefixPaths(); - } else { - setPrefixPaths((java.util.List)value); - } - break; - - case MEASUREMENTS_LIST: - if (value == null) { - unsetMeasurementsList(); - } else { - setMeasurementsList((java.util.List>)value); - } - break; - - case VALUES_LIST: - if (value == null) { - unsetValuesList(); - } else { - setValuesList((java.util.List)value); - } - break; - - case TIMESTAMPS_LIST: - if (value == null) { - unsetTimestampsList(); - } else { - setTimestampsList((java.util.List)value); - } - break; - - case TYPES_LIST: - if (value == null) { - unsetTypesList(); - } else { - setTypesList((java.util.List>)value); - } - break; - - case SIZE_LIST: - if (value == null) { - unsetSizeList(); - } else { - setSizeList((java.util.List)value); - } - break; - - case IS_ALIGNED: - if (value == null) { - unsetIsAligned(); - } else { - setIsAligned((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATHS: - return getPrefixPaths(); - - case MEASUREMENTS_LIST: - return getMeasurementsList(); - - case VALUES_LIST: - return getValuesList(); - - case TIMESTAMPS_LIST: - return getTimestampsList(); - - case TYPES_LIST: - return getTypesList(); - - case SIZE_LIST: - return getSizeList(); - - case IS_ALIGNED: - return isIsAligned(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATHS: - return isSetPrefixPaths(); - case MEASUREMENTS_LIST: - return isSetMeasurementsList(); - case VALUES_LIST: - return isSetValuesList(); - case TIMESTAMPS_LIST: - return isSetTimestampsList(); - case TYPES_LIST: - return isSetTypesList(); - case SIZE_LIST: - return isSetSizeList(); - case IS_ALIGNED: - return isSetIsAligned(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSInsertTabletsReq) - return this.equals((TSInsertTabletsReq)that); - return false; - } - - public boolean equals(TSInsertTabletsReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPaths = true && this.isSetPrefixPaths(); - boolean that_present_prefixPaths = true && that.isSetPrefixPaths(); - if (this_present_prefixPaths || that_present_prefixPaths) { - if (!(this_present_prefixPaths && that_present_prefixPaths)) - return false; - if (!this.prefixPaths.equals(that.prefixPaths)) - return false; - } - - boolean this_present_measurementsList = true && this.isSetMeasurementsList(); - boolean that_present_measurementsList = true && that.isSetMeasurementsList(); - if (this_present_measurementsList || that_present_measurementsList) { - if (!(this_present_measurementsList && that_present_measurementsList)) - return false; - if (!this.measurementsList.equals(that.measurementsList)) - return false; - } - - boolean this_present_valuesList = true && this.isSetValuesList(); - boolean that_present_valuesList = true && that.isSetValuesList(); - if (this_present_valuesList || that_present_valuesList) { - if (!(this_present_valuesList && that_present_valuesList)) - return false; - if (!this.valuesList.equals(that.valuesList)) - return false; - } - - boolean this_present_timestampsList = true && this.isSetTimestampsList(); - boolean that_present_timestampsList = true && that.isSetTimestampsList(); - if (this_present_timestampsList || that_present_timestampsList) { - if (!(this_present_timestampsList && that_present_timestampsList)) - return false; - if (!this.timestampsList.equals(that.timestampsList)) - return false; - } - - boolean this_present_typesList = true && this.isSetTypesList(); - boolean that_present_typesList = true && that.isSetTypesList(); - if (this_present_typesList || that_present_typesList) { - if (!(this_present_typesList && that_present_typesList)) - return false; - if (!this.typesList.equals(that.typesList)) - return false; - } - - boolean this_present_sizeList = true && this.isSetSizeList(); - boolean that_present_sizeList = true && that.isSetSizeList(); - if (this_present_sizeList || that_present_sizeList) { - if (!(this_present_sizeList && that_present_sizeList)) - return false; - if (!this.sizeList.equals(that.sizeList)) - return false; - } - - boolean this_present_isAligned = true && this.isSetIsAligned(); - boolean that_present_isAligned = true && that.isSetIsAligned(); - if (this_present_isAligned || that_present_isAligned) { - if (!(this_present_isAligned && that_present_isAligned)) - return false; - if (this.isAligned != that.isAligned) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPaths()) ? 131071 : 524287); - if (isSetPrefixPaths()) - hashCode = hashCode * 8191 + prefixPaths.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMeasurementsList()) ? 131071 : 524287); - if (isSetMeasurementsList()) - hashCode = hashCode * 8191 + measurementsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValuesList()) ? 131071 : 524287); - if (isSetValuesList()) - hashCode = hashCode * 8191 + valuesList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTimestampsList()) ? 131071 : 524287); - if (isSetTimestampsList()) - hashCode = hashCode * 8191 + timestampsList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTypesList()) ? 131071 : 524287); - if (isSetTypesList()) - hashCode = hashCode * 8191 + typesList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetSizeList()) ? 131071 : 524287); - if (isSetSizeList()) - hashCode = hashCode * 8191 + sizeList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetIsAligned()) ? 131071 : 524287); - if (isSetIsAligned()) - hashCode = hashCode * 8191 + ((isAligned) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSInsertTabletsReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPaths(), other.isSetPrefixPaths()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPaths()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPaths, other.prefixPaths); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurementsList(), other.isSetMeasurementsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurementsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementsList, other.measurementsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValuesList(), other.isSetValuesList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValuesList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valuesList, other.valuesList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimestampsList(), other.isSetTimestampsList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimestampsList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestampsList, other.timestampsList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTypesList(), other.isSetTypesList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTypesList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typesList, other.typesList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSizeList(), other.isSetSizeList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSizeList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sizeList, other.sizeList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetIsAligned(), other.isSetIsAligned()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAligned()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAligned, other.isAligned); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSInsertTabletsReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPaths:"); - if (this.prefixPaths == null) { - sb.append("null"); - } else { - sb.append(this.prefixPaths); - } - first = false; - if (!first) sb.append(", "); - sb.append("measurementsList:"); - if (this.measurementsList == null) { - sb.append("null"); - } else { - sb.append(this.measurementsList); - } - first = false; - if (!first) sb.append(", "); - sb.append("valuesList:"); - if (this.valuesList == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.valuesList, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("timestampsList:"); - if (this.timestampsList == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.timestampsList, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("typesList:"); - if (this.typesList == null) { - sb.append("null"); - } else { - sb.append(this.typesList); - } - first = false; - if (!first) sb.append(", "); - sb.append("sizeList:"); - if (this.sizeList == null) { - sb.append("null"); - } else { - sb.append(this.sizeList); - } - first = false; - if (isSetIsAligned()) { - if (!first) sb.append(", "); - sb.append("isAligned:"); - sb.append(this.isAligned); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPaths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPaths' was not present! Struct: " + toString()); - } - if (measurementsList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurementsList' was not present! Struct: " + toString()); - } - if (valuesList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'valuesList' was not present! Struct: " + toString()); - } - if (timestampsList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestampsList' was not present! Struct: " + toString()); - } - if (typesList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'typesList' was not present! Struct: " + toString()); - } - if (sizeList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sizeList' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSInsertTabletsReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertTabletsReqStandardScheme getScheme() { - return new TSInsertTabletsReqStandardScheme(); - } - } - - private static class TSInsertTabletsReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSInsertTabletsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATHS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list214 = iprot.readListBegin(); - struct.prefixPaths = new java.util.ArrayList(_list214.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem215; - for (int _i216 = 0; _i216 < _list214.size; ++_i216) - { - _elem215 = iprot.readString(); - struct.prefixPaths.add(_elem215); - } - iprot.readListEnd(); - } - struct.setPrefixPathsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MEASUREMENTS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list217 = iprot.readListBegin(); - struct.measurementsList = new java.util.ArrayList>(_list217.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem218; - for (int _i219 = 0; _i219 < _list217.size; ++_i219) - { - { - org.apache.thrift.protocol.TList _list220 = iprot.readListBegin(); - _elem218 = new java.util.ArrayList(_list220.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem221; - for (int _i222 = 0; _i222 < _list220.size; ++_i222) - { - _elem221 = iprot.readString(); - _elem218.add(_elem221); - } - iprot.readListEnd(); - } - struct.measurementsList.add(_elem218); - } - iprot.readListEnd(); - } - struct.setMeasurementsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VALUES_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list223 = iprot.readListBegin(); - struct.valuesList = new java.util.ArrayList(_list223.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem224; - for (int _i225 = 0; _i225 < _list223.size; ++_i225) - { - _elem224 = iprot.readBinary(); - struct.valuesList.add(_elem224); - } - iprot.readListEnd(); - } - struct.setValuesListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // TIMESTAMPS_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list226 = iprot.readListBegin(); - struct.timestampsList = new java.util.ArrayList(_list226.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem227; - for (int _i228 = 0; _i228 < _list226.size; ++_i228) - { - _elem227 = iprot.readBinary(); - struct.timestampsList.add(_elem227); - } - iprot.readListEnd(); - } - struct.setTimestampsListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // TYPES_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list229 = iprot.readListBegin(); - struct.typesList = new java.util.ArrayList>(_list229.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem230; - for (int _i231 = 0; _i231 < _list229.size; ++_i231) - { - { - org.apache.thrift.protocol.TList _list232 = iprot.readListBegin(); - _elem230 = new java.util.ArrayList(_list232.size); - int _elem233; - for (int _i234 = 0; _i234 < _list232.size; ++_i234) - { - _elem233 = iprot.readI32(); - _elem230.add(_elem233); - } - iprot.readListEnd(); - } - struct.typesList.add(_elem230); - } - iprot.readListEnd(); - } - struct.setTypesListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // SIZE_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list235 = iprot.readListBegin(); - struct.sizeList = new java.util.ArrayList(_list235.size); - int _elem236; - for (int _i237 = 0; _i237 < _list235.size; ++_i237) - { - _elem236 = iprot.readI32(); - struct.sizeList.add(_elem236); - } - iprot.readListEnd(); - } - struct.setSizeListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // IS_ALIGNED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSInsertTabletsReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPaths != null) { - oprot.writeFieldBegin(PREFIX_PATHS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.prefixPaths.size())); - for (java.lang.String _iter238 : struct.prefixPaths) - { - oprot.writeString(_iter238); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.measurementsList != null) { - oprot.writeFieldBegin(MEASUREMENTS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.measurementsList.size())); - for (java.util.List _iter239 : struct.measurementsList) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter239.size())); - for (java.lang.String _iter240 : _iter239) - { - oprot.writeString(_iter240); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.valuesList != null) { - oprot.writeFieldBegin(VALUES_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valuesList.size())); - for (java.nio.ByteBuffer _iter241 : struct.valuesList) - { - oprot.writeBinary(_iter241); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.timestampsList != null) { - oprot.writeFieldBegin(TIMESTAMPS_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.timestampsList.size())); - for (java.nio.ByteBuffer _iter242 : struct.timestampsList) - { - oprot.writeBinary(_iter242); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.typesList != null) { - oprot.writeFieldBegin(TYPES_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.typesList.size())); - for (java.util.List _iter243 : struct.typesList) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, _iter243.size())); - for (int _iter244 : _iter243) - { - oprot.writeI32(_iter244); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.sizeList != null) { - oprot.writeFieldBegin(SIZE_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.sizeList.size())); - for (int _iter245 : struct.sizeList) - { - oprot.writeI32(_iter245); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetIsAligned()) { - oprot.writeFieldBegin(IS_ALIGNED_FIELD_DESC); - oprot.writeBool(struct.isAligned); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSInsertTabletsReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSInsertTabletsReqTupleScheme getScheme() { - return new TSInsertTabletsReqTupleScheme(); - } - } - - private static class TSInsertTabletsReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSInsertTabletsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - { - oprot.writeI32(struct.prefixPaths.size()); - for (java.lang.String _iter246 : struct.prefixPaths) - { - oprot.writeString(_iter246); - } - } - { - oprot.writeI32(struct.measurementsList.size()); - for (java.util.List _iter247 : struct.measurementsList) - { - { - oprot.writeI32(_iter247.size()); - for (java.lang.String _iter248 : _iter247) - { - oprot.writeString(_iter248); - } - } - } - } - { - oprot.writeI32(struct.valuesList.size()); - for (java.nio.ByteBuffer _iter249 : struct.valuesList) - { - oprot.writeBinary(_iter249); - } - } - { - oprot.writeI32(struct.timestampsList.size()); - for (java.nio.ByteBuffer _iter250 : struct.timestampsList) - { - oprot.writeBinary(_iter250); - } - } - { - oprot.writeI32(struct.typesList.size()); - for (java.util.List _iter251 : struct.typesList) - { - { - oprot.writeI32(_iter251.size()); - for (int _iter252 : _iter251) - { - oprot.writeI32(_iter252); - } - } - } - } - { - oprot.writeI32(struct.sizeList.size()); - for (int _iter253 : struct.sizeList) - { - oprot.writeI32(_iter253); - } - } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetIsAligned()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetIsAligned()) { - oprot.writeBool(struct.isAligned); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSInsertTabletsReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - { - org.apache.thrift.protocol.TList _list254 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.prefixPaths = new java.util.ArrayList(_list254.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem255; - for (int _i256 = 0; _i256 < _list254.size; ++_i256) - { - _elem255 = iprot.readString(); - struct.prefixPaths.add(_elem255); - } - } - struct.setPrefixPathsIsSet(true); - { - org.apache.thrift.protocol.TList _list257 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); - struct.measurementsList = new java.util.ArrayList>(_list257.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem258; - for (int _i259 = 0; _i259 < _list257.size; ++_i259) - { - { - org.apache.thrift.protocol.TList _list260 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - _elem258 = new java.util.ArrayList(_list260.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem261; - for (int _i262 = 0; _i262 < _list260.size; ++_i262) - { - _elem261 = iprot.readString(); - _elem258.add(_elem261); - } - } - struct.measurementsList.add(_elem258); - } - } - struct.setMeasurementsListIsSet(true); - { - org.apache.thrift.protocol.TList _list263 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.valuesList = new java.util.ArrayList(_list263.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem264; - for (int _i265 = 0; _i265 < _list263.size; ++_i265) - { - _elem264 = iprot.readBinary(); - struct.valuesList.add(_elem264); - } - } - struct.setValuesListIsSet(true); - { - org.apache.thrift.protocol.TList _list266 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.timestampsList = new java.util.ArrayList(_list266.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem267; - for (int _i268 = 0; _i268 < _list266.size; ++_i268) - { - _elem267 = iprot.readBinary(); - struct.timestampsList.add(_elem267); - } - } - struct.setTimestampsListIsSet(true); - { - org.apache.thrift.protocol.TList _list269 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST); - struct.typesList = new java.util.ArrayList>(_list269.size); - @org.apache.thrift.annotation.Nullable java.util.List _elem270; - for (int _i271 = 0; _i271 < _list269.size; ++_i271) - { - { - org.apache.thrift.protocol.TList _list272 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - _elem270 = new java.util.ArrayList(_list272.size); - int _elem273; - for (int _i274 = 0; _i274 < _list272.size; ++_i274) - { - _elem273 = iprot.readI32(); - _elem270.add(_elem273); - } - } - struct.typesList.add(_elem270); - } - } - struct.setTypesListIsSet(true); - { - org.apache.thrift.protocol.TList _list275 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); - struct.sizeList = new java.util.ArrayList(_list275.size); - int _elem276; - for (int _i277 = 0; _i277 < _list275.size; ++_i277) - { - _elem276 = iprot.readI32(); - struct.sizeList.add(_elem276); - } - } - struct.setSizeListIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.isAligned = iprot.readBool(); - struct.setIsAlignedIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSLastDataQueryReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSLastDataQueryReq.java deleted file mode 100644 index 01b56d63f9f56..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSLastDataQueryReq.java +++ /dev/null @@ -1,1213 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSLastDataQueryReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSLastDataQueryReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField ENABLE_REDIRECT_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("enableRedirectQuery", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField JDBC_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("jdbcQuery", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)8); - private static final org.apache.thrift.protocol.TField LEGAL_PATH_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("legalPathNodes", org.apache.thrift.protocol.TType.BOOL, (short)9); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSLastDataQueryReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSLastDataQueryReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List paths; // required - public int fetchSize; // optional - public long time; // required - public long statementId; // required - public boolean enableRedirectQuery; // optional - public boolean jdbcQuery; // optional - public long timeout; // optional - public boolean legalPathNodes; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PATHS((short)2, "paths"), - FETCH_SIZE((short)3, "fetchSize"), - TIME((short)4, "time"), - STATEMENT_ID((short)5, "statementId"), - ENABLE_REDIRECT_QUERY((short)6, "enableRedirectQuery"), - JDBC_QUERY((short)7, "jdbcQuery"), - TIMEOUT((short)8, "timeout"), - LEGAL_PATH_NODES((short)9, "legalPathNodes"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PATHS - return PATHS; - case 3: // FETCH_SIZE - return FETCH_SIZE; - case 4: // TIME - return TIME; - case 5: // STATEMENT_ID - return STATEMENT_ID; - case 6: // ENABLE_REDIRECT_QUERY - return ENABLE_REDIRECT_QUERY; - case 7: // JDBC_QUERY - return JDBC_QUERY; - case 8: // TIMEOUT - return TIMEOUT; - case 9: // LEGAL_PATH_NODES - return LEGAL_PATH_NODES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __FETCHSIZE_ISSET_ID = 1; - private static final int __TIME_ISSET_ID = 2; - private static final int __STATEMENTID_ISSET_ID = 3; - private static final int __ENABLEREDIRECTQUERY_ISSET_ID = 4; - private static final int __JDBCQUERY_ISSET_ID = 5; - private static final int __TIMEOUT_ISSET_ID = 6; - private static final int __LEGALPATHNODES_ISSET_ID = 7; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.FETCH_SIZE,_Fields.ENABLE_REDIRECT_QUERY,_Fields.JDBC_QUERY,_Fields.TIMEOUT,_Fields.LEGAL_PATH_NODES}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.ENABLE_REDIRECT_QUERY, new org.apache.thrift.meta_data.FieldMetaData("enableRedirectQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.JDBC_QUERY, new org.apache.thrift.meta_data.FieldMetaData("jdbcQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LEGAL_PATH_NODES, new org.apache.thrift.meta_data.FieldMetaData("legalPathNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSLastDataQueryReq.class, metaDataMap); - } - - public TSLastDataQueryReq() { - } - - public TSLastDataQueryReq( - long sessionId, - java.util.List paths, - long time, - long statementId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.paths = paths; - this.time = time; - setTimeIsSet(true); - this.statementId = statementId; - setStatementIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSLastDataQueryReq(TSLastDataQueryReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPaths()) { - java.util.List __this__paths = new java.util.ArrayList(other.paths); - this.paths = __this__paths; - } - this.fetchSize = other.fetchSize; - this.time = other.time; - this.statementId = other.statementId; - this.enableRedirectQuery = other.enableRedirectQuery; - this.jdbcQuery = other.jdbcQuery; - this.timeout = other.timeout; - this.legalPathNodes = other.legalPathNodes; - } - - @Override - public TSLastDataQueryReq deepCopy() { - return new TSLastDataQueryReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.paths = null; - setFetchSizeIsSet(false); - this.fetchSize = 0; - setTimeIsSet(false); - this.time = 0; - setStatementIdIsSet(false); - this.statementId = 0; - setEnableRedirectQueryIsSet(false); - this.enableRedirectQuery = false; - setJdbcQueryIsSet(false); - this.jdbcQuery = false; - setTimeoutIsSet(false); - this.timeout = 0; - setLegalPathNodesIsSet(false); - this.legalPathNodes = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSLastDataQueryReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getPathsSize() { - return (this.paths == null) ? 0 : this.paths.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getPathsIterator() { - return (this.paths == null) ? null : this.paths.iterator(); - } - - public void addToPaths(java.lang.String elem) { - if (this.paths == null) { - this.paths = new java.util.ArrayList(); - } - this.paths.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getPaths() { - return this.paths; - } - - public TSLastDataQueryReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { - this.paths = paths; - return this; - } - - public void unsetPaths() { - this.paths = null; - } - - /** Returns true if field paths is set (has been assigned a value) and false otherwise */ - public boolean isSetPaths() { - return this.paths != null; - } - - public void setPathsIsSet(boolean value) { - if (!value) { - this.paths = null; - } - } - - public int getFetchSize() { - return this.fetchSize; - } - - public TSLastDataQueryReq setFetchSize(int fetchSize) { - this.fetchSize = fetchSize; - setFetchSizeIsSet(true); - return this; - } - - public void unsetFetchSize() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ - public boolean isSetFetchSize() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - public void setFetchSizeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); - } - - public long getTime() { - return this.time; - } - - public TSLastDataQueryReq setTime(long time) { - this.time = time; - setTimeIsSet(true); - return this; - } - - public void unsetTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_ISSET_ID); - } - - /** Returns true if field time is set (has been assigned a value) and false otherwise */ - public boolean isSetTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID); - } - - public void setTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_ISSET_ID, value); - } - - public long getStatementId() { - return this.statementId; - } - - public TSLastDataQueryReq setStatementId(long statementId) { - this.statementId = statementId; - setStatementIdIsSet(true); - return this; - } - - public void unsetStatementId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ - public boolean isSetStatementId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - public void setStatementIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); - } - - public boolean isEnableRedirectQuery() { - return this.enableRedirectQuery; - } - - public TSLastDataQueryReq setEnableRedirectQuery(boolean enableRedirectQuery) { - this.enableRedirectQuery = enableRedirectQuery; - setEnableRedirectQueryIsSet(true); - return this; - } - - public void unsetEnableRedirectQuery() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); - } - - /** Returns true if field enableRedirectQuery is set (has been assigned a value) and false otherwise */ - public boolean isSetEnableRedirectQuery() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); - } - - public void setEnableRedirectQueryIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID, value); - } - - public boolean isJdbcQuery() { - return this.jdbcQuery; - } - - public TSLastDataQueryReq setJdbcQuery(boolean jdbcQuery) { - this.jdbcQuery = jdbcQuery; - setJdbcQueryIsSet(true); - return this; - } - - public void unsetJdbcQuery() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); - } - - /** Returns true if field jdbcQuery is set (has been assigned a value) and false otherwise */ - public boolean isSetJdbcQuery() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); - } - - public void setJdbcQueryIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JDBCQUERY_ISSET_ID, value); - } - - public long getTimeout() { - return this.timeout; - } - - public TSLastDataQueryReq setTimeout(long timeout) { - this.timeout = timeout; - setTimeoutIsSet(true); - return this; - } - - public void unsetTimeout() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeout() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - public void setTimeoutIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); - } - - public boolean isLegalPathNodes() { - return this.legalPathNodes; - } - - public TSLastDataQueryReq setLegalPathNodes(boolean legalPathNodes) { - this.legalPathNodes = legalPathNodes; - setLegalPathNodesIsSet(true); - return this; - } - - public void unsetLegalPathNodes() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); - } - - /** Returns true if field legalPathNodes is set (has been assigned a value) and false otherwise */ - public boolean isSetLegalPathNodes() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); - } - - public void setLegalPathNodesIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PATHS: - if (value == null) { - unsetPaths(); - } else { - setPaths((java.util.List)value); - } - break; - - case FETCH_SIZE: - if (value == null) { - unsetFetchSize(); - } else { - setFetchSize((java.lang.Integer)value); - } - break; - - case TIME: - if (value == null) { - unsetTime(); - } else { - setTime((java.lang.Long)value); - } - break; - - case STATEMENT_ID: - if (value == null) { - unsetStatementId(); - } else { - setStatementId((java.lang.Long)value); - } - break; - - case ENABLE_REDIRECT_QUERY: - if (value == null) { - unsetEnableRedirectQuery(); - } else { - setEnableRedirectQuery((java.lang.Boolean)value); - } - break; - - case JDBC_QUERY: - if (value == null) { - unsetJdbcQuery(); - } else { - setJdbcQuery((java.lang.Boolean)value); - } - break; - - case TIMEOUT: - if (value == null) { - unsetTimeout(); - } else { - setTimeout((java.lang.Long)value); - } - break; - - case LEGAL_PATH_NODES: - if (value == null) { - unsetLegalPathNodes(); - } else { - setLegalPathNodes((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PATHS: - return getPaths(); - - case FETCH_SIZE: - return getFetchSize(); - - case TIME: - return getTime(); - - case STATEMENT_ID: - return getStatementId(); - - case ENABLE_REDIRECT_QUERY: - return isEnableRedirectQuery(); - - case JDBC_QUERY: - return isJdbcQuery(); - - case TIMEOUT: - return getTimeout(); - - case LEGAL_PATH_NODES: - return isLegalPathNodes(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PATHS: - return isSetPaths(); - case FETCH_SIZE: - return isSetFetchSize(); - case TIME: - return isSetTime(); - case STATEMENT_ID: - return isSetStatementId(); - case ENABLE_REDIRECT_QUERY: - return isSetEnableRedirectQuery(); - case JDBC_QUERY: - return isSetJdbcQuery(); - case TIMEOUT: - return isSetTimeout(); - case LEGAL_PATH_NODES: - return isSetLegalPathNodes(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSLastDataQueryReq) - return this.equals((TSLastDataQueryReq)that); - return false; - } - - public boolean equals(TSLastDataQueryReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_paths = true && this.isSetPaths(); - boolean that_present_paths = true && that.isSetPaths(); - if (this_present_paths || that_present_paths) { - if (!(this_present_paths && that_present_paths)) - return false; - if (!this.paths.equals(that.paths)) - return false; - } - - boolean this_present_fetchSize = true && this.isSetFetchSize(); - boolean that_present_fetchSize = true && that.isSetFetchSize(); - if (this_present_fetchSize || that_present_fetchSize) { - if (!(this_present_fetchSize && that_present_fetchSize)) - return false; - if (this.fetchSize != that.fetchSize) - return false; - } - - boolean this_present_time = true; - boolean that_present_time = true; - if (this_present_time || that_present_time) { - if (!(this_present_time && that_present_time)) - return false; - if (this.time != that.time) - return false; - } - - boolean this_present_statementId = true; - boolean that_present_statementId = true; - if (this_present_statementId || that_present_statementId) { - if (!(this_present_statementId && that_present_statementId)) - return false; - if (this.statementId != that.statementId) - return false; - } - - boolean this_present_enableRedirectQuery = true && this.isSetEnableRedirectQuery(); - boolean that_present_enableRedirectQuery = true && that.isSetEnableRedirectQuery(); - if (this_present_enableRedirectQuery || that_present_enableRedirectQuery) { - if (!(this_present_enableRedirectQuery && that_present_enableRedirectQuery)) - return false; - if (this.enableRedirectQuery != that.enableRedirectQuery) - return false; - } - - boolean this_present_jdbcQuery = true && this.isSetJdbcQuery(); - boolean that_present_jdbcQuery = true && that.isSetJdbcQuery(); - if (this_present_jdbcQuery || that_present_jdbcQuery) { - if (!(this_present_jdbcQuery && that_present_jdbcQuery)) - return false; - if (this.jdbcQuery != that.jdbcQuery) - return false; - } - - boolean this_present_timeout = true && this.isSetTimeout(); - boolean that_present_timeout = true && that.isSetTimeout(); - if (this_present_timeout || that_present_timeout) { - if (!(this_present_timeout && that_present_timeout)) - return false; - if (this.timeout != that.timeout) - return false; - } - - boolean this_present_legalPathNodes = true && this.isSetLegalPathNodes(); - boolean that_present_legalPathNodes = true && that.isSetLegalPathNodes(); - if (this_present_legalPathNodes || that_present_legalPathNodes) { - if (!(this_present_legalPathNodes && that_present_legalPathNodes)) - return false; - if (this.legalPathNodes != that.legalPathNodes) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); - if (isSetPaths()) - hashCode = hashCode * 8191 + paths.hashCode(); - - hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); - if (isSetFetchSize()) - hashCode = hashCode * 8191 + fetchSize; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(time); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); - - hashCode = hashCode * 8191 + ((isSetEnableRedirectQuery()) ? 131071 : 524287); - if (isSetEnableRedirectQuery()) - hashCode = hashCode * 8191 + ((enableRedirectQuery) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetJdbcQuery()) ? 131071 : 524287); - if (isSetJdbcQuery()) - hashCode = hashCode * 8191 + ((jdbcQuery) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); - if (isSetTimeout()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); - - hashCode = hashCode * 8191 + ((isSetLegalPathNodes()) ? 131071 : 524287); - if (isSetLegalPathNodes()) - hashCode = hashCode * 8191 + ((legalPathNodes) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSLastDataQueryReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPaths()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFetchSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTime(), other.isSetTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time, other.time); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatementId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEnableRedirectQuery(), other.isSetEnableRedirectQuery()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnableRedirectQuery()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableRedirectQuery, other.enableRedirectQuery); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetJdbcQuery(), other.isSetJdbcQuery()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetJdbcQuery()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jdbcQuery, other.jdbcQuery); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetLegalPathNodes(), other.isSetLegalPathNodes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLegalPathNodes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legalPathNodes, other.legalPathNodes); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSLastDataQueryReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("paths:"); - if (this.paths == null) { - sb.append("null"); - } else { - sb.append(this.paths); - } - first = false; - if (isSetFetchSize()) { - if (!first) sb.append(", "); - sb.append("fetchSize:"); - sb.append(this.fetchSize); - first = false; - } - if (!first) sb.append(", "); - sb.append("time:"); - sb.append(this.time); - first = false; - if (!first) sb.append(", "); - sb.append("statementId:"); - sb.append(this.statementId); - first = false; - if (isSetEnableRedirectQuery()) { - if (!first) sb.append(", "); - sb.append("enableRedirectQuery:"); - sb.append(this.enableRedirectQuery); - first = false; - } - if (isSetJdbcQuery()) { - if (!first) sb.append(", "); - sb.append("jdbcQuery:"); - sb.append(this.jdbcQuery); - first = false; - } - if (isSetTimeout()) { - if (!first) sb.append(", "); - sb.append("timeout:"); - sb.append(this.timeout); - first = false; - } - if (isSetLegalPathNodes()) { - if (!first) sb.append(", "); - sb.append("legalPathNodes:"); - sb.append(this.legalPathNodes); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (paths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); - } - // alas, we cannot check 'time' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSLastDataQueryReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSLastDataQueryReqStandardScheme getScheme() { - return new TSLastDataQueryReqStandardScheme(); - } - } - - private static class TSLastDataQueryReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSLastDataQueryReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATHS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list560 = iprot.readListBegin(); - struct.paths = new java.util.ArrayList(_list560.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem561; - for (int _i562 = 0; _i562 < _list560.size; ++_i562) - { - _elem561 = iprot.readString(); - struct.paths.add(_elem561); - } - iprot.readListEnd(); - } - struct.setPathsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FETCH_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.time = iprot.readI64(); - struct.setTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // STATEMENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // ENABLE_REDIRECT_QUERY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.enableRedirectQuery = iprot.readBool(); - struct.setEnableRedirectQueryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // JDBC_QUERY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.jdbcQuery = iprot.readBool(); - struct.setJdbcQueryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // TIMEOUT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // LEGAL_PATH_NODES - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.legalPathNodes = iprot.readBool(); - struct.setLegalPathNodesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetTime()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'time' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetStatementId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSLastDataQueryReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.paths != null) { - oprot.writeFieldBegin(PATHS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); - for (java.lang.String _iter563 : struct.paths) - { - oprot.writeString(_iter563); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetFetchSize()) { - oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); - oprot.writeI32(struct.fetchSize); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(TIME_FIELD_DESC); - oprot.writeI64(struct.time); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); - oprot.writeI64(struct.statementId); - oprot.writeFieldEnd(); - if (struct.isSetEnableRedirectQuery()) { - oprot.writeFieldBegin(ENABLE_REDIRECT_QUERY_FIELD_DESC); - oprot.writeBool(struct.enableRedirectQuery); - oprot.writeFieldEnd(); - } - if (struct.isSetJdbcQuery()) { - oprot.writeFieldBegin(JDBC_QUERY_FIELD_DESC); - oprot.writeBool(struct.jdbcQuery); - oprot.writeFieldEnd(); - } - if (struct.isSetTimeout()) { - oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); - oprot.writeI64(struct.timeout); - oprot.writeFieldEnd(); - } - if (struct.isSetLegalPathNodes()) { - oprot.writeFieldBegin(LEGAL_PATH_NODES_FIELD_DESC); - oprot.writeBool(struct.legalPathNodes); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSLastDataQueryReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSLastDataQueryReqTupleScheme getScheme() { - return new TSLastDataQueryReqTupleScheme(); - } - } - - private static class TSLastDataQueryReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSLastDataQueryReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - { - oprot.writeI32(struct.paths.size()); - for (java.lang.String _iter564 : struct.paths) - { - oprot.writeString(_iter564); - } - } - oprot.writeI64(struct.time); - oprot.writeI64(struct.statementId); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetFetchSize()) { - optionals.set(0); - } - if (struct.isSetEnableRedirectQuery()) { - optionals.set(1); - } - if (struct.isSetJdbcQuery()) { - optionals.set(2); - } - if (struct.isSetTimeout()) { - optionals.set(3); - } - if (struct.isSetLegalPathNodes()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetFetchSize()) { - oprot.writeI32(struct.fetchSize); - } - if (struct.isSetEnableRedirectQuery()) { - oprot.writeBool(struct.enableRedirectQuery); - } - if (struct.isSetJdbcQuery()) { - oprot.writeBool(struct.jdbcQuery); - } - if (struct.isSetTimeout()) { - oprot.writeI64(struct.timeout); - } - if (struct.isSetLegalPathNodes()) { - oprot.writeBool(struct.legalPathNodes); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSLastDataQueryReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - { - org.apache.thrift.protocol.TList _list565 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.paths = new java.util.ArrayList(_list565.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem566; - for (int _i567 = 0; _i567 < _list565.size; ++_i567) - { - _elem566 = iprot.readString(); - struct.paths.add(_elem566); - } - } - struct.setPathsIsSet(true); - struct.time = iprot.readI64(); - struct.setTimeIsSet(true); - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } - if (incoming.get(1)) { - struct.enableRedirectQuery = iprot.readBool(); - struct.setEnableRedirectQueryIsSet(true); - } - if (incoming.get(2)) { - struct.jdbcQuery = iprot.readBool(); - struct.setJdbcQueryIsSet(true); - } - if (incoming.get(3)) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } - if (incoming.get(4)) { - struct.legalPathNodes = iprot.readBool(); - struct.setLegalPathNodesIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionReq.java deleted file mode 100644 index 2f030bb01d9c4..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionReq.java +++ /dev/null @@ -1,872 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSOpenSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSOpenSessionReq"); - - private static final org.apache.thrift.protocol.TField CLIENT_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("client_protocol", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField ZONE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("zoneId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)5); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSOpenSessionReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSOpenSessionReqTupleSchemeFactory(); - - /** - * - * @see TSProtocolVersion - */ - public @org.apache.thrift.annotation.Nullable TSProtocolVersion client_protocol; // required - public @org.apache.thrift.annotation.Nullable java.lang.String zoneId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String username; // required - public @org.apache.thrift.annotation.Nullable java.lang.String password; // optional - public @org.apache.thrift.annotation.Nullable java.util.Map configuration; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * - * @see TSProtocolVersion - */ - CLIENT_PROTOCOL((short)1, "client_protocol"), - ZONE_ID((short)2, "zoneId"), - USERNAME((short)3, "username"), - PASSWORD((short)4, "password"), - CONFIGURATION((short)5, "configuration"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // CLIENT_PROTOCOL - return CLIENT_PROTOCOL; - case 2: // ZONE_ID - return ZONE_ID; - case 3: // USERNAME - return USERNAME; - case 4: // PASSWORD - return PASSWORD; - case 5: // CONFIGURATION - return CONFIGURATION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.PASSWORD,_Fields.CONFIGURATION}; - 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.CLIENT_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("client_protocol", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TSProtocolVersion.class))); - tmpMap.put(_Fields.ZONE_ID, new org.apache.thrift.meta_data.FieldMetaData("zoneId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSOpenSessionReq.class, metaDataMap); - } - - public TSOpenSessionReq() { - this.client_protocol = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V3; - - } - - public TSOpenSessionReq( - TSProtocolVersion client_protocol, - java.lang.String zoneId, - java.lang.String username) - { - this(); - this.client_protocol = client_protocol; - this.zoneId = zoneId; - this.username = username; - } - - /** - * Performs a deep copy on other. - */ - public TSOpenSessionReq(TSOpenSessionReq other) { - if (other.isSetClient_protocol()) { - this.client_protocol = other.client_protocol; - } - if (other.isSetZoneId()) { - this.zoneId = other.zoneId; - } - if (other.isSetUsername()) { - this.username = other.username; - } - if (other.isSetPassword()) { - this.password = other.password; - } - if (other.isSetConfiguration()) { - java.util.Map __this__configuration = new java.util.HashMap(other.configuration); - this.configuration = __this__configuration; - } - } - - @Override - public TSOpenSessionReq deepCopy() { - return new TSOpenSessionReq(this); - } - - @Override - public void clear() { - this.client_protocol = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V3; - - this.zoneId = null; - this.username = null; - this.password = null; - this.configuration = null; - } - - /** - * - * @see TSProtocolVersion - */ - @org.apache.thrift.annotation.Nullable - public TSProtocolVersion getClient_protocol() { - return this.client_protocol; - } - - /** - * - * @see TSProtocolVersion - */ - public TSOpenSessionReq setClient_protocol(@org.apache.thrift.annotation.Nullable TSProtocolVersion client_protocol) { - this.client_protocol = client_protocol; - return this; - } - - public void unsetClient_protocol() { - this.client_protocol = null; - } - - /** Returns true if field client_protocol is set (has been assigned a value) and false otherwise */ - public boolean isSetClient_protocol() { - return this.client_protocol != null; - } - - public void setClient_protocolIsSet(boolean value) { - if (!value) { - this.client_protocol = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getZoneId() { - return this.zoneId; - } - - public TSOpenSessionReq setZoneId(@org.apache.thrift.annotation.Nullable java.lang.String zoneId) { - this.zoneId = zoneId; - return this; - } - - public void unsetZoneId() { - this.zoneId = null; - } - - /** Returns true if field zoneId is set (has been assigned a value) and false otherwise */ - public boolean isSetZoneId() { - return this.zoneId != null; - } - - public void setZoneIdIsSet(boolean value) { - if (!value) { - this.zoneId = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getUsername() { - return this.username; - } - - public TSOpenSessionReq setUsername(@org.apache.thrift.annotation.Nullable java.lang.String username) { - this.username = username; - return this; - } - - public void unsetUsername() { - this.username = null; - } - - /** Returns true if field username is set (has been assigned a value) and false otherwise */ - public boolean isSetUsername() { - return this.username != null; - } - - public void setUsernameIsSet(boolean value) { - if (!value) { - this.username = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPassword() { - return this.password; - } - - public TSOpenSessionReq setPassword(@org.apache.thrift.annotation.Nullable java.lang.String password) { - this.password = password; - return this; - } - - public void unsetPassword() { - this.password = null; - } - - /** Returns true if field password is set (has been assigned a value) and false otherwise */ - public boolean isSetPassword() { - return this.password != null; - } - - public void setPasswordIsSet(boolean value) { - if (!value) { - this.password = null; - } - } - - public int getConfigurationSize() { - return (this.configuration == null) ? 0 : this.configuration.size(); - } - - public void putToConfiguration(java.lang.String key, java.lang.String val) { - if (this.configuration == null) { - this.configuration = new java.util.HashMap(); - } - this.configuration.put(key, val); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Map getConfiguration() { - return this.configuration; - } - - public TSOpenSessionReq setConfiguration(@org.apache.thrift.annotation.Nullable java.util.Map configuration) { - this.configuration = configuration; - return this; - } - - public void unsetConfiguration() { - this.configuration = null; - } - - /** Returns true if field configuration is set (has been assigned a value) and false otherwise */ - public boolean isSetConfiguration() { - return this.configuration != null; - } - - public void setConfigurationIsSet(boolean value) { - if (!value) { - this.configuration = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case CLIENT_PROTOCOL: - if (value == null) { - unsetClient_protocol(); - } else { - setClient_protocol((TSProtocolVersion)value); - } - break; - - case ZONE_ID: - if (value == null) { - unsetZoneId(); - } else { - setZoneId((java.lang.String)value); - } - break; - - case USERNAME: - if (value == null) { - unsetUsername(); - } else { - setUsername((java.lang.String)value); - } - break; - - case PASSWORD: - if (value == null) { - unsetPassword(); - } else { - setPassword((java.lang.String)value); - } - break; - - case CONFIGURATION: - if (value == null) { - unsetConfiguration(); - } else { - setConfiguration((java.util.Map)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case CLIENT_PROTOCOL: - return getClient_protocol(); - - case ZONE_ID: - return getZoneId(); - - case USERNAME: - return getUsername(); - - case PASSWORD: - return getPassword(); - - case CONFIGURATION: - return getConfiguration(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case CLIENT_PROTOCOL: - return isSetClient_protocol(); - case ZONE_ID: - return isSetZoneId(); - case USERNAME: - return isSetUsername(); - case PASSWORD: - return isSetPassword(); - case CONFIGURATION: - return isSetConfiguration(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSOpenSessionReq) - return this.equals((TSOpenSessionReq)that); - return false; - } - - public boolean equals(TSOpenSessionReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_client_protocol = true && this.isSetClient_protocol(); - boolean that_present_client_protocol = true && that.isSetClient_protocol(); - if (this_present_client_protocol || that_present_client_protocol) { - if (!(this_present_client_protocol && that_present_client_protocol)) - return false; - if (!this.client_protocol.equals(that.client_protocol)) - return false; - } - - boolean this_present_zoneId = true && this.isSetZoneId(); - boolean that_present_zoneId = true && that.isSetZoneId(); - if (this_present_zoneId || that_present_zoneId) { - if (!(this_present_zoneId && that_present_zoneId)) - return false; - if (!this.zoneId.equals(that.zoneId)) - return false; - } - - boolean this_present_username = true && this.isSetUsername(); - boolean that_present_username = true && that.isSetUsername(); - if (this_present_username || that_present_username) { - if (!(this_present_username && that_present_username)) - return false; - if (!this.username.equals(that.username)) - return false; - } - - boolean this_present_password = true && this.isSetPassword(); - boolean that_present_password = true && that.isSetPassword(); - if (this_present_password || that_present_password) { - if (!(this_present_password && that_present_password)) - return false; - if (!this.password.equals(that.password)) - return false; - } - - boolean this_present_configuration = true && this.isSetConfiguration(); - boolean that_present_configuration = true && that.isSetConfiguration(); - if (this_present_configuration || that_present_configuration) { - if (!(this_present_configuration && that_present_configuration)) - return false; - if (!this.configuration.equals(that.configuration)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetClient_protocol()) ? 131071 : 524287); - if (isSetClient_protocol()) - hashCode = hashCode * 8191 + client_protocol.getValue(); - - hashCode = hashCode * 8191 + ((isSetZoneId()) ? 131071 : 524287); - if (isSetZoneId()) - hashCode = hashCode * 8191 + zoneId.hashCode(); - - hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287); - if (isSetUsername()) - hashCode = hashCode * 8191 + username.hashCode(); - - hashCode = hashCode * 8191 + ((isSetPassword()) ? 131071 : 524287); - if (isSetPassword()) - hashCode = hashCode * 8191 + password.hashCode(); - - hashCode = hashCode * 8191 + ((isSetConfiguration()) ? 131071 : 524287); - if (isSetConfiguration()) - hashCode = hashCode * 8191 + configuration.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSOpenSessionReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetClient_protocol(), other.isSetClient_protocol()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetClient_protocol()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.client_protocol, other.client_protocol); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetZoneId(), other.isSetZoneId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetZoneId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.zoneId, other.zoneId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetUsername(), other.isSetUsername()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUsername()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPassword(), other.isSetPassword()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPassword()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetConfiguration(), other.isSetConfiguration()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetConfiguration()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSOpenSessionReq("); - boolean first = true; - - sb.append("client_protocol:"); - if (this.client_protocol == null) { - sb.append("null"); - } else { - sb.append(this.client_protocol); - } - first = false; - if (!first) sb.append(", "); - sb.append("zoneId:"); - if (this.zoneId == null) { - sb.append("null"); - } else { - sb.append(this.zoneId); - } - first = false; - if (!first) sb.append(", "); - sb.append("username:"); - if (this.username == null) { - sb.append("null"); - } else { - sb.append(this.username); - } - first = false; - if (isSetPassword()) { - if (!first) sb.append(", "); - sb.append("password:"); - if (this.password == null) { - sb.append("null"); - } else { - sb.append(this.password); - } - first = false; - } - if (isSetConfiguration()) { - if (!first) sb.append(", "); - sb.append("configuration:"); - if (this.configuration == null) { - sb.append("null"); - } else { - sb.append(this.configuration); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (client_protocol == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'client_protocol' was not present! Struct: " + toString()); - } - if (zoneId == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'zoneId' was not present! Struct: " + toString()); - } - if (username == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class TSOpenSessionReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSOpenSessionReqStandardScheme getScheme() { - return new TSOpenSessionReqStandardScheme(); - } - } - - private static class TSOpenSessionReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSOpenSessionReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // CLIENT_PROTOCOL - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.client_protocol = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.findByValue(iprot.readI32()); - struct.setClient_protocolIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ZONE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.zoneId = iprot.readString(); - struct.setZoneIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // USERNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.username = iprot.readString(); - struct.setUsernameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // PASSWORD - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.password = iprot.readString(); - struct.setPasswordIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // CONFIGURATION - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map116 = iprot.readMapBegin(); - struct.configuration = new java.util.HashMap(2*_map116.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key117; - @org.apache.thrift.annotation.Nullable java.lang.String _val118; - for (int _i119 = 0; _i119 < _map116.size; ++_i119) - { - _key117 = iprot.readString(); - _val118 = iprot.readString(); - struct.configuration.put(_key117, _val118); - } - iprot.readMapEnd(); - } - struct.setConfigurationIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSOpenSessionReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.client_protocol != null) { - oprot.writeFieldBegin(CLIENT_PROTOCOL_FIELD_DESC); - oprot.writeI32(struct.client_protocol.getValue()); - oprot.writeFieldEnd(); - } - if (struct.zoneId != null) { - oprot.writeFieldBegin(ZONE_ID_FIELD_DESC); - oprot.writeString(struct.zoneId); - oprot.writeFieldEnd(); - } - if (struct.username != null) { - oprot.writeFieldBegin(USERNAME_FIELD_DESC); - oprot.writeString(struct.username); - oprot.writeFieldEnd(); - } - if (struct.password != null) { - if (struct.isSetPassword()) { - oprot.writeFieldBegin(PASSWORD_FIELD_DESC); - oprot.writeString(struct.password); - oprot.writeFieldEnd(); - } - } - if (struct.configuration != null) { - if (struct.isSetConfiguration()) { - oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size())); - for (java.util.Map.Entry _iter120 : struct.configuration.entrySet()) - { - oprot.writeString(_iter120.getKey()); - oprot.writeString(_iter120.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSOpenSessionReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSOpenSessionReqTupleScheme getScheme() { - return new TSOpenSessionReqTupleScheme(); - } - } - - private static class TSOpenSessionReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSOpenSessionReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI32(struct.client_protocol.getValue()); - oprot.writeString(struct.zoneId); - oprot.writeString(struct.username); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetPassword()) { - optionals.set(0); - } - if (struct.isSetConfiguration()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPassword()) { - oprot.writeString(struct.password); - } - if (struct.isSetConfiguration()) { - { - oprot.writeI32(struct.configuration.size()); - for (java.util.Map.Entry _iter121 : struct.configuration.entrySet()) - { - oprot.writeString(_iter121.getKey()); - oprot.writeString(_iter121.getValue()); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSOpenSessionReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.client_protocol = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.findByValue(iprot.readI32()); - struct.setClient_protocolIsSet(true); - struct.zoneId = iprot.readString(); - struct.setZoneIdIsSet(true); - struct.username = iprot.readString(); - struct.setUsernameIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.password = iprot.readString(); - struct.setPasswordIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TMap _map122 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - struct.configuration = new java.util.HashMap(2*_map122.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key123; - @org.apache.thrift.annotation.Nullable java.lang.String _val124; - for (int _i125 = 0; _i125 < _map122.size; ++_i125) - { - _key123 = iprot.readString(); - _val124 = iprot.readString(); - struct.configuration.put(_key123, _val124); - } - } - struct.setConfigurationIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionResp.java deleted file mode 100644 index 3318c7bcb2c6f..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSOpenSessionResp.java +++ /dev/null @@ -1,772 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSOpenSessionResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSOpenSessionResp"); - - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField SERVER_PROTOCOL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("serverProtocolVersion", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSOpenSessionRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSOpenSessionRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required - /** - * - * @see TSProtocolVersion - */ - public @org.apache.thrift.annotation.Nullable TSProtocolVersion serverProtocolVersion; // required - public long sessionId; // optional - public @org.apache.thrift.annotation.Nullable java.util.Map configuration; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATUS((short)1, "status"), - /** - * - * @see TSProtocolVersion - */ - SERVER_PROTOCOL_VERSION((short)2, "serverProtocolVersion"), - SESSION_ID((short)3, "sessionId"), - CONFIGURATION((short)4, "configuration"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATUS - return STATUS; - case 2: // SERVER_PROTOCOL_VERSION - return SERVER_PROTOCOL_VERSION; - case 3: // SESSION_ID - return SESSION_ID; - case 4: // CONFIGURATION - return CONFIGURATION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.SESSION_ID,_Fields.CONFIGURATION}; - 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - tmpMap.put(_Fields.SERVER_PROTOCOL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("serverProtocolVersion", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TSProtocolVersion.class))); - tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSOpenSessionResp.class, metaDataMap); - } - - public TSOpenSessionResp() { - this.serverProtocolVersion = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V1; - - } - - public TSOpenSessionResp( - org.apache.iotdb.common.rpc.thrift.TSStatus status, - TSProtocolVersion serverProtocolVersion) - { - this(); - this.status = status; - this.serverProtocolVersion = serverProtocolVersion; - } - - /** - * Performs a deep copy on other. - */ - public TSOpenSessionResp(TSOpenSessionResp other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetStatus()) { - this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); - } - if (other.isSetServerProtocolVersion()) { - this.serverProtocolVersion = other.serverProtocolVersion; - } - this.sessionId = other.sessionId; - if (other.isSetConfiguration()) { - java.util.Map __this__configuration = new java.util.HashMap(other.configuration); - this.configuration = __this__configuration; - } - } - - @Override - public TSOpenSessionResp deepCopy() { - return new TSOpenSessionResp(this); - } - - @Override - public void clear() { - this.status = null; - this.serverProtocolVersion = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V1; - - setSessionIdIsSet(false); - this.sessionId = 0; - this.configuration = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { - return this.status; - } - - public TSOpenSessionResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { - this.status = status; - return this; - } - - public void unsetStatus() { - this.status = null; - } - - /** Returns true if field status is set (has been assigned a value) and false otherwise */ - public boolean isSetStatus() { - return this.status != null; - } - - public void setStatusIsSet(boolean value) { - if (!value) { - this.status = null; - } - } - - /** - * - * @see TSProtocolVersion - */ - @org.apache.thrift.annotation.Nullable - public TSProtocolVersion getServerProtocolVersion() { - return this.serverProtocolVersion; - } - - /** - * - * @see TSProtocolVersion - */ - public TSOpenSessionResp setServerProtocolVersion(@org.apache.thrift.annotation.Nullable TSProtocolVersion serverProtocolVersion) { - this.serverProtocolVersion = serverProtocolVersion; - return this; - } - - public void unsetServerProtocolVersion() { - this.serverProtocolVersion = null; - } - - /** Returns true if field serverProtocolVersion is set (has been assigned a value) and false otherwise */ - public boolean isSetServerProtocolVersion() { - return this.serverProtocolVersion != null; - } - - public void setServerProtocolVersionIsSet(boolean value) { - if (!value) { - this.serverProtocolVersion = null; - } - } - - public long getSessionId() { - return this.sessionId; - } - - public TSOpenSessionResp setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getConfigurationSize() { - return (this.configuration == null) ? 0 : this.configuration.size(); - } - - public void putToConfiguration(java.lang.String key, java.lang.String val) { - if (this.configuration == null) { - this.configuration = new java.util.HashMap(); - } - this.configuration.put(key, val); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Map getConfiguration() { - return this.configuration; - } - - public TSOpenSessionResp setConfiguration(@org.apache.thrift.annotation.Nullable java.util.Map configuration) { - this.configuration = configuration; - return this; - } - - public void unsetConfiguration() { - this.configuration = null; - } - - /** Returns true if field configuration is set (has been assigned a value) and false otherwise */ - public boolean isSetConfiguration() { - return this.configuration != null; - } - - public void setConfigurationIsSet(boolean value) { - if (!value) { - this.configuration = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - case SERVER_PROTOCOL_VERSION: - if (value == null) { - unsetServerProtocolVersion(); - } else { - setServerProtocolVersion((TSProtocolVersion)value); - } - break; - - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case CONFIGURATION: - if (value == null) { - unsetConfiguration(); - } else { - setConfiguration((java.util.Map)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case STATUS: - return getStatus(); - - case SERVER_PROTOCOL_VERSION: - return getServerProtocolVersion(); - - case SESSION_ID: - return getSessionId(); - - case CONFIGURATION: - return getConfiguration(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case STATUS: - return isSetStatus(); - case SERVER_PROTOCOL_VERSION: - return isSetServerProtocolVersion(); - case SESSION_ID: - return isSetSessionId(); - case CONFIGURATION: - return isSetConfiguration(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSOpenSessionResp) - return this.equals((TSOpenSessionResp)that); - return false; - } - - public boolean equals(TSOpenSessionResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_status = true && this.isSetStatus(); - boolean that_present_status = true && that.isSetStatus(); - if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) - return false; - if (!this.status.equals(that.status)) - return false; - } - - boolean this_present_serverProtocolVersion = true && this.isSetServerProtocolVersion(); - boolean that_present_serverProtocolVersion = true && that.isSetServerProtocolVersion(); - if (this_present_serverProtocolVersion || that_present_serverProtocolVersion) { - if (!(this_present_serverProtocolVersion && that_present_serverProtocolVersion)) - return false; - if (!this.serverProtocolVersion.equals(that.serverProtocolVersion)) - return false; - } - - boolean this_present_sessionId = true && this.isSetSessionId(); - boolean that_present_sessionId = true && that.isSetSessionId(); - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_configuration = true && this.isSetConfiguration(); - boolean that_present_configuration = true && that.isSetConfiguration(); - if (this_present_configuration || that_present_configuration) { - if (!(this_present_configuration && that_present_configuration)) - return false; - if (!this.configuration.equals(that.configuration)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); - if (isSetStatus()) - hashCode = hashCode * 8191 + status.hashCode(); - - hashCode = hashCode * 8191 + ((isSetServerProtocolVersion()) ? 131071 : 524287); - if (isSetServerProtocolVersion()) - hashCode = hashCode * 8191 + serverProtocolVersion.getValue(); - - hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287); - if (isSetSessionId()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetConfiguration()) ? 131071 : 524287); - if (isSetConfiguration()) - hashCode = hashCode * 8191 + configuration.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSOpenSessionResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetServerProtocolVersion(), other.isSetServerProtocolVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetServerProtocolVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverProtocolVersion, other.serverProtocolVersion); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetConfiguration(), other.isSetConfiguration()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetConfiguration()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSOpenSessionResp("); - boolean first = true; - - sb.append("status:"); - if (this.status == null) { - sb.append("null"); - } else { - sb.append(this.status); - } - first = false; - if (!first) sb.append(", "); - sb.append("serverProtocolVersion:"); - if (this.serverProtocolVersion == null) { - sb.append("null"); - } else { - sb.append(this.serverProtocolVersion); - } - first = false; - if (isSetSessionId()) { - if (!first) sb.append(", "); - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - } - if (isSetConfiguration()) { - if (!first) sb.append(", "); - sb.append("configuration:"); - if (this.configuration == null) { - sb.append("null"); - } else { - sb.append(this.configuration); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (status == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); - } - if (serverProtocolVersion == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'serverProtocolVersion' was not present! Struct: " + toString()); - } - // check for sub-struct validity - if (status != null) { - status.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSOpenSessionRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSOpenSessionRespStandardScheme getScheme() { - return new TSOpenSessionRespStandardScheme(); - } - } - - private static class TSOpenSessionRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSOpenSessionResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SERVER_PROTOCOL_VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.serverProtocolVersion = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.findByValue(iprot.readI32()); - struct.setServerProtocolVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // CONFIGURATION - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map106 = iprot.readMapBegin(); - struct.configuration = new java.util.HashMap(2*_map106.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key107; - @org.apache.thrift.annotation.Nullable java.lang.String _val108; - for (int _i109 = 0; _i109 < _map106.size; ++_i109) - { - _key107 = iprot.readString(); - _val108 = iprot.readString(); - struct.configuration.put(_key107, _val108); - } - iprot.readMapEnd(); - } - struct.setConfigurationIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSOpenSessionResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.status != null) { - oprot.writeFieldBegin(STATUS_FIELD_DESC); - struct.status.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.serverProtocolVersion != null) { - oprot.writeFieldBegin(SERVER_PROTOCOL_VERSION_FIELD_DESC); - oprot.writeI32(struct.serverProtocolVersion.getValue()); - oprot.writeFieldEnd(); - } - if (struct.isSetSessionId()) { - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - } - if (struct.configuration != null) { - if (struct.isSetConfiguration()) { - oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size())); - for (java.util.Map.Entry _iter110 : struct.configuration.entrySet()) - { - oprot.writeString(_iter110.getKey()); - oprot.writeString(_iter110.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSOpenSessionRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSOpenSessionRespTupleScheme getScheme() { - return new TSOpenSessionRespTupleScheme(); - } - } - - private static class TSOpenSessionRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSOpenSessionResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status.write(oprot); - oprot.writeI32(struct.serverProtocolVersion.getValue()); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSessionId()) { - optionals.set(0); - } - if (struct.isSetConfiguration()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSessionId()) { - oprot.writeI64(struct.sessionId); - } - if (struct.isSetConfiguration()) { - { - oprot.writeI32(struct.configuration.size()); - for (java.util.Map.Entry _iter111 : struct.configuration.entrySet()) - { - oprot.writeString(_iter111.getKey()); - oprot.writeString(_iter111.getValue()); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSOpenSessionResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - struct.serverProtocolVersion = org.apache.iotdb.service.rpc.thrift.TSProtocolVersion.findByValue(iprot.readI32()); - struct.setServerProtocolVersionIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TMap _map112 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); - struct.configuration = new java.util.HashMap(2*_map112.size); - @org.apache.thrift.annotation.Nullable java.lang.String _key113; - @org.apache.thrift.annotation.Nullable java.lang.String _val114; - for (int _i115 = 0; _i115 < _map112.size; ++_i115) - { - _key113 = iprot.readString(); - _val114 = iprot.readString(); - struct.configuration.put(_key113, _val114); - } - } - struct.setConfigurationIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java deleted file mode 100644 index 266a3a661a478..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSProtocolVersion.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - - -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public enum TSProtocolVersion implements org.apache.thrift.TEnum { - IOTDB_SERVICE_PROTOCOL_V1(0), - IOTDB_SERVICE_PROTOCOL_V2(1), - IOTDB_SERVICE_PROTOCOL_V3(2); - - private final int value; - - private TSProtocolVersion(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - @Override - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - @org.apache.thrift.annotation.Nullable - public static TSProtocolVersion findByValue(int value) { - switch (value) { - case 0: - return IOTDB_SERVICE_PROTOCOL_V1; - case 1: - return IOTDB_SERVICE_PROTOCOL_V2; - case 2: - return IOTDB_SERVICE_PROTOCOL_V3; - default: - return null; - } - } -} diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSPruneSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSPruneSchemaTemplateReq.java deleted file mode 100644 index 4bd55feb94cb5..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSPruneSchemaTemplateReq.java +++ /dev/null @@ -1,579 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSPruneSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSPruneSchemaTemplateReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSPruneSchemaTemplateReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSPruneSchemaTemplateReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String name; // required - public @org.apache.thrift.annotation.Nullable java.lang.String path; // 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 { - SESSION_ID((short)1, "sessionId"), - NAME((short)2, "name"), - PATH((short)3, "path"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // NAME - return NAME; - case 3: // PATH - return PATH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSPruneSchemaTemplateReq.class, metaDataMap); - } - - public TSPruneSchemaTemplateReq() { - } - - public TSPruneSchemaTemplateReq( - long sessionId, - java.lang.String name, - java.lang.String path) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.name = name; - this.path = path; - } - - /** - * Performs a deep copy on other. - */ - public TSPruneSchemaTemplateReq(TSPruneSchemaTemplateReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetPath()) { - this.path = other.path; - } - } - - @Override - public TSPruneSchemaTemplateReq deepCopy() { - return new TSPruneSchemaTemplateReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.name = null; - this.path = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSPruneSchemaTemplateReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getName() { - return this.name; - } - - public TSPruneSchemaTemplateReq setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPath() { - return this.path; - } - - public TSPruneSchemaTemplateReq setPath(@org.apache.thrift.annotation.Nullable java.lang.String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((java.lang.String)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case NAME: - return getName(); - - case PATH: - return getPath(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case NAME: - return isSetName(); - case PATH: - return isSetPath(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSPruneSchemaTemplateReq) - return this.equals((TSPruneSchemaTemplateReq)that); - return false; - } - - public boolean equals(TSPruneSchemaTemplateReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); - if (isSetName()) - hashCode = hashCode * 8191 + name.hashCode(); - - hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287); - if (isSetPath()) - hashCode = hashCode * 8191 + path.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSPruneSchemaTemplateReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPath(), other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSPruneSchemaTemplateReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (name == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); - } - if (path == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'path' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSPruneSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSPruneSchemaTemplateReqStandardScheme getScheme() { - return new TSPruneSchemaTemplateReqStandardScheme(); - } - } - - private static class TSPruneSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSPruneSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSPruneSchemaTemplateReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSPruneSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSPruneSchemaTemplateReqTupleScheme getScheme() { - return new TSPruneSchemaTemplateReqTupleScheme(); - } - } - - private static class TSPruneSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSPruneSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.name); - oprot.writeString(struct.path); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSPruneSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.name = iprot.readString(); - struct.setNameIsSet(true); - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java deleted file mode 100644 index d9df17def3e8d..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryDataSet.java +++ /dev/null @@ -1,696 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSQueryDataSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryDataSet"); - - private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField VALUE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valueList", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField BITMAP_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("bitmapList", org.apache.thrift.protocol.TType.LIST, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryDataSetStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryDataSetTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer time; // required - public @org.apache.thrift.annotation.Nullable java.util.List valueList; // required - public @org.apache.thrift.annotation.Nullable java.util.List bitmapList; // 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 { - TIME((short)1, "time"), - VALUE_LIST((short)2, "valueList"), - BITMAP_LIST((short)3, "bitmapList"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TIME - return TIME; - case 2: // VALUE_LIST - return VALUE_LIST; - case 3: // BITMAP_LIST - return BITMAP_LIST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.VALUE_LIST, new org.apache.thrift.meta_data.FieldMetaData("valueList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.BITMAP_LIST, new org.apache.thrift.meta_data.FieldMetaData("bitmapList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryDataSet.class, metaDataMap); - } - - public TSQueryDataSet() { - } - - public TSQueryDataSet( - java.nio.ByteBuffer time, - java.util.List valueList, - java.util.List bitmapList) - { - this(); - this.time = org.apache.thrift.TBaseHelper.copyBinary(time); - this.valueList = valueList; - this.bitmapList = bitmapList; - } - - /** - * Performs a deep copy on other. - */ - public TSQueryDataSet(TSQueryDataSet other) { - if (other.isSetTime()) { - this.time = org.apache.thrift.TBaseHelper.copyBinary(other.time); - } - if (other.isSetValueList()) { - java.util.List __this__valueList = new java.util.ArrayList(other.valueList); - this.valueList = __this__valueList; - } - if (other.isSetBitmapList()) { - java.util.List __this__bitmapList = new java.util.ArrayList(other.bitmapList); - this.bitmapList = __this__bitmapList; - } - } - - @Override - public TSQueryDataSet deepCopy() { - return new TSQueryDataSet(this); - } - - @Override - public void clear() { - this.time = null; - this.valueList = null; - this.bitmapList = null; - } - - public byte[] getTime() { - setTime(org.apache.thrift.TBaseHelper.rightSize(time)); - return time == null ? null : time.array(); - } - - public java.nio.ByteBuffer bufferForTime() { - return org.apache.thrift.TBaseHelper.copyBinary(time); - } - - public TSQueryDataSet setTime(byte[] time) { - this.time = time == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(time.clone()); - return this; - } - - public TSQueryDataSet setTime(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer time) { - this.time = org.apache.thrift.TBaseHelper.copyBinary(time); - return this; - } - - public void unsetTime() { - this.time = null; - } - - /** Returns true if field time is set (has been assigned a value) and false otherwise */ - public boolean isSetTime() { - return this.time != null; - } - - public void setTimeIsSet(boolean value) { - if (!value) { - this.time = null; - } - } - - public int getValueListSize() { - return (this.valueList == null) ? 0 : this.valueList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getValueListIterator() { - return (this.valueList == null) ? null : this.valueList.iterator(); - } - - public void addToValueList(java.nio.ByteBuffer elem) { - if (this.valueList == null) { - this.valueList = new java.util.ArrayList(); - } - this.valueList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getValueList() { - return this.valueList; - } - - public TSQueryDataSet setValueList(@org.apache.thrift.annotation.Nullable java.util.List valueList) { - this.valueList = valueList; - return this; - } - - public void unsetValueList() { - this.valueList = null; - } - - /** Returns true if field valueList is set (has been assigned a value) and false otherwise */ - public boolean isSetValueList() { - return this.valueList != null; - } - - public void setValueListIsSet(boolean value) { - if (!value) { - this.valueList = null; - } - } - - public int getBitmapListSize() { - return (this.bitmapList == null) ? 0 : this.bitmapList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getBitmapListIterator() { - return (this.bitmapList == null) ? null : this.bitmapList.iterator(); - } - - public void addToBitmapList(java.nio.ByteBuffer elem) { - if (this.bitmapList == null) { - this.bitmapList = new java.util.ArrayList(); - } - this.bitmapList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getBitmapList() { - return this.bitmapList; - } - - public TSQueryDataSet setBitmapList(@org.apache.thrift.annotation.Nullable java.util.List bitmapList) { - this.bitmapList = bitmapList; - return this; - } - - public void unsetBitmapList() { - this.bitmapList = null; - } - - /** Returns true if field bitmapList is set (has been assigned a value) and false otherwise */ - public boolean isSetBitmapList() { - return this.bitmapList != null; - } - - public void setBitmapListIsSet(boolean value) { - if (!value) { - this.bitmapList = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TIME: - if (value == null) { - unsetTime(); - } else { - if (value instanceof byte[]) { - setTime((byte[])value); - } else { - setTime((java.nio.ByteBuffer)value); - } - } - break; - - case VALUE_LIST: - if (value == null) { - unsetValueList(); - } else { - setValueList((java.util.List)value); - } - break; - - case BITMAP_LIST: - if (value == null) { - unsetBitmapList(); - } else { - setBitmapList((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TIME: - return getTime(); - - case VALUE_LIST: - return getValueList(); - - case BITMAP_LIST: - return getBitmapList(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TIME: - return isSetTime(); - case VALUE_LIST: - return isSetValueList(); - case BITMAP_LIST: - return isSetBitmapList(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSQueryDataSet) - return this.equals((TSQueryDataSet)that); - return false; - } - - public boolean equals(TSQueryDataSet that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_time = true && this.isSetTime(); - boolean that_present_time = true && that.isSetTime(); - if (this_present_time || that_present_time) { - if (!(this_present_time && that_present_time)) - return false; - if (!this.time.equals(that.time)) - return false; - } - - boolean this_present_valueList = true && this.isSetValueList(); - boolean that_present_valueList = true && that.isSetValueList(); - if (this_present_valueList || that_present_valueList) { - if (!(this_present_valueList && that_present_valueList)) - return false; - if (!this.valueList.equals(that.valueList)) - return false; - } - - boolean this_present_bitmapList = true && this.isSetBitmapList(); - boolean that_present_bitmapList = true && that.isSetBitmapList(); - if (this_present_bitmapList || that_present_bitmapList) { - if (!(this_present_bitmapList && that_present_bitmapList)) - return false; - if (!this.bitmapList.equals(that.bitmapList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetTime()) ? 131071 : 524287); - if (isSetTime()) - hashCode = hashCode * 8191 + time.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValueList()) ? 131071 : 524287); - if (isSetValueList()) - hashCode = hashCode * 8191 + valueList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetBitmapList()) ? 131071 : 524287); - if (isSetBitmapList()) - hashCode = hashCode * 8191 + bitmapList.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSQueryDataSet other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTime(), other.isSetTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time, other.time); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValueList(), other.isSetValueList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValueList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueList, other.valueList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetBitmapList(), other.isSetBitmapList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBitmapList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitmapList, other.bitmapList); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryDataSet("); - boolean first = true; - - sb.append("time:"); - if (this.time == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.time, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("valueList:"); - if (this.valueList == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.valueList, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("bitmapList:"); - if (this.bitmapList == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.bitmapList, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (time == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'time' was not present! Struct: " + toString()); - } - if (valueList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueList' was not present! Struct: " + toString()); - } - if (bitmapList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'bitmapList' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class TSQueryDataSetStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSQueryDataSetStandardScheme getScheme() { - return new TSQueryDataSetStandardScheme(); - } - } - - private static class TSQueryDataSetStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryDataSet struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TIME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.time = iprot.readBinary(); - struct.setTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // VALUE_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.valueList = new java.util.ArrayList(_list0.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem1; - for (int _i2 = 0; _i2 < _list0.size; ++_i2) - { - _elem1 = iprot.readBinary(); - struct.valueList.add(_elem1); - } - iprot.readListEnd(); - } - struct.setValueListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // BITMAP_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); - struct.bitmapList = new java.util.ArrayList(_list3.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem4; - for (int _i5 = 0; _i5 < _list3.size; ++_i5) - { - _elem4 = iprot.readBinary(); - struct.bitmapList.add(_elem4); - } - iprot.readListEnd(); - } - struct.setBitmapListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryDataSet struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.time != null) { - oprot.writeFieldBegin(TIME_FIELD_DESC); - oprot.writeBinary(struct.time); - oprot.writeFieldEnd(); - } - if (struct.valueList != null) { - oprot.writeFieldBegin(VALUE_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valueList.size())); - for (java.nio.ByteBuffer _iter6 : struct.valueList) - { - oprot.writeBinary(_iter6); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.bitmapList != null) { - oprot.writeFieldBegin(BITMAP_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.bitmapList.size())); - for (java.nio.ByteBuffer _iter7 : struct.bitmapList) - { - oprot.writeBinary(_iter7); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSQueryDataSetTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSQueryDataSetTupleScheme getScheme() { - return new TSQueryDataSetTupleScheme(); - } - } - - private static class TSQueryDataSetTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryDataSet struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeBinary(struct.time); - { - oprot.writeI32(struct.valueList.size()); - for (java.nio.ByteBuffer _iter8 : struct.valueList) - { - oprot.writeBinary(_iter8); - } - } - { - oprot.writeI32(struct.bitmapList.size()); - for (java.nio.ByteBuffer _iter9 : struct.bitmapList) - { - oprot.writeBinary(_iter9); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryDataSet struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.time = iprot.readBinary(); - struct.setTimeIsSet(true); - { - org.apache.thrift.protocol.TList _list10 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.valueList = new java.util.ArrayList(_list10.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem11; - for (int _i12 = 0; _i12 < _list10.size; ++_i12) - { - _elem11 = iprot.readBinary(); - struct.valueList.add(_elem11); - } - } - struct.setValueListIsSet(true); - { - org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.bitmapList = new java.util.ArrayList(_list13.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem14; - for (int _i15 = 0; _i15 < _list13.size; ++_i15) - { - _elem14 = iprot.readBinary(); - struct.bitmapList.add(_elem14); - } - } - struct.setBitmapListIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java deleted file mode 100644 index 23f0149373b02..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryNonAlignDataSet.java +++ /dev/null @@ -1,582 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSQueryNonAlignDataSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryNonAlignDataSet"); - - private static final org.apache.thrift.protocol.TField TIME_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("timeList", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField VALUE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valueList", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryNonAlignDataSetStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryNonAlignDataSetTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.util.List timeList; // required - public @org.apache.thrift.annotation.Nullable java.util.List valueList; // 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 { - TIME_LIST((short)1, "timeList"), - VALUE_LIST((short)2, "valueList"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TIME_LIST - return TIME_LIST; - case 2: // VALUE_LIST - return VALUE_LIST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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.TIME_LIST, new org.apache.thrift.meta_data.FieldMetaData("timeList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.VALUE_LIST, new org.apache.thrift.meta_data.FieldMetaData("valueList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryNonAlignDataSet.class, metaDataMap); - } - - public TSQueryNonAlignDataSet() { - } - - public TSQueryNonAlignDataSet( - java.util.List timeList, - java.util.List valueList) - { - this(); - this.timeList = timeList; - this.valueList = valueList; - } - - /** - * Performs a deep copy on other. - */ - public TSQueryNonAlignDataSet(TSQueryNonAlignDataSet other) { - if (other.isSetTimeList()) { - java.util.List __this__timeList = new java.util.ArrayList(other.timeList); - this.timeList = __this__timeList; - } - if (other.isSetValueList()) { - java.util.List __this__valueList = new java.util.ArrayList(other.valueList); - this.valueList = __this__valueList; - } - } - - @Override - public TSQueryNonAlignDataSet deepCopy() { - return new TSQueryNonAlignDataSet(this); - } - - @Override - public void clear() { - this.timeList = null; - this.valueList = null; - } - - public int getTimeListSize() { - return (this.timeList == null) ? 0 : this.timeList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getTimeListIterator() { - return (this.timeList == null) ? null : this.timeList.iterator(); - } - - public void addToTimeList(java.nio.ByteBuffer elem) { - if (this.timeList == null) { - this.timeList = new java.util.ArrayList(); - } - this.timeList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getTimeList() { - return this.timeList; - } - - public TSQueryNonAlignDataSet setTimeList(@org.apache.thrift.annotation.Nullable java.util.List timeList) { - this.timeList = timeList; - return this; - } - - public void unsetTimeList() { - this.timeList = null; - } - - /** Returns true if field timeList is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeList() { - return this.timeList != null; - } - - public void setTimeListIsSet(boolean value) { - if (!value) { - this.timeList = null; - } - } - - public int getValueListSize() { - return (this.valueList == null) ? 0 : this.valueList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getValueListIterator() { - return (this.valueList == null) ? null : this.valueList.iterator(); - } - - public void addToValueList(java.nio.ByteBuffer elem) { - if (this.valueList == null) { - this.valueList = new java.util.ArrayList(); - } - this.valueList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getValueList() { - return this.valueList; - } - - public TSQueryNonAlignDataSet setValueList(@org.apache.thrift.annotation.Nullable java.util.List valueList) { - this.valueList = valueList; - return this; - } - - public void unsetValueList() { - this.valueList = null; - } - - /** Returns true if field valueList is set (has been assigned a value) and false otherwise */ - public boolean isSetValueList() { - return this.valueList != null; - } - - public void setValueListIsSet(boolean value) { - if (!value) { - this.valueList = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TIME_LIST: - if (value == null) { - unsetTimeList(); - } else { - setTimeList((java.util.List)value); - } - break; - - case VALUE_LIST: - if (value == null) { - unsetValueList(); - } else { - setValueList((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TIME_LIST: - return getTimeList(); - - case VALUE_LIST: - return getValueList(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TIME_LIST: - return isSetTimeList(); - case VALUE_LIST: - return isSetValueList(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSQueryNonAlignDataSet) - return this.equals((TSQueryNonAlignDataSet)that); - return false; - } - - public boolean equals(TSQueryNonAlignDataSet that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_timeList = true && this.isSetTimeList(); - boolean that_present_timeList = true && that.isSetTimeList(); - if (this_present_timeList || that_present_timeList) { - if (!(this_present_timeList && that_present_timeList)) - return false; - if (!this.timeList.equals(that.timeList)) - return false; - } - - boolean this_present_valueList = true && this.isSetValueList(); - boolean that_present_valueList = true && that.isSetValueList(); - if (this_present_valueList || that_present_valueList) { - if (!(this_present_valueList && that_present_valueList)) - return false; - if (!this.valueList.equals(that.valueList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetTimeList()) ? 131071 : 524287); - if (isSetTimeList()) - hashCode = hashCode * 8191 + timeList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetValueList()) ? 131071 : 524287); - if (isSetValueList()) - hashCode = hashCode * 8191 + valueList.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSQueryNonAlignDataSet other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTimeList(), other.isSetTimeList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeList, other.timeList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetValueList(), other.isSetValueList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValueList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueList, other.valueList); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryNonAlignDataSet("); - boolean first = true; - - sb.append("timeList:"); - if (this.timeList == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.timeList, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("valueList:"); - if (this.valueList == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.valueList, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (timeList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeList' was not present! Struct: " + toString()); - } - if (valueList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueList' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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); - } - } - - private static class TSQueryNonAlignDataSetStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSQueryNonAlignDataSetStandardScheme getScheme() { - return new TSQueryNonAlignDataSetStandardScheme(); - } - } - - private static class TSQueryNonAlignDataSetStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TIME_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); - struct.timeList = new java.util.ArrayList(_list16.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem17; - for (int _i18 = 0; _i18 < _list16.size; ++_i18) - { - _elem17 = iprot.readBinary(); - struct.timeList.add(_elem17); - } - iprot.readListEnd(); - } - struct.setTimeListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // VALUE_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list19 = iprot.readListBegin(); - struct.valueList = new java.util.ArrayList(_list19.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem20; - for (int _i21 = 0; _i21 < _list19.size; ++_i21) - { - _elem20 = iprot.readBinary(); - struct.valueList.add(_elem20); - } - iprot.readListEnd(); - } - struct.setValueListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.timeList != null) { - oprot.writeFieldBegin(TIME_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.timeList.size())); - for (java.nio.ByteBuffer _iter22 : struct.timeList) - { - oprot.writeBinary(_iter22); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.valueList != null) { - oprot.writeFieldBegin(VALUE_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valueList.size())); - for (java.nio.ByteBuffer _iter23 : struct.valueList) - { - oprot.writeBinary(_iter23); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSQueryNonAlignDataSetTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSQueryNonAlignDataSetTupleScheme getScheme() { - return new TSQueryNonAlignDataSetTupleScheme(); - } - } - - private static class TSQueryNonAlignDataSetTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - oprot.writeI32(struct.timeList.size()); - for (java.nio.ByteBuffer _iter24 : struct.timeList) - { - oprot.writeBinary(_iter24); - } - } - { - oprot.writeI32(struct.valueList.size()); - for (java.nio.ByteBuffer _iter25 : struct.valueList) - { - oprot.writeBinary(_iter25); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryNonAlignDataSet struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list26 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.timeList = new java.util.ArrayList(_list26.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem27; - for (int _i28 = 0; _i28 < _list26.size; ++_i28) - { - _elem27 = iprot.readBinary(); - struct.timeList.add(_elem27); - } - } - struct.setTimeListIsSet(true); - { - org.apache.thrift.protocol.TList _list29 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.valueList = new java.util.ArrayList(_list29.size); - @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem30; - for (int _i31 = 0; _i31 < _list29.size; ++_i31) - { - _elem30 = iprot.readBinary(); - struct.valueList.add(_elem30); - } - } - struct.setValueListIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateReq.java deleted file mode 100644 index 8ebdfc0ccdde9..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateReq.java +++ /dev/null @@ -1,682 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSQueryTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryTemplateReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField QUERY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryType", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField MEASUREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("measurement", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryTemplateReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryTemplateReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String name; // required - public int queryType; // required - public @org.apache.thrift.annotation.Nullable java.lang.String measurement; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - NAME((short)2, "name"), - QUERY_TYPE((short)3, "queryType"), - MEASUREMENT((short)4, "measurement"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // NAME - return NAME; - case 3: // QUERY_TYPE - return QUERY_TYPE; - case 4: // MEASUREMENT - return MEASUREMENT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __QUERYTYPE_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.MEASUREMENT}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.QUERY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("queryType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.MEASUREMENT, new org.apache.thrift.meta_data.FieldMetaData("measurement", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryTemplateReq.class, metaDataMap); - } - - public TSQueryTemplateReq() { - } - - public TSQueryTemplateReq( - long sessionId, - java.lang.String name, - int queryType) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.name = name; - this.queryType = queryType; - setQueryTypeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSQueryTemplateReq(TSQueryTemplateReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetName()) { - this.name = other.name; - } - this.queryType = other.queryType; - if (other.isSetMeasurement()) { - this.measurement = other.measurement; - } - } - - @Override - public TSQueryTemplateReq deepCopy() { - return new TSQueryTemplateReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.name = null; - setQueryTypeIsSet(false); - this.queryType = 0; - this.measurement = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSQueryTemplateReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getName() { - return this.name; - } - - public TSQueryTemplateReq setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public int getQueryType() { - return this.queryType; - } - - public TSQueryTemplateReq setQueryType(int queryType) { - this.queryType = queryType; - setQueryTypeIsSet(true); - return this; - } - - public void unsetQueryType() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYTYPE_ISSET_ID); - } - - /** Returns true if field queryType is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryType() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYTYPE_ISSET_ID); - } - - public void setQueryTypeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYTYPE_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getMeasurement() { - return this.measurement; - } - - public TSQueryTemplateReq setMeasurement(@org.apache.thrift.annotation.Nullable java.lang.String measurement) { - this.measurement = measurement; - return this; - } - - public void unsetMeasurement() { - this.measurement = null; - } - - /** Returns true if field measurement is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurement() { - return this.measurement != null; - } - - public void setMeasurementIsSet(boolean value) { - if (!value) { - this.measurement = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((java.lang.String)value); - } - break; - - case QUERY_TYPE: - if (value == null) { - unsetQueryType(); - } else { - setQueryType((java.lang.Integer)value); - } - break; - - case MEASUREMENT: - if (value == null) { - unsetMeasurement(); - } else { - setMeasurement((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case NAME: - return getName(); - - case QUERY_TYPE: - return getQueryType(); - - case MEASUREMENT: - return getMeasurement(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case NAME: - return isSetName(); - case QUERY_TYPE: - return isSetQueryType(); - case MEASUREMENT: - return isSetMeasurement(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSQueryTemplateReq) - return this.equals((TSQueryTemplateReq)that); - return false; - } - - public boolean equals(TSQueryTemplateReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_queryType = true; - boolean that_present_queryType = true; - if (this_present_queryType || that_present_queryType) { - if (!(this_present_queryType && that_present_queryType)) - return false; - if (this.queryType != that.queryType) - return false; - } - - boolean this_present_measurement = true && this.isSetMeasurement(); - boolean that_present_measurement = true && that.isSetMeasurement(); - if (this_present_measurement || that_present_measurement) { - if (!(this_present_measurement && that_present_measurement)) - return false; - if (!this.measurement.equals(that.measurement)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); - if (isSetName()) - hashCode = hashCode * 8191 + name.hashCode(); - - hashCode = hashCode * 8191 + queryType; - - hashCode = hashCode * 8191 + ((isSetMeasurement()) ? 131071 : 524287); - if (isSetMeasurement()) - hashCode = hashCode * 8191 + measurement.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSQueryTemplateReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryType(), other.isSetQueryType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryType, other.queryType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurement(), other.isSetMeasurement()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurement()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurement, other.measurement); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryTemplateReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("queryType:"); - sb.append(this.queryType); - first = false; - if (isSetMeasurement()) { - if (!first) sb.append(", "); - sb.append("measurement:"); - if (this.measurement == null) { - sb.append("null"); - } else { - sb.append(this.measurement); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (name == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); - } - // alas, we cannot check 'queryType' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSQueryTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSQueryTemplateReqStandardScheme getScheme() { - return new TSQueryTemplateReqStandardScheme(); - } - } - - private static class TSQueryTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // QUERY_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.queryType = iprot.readI32(); - struct.setQueryTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MEASUREMENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.measurement = iprot.readString(); - struct.setMeasurementIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetQueryType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryType' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryTemplateReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); - oprot.writeI32(struct.queryType); - oprot.writeFieldEnd(); - if (struct.measurement != null) { - if (struct.isSetMeasurement()) { - oprot.writeFieldBegin(MEASUREMENT_FIELD_DESC); - oprot.writeString(struct.measurement); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSQueryTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSQueryTemplateReqTupleScheme getScheme() { - return new TSQueryTemplateReqTupleScheme(); - } - } - - private static class TSQueryTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.name); - oprot.writeI32(struct.queryType); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetMeasurement()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetMeasurement()) { - oprot.writeString(struct.measurement); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.name = iprot.readString(); - struct.setNameIsSet(true); - struct.queryType = iprot.readI32(); - struct.setQueryTypeIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.measurement = iprot.readString(); - struct.setMeasurementIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateResp.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateResp.java deleted file mode 100644 index 9eae67b19404d..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSQueryTemplateResp.java +++ /dev/null @@ -1,842 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSQueryTemplateResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSQueryTemplateResp"); - - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField QUERY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryType", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.BOOL, (short)3); - private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurements", org.apache.thrift.protocol.TType.LIST, (short)5); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryTemplateRespStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryTemplateRespTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required - public int queryType; // required - public boolean result; // optional - public int count; // optional - public @org.apache.thrift.annotation.Nullable java.util.List measurements; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATUS((short)1, "status"), - QUERY_TYPE((short)2, "queryType"), - RESULT((short)3, "result"), - COUNT((short)4, "count"), - MEASUREMENTS((short)5, "measurements"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATUS - return STATUS; - case 2: // QUERY_TYPE - return QUERY_TYPE; - case 3: // RESULT - return RESULT; - case 4: // COUNT - return COUNT; - case 5: // MEASUREMENTS - return MEASUREMENTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __QUERYTYPE_ISSET_ID = 0; - private static final int __RESULT_ISSET_ID = 1; - private static final int __COUNT_ISSET_ID = 2; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.RESULT,_Fields.COUNT,_Fields.MEASUREMENTS}; - 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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSStatus.class))); - tmpMap.put(_Fields.QUERY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("queryType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("measurements", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryTemplateResp.class, metaDataMap); - } - - public TSQueryTemplateResp() { - } - - public TSQueryTemplateResp( - org.apache.iotdb.common.rpc.thrift.TSStatus status, - int queryType) - { - this(); - this.status = status; - this.queryType = queryType; - setQueryTypeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSQueryTemplateResp(TSQueryTemplateResp other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetStatus()) { - this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status); - } - this.queryType = other.queryType; - this.result = other.result; - this.count = other.count; - if (other.isSetMeasurements()) { - java.util.List __this__measurements = new java.util.ArrayList(other.measurements); - this.measurements = __this__measurements; - } - } - - @Override - public TSQueryTemplateResp deepCopy() { - return new TSQueryTemplateResp(this); - } - - @Override - public void clear() { - this.status = null; - setQueryTypeIsSet(false); - this.queryType = 0; - setResultIsSet(false); - this.result = false; - setCountIsSet(false); - this.count = 0; - this.measurements = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() { - return this.status; - } - - public TSQueryTemplateResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status) { - this.status = status; - return this; - } - - public void unsetStatus() { - this.status = null; - } - - /** Returns true if field status is set (has been assigned a value) and false otherwise */ - public boolean isSetStatus() { - return this.status != null; - } - - public void setStatusIsSet(boolean value) { - if (!value) { - this.status = null; - } - } - - public int getQueryType() { - return this.queryType; - } - - public TSQueryTemplateResp setQueryType(int queryType) { - this.queryType = queryType; - setQueryTypeIsSet(true); - return this; - } - - public void unsetQueryType() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYTYPE_ISSET_ID); - } - - /** Returns true if field queryType is set (has been assigned a value) and false otherwise */ - public boolean isSetQueryType() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYTYPE_ISSET_ID); - } - - public void setQueryTypeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYTYPE_ISSET_ID, value); - } - - public boolean isResult() { - return this.result; - } - - public TSQueryTemplateResp setResult(boolean result) { - this.result = result; - setResultIsSet(true); - return this; - } - - public void unsetResult() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RESULT_ISSET_ID); - } - - /** Returns true if field result is set (has been assigned a value) and false otherwise */ - public boolean isSetResult() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RESULT_ISSET_ID); - } - - public void setResultIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESULT_ISSET_ID, value); - } - - public int getCount() { - return this.count; - } - - public TSQueryTemplateResp setCount(int count) { - this.count = count; - setCountIsSet(true); - return this; - } - - public void unsetCount() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID); - } - - /** Returns true if field count is set (has been assigned a value) and false otherwise */ - public boolean isSetCount() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID); - } - - public void setCountIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value); - } - - public int getMeasurementsSize() { - return (this.measurements == null) ? 0 : this.measurements.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getMeasurementsIterator() { - return (this.measurements == null) ? null : this.measurements.iterator(); - } - - public void addToMeasurements(java.lang.String elem) { - if (this.measurements == null) { - this.measurements = new java.util.ArrayList(); - } - this.measurements.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getMeasurements() { - return this.measurements; - } - - public TSQueryTemplateResp setMeasurements(@org.apache.thrift.annotation.Nullable java.util.List measurements) { - this.measurements = measurements; - return this; - } - - public void unsetMeasurements() { - this.measurements = null; - } - - /** Returns true if field measurements is set (has been assigned a value) and false otherwise */ - public boolean isSetMeasurements() { - return this.measurements != null; - } - - public void setMeasurementsIsSet(boolean value) { - if (!value) { - this.measurements = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((org.apache.iotdb.common.rpc.thrift.TSStatus)value); - } - break; - - case QUERY_TYPE: - if (value == null) { - unsetQueryType(); - } else { - setQueryType((java.lang.Integer)value); - } - break; - - case RESULT: - if (value == null) { - unsetResult(); - } else { - setResult((java.lang.Boolean)value); - } - break; - - case COUNT: - if (value == null) { - unsetCount(); - } else { - setCount((java.lang.Integer)value); - } - break; - - case MEASUREMENTS: - if (value == null) { - unsetMeasurements(); - } else { - setMeasurements((java.util.List)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case STATUS: - return getStatus(); - - case QUERY_TYPE: - return getQueryType(); - - case RESULT: - return isResult(); - - case COUNT: - return getCount(); - - case MEASUREMENTS: - return getMeasurements(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case STATUS: - return isSetStatus(); - case QUERY_TYPE: - return isSetQueryType(); - case RESULT: - return isSetResult(); - case COUNT: - return isSetCount(); - case MEASUREMENTS: - return isSetMeasurements(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSQueryTemplateResp) - return this.equals((TSQueryTemplateResp)that); - return false; - } - - public boolean equals(TSQueryTemplateResp that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_status = true && this.isSetStatus(); - boolean that_present_status = true && that.isSetStatus(); - if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) - return false; - if (!this.status.equals(that.status)) - return false; - } - - boolean this_present_queryType = true; - boolean that_present_queryType = true; - if (this_present_queryType || that_present_queryType) { - if (!(this_present_queryType && that_present_queryType)) - return false; - if (this.queryType != that.queryType) - return false; - } - - boolean this_present_result = true && this.isSetResult(); - boolean that_present_result = true && that.isSetResult(); - if (this_present_result || that_present_result) { - if (!(this_present_result && that_present_result)) - return false; - if (this.result != that.result) - return false; - } - - boolean this_present_count = true && this.isSetCount(); - boolean that_present_count = true && that.isSetCount(); - if (this_present_count || that_present_count) { - if (!(this_present_count && that_present_count)) - return false; - if (this.count != that.count) - return false; - } - - boolean this_present_measurements = true && this.isSetMeasurements(); - boolean that_present_measurements = true && that.isSetMeasurements(); - if (this_present_measurements || that_present_measurements) { - if (!(this_present_measurements && that_present_measurements)) - return false; - if (!this.measurements.equals(that.measurements)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); - if (isSetStatus()) - hashCode = hashCode * 8191 + status.hashCode(); - - hashCode = hashCode * 8191 + queryType; - - hashCode = hashCode * 8191 + ((isSetResult()) ? 131071 : 524287); - if (isSetResult()) - hashCode = hashCode * 8191 + ((result) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetCount()) ? 131071 : 524287); - if (isSetCount()) - hashCode = hashCode * 8191 + count; - - hashCode = hashCode * 8191 + ((isSetMeasurements()) ? 131071 : 524287); - if (isSetMeasurements()) - hashCode = hashCode * 8191 + measurements.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSQueryTemplateResp other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetQueryType(), other.isSetQueryType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQueryType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryType, other.queryType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetResult(), other.isSetResult()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetResult()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, other.result); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCount(), other.isSetCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, other.count); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMeasurements(), other.isSetMeasurements()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMeasurements()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurements, other.measurements); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSQueryTemplateResp("); - boolean first = true; - - sb.append("status:"); - if (this.status == null) { - sb.append("null"); - } else { - sb.append(this.status); - } - first = false; - if (!first) sb.append(", "); - sb.append("queryType:"); - sb.append(this.queryType); - first = false; - if (isSetResult()) { - if (!first) sb.append(", "); - sb.append("result:"); - sb.append(this.result); - first = false; - } - if (isSetCount()) { - if (!first) sb.append(", "); - sb.append("count:"); - sb.append(this.count); - first = false; - } - if (isSetMeasurements()) { - if (!first) sb.append(", "); - sb.append("measurements:"); - if (this.measurements == null) { - sb.append("null"); - } else { - sb.append(this.measurements); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (status == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); - } - // alas, we cannot check 'queryType' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - if (status != null) { - status.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSQueryTemplateRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSQueryTemplateRespStandardScheme getScheme() { - return new TSQueryTemplateRespStandardScheme(); - } - } - - private static class TSQueryTemplateRespStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryTemplateResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // QUERY_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.queryType = iprot.readI32(); - struct.setQueryTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // RESULT - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.result = iprot.readBool(); - struct.setResultIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.count = iprot.readI32(); - struct.setCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // MEASUREMENTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list726 = iprot.readListBegin(); - struct.measurements = new java.util.ArrayList(_list726.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem727; - for (int _i728 = 0; _i728 < _list726.size; ++_i728) - { - _elem727 = iprot.readString(); - struct.measurements.add(_elem727); - } - iprot.readListEnd(); - } - struct.setMeasurementsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetQueryType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryType' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryTemplateResp struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.status != null) { - oprot.writeFieldBegin(STATUS_FIELD_DESC); - struct.status.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); - oprot.writeI32(struct.queryType); - oprot.writeFieldEnd(); - if (struct.isSetResult()) { - oprot.writeFieldBegin(RESULT_FIELD_DESC); - oprot.writeBool(struct.result); - oprot.writeFieldEnd(); - } - if (struct.isSetCount()) { - oprot.writeFieldBegin(COUNT_FIELD_DESC); - oprot.writeI32(struct.count); - oprot.writeFieldEnd(); - } - if (struct.measurements != null) { - if (struct.isSetMeasurements()) { - oprot.writeFieldBegin(MEASUREMENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.measurements.size())); - for (java.lang.String _iter729 : struct.measurements) - { - oprot.writeString(_iter729); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSQueryTemplateRespTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSQueryTemplateRespTupleScheme getScheme() { - return new TSQueryTemplateRespTupleScheme(); - } - } - - private static class TSQueryTemplateRespTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryTemplateResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status.write(oprot); - oprot.writeI32(struct.queryType); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetResult()) { - optionals.set(0); - } - if (struct.isSetCount()) { - optionals.set(1); - } - if (struct.isSetMeasurements()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetResult()) { - oprot.writeBool(struct.result); - } - if (struct.isSetCount()) { - oprot.writeI32(struct.count); - } - if (struct.isSetMeasurements()) { - { - oprot.writeI32(struct.measurements.size()); - for (java.lang.String _iter730 : struct.measurements) - { - oprot.writeString(_iter730); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryTemplateResp struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(); - struct.status.read(iprot); - struct.setStatusIsSet(true); - struct.queryType = iprot.readI32(); - struct.setQueryTypeIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.result = iprot.readBool(); - struct.setResultIsSet(true); - } - if (incoming.get(1)) { - struct.count = iprot.readI32(); - struct.setCountIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list731 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.measurements = new java.util.ArrayList(_list731.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem732; - for (int _i733 = 0; _i733 < _list731.size; ++_i733) - { - _elem732 = iprot.readString(); - struct.measurements.add(_elem732); - } - } - struct.setMeasurementsIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSRawDataQueryReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSRawDataQueryReq.java deleted file mode 100644 index 8c6be66ca7ccc..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSRawDataQueryReq.java +++ /dev/null @@ -1,1306 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSRawDataQueryReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSRawDataQueryReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("paths", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)6); - private static final org.apache.thrift.protocol.TField ENABLE_REDIRECT_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("enableRedirectQuery", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField JDBC_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("jdbcQuery", org.apache.thrift.protocol.TType.BOOL, (short)8); - private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)9); - private static final org.apache.thrift.protocol.TField LEGAL_PATH_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("legalPathNodes", org.apache.thrift.protocol.TType.BOOL, (short)10); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSRawDataQueryReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSRawDataQueryReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.util.List paths; // required - public int fetchSize; // optional - public long startTime; // required - public long endTime; // required - public long statementId; // required - public boolean enableRedirectQuery; // optional - public boolean jdbcQuery; // optional - public long timeout; // optional - public boolean legalPathNodes; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SESSION_ID((short)1, "sessionId"), - PATHS((short)2, "paths"), - FETCH_SIZE((short)3, "fetchSize"), - START_TIME((short)4, "startTime"), - END_TIME((short)5, "endTime"), - STATEMENT_ID((short)6, "statementId"), - ENABLE_REDIRECT_QUERY((short)7, "enableRedirectQuery"), - JDBC_QUERY((short)8, "jdbcQuery"), - TIMEOUT((short)9, "timeout"), - LEGAL_PATH_NODES((short)10, "legalPathNodes"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PATHS - return PATHS; - case 3: // FETCH_SIZE - return FETCH_SIZE; - case 4: // START_TIME - return START_TIME; - case 5: // END_TIME - return END_TIME; - case 6: // STATEMENT_ID - return STATEMENT_ID; - case 7: // ENABLE_REDIRECT_QUERY - return ENABLE_REDIRECT_QUERY; - case 8: // JDBC_QUERY - return JDBC_QUERY; - case 9: // TIMEOUT - return TIMEOUT; - case 10: // LEGAL_PATH_NODES - return LEGAL_PATH_NODES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - private static final int __FETCHSIZE_ISSET_ID = 1; - private static final int __STARTTIME_ISSET_ID = 2; - private static final int __ENDTIME_ISSET_ID = 3; - private static final int __STATEMENTID_ISSET_ID = 4; - private static final int __ENABLEREDIRECTQUERY_ISSET_ID = 5; - private static final int __JDBCQUERY_ISSET_ID = 6; - private static final int __TIMEOUT_ISSET_ID = 7; - private static final int __LEGALPATHNODES_ISSET_ID = 8; - private short __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.FETCH_SIZE,_Fields.ENABLE_REDIRECT_QUERY,_Fields.JDBC_QUERY,_Fields.TIMEOUT,_Fields.LEGAL_PATH_NODES}; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PATHS, new org.apache.thrift.meta_data.FieldMetaData("paths", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.ENABLE_REDIRECT_QUERY, new org.apache.thrift.meta_data.FieldMetaData("enableRedirectQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.JDBC_QUERY, new org.apache.thrift.meta_data.FieldMetaData("jdbcQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LEGAL_PATH_NODES, new org.apache.thrift.meta_data.FieldMetaData("legalPathNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSRawDataQueryReq.class, metaDataMap); - } - - public TSRawDataQueryReq() { - } - - public TSRawDataQueryReq( - long sessionId, - java.util.List paths, - long startTime, - long endTime, - long statementId) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.paths = paths; - this.startTime = startTime; - setStartTimeIsSet(true); - this.endTime = endTime; - setEndTimeIsSet(true); - this.statementId = statementId; - setStatementIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSRawDataQueryReq(TSRawDataQueryReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPaths()) { - java.util.List __this__paths = new java.util.ArrayList(other.paths); - this.paths = __this__paths; - } - this.fetchSize = other.fetchSize; - this.startTime = other.startTime; - this.endTime = other.endTime; - this.statementId = other.statementId; - this.enableRedirectQuery = other.enableRedirectQuery; - this.jdbcQuery = other.jdbcQuery; - this.timeout = other.timeout; - this.legalPathNodes = other.legalPathNodes; - } - - @Override - public TSRawDataQueryReq deepCopy() { - return new TSRawDataQueryReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.paths = null; - setFetchSizeIsSet(false); - this.fetchSize = 0; - setStartTimeIsSet(false); - this.startTime = 0; - setEndTimeIsSet(false); - this.endTime = 0; - setStatementIdIsSet(false); - this.statementId = 0; - setEnableRedirectQueryIsSet(false); - this.enableRedirectQuery = false; - setJdbcQueryIsSet(false); - this.jdbcQuery = false; - setTimeoutIsSet(false); - this.timeout = 0; - setLegalPathNodesIsSet(false); - this.legalPathNodes = false; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSRawDataQueryReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - public int getPathsSize() { - return (this.paths == null) ? 0 : this.paths.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getPathsIterator() { - return (this.paths == null) ? null : this.paths.iterator(); - } - - public void addToPaths(java.lang.String elem) { - if (this.paths == null) { - this.paths = new java.util.ArrayList(); - } - this.paths.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getPaths() { - return this.paths; - } - - public TSRawDataQueryReq setPaths(@org.apache.thrift.annotation.Nullable java.util.List paths) { - this.paths = paths; - return this; - } - - public void unsetPaths() { - this.paths = null; - } - - /** Returns true if field paths is set (has been assigned a value) and false otherwise */ - public boolean isSetPaths() { - return this.paths != null; - } - - public void setPathsIsSet(boolean value) { - if (!value) { - this.paths = null; - } - } - - public int getFetchSize() { - return this.fetchSize; - } - - public TSRawDataQueryReq setFetchSize(int fetchSize) { - this.fetchSize = fetchSize; - setFetchSizeIsSet(true); - return this; - } - - public void unsetFetchSize() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - /** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */ - public boolean isSetFetchSize() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID); - } - - public void setFetchSizeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value); - } - - public long getStartTime() { - return this.startTime; - } - - public TSRawDataQueryReq setStartTime(long startTime) { - this.startTime = startTime; - setStartTimeIsSet(true); - return this; - } - - public void unsetStartTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); - } - - /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ - public boolean isSetStartTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); - } - - public void setStartTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); - } - - public long getEndTime() { - return this.endTime; - } - - public TSRawDataQueryReq setEndTime(long endTime) { - this.endTime = endTime; - setEndTimeIsSet(true); - return this; - } - - public void unsetEndTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ - public boolean isSetEndTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - public void setEndTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); - } - - public long getStatementId() { - return this.statementId; - } - - public TSRawDataQueryReq setStatementId(long statementId) { - this.statementId = statementId; - setStatementIdIsSet(true); - return this; - } - - public void unsetStatementId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - /** Returns true if field statementId is set (has been assigned a value) and false otherwise */ - public boolean isSetStatementId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID); - } - - public void setStatementIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value); - } - - public boolean isEnableRedirectQuery() { - return this.enableRedirectQuery; - } - - public TSRawDataQueryReq setEnableRedirectQuery(boolean enableRedirectQuery) { - this.enableRedirectQuery = enableRedirectQuery; - setEnableRedirectQueryIsSet(true); - return this; - } - - public void unsetEnableRedirectQuery() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); - } - - /** Returns true if field enableRedirectQuery is set (has been assigned a value) and false otherwise */ - public boolean isSetEnableRedirectQuery() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID); - } - - public void setEnableRedirectQueryIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLEREDIRECTQUERY_ISSET_ID, value); - } - - public boolean isJdbcQuery() { - return this.jdbcQuery; - } - - public TSRawDataQueryReq setJdbcQuery(boolean jdbcQuery) { - this.jdbcQuery = jdbcQuery; - setJdbcQueryIsSet(true); - return this; - } - - public void unsetJdbcQuery() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); - } - - /** Returns true if field jdbcQuery is set (has been assigned a value) and false otherwise */ - public boolean isSetJdbcQuery() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JDBCQUERY_ISSET_ID); - } - - public void setJdbcQueryIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JDBCQUERY_ISSET_ID, value); - } - - public long getTimeout() { - return this.timeout; - } - - public TSRawDataQueryReq setTimeout(long timeout) { - this.timeout = timeout; - setTimeoutIsSet(true); - return this; - } - - public void unsetTimeout() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeout() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); - } - - public void setTimeoutIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); - } - - public boolean isLegalPathNodes() { - return this.legalPathNodes; - } - - public TSRawDataQueryReq setLegalPathNodes(boolean legalPathNodes) { - this.legalPathNodes = legalPathNodes; - setLegalPathNodesIsSet(true); - return this; - } - - public void unsetLegalPathNodes() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); - } - - /** Returns true if field legalPathNodes is set (has been assigned a value) and false otherwise */ - public boolean isSetLegalPathNodes() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID); - } - - public void setLegalPathNodesIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LEGALPATHNODES_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PATHS: - if (value == null) { - unsetPaths(); - } else { - setPaths((java.util.List)value); - } - break; - - case FETCH_SIZE: - if (value == null) { - unsetFetchSize(); - } else { - setFetchSize((java.lang.Integer)value); - } - break; - - case START_TIME: - if (value == null) { - unsetStartTime(); - } else { - setStartTime((java.lang.Long)value); - } - break; - - case END_TIME: - if (value == null) { - unsetEndTime(); - } else { - setEndTime((java.lang.Long)value); - } - break; - - case STATEMENT_ID: - if (value == null) { - unsetStatementId(); - } else { - setStatementId((java.lang.Long)value); - } - break; - - case ENABLE_REDIRECT_QUERY: - if (value == null) { - unsetEnableRedirectQuery(); - } else { - setEnableRedirectQuery((java.lang.Boolean)value); - } - break; - - case JDBC_QUERY: - if (value == null) { - unsetJdbcQuery(); - } else { - setJdbcQuery((java.lang.Boolean)value); - } - break; - - case TIMEOUT: - if (value == null) { - unsetTimeout(); - } else { - setTimeout((java.lang.Long)value); - } - break; - - case LEGAL_PATH_NODES: - if (value == null) { - unsetLegalPathNodes(); - } else { - setLegalPathNodes((java.lang.Boolean)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PATHS: - return getPaths(); - - case FETCH_SIZE: - return getFetchSize(); - - case START_TIME: - return getStartTime(); - - case END_TIME: - return getEndTime(); - - case STATEMENT_ID: - return getStatementId(); - - case ENABLE_REDIRECT_QUERY: - return isEnableRedirectQuery(); - - case JDBC_QUERY: - return isJdbcQuery(); - - case TIMEOUT: - return getTimeout(); - - case LEGAL_PATH_NODES: - return isLegalPathNodes(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PATHS: - return isSetPaths(); - case FETCH_SIZE: - return isSetFetchSize(); - case START_TIME: - return isSetStartTime(); - case END_TIME: - return isSetEndTime(); - case STATEMENT_ID: - return isSetStatementId(); - case ENABLE_REDIRECT_QUERY: - return isSetEnableRedirectQuery(); - case JDBC_QUERY: - return isSetJdbcQuery(); - case TIMEOUT: - return isSetTimeout(); - case LEGAL_PATH_NODES: - return isSetLegalPathNodes(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSRawDataQueryReq) - return this.equals((TSRawDataQueryReq)that); - return false; - } - - public boolean equals(TSRawDataQueryReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_paths = true && this.isSetPaths(); - boolean that_present_paths = true && that.isSetPaths(); - if (this_present_paths || that_present_paths) { - if (!(this_present_paths && that_present_paths)) - return false; - if (!this.paths.equals(that.paths)) - return false; - } - - boolean this_present_fetchSize = true && this.isSetFetchSize(); - boolean that_present_fetchSize = true && that.isSetFetchSize(); - if (this_present_fetchSize || that_present_fetchSize) { - if (!(this_present_fetchSize && that_present_fetchSize)) - return false; - if (this.fetchSize != that.fetchSize) - return false; - } - - boolean this_present_startTime = true; - boolean that_present_startTime = true; - if (this_present_startTime || that_present_startTime) { - if (!(this_present_startTime && that_present_startTime)) - return false; - if (this.startTime != that.startTime) - return false; - } - - boolean this_present_endTime = true; - boolean that_present_endTime = true; - if (this_present_endTime || that_present_endTime) { - if (!(this_present_endTime && that_present_endTime)) - return false; - if (this.endTime != that.endTime) - return false; - } - - boolean this_present_statementId = true; - boolean that_present_statementId = true; - if (this_present_statementId || that_present_statementId) { - if (!(this_present_statementId && that_present_statementId)) - return false; - if (this.statementId != that.statementId) - return false; - } - - boolean this_present_enableRedirectQuery = true && this.isSetEnableRedirectQuery(); - boolean that_present_enableRedirectQuery = true && that.isSetEnableRedirectQuery(); - if (this_present_enableRedirectQuery || that_present_enableRedirectQuery) { - if (!(this_present_enableRedirectQuery && that_present_enableRedirectQuery)) - return false; - if (this.enableRedirectQuery != that.enableRedirectQuery) - return false; - } - - boolean this_present_jdbcQuery = true && this.isSetJdbcQuery(); - boolean that_present_jdbcQuery = true && that.isSetJdbcQuery(); - if (this_present_jdbcQuery || that_present_jdbcQuery) { - if (!(this_present_jdbcQuery && that_present_jdbcQuery)) - return false; - if (this.jdbcQuery != that.jdbcQuery) - return false; - } - - boolean this_present_timeout = true && this.isSetTimeout(); - boolean that_present_timeout = true && that.isSetTimeout(); - if (this_present_timeout || that_present_timeout) { - if (!(this_present_timeout && that_present_timeout)) - return false; - if (this.timeout != that.timeout) - return false; - } - - boolean this_present_legalPathNodes = true && this.isSetLegalPathNodes(); - boolean that_present_legalPathNodes = true && that.isSetLegalPathNodes(); - if (this_present_legalPathNodes || that_present_legalPathNodes) { - if (!(this_present_legalPathNodes && that_present_legalPathNodes)) - return false; - if (this.legalPathNodes != that.legalPathNodes) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPaths()) ? 131071 : 524287); - if (isSetPaths()) - hashCode = hashCode * 8191 + paths.hashCode(); - - hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287); - if (isSetFetchSize()) - hashCode = hashCode * 8191 + fetchSize; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId); - - hashCode = hashCode * 8191 + ((isSetEnableRedirectQuery()) ? 131071 : 524287); - if (isSetEnableRedirectQuery()) - hashCode = hashCode * 8191 + ((enableRedirectQuery) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetJdbcQuery()) ? 131071 : 524287); - if (isSetJdbcQuery()) - hashCode = hashCode * 8191 + ((jdbcQuery) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287); - if (isSetTimeout()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout); - - hashCode = hashCode * 8191 + ((isSetLegalPathNodes()) ? 131071 : 524287); - if (isSetLegalPathNodes()) - hashCode = hashCode * 8191 + ((legalPathNodes) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(TSRawDataQueryReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPaths(), other.isSetPaths()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPaths()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paths, other.paths); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFetchSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEndTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatementId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetEnableRedirectQuery(), other.isSetEnableRedirectQuery()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnableRedirectQuery()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enableRedirectQuery, other.enableRedirectQuery); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetJdbcQuery(), other.isSetJdbcQuery()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetJdbcQuery()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jdbcQuery, other.jdbcQuery); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetLegalPathNodes(), other.isSetLegalPathNodes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLegalPathNodes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legalPathNodes, other.legalPathNodes); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSRawDataQueryReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("paths:"); - if (this.paths == null) { - sb.append("null"); - } else { - sb.append(this.paths); - } - first = false; - if (isSetFetchSize()) { - if (!first) sb.append(", "); - sb.append("fetchSize:"); - sb.append(this.fetchSize); - first = false; - } - if (!first) sb.append(", "); - sb.append("startTime:"); - sb.append(this.startTime); - first = false; - if (!first) sb.append(", "); - sb.append("endTime:"); - sb.append(this.endTime); - first = false; - if (!first) sb.append(", "); - sb.append("statementId:"); - sb.append(this.statementId); - first = false; - if (isSetEnableRedirectQuery()) { - if (!first) sb.append(", "); - sb.append("enableRedirectQuery:"); - sb.append(this.enableRedirectQuery); - first = false; - } - if (isSetJdbcQuery()) { - if (!first) sb.append(", "); - sb.append("jdbcQuery:"); - sb.append(this.jdbcQuery); - first = false; - } - if (isSetTimeout()) { - if (!first) sb.append(", "); - sb.append("timeout:"); - sb.append(this.timeout); - first = false; - } - if (isSetLegalPathNodes()) { - if (!first) sb.append(", "); - sb.append("legalPathNodes:"); - sb.append(this.legalPathNodes); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (paths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'paths' was not present! Struct: " + toString()); - } - // alas, we cannot check 'startTime' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'endTime' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSRawDataQueryReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSRawDataQueryReqStandardScheme getScheme() { - return new TSRawDataQueryReqStandardScheme(); - } - } - - private static class TSRawDataQueryReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSRawDataQueryReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATHS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list552 = iprot.readListBegin(); - struct.paths = new java.util.ArrayList(_list552.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem553; - for (int _i554 = 0; _i554 < _list552.size; ++_i554) - { - _elem553 = iprot.readString(); - struct.paths.add(_elem553); - } - iprot.readListEnd(); - } - struct.setPathsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FETCH_SIZE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // START_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // END_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // STATEMENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // ENABLE_REDIRECT_QUERY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.enableRedirectQuery = iprot.readBool(); - struct.setEnableRedirectQueryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // JDBC_QUERY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.jdbcQuery = iprot.readBool(); - struct.setJdbcQueryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // TIMEOUT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // LEGAL_PATH_NODES - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.legalPathNodes = iprot.readBool(); - struct.setLegalPathNodesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetStartTime()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'startTime' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetEndTime()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'endTime' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetStatementId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSRawDataQueryReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.paths != null) { - oprot.writeFieldBegin(PATHS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.paths.size())); - for (java.lang.String _iter555 : struct.paths) - { - oprot.writeString(_iter555); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetFetchSize()) { - oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC); - oprot.writeI32(struct.fetchSize); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(START_TIME_FIELD_DESC); - oprot.writeI64(struct.startTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(END_TIME_FIELD_DESC); - oprot.writeI64(struct.endTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC); - oprot.writeI64(struct.statementId); - oprot.writeFieldEnd(); - if (struct.isSetEnableRedirectQuery()) { - oprot.writeFieldBegin(ENABLE_REDIRECT_QUERY_FIELD_DESC); - oprot.writeBool(struct.enableRedirectQuery); - oprot.writeFieldEnd(); - } - if (struct.isSetJdbcQuery()) { - oprot.writeFieldBegin(JDBC_QUERY_FIELD_DESC); - oprot.writeBool(struct.jdbcQuery); - oprot.writeFieldEnd(); - } - if (struct.isSetTimeout()) { - oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); - oprot.writeI64(struct.timeout); - oprot.writeFieldEnd(); - } - if (struct.isSetLegalPathNodes()) { - oprot.writeFieldBegin(LEGAL_PATH_NODES_FIELD_DESC); - oprot.writeBool(struct.legalPathNodes); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSRawDataQueryReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSRawDataQueryReqTupleScheme getScheme() { - return new TSRawDataQueryReqTupleScheme(); - } - } - - private static class TSRawDataQueryReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSRawDataQueryReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - { - oprot.writeI32(struct.paths.size()); - for (java.lang.String _iter556 : struct.paths) - { - oprot.writeString(_iter556); - } - } - oprot.writeI64(struct.startTime); - oprot.writeI64(struct.endTime); - oprot.writeI64(struct.statementId); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetFetchSize()) { - optionals.set(0); - } - if (struct.isSetEnableRedirectQuery()) { - optionals.set(1); - } - if (struct.isSetJdbcQuery()) { - optionals.set(2); - } - if (struct.isSetTimeout()) { - optionals.set(3); - } - if (struct.isSetLegalPathNodes()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetFetchSize()) { - oprot.writeI32(struct.fetchSize); - } - if (struct.isSetEnableRedirectQuery()) { - oprot.writeBool(struct.enableRedirectQuery); - } - if (struct.isSetJdbcQuery()) { - oprot.writeBool(struct.jdbcQuery); - } - if (struct.isSetTimeout()) { - oprot.writeI64(struct.timeout); - } - if (struct.isSetLegalPathNodes()) { - oprot.writeBool(struct.legalPathNodes); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSRawDataQueryReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - { - org.apache.thrift.protocol.TList _list557 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.paths = new java.util.ArrayList(_list557.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem558; - for (int _i559 = 0; _i559 < _list557.size; ++_i559) - { - _elem558 = iprot.readString(); - struct.paths.add(_elem558); - } - } - struct.setPathsIsSet(true); - struct.startTime = iprot.readI64(); - struct.setStartTimeIsSet(true); - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - struct.statementId = iprot.readI64(); - struct.setStatementIdIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.fetchSize = iprot.readI32(); - struct.setFetchSizeIsSet(true); - } - if (incoming.get(1)) { - struct.enableRedirectQuery = iprot.readBool(); - struct.setEnableRedirectQueryIsSet(true); - } - if (incoming.get(2)) { - struct.jdbcQuery = iprot.readBool(); - struct.setJdbcQueryIsSet(true); - } - if (incoming.get(3)) { - struct.timeout = iprot.readI64(); - struct.setTimeoutIsSet(true); - } - if (incoming.get(4)) { - struct.legalPathNodes = iprot.readBool(); - struct.setLegalPathNodesIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetSchemaTemplateReq.java deleted file mode 100644 index c36ad8b6028cc..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetSchemaTemplateReq.java +++ /dev/null @@ -1,579 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSSetSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSSetSchemaTemplateReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField TEMPLATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("templateName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSSetSchemaTemplateReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSSetSchemaTemplateReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String templateName; // required - public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // 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 { - SESSION_ID((short)1, "sessionId"), - TEMPLATE_NAME((short)2, "templateName"), - PREFIX_PATH((short)3, "prefixPath"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // TEMPLATE_NAME - return TEMPLATE_NAME; - case 3: // PREFIX_PATH - return PREFIX_PATH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TEMPLATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("templateName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSSetSchemaTemplateReq.class, metaDataMap); - } - - public TSSetSchemaTemplateReq() { - } - - public TSSetSchemaTemplateReq( - long sessionId, - java.lang.String templateName, - java.lang.String prefixPath) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.templateName = templateName; - this.prefixPath = prefixPath; - } - - /** - * Performs a deep copy on other. - */ - public TSSetSchemaTemplateReq(TSSetSchemaTemplateReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetTemplateName()) { - this.templateName = other.templateName; - } - if (other.isSetPrefixPath()) { - this.prefixPath = other.prefixPath; - } - } - - @Override - public TSSetSchemaTemplateReq deepCopy() { - return new TSSetSchemaTemplateReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.templateName = null; - this.prefixPath = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSSetSchemaTemplateReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getTemplateName() { - return this.templateName; - } - - public TSSetSchemaTemplateReq setTemplateName(@org.apache.thrift.annotation.Nullable java.lang.String templateName) { - this.templateName = templateName; - return this; - } - - public void unsetTemplateName() { - this.templateName = null; - } - - /** Returns true if field templateName is set (has been assigned a value) and false otherwise */ - public boolean isSetTemplateName() { - return this.templateName != null; - } - - public void setTemplateNameIsSet(boolean value) { - if (!value) { - this.templateName = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPrefixPath() { - return this.prefixPath; - } - - public TSSetSchemaTemplateReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { - this.prefixPath = prefixPath; - return this; - } - - public void unsetPrefixPath() { - this.prefixPath = null; - } - - /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPath() { - return this.prefixPath != null; - } - - public void setPrefixPathIsSet(boolean value) { - if (!value) { - this.prefixPath = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case TEMPLATE_NAME: - if (value == null) { - unsetTemplateName(); - } else { - setTemplateName((java.lang.String)value); - } - break; - - case PREFIX_PATH: - if (value == null) { - unsetPrefixPath(); - } else { - setPrefixPath((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case TEMPLATE_NAME: - return getTemplateName(); - - case PREFIX_PATH: - return getPrefixPath(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case TEMPLATE_NAME: - return isSetTemplateName(); - case PREFIX_PATH: - return isSetPrefixPath(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSSetSchemaTemplateReq) - return this.equals((TSSetSchemaTemplateReq)that); - return false; - } - - public boolean equals(TSSetSchemaTemplateReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_templateName = true && this.isSetTemplateName(); - boolean that_present_templateName = true && that.isSetTemplateName(); - if (this_present_templateName || that_present_templateName) { - if (!(this_present_templateName && that_present_templateName)) - return false; - if (!this.templateName.equals(that.templateName)) - return false; - } - - boolean this_present_prefixPath = true && this.isSetPrefixPath(); - boolean that_present_prefixPath = true && that.isSetPrefixPath(); - if (this_present_prefixPath || that_present_prefixPath) { - if (!(this_present_prefixPath && that_present_prefixPath)) - return false; - if (!this.prefixPath.equals(that.prefixPath)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetTemplateName()) ? 131071 : 524287); - if (isSetTemplateName()) - hashCode = hashCode * 8191 + templateName.hashCode(); - - hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); - if (isSetPrefixPath()) - hashCode = hashCode * 8191 + prefixPath.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSSetSchemaTemplateReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTemplateName(), other.isSetTemplateName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTemplateName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.templateName, other.templateName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSSetSchemaTemplateReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("templateName:"); - if (this.templateName == null) { - sb.append("null"); - } else { - sb.append(this.templateName); - } - first = false; - if (!first) sb.append(", "); - sb.append("prefixPath:"); - if (this.prefixPath == null) { - sb.append("null"); - } else { - sb.append(this.prefixPath); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (templateName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'templateName' was not present! Struct: " + toString()); - } - if (prefixPath == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSSetSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSSetSchemaTemplateReqStandardScheme getScheme() { - return new TSSetSchemaTemplateReqStandardScheme(); - } - } - - private static class TSSetSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSSetSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TEMPLATE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.templateName = iprot.readString(); - struct.setTemplateNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PREFIX_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSSetSchemaTemplateReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.templateName != null) { - oprot.writeFieldBegin(TEMPLATE_NAME_FIELD_DESC); - oprot.writeString(struct.templateName); - oprot.writeFieldEnd(); - } - if (struct.prefixPath != null) { - oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); - oprot.writeString(struct.prefixPath); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSSetSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSSetSchemaTemplateReqTupleScheme getScheme() { - return new TSSetSchemaTemplateReqTupleScheme(); - } - } - - private static class TSSetSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSSetSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.templateName); - oprot.writeString(struct.prefixPath); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSSetSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.templateName = iprot.readString(); - struct.setTemplateNameIsSet(true); - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetTimeZoneReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetTimeZoneReq.java deleted file mode 100644 index 3ade3edfc3883..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSSetTimeZoneReq.java +++ /dev/null @@ -1,478 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSSetTimeZoneReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSSetTimeZoneReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField TIME_ZONE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeZone", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSSetTimeZoneReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSSetTimeZoneReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String timeZone; // 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 { - SESSION_ID((short)1, "sessionId"), - TIME_ZONE((short)2, "timeZone"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // TIME_ZONE - return TIME_ZONE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TIME_ZONE, new org.apache.thrift.meta_data.FieldMetaData("timeZone", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSSetTimeZoneReq.class, metaDataMap); - } - - public TSSetTimeZoneReq() { - } - - public TSSetTimeZoneReq( - long sessionId, - java.lang.String timeZone) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.timeZone = timeZone; - } - - /** - * Performs a deep copy on other. - */ - public TSSetTimeZoneReq(TSSetTimeZoneReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetTimeZone()) { - this.timeZone = other.timeZone; - } - } - - @Override - public TSSetTimeZoneReq deepCopy() { - return new TSSetTimeZoneReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.timeZone = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSSetTimeZoneReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getTimeZone() { - return this.timeZone; - } - - public TSSetTimeZoneReq setTimeZone(@org.apache.thrift.annotation.Nullable java.lang.String timeZone) { - this.timeZone = timeZone; - return this; - } - - public void unsetTimeZone() { - this.timeZone = null; - } - - /** Returns true if field timeZone is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeZone() { - return this.timeZone != null; - } - - public void setTimeZoneIsSet(boolean value) { - if (!value) { - this.timeZone = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case TIME_ZONE: - if (value == null) { - unsetTimeZone(); - } else { - setTimeZone((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case TIME_ZONE: - return getTimeZone(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case TIME_ZONE: - return isSetTimeZone(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSSetTimeZoneReq) - return this.equals((TSSetTimeZoneReq)that); - return false; - } - - public boolean equals(TSSetTimeZoneReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_timeZone = true && this.isSetTimeZone(); - boolean that_present_timeZone = true && that.isSetTimeZone(); - if (this_present_timeZone || that_present_timeZone) { - if (!(this_present_timeZone && that_present_timeZone)) - return false; - if (!this.timeZone.equals(that.timeZone)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetTimeZone()) ? 131071 : 524287); - if (isSetTimeZone()) - hashCode = hashCode * 8191 + timeZone.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSSetTimeZoneReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTimeZone(), other.isSetTimeZone()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeZone()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeZone, other.timeZone); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSSetTimeZoneReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("timeZone:"); - if (this.timeZone == null) { - sb.append("null"); - } else { - sb.append(this.timeZone); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (timeZone == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeZone' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSSetTimeZoneReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSSetTimeZoneReqStandardScheme getScheme() { - return new TSSetTimeZoneReqStandardScheme(); - } - } - - private static class TSSetTimeZoneReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSSetTimeZoneReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TIME_ZONE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.timeZone = iprot.readString(); - struct.setTimeZoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSSetTimeZoneReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.timeZone != null) { - oprot.writeFieldBegin(TIME_ZONE_FIELD_DESC); - oprot.writeString(struct.timeZone); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSSetTimeZoneReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSSetTimeZoneReqTupleScheme getScheme() { - return new TSSetTimeZoneReqTupleScheme(); - } - } - - private static class TSSetTimeZoneReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSSetTimeZoneReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.timeZone); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSSetTimeZoneReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.timeZone = iprot.readString(); - struct.setTimeZoneIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java deleted file mode 100644 index 3f969d6d1e81a..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSTracingInfo.java +++ /dev/null @@ -1,1481 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSTracingInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSTracingInfo"); - - private static final org.apache.thrift.protocol.TField ACTIVITY_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("activityList", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField ELAPSED_TIME_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsedTimeList", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField SERIES_PATH_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("seriesPathNum", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField SEQ_FILE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("seqFileNum", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField UN_SEQ_FILE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("unSeqFileNum", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField SEQUENCE_CHUNK_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("sequenceChunkNum", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField SEQUENCE_CHUNK_POINT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("sequenceChunkPointNum", org.apache.thrift.protocol.TType.I64, (short)7); - private static final org.apache.thrift.protocol.TField UNSEQUENCE_CHUNK_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("unsequenceChunkNum", org.apache.thrift.protocol.TType.I32, (short)8); - private static final org.apache.thrift.protocol.TField UNSEQUENCE_CHUNK_POINT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("unsequenceChunkPointNum", org.apache.thrift.protocol.TType.I64, (short)9); - private static final org.apache.thrift.protocol.TField TOTAL_PAGE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPageNum", org.apache.thrift.protocol.TType.I32, (short)10); - private static final org.apache.thrift.protocol.TField OVERLAPPED_PAGE_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("overlappedPageNum", org.apache.thrift.protocol.TType.I32, (short)11); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSTracingInfoStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSTracingInfoTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.util.List activityList; // required - public @org.apache.thrift.annotation.Nullable java.util.List elapsedTimeList; // required - public int seriesPathNum; // optional - public int seqFileNum; // optional - public int unSeqFileNum; // optional - public int sequenceChunkNum; // optional - public long sequenceChunkPointNum; // optional - public int unsequenceChunkNum; // optional - public long unsequenceChunkPointNum; // optional - public int totalPageNum; // optional - public int overlappedPageNum; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ACTIVITY_LIST((short)1, "activityList"), - ELAPSED_TIME_LIST((short)2, "elapsedTimeList"), - SERIES_PATH_NUM((short)3, "seriesPathNum"), - SEQ_FILE_NUM((short)4, "seqFileNum"), - UN_SEQ_FILE_NUM((short)5, "unSeqFileNum"), - SEQUENCE_CHUNK_NUM((short)6, "sequenceChunkNum"), - SEQUENCE_CHUNK_POINT_NUM((short)7, "sequenceChunkPointNum"), - UNSEQUENCE_CHUNK_NUM((short)8, "unsequenceChunkNum"), - UNSEQUENCE_CHUNK_POINT_NUM((short)9, "unsequenceChunkPointNum"), - TOTAL_PAGE_NUM((short)10, "totalPageNum"), - OVERLAPPED_PAGE_NUM((short)11, "overlappedPageNum"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ACTIVITY_LIST - return ACTIVITY_LIST; - case 2: // ELAPSED_TIME_LIST - return ELAPSED_TIME_LIST; - case 3: // SERIES_PATH_NUM - return SERIES_PATH_NUM; - case 4: // SEQ_FILE_NUM - return SEQ_FILE_NUM; - case 5: // UN_SEQ_FILE_NUM - return UN_SEQ_FILE_NUM; - case 6: // SEQUENCE_CHUNK_NUM - return SEQUENCE_CHUNK_NUM; - case 7: // SEQUENCE_CHUNK_POINT_NUM - return SEQUENCE_CHUNK_POINT_NUM; - case 8: // UNSEQUENCE_CHUNK_NUM - return UNSEQUENCE_CHUNK_NUM; - case 9: // UNSEQUENCE_CHUNK_POINT_NUM - return UNSEQUENCE_CHUNK_POINT_NUM; - case 10: // TOTAL_PAGE_NUM - return TOTAL_PAGE_NUM; - case 11: // OVERLAPPED_PAGE_NUM - return OVERLAPPED_PAGE_NUM; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SERIESPATHNUM_ISSET_ID = 0; - private static final int __SEQFILENUM_ISSET_ID = 1; - private static final int __UNSEQFILENUM_ISSET_ID = 2; - private static final int __SEQUENCECHUNKNUM_ISSET_ID = 3; - private static final int __SEQUENCECHUNKPOINTNUM_ISSET_ID = 4; - private static final int __UNSEQUENCECHUNKNUM_ISSET_ID = 5; - private static final int __UNSEQUENCECHUNKPOINTNUM_ISSET_ID = 6; - private static final int __TOTALPAGENUM_ISSET_ID = 7; - private static final int __OVERLAPPEDPAGENUM_ISSET_ID = 8; - private short __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.SERIES_PATH_NUM,_Fields.SEQ_FILE_NUM,_Fields.UN_SEQ_FILE_NUM,_Fields.SEQUENCE_CHUNK_NUM,_Fields.SEQUENCE_CHUNK_POINT_NUM,_Fields.UNSEQUENCE_CHUNK_NUM,_Fields.UNSEQUENCE_CHUNK_POINT_NUM,_Fields.TOTAL_PAGE_NUM,_Fields.OVERLAPPED_PAGE_NUM}; - 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.ACTIVITY_LIST, new org.apache.thrift.meta_data.FieldMetaData("activityList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.ELAPSED_TIME_LIST, new org.apache.thrift.meta_data.FieldMetaData("elapsedTimeList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - tmpMap.put(_Fields.SERIES_PATH_NUM, new org.apache.thrift.meta_data.FieldMetaData("seriesPathNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SEQ_FILE_NUM, new org.apache.thrift.meta_data.FieldMetaData("seqFileNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.UN_SEQ_FILE_NUM, new org.apache.thrift.meta_data.FieldMetaData("unSeqFileNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SEQUENCE_CHUNK_NUM, new org.apache.thrift.meta_data.FieldMetaData("sequenceChunkNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SEQUENCE_CHUNK_POINT_NUM, new org.apache.thrift.meta_data.FieldMetaData("sequenceChunkPointNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.UNSEQUENCE_CHUNK_NUM, new org.apache.thrift.meta_data.FieldMetaData("unsequenceChunkNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.UNSEQUENCE_CHUNK_POINT_NUM, new org.apache.thrift.meta_data.FieldMetaData("unsequenceChunkPointNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TOTAL_PAGE_NUM, new org.apache.thrift.meta_data.FieldMetaData("totalPageNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.OVERLAPPED_PAGE_NUM, new org.apache.thrift.meta_data.FieldMetaData("overlappedPageNum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSTracingInfo.class, metaDataMap); - } - - public TSTracingInfo() { - } - - public TSTracingInfo( - java.util.List activityList, - java.util.List elapsedTimeList) - { - this(); - this.activityList = activityList; - this.elapsedTimeList = elapsedTimeList; - } - - /** - * Performs a deep copy on other. - */ - public TSTracingInfo(TSTracingInfo other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetActivityList()) { - java.util.List __this__activityList = new java.util.ArrayList(other.activityList); - this.activityList = __this__activityList; - } - if (other.isSetElapsedTimeList()) { - java.util.List __this__elapsedTimeList = new java.util.ArrayList(other.elapsedTimeList); - this.elapsedTimeList = __this__elapsedTimeList; - } - this.seriesPathNum = other.seriesPathNum; - this.seqFileNum = other.seqFileNum; - this.unSeqFileNum = other.unSeqFileNum; - this.sequenceChunkNum = other.sequenceChunkNum; - this.sequenceChunkPointNum = other.sequenceChunkPointNum; - this.unsequenceChunkNum = other.unsequenceChunkNum; - this.unsequenceChunkPointNum = other.unsequenceChunkPointNum; - this.totalPageNum = other.totalPageNum; - this.overlappedPageNum = other.overlappedPageNum; - } - - @Override - public TSTracingInfo deepCopy() { - return new TSTracingInfo(this); - } - - @Override - public void clear() { - this.activityList = null; - this.elapsedTimeList = null; - setSeriesPathNumIsSet(false); - this.seriesPathNum = 0; - setSeqFileNumIsSet(false); - this.seqFileNum = 0; - setUnSeqFileNumIsSet(false); - this.unSeqFileNum = 0; - setSequenceChunkNumIsSet(false); - this.sequenceChunkNum = 0; - setSequenceChunkPointNumIsSet(false); - this.sequenceChunkPointNum = 0; - setUnsequenceChunkNumIsSet(false); - this.unsequenceChunkNum = 0; - setUnsequenceChunkPointNumIsSet(false); - this.unsequenceChunkPointNum = 0; - setTotalPageNumIsSet(false); - this.totalPageNum = 0; - setOverlappedPageNumIsSet(false); - this.overlappedPageNum = 0; - } - - public int getActivityListSize() { - return (this.activityList == null) ? 0 : this.activityList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getActivityListIterator() { - return (this.activityList == null) ? null : this.activityList.iterator(); - } - - public void addToActivityList(java.lang.String elem) { - if (this.activityList == null) { - this.activityList = new java.util.ArrayList(); - } - this.activityList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getActivityList() { - return this.activityList; - } - - public TSTracingInfo setActivityList(@org.apache.thrift.annotation.Nullable java.util.List activityList) { - this.activityList = activityList; - return this; - } - - public void unsetActivityList() { - this.activityList = null; - } - - /** Returns true if field activityList is set (has been assigned a value) and false otherwise */ - public boolean isSetActivityList() { - return this.activityList != null; - } - - public void setActivityListIsSet(boolean value) { - if (!value) { - this.activityList = null; - } - } - - public int getElapsedTimeListSize() { - return (this.elapsedTimeList == null) ? 0 : this.elapsedTimeList.size(); - } - - @org.apache.thrift.annotation.Nullable - public java.util.Iterator getElapsedTimeListIterator() { - return (this.elapsedTimeList == null) ? null : this.elapsedTimeList.iterator(); - } - - public void addToElapsedTimeList(long elem) { - if (this.elapsedTimeList == null) { - this.elapsedTimeList = new java.util.ArrayList(); - } - this.elapsedTimeList.add(elem); - } - - @org.apache.thrift.annotation.Nullable - public java.util.List getElapsedTimeList() { - return this.elapsedTimeList; - } - - public TSTracingInfo setElapsedTimeList(@org.apache.thrift.annotation.Nullable java.util.List elapsedTimeList) { - this.elapsedTimeList = elapsedTimeList; - return this; - } - - public void unsetElapsedTimeList() { - this.elapsedTimeList = null; - } - - /** Returns true if field elapsedTimeList is set (has been assigned a value) and false otherwise */ - public boolean isSetElapsedTimeList() { - return this.elapsedTimeList != null; - } - - public void setElapsedTimeListIsSet(boolean value) { - if (!value) { - this.elapsedTimeList = null; - } - } - - public int getSeriesPathNum() { - return this.seriesPathNum; - } - - public TSTracingInfo setSeriesPathNum(int seriesPathNum) { - this.seriesPathNum = seriesPathNum; - setSeriesPathNumIsSet(true); - return this; - } - - public void unsetSeriesPathNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SERIESPATHNUM_ISSET_ID); - } - - /** Returns true if field seriesPathNum is set (has been assigned a value) and false otherwise */ - public boolean isSetSeriesPathNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SERIESPATHNUM_ISSET_ID); - } - - public void setSeriesPathNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SERIESPATHNUM_ISSET_ID, value); - } - - public int getSeqFileNum() { - return this.seqFileNum; - } - - public TSTracingInfo setSeqFileNum(int seqFileNum) { - this.seqFileNum = seqFileNum; - setSeqFileNumIsSet(true); - return this; - } - - public void unsetSeqFileNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SEQFILENUM_ISSET_ID); - } - - /** Returns true if field seqFileNum is set (has been assigned a value) and false otherwise */ - public boolean isSetSeqFileNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SEQFILENUM_ISSET_ID); - } - - public void setSeqFileNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SEQFILENUM_ISSET_ID, value); - } - - public int getUnSeqFileNum() { - return this.unSeqFileNum; - } - - public TSTracingInfo setUnSeqFileNum(int unSeqFileNum) { - this.unSeqFileNum = unSeqFileNum; - setUnSeqFileNumIsSet(true); - return this; - } - - public void unsetUnSeqFileNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNSEQFILENUM_ISSET_ID); - } - - /** Returns true if field unSeqFileNum is set (has been assigned a value) and false otherwise */ - public boolean isSetUnSeqFileNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNSEQFILENUM_ISSET_ID); - } - - public void setUnSeqFileNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNSEQFILENUM_ISSET_ID, value); - } - - public int getSequenceChunkNum() { - return this.sequenceChunkNum; - } - - public TSTracingInfo setSequenceChunkNum(int sequenceChunkNum) { - this.sequenceChunkNum = sequenceChunkNum; - setSequenceChunkNumIsSet(true); - return this; - } - - public void unsetSequenceChunkNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SEQUENCECHUNKNUM_ISSET_ID); - } - - /** Returns true if field sequenceChunkNum is set (has been assigned a value) and false otherwise */ - public boolean isSetSequenceChunkNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SEQUENCECHUNKNUM_ISSET_ID); - } - - public void setSequenceChunkNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SEQUENCECHUNKNUM_ISSET_ID, value); - } - - public long getSequenceChunkPointNum() { - return this.sequenceChunkPointNum; - } - - public TSTracingInfo setSequenceChunkPointNum(long sequenceChunkPointNum) { - this.sequenceChunkPointNum = sequenceChunkPointNum; - setSequenceChunkPointNumIsSet(true); - return this; - } - - public void unsetSequenceChunkPointNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SEQUENCECHUNKPOINTNUM_ISSET_ID); - } - - /** Returns true if field sequenceChunkPointNum is set (has been assigned a value) and false otherwise */ - public boolean isSetSequenceChunkPointNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SEQUENCECHUNKPOINTNUM_ISSET_ID); - } - - public void setSequenceChunkPointNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SEQUENCECHUNKPOINTNUM_ISSET_ID, value); - } - - public int getUnsequenceChunkNum() { - return this.unsequenceChunkNum; - } - - public TSTracingInfo setUnsequenceChunkNum(int unsequenceChunkNum) { - this.unsequenceChunkNum = unsequenceChunkNum; - setUnsequenceChunkNumIsSet(true); - return this; - } - - public void unsetUnsequenceChunkNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNSEQUENCECHUNKNUM_ISSET_ID); - } - - /** Returns true if field unsequenceChunkNum is set (has been assigned a value) and false otherwise */ - public boolean isSetUnsequenceChunkNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNSEQUENCECHUNKNUM_ISSET_ID); - } - - public void setUnsequenceChunkNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNSEQUENCECHUNKNUM_ISSET_ID, value); - } - - public long getUnsequenceChunkPointNum() { - return this.unsequenceChunkPointNum; - } - - public TSTracingInfo setUnsequenceChunkPointNum(long unsequenceChunkPointNum) { - this.unsequenceChunkPointNum = unsequenceChunkPointNum; - setUnsequenceChunkPointNumIsSet(true); - return this; - } - - public void unsetUnsequenceChunkPointNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNSEQUENCECHUNKPOINTNUM_ISSET_ID); - } - - /** Returns true if field unsequenceChunkPointNum is set (has been assigned a value) and false otherwise */ - public boolean isSetUnsequenceChunkPointNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNSEQUENCECHUNKPOINTNUM_ISSET_ID); - } - - public void setUnsequenceChunkPointNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNSEQUENCECHUNKPOINTNUM_ISSET_ID, value); - } - - public int getTotalPageNum() { - return this.totalPageNum; - } - - public TSTracingInfo setTotalPageNum(int totalPageNum) { - this.totalPageNum = totalPageNum; - setTotalPageNumIsSet(true); - return this; - } - - public void unsetTotalPageNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTALPAGENUM_ISSET_ID); - } - - /** Returns true if field totalPageNum is set (has been assigned a value) and false otherwise */ - public boolean isSetTotalPageNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTALPAGENUM_ISSET_ID); - } - - public void setTotalPageNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTALPAGENUM_ISSET_ID, value); - } - - public int getOverlappedPageNum() { - return this.overlappedPageNum; - } - - public TSTracingInfo setOverlappedPageNum(int overlappedPageNum) { - this.overlappedPageNum = overlappedPageNum; - setOverlappedPageNumIsSet(true); - return this; - } - - public void unsetOverlappedPageNum() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OVERLAPPEDPAGENUM_ISSET_ID); - } - - /** Returns true if field overlappedPageNum is set (has been assigned a value) and false otherwise */ - public boolean isSetOverlappedPageNum() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OVERLAPPEDPAGENUM_ISSET_ID); - } - - public void setOverlappedPageNumIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OVERLAPPEDPAGENUM_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case ACTIVITY_LIST: - if (value == null) { - unsetActivityList(); - } else { - setActivityList((java.util.List)value); - } - break; - - case ELAPSED_TIME_LIST: - if (value == null) { - unsetElapsedTimeList(); - } else { - setElapsedTimeList((java.util.List)value); - } - break; - - case SERIES_PATH_NUM: - if (value == null) { - unsetSeriesPathNum(); - } else { - setSeriesPathNum((java.lang.Integer)value); - } - break; - - case SEQ_FILE_NUM: - if (value == null) { - unsetSeqFileNum(); - } else { - setSeqFileNum((java.lang.Integer)value); - } - break; - - case UN_SEQ_FILE_NUM: - if (value == null) { - unsetUnSeqFileNum(); - } else { - setUnSeqFileNum((java.lang.Integer)value); - } - break; - - case SEQUENCE_CHUNK_NUM: - if (value == null) { - unsetSequenceChunkNum(); - } else { - setSequenceChunkNum((java.lang.Integer)value); - } - break; - - case SEQUENCE_CHUNK_POINT_NUM: - if (value == null) { - unsetSequenceChunkPointNum(); - } else { - setSequenceChunkPointNum((java.lang.Long)value); - } - break; - - case UNSEQUENCE_CHUNK_NUM: - if (value == null) { - unsetUnsequenceChunkNum(); - } else { - setUnsequenceChunkNum((java.lang.Integer)value); - } - break; - - case UNSEQUENCE_CHUNK_POINT_NUM: - if (value == null) { - unsetUnsequenceChunkPointNum(); - } else { - setUnsequenceChunkPointNum((java.lang.Long)value); - } - break; - - case TOTAL_PAGE_NUM: - if (value == null) { - unsetTotalPageNum(); - } else { - setTotalPageNum((java.lang.Integer)value); - } - break; - - case OVERLAPPED_PAGE_NUM: - if (value == null) { - unsetOverlappedPageNum(); - } else { - setOverlappedPageNum((java.lang.Integer)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case ACTIVITY_LIST: - return getActivityList(); - - case ELAPSED_TIME_LIST: - return getElapsedTimeList(); - - case SERIES_PATH_NUM: - return getSeriesPathNum(); - - case SEQ_FILE_NUM: - return getSeqFileNum(); - - case UN_SEQ_FILE_NUM: - return getUnSeqFileNum(); - - case SEQUENCE_CHUNK_NUM: - return getSequenceChunkNum(); - - case SEQUENCE_CHUNK_POINT_NUM: - return getSequenceChunkPointNum(); - - case UNSEQUENCE_CHUNK_NUM: - return getUnsequenceChunkNum(); - - case UNSEQUENCE_CHUNK_POINT_NUM: - return getUnsequenceChunkPointNum(); - - case TOTAL_PAGE_NUM: - return getTotalPageNum(); - - case OVERLAPPED_PAGE_NUM: - return getOverlappedPageNum(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case ACTIVITY_LIST: - return isSetActivityList(); - case ELAPSED_TIME_LIST: - return isSetElapsedTimeList(); - case SERIES_PATH_NUM: - return isSetSeriesPathNum(); - case SEQ_FILE_NUM: - return isSetSeqFileNum(); - case UN_SEQ_FILE_NUM: - return isSetUnSeqFileNum(); - case SEQUENCE_CHUNK_NUM: - return isSetSequenceChunkNum(); - case SEQUENCE_CHUNK_POINT_NUM: - return isSetSequenceChunkPointNum(); - case UNSEQUENCE_CHUNK_NUM: - return isSetUnsequenceChunkNum(); - case UNSEQUENCE_CHUNK_POINT_NUM: - return isSetUnsequenceChunkPointNum(); - case TOTAL_PAGE_NUM: - return isSetTotalPageNum(); - case OVERLAPPED_PAGE_NUM: - return isSetOverlappedPageNum(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSTracingInfo) - return this.equals((TSTracingInfo)that); - return false; - } - - public boolean equals(TSTracingInfo that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_activityList = true && this.isSetActivityList(); - boolean that_present_activityList = true && that.isSetActivityList(); - if (this_present_activityList || that_present_activityList) { - if (!(this_present_activityList && that_present_activityList)) - return false; - if (!this.activityList.equals(that.activityList)) - return false; - } - - boolean this_present_elapsedTimeList = true && this.isSetElapsedTimeList(); - boolean that_present_elapsedTimeList = true && that.isSetElapsedTimeList(); - if (this_present_elapsedTimeList || that_present_elapsedTimeList) { - if (!(this_present_elapsedTimeList && that_present_elapsedTimeList)) - return false; - if (!this.elapsedTimeList.equals(that.elapsedTimeList)) - return false; - } - - boolean this_present_seriesPathNum = true && this.isSetSeriesPathNum(); - boolean that_present_seriesPathNum = true && that.isSetSeriesPathNum(); - if (this_present_seriesPathNum || that_present_seriesPathNum) { - if (!(this_present_seriesPathNum && that_present_seriesPathNum)) - return false; - if (this.seriesPathNum != that.seriesPathNum) - return false; - } - - boolean this_present_seqFileNum = true && this.isSetSeqFileNum(); - boolean that_present_seqFileNum = true && that.isSetSeqFileNum(); - if (this_present_seqFileNum || that_present_seqFileNum) { - if (!(this_present_seqFileNum && that_present_seqFileNum)) - return false; - if (this.seqFileNum != that.seqFileNum) - return false; - } - - boolean this_present_unSeqFileNum = true && this.isSetUnSeqFileNum(); - boolean that_present_unSeqFileNum = true && that.isSetUnSeqFileNum(); - if (this_present_unSeqFileNum || that_present_unSeqFileNum) { - if (!(this_present_unSeqFileNum && that_present_unSeqFileNum)) - return false; - if (this.unSeqFileNum != that.unSeqFileNum) - return false; - } - - boolean this_present_sequenceChunkNum = true && this.isSetSequenceChunkNum(); - boolean that_present_sequenceChunkNum = true && that.isSetSequenceChunkNum(); - if (this_present_sequenceChunkNum || that_present_sequenceChunkNum) { - if (!(this_present_sequenceChunkNum && that_present_sequenceChunkNum)) - return false; - if (this.sequenceChunkNum != that.sequenceChunkNum) - return false; - } - - boolean this_present_sequenceChunkPointNum = true && this.isSetSequenceChunkPointNum(); - boolean that_present_sequenceChunkPointNum = true && that.isSetSequenceChunkPointNum(); - if (this_present_sequenceChunkPointNum || that_present_sequenceChunkPointNum) { - if (!(this_present_sequenceChunkPointNum && that_present_sequenceChunkPointNum)) - return false; - if (this.sequenceChunkPointNum != that.sequenceChunkPointNum) - return false; - } - - boolean this_present_unsequenceChunkNum = true && this.isSetUnsequenceChunkNum(); - boolean that_present_unsequenceChunkNum = true && that.isSetUnsequenceChunkNum(); - if (this_present_unsequenceChunkNum || that_present_unsequenceChunkNum) { - if (!(this_present_unsequenceChunkNum && that_present_unsequenceChunkNum)) - return false; - if (this.unsequenceChunkNum != that.unsequenceChunkNum) - return false; - } - - boolean this_present_unsequenceChunkPointNum = true && this.isSetUnsequenceChunkPointNum(); - boolean that_present_unsequenceChunkPointNum = true && that.isSetUnsequenceChunkPointNum(); - if (this_present_unsequenceChunkPointNum || that_present_unsequenceChunkPointNum) { - if (!(this_present_unsequenceChunkPointNum && that_present_unsequenceChunkPointNum)) - return false; - if (this.unsequenceChunkPointNum != that.unsequenceChunkPointNum) - return false; - } - - boolean this_present_totalPageNum = true && this.isSetTotalPageNum(); - boolean that_present_totalPageNum = true && that.isSetTotalPageNum(); - if (this_present_totalPageNum || that_present_totalPageNum) { - if (!(this_present_totalPageNum && that_present_totalPageNum)) - return false; - if (this.totalPageNum != that.totalPageNum) - return false; - } - - boolean this_present_overlappedPageNum = true && this.isSetOverlappedPageNum(); - boolean that_present_overlappedPageNum = true && that.isSetOverlappedPageNum(); - if (this_present_overlappedPageNum || that_present_overlappedPageNum) { - if (!(this_present_overlappedPageNum && that_present_overlappedPageNum)) - return false; - if (this.overlappedPageNum != that.overlappedPageNum) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetActivityList()) ? 131071 : 524287); - if (isSetActivityList()) - hashCode = hashCode * 8191 + activityList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetElapsedTimeList()) ? 131071 : 524287); - if (isSetElapsedTimeList()) - hashCode = hashCode * 8191 + elapsedTimeList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetSeriesPathNum()) ? 131071 : 524287); - if (isSetSeriesPathNum()) - hashCode = hashCode * 8191 + seriesPathNum; - - hashCode = hashCode * 8191 + ((isSetSeqFileNum()) ? 131071 : 524287); - if (isSetSeqFileNum()) - hashCode = hashCode * 8191 + seqFileNum; - - hashCode = hashCode * 8191 + ((isSetUnSeqFileNum()) ? 131071 : 524287); - if (isSetUnSeqFileNum()) - hashCode = hashCode * 8191 + unSeqFileNum; - - hashCode = hashCode * 8191 + ((isSetSequenceChunkNum()) ? 131071 : 524287); - if (isSetSequenceChunkNum()) - hashCode = hashCode * 8191 + sequenceChunkNum; - - hashCode = hashCode * 8191 + ((isSetSequenceChunkPointNum()) ? 131071 : 524287); - if (isSetSequenceChunkPointNum()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sequenceChunkPointNum); - - hashCode = hashCode * 8191 + ((isSetUnsequenceChunkNum()) ? 131071 : 524287); - if (isSetUnsequenceChunkNum()) - hashCode = hashCode * 8191 + unsequenceChunkNum; - - hashCode = hashCode * 8191 + ((isSetUnsequenceChunkPointNum()) ? 131071 : 524287); - if (isSetUnsequenceChunkPointNum()) - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(unsequenceChunkPointNum); - - hashCode = hashCode * 8191 + ((isSetTotalPageNum()) ? 131071 : 524287); - if (isSetTotalPageNum()) - hashCode = hashCode * 8191 + totalPageNum; - - hashCode = hashCode * 8191 + ((isSetOverlappedPageNum()) ? 131071 : 524287); - if (isSetOverlappedPageNum()) - hashCode = hashCode * 8191 + overlappedPageNum; - - return hashCode; - } - - @Override - public int compareTo(TSTracingInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetActivityList(), other.isSetActivityList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetActivityList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityList, other.activityList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetElapsedTimeList(), other.isSetElapsedTimeList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetElapsedTimeList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsedTimeList, other.elapsedTimeList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSeriesPathNum(), other.isSetSeriesPathNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSeriesPathNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seriesPathNum, other.seriesPathNum); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSeqFileNum(), other.isSetSeqFileNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSeqFileNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seqFileNum, other.seqFileNum); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetUnSeqFileNum(), other.isSetUnSeqFileNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUnSeqFileNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unSeqFileNum, other.unSeqFileNum); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSequenceChunkNum(), other.isSetSequenceChunkNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSequenceChunkNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sequenceChunkNum, other.sequenceChunkNum); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetSequenceChunkPointNum(), other.isSetSequenceChunkPointNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSequenceChunkPointNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sequenceChunkPointNum, other.sequenceChunkPointNum); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetUnsequenceChunkNum(), other.isSetUnsequenceChunkNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUnsequenceChunkNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unsequenceChunkNum, other.unsequenceChunkNum); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetUnsequenceChunkPointNum(), other.isSetUnsequenceChunkPointNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUnsequenceChunkPointNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unsequenceChunkPointNum, other.unsequenceChunkPointNum); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTotalPageNum(), other.isSetTotalPageNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTotalPageNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalPageNum, other.totalPageNum); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetOverlappedPageNum(), other.isSetOverlappedPageNum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOverlappedPageNum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overlappedPageNum, other.overlappedPageNum); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSTracingInfo("); - boolean first = true; - - sb.append("activityList:"); - if (this.activityList == null) { - sb.append("null"); - } else { - sb.append(this.activityList); - } - first = false; - if (!first) sb.append(", "); - sb.append("elapsedTimeList:"); - if (this.elapsedTimeList == null) { - sb.append("null"); - } else { - sb.append(this.elapsedTimeList); - } - first = false; - if (isSetSeriesPathNum()) { - if (!first) sb.append(", "); - sb.append("seriesPathNum:"); - sb.append(this.seriesPathNum); - first = false; - } - if (isSetSeqFileNum()) { - if (!first) sb.append(", "); - sb.append("seqFileNum:"); - sb.append(this.seqFileNum); - first = false; - } - if (isSetUnSeqFileNum()) { - if (!first) sb.append(", "); - sb.append("unSeqFileNum:"); - sb.append(this.unSeqFileNum); - first = false; - } - if (isSetSequenceChunkNum()) { - if (!first) sb.append(", "); - sb.append("sequenceChunkNum:"); - sb.append(this.sequenceChunkNum); - first = false; - } - if (isSetSequenceChunkPointNum()) { - if (!first) sb.append(", "); - sb.append("sequenceChunkPointNum:"); - sb.append(this.sequenceChunkPointNum); - first = false; - } - if (isSetUnsequenceChunkNum()) { - if (!first) sb.append(", "); - sb.append("unsequenceChunkNum:"); - sb.append(this.unsequenceChunkNum); - first = false; - } - if (isSetUnsequenceChunkPointNum()) { - if (!first) sb.append(", "); - sb.append("unsequenceChunkPointNum:"); - sb.append(this.unsequenceChunkPointNum); - first = false; - } - if (isSetTotalPageNum()) { - if (!first) sb.append(", "); - sb.append("totalPageNum:"); - sb.append(this.totalPageNum); - first = false; - } - if (isSetOverlappedPageNum()) { - if (!first) sb.append(", "); - sb.append("overlappedPageNum:"); - sb.append(this.overlappedPageNum); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (activityList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'activityList' was not present! Struct: " + toString()); - } - if (elapsedTimeList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'elapsedTimeList' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSTracingInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSTracingInfoStandardScheme getScheme() { - return new TSTracingInfoStandardScheme(); - } - } - - private static class TSTracingInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSTracingInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ACTIVITY_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); - struct.activityList = new java.util.ArrayList(_list32.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem33; - for (int _i34 = 0; _i34 < _list32.size; ++_i34) - { - _elem33 = iprot.readString(); - struct.activityList.add(_elem33); - } - iprot.readListEnd(); - } - struct.setActivityListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ELAPSED_TIME_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); - struct.elapsedTimeList = new java.util.ArrayList(_list35.size); - long _elem36; - for (int _i37 = 0; _i37 < _list35.size; ++_i37) - { - _elem36 = iprot.readI64(); - struct.elapsedTimeList.add(_elem36); - } - iprot.readListEnd(); - } - struct.setElapsedTimeListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SERIES_PATH_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.seriesPathNum = iprot.readI32(); - struct.setSeriesPathNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // SEQ_FILE_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.seqFileNum = iprot.readI32(); - struct.setSeqFileNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // UN_SEQ_FILE_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.unSeqFileNum = iprot.readI32(); - struct.setUnSeqFileNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // SEQUENCE_CHUNK_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.sequenceChunkNum = iprot.readI32(); - struct.setSequenceChunkNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // SEQUENCE_CHUNK_POINT_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sequenceChunkPointNum = iprot.readI64(); - struct.setSequenceChunkPointNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // UNSEQUENCE_CHUNK_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.unsequenceChunkNum = iprot.readI32(); - struct.setUnsequenceChunkNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // UNSEQUENCE_CHUNK_POINT_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.unsequenceChunkPointNum = iprot.readI64(); - struct.setUnsequenceChunkPointNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // TOTAL_PAGE_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.totalPageNum = iprot.readI32(); - struct.setTotalPageNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // OVERLAPPED_PAGE_NUM - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.overlappedPageNum = iprot.readI32(); - struct.setOverlappedPageNumIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSTracingInfo struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.activityList != null) { - oprot.writeFieldBegin(ACTIVITY_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.activityList.size())); - for (java.lang.String _iter38 : struct.activityList) - { - oprot.writeString(_iter38); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.elapsedTimeList != null) { - oprot.writeFieldBegin(ELAPSED_TIME_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.elapsedTimeList.size())); - for (long _iter39 : struct.elapsedTimeList) - { - oprot.writeI64(_iter39); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetSeriesPathNum()) { - oprot.writeFieldBegin(SERIES_PATH_NUM_FIELD_DESC); - oprot.writeI32(struct.seriesPathNum); - oprot.writeFieldEnd(); - } - if (struct.isSetSeqFileNum()) { - oprot.writeFieldBegin(SEQ_FILE_NUM_FIELD_DESC); - oprot.writeI32(struct.seqFileNum); - oprot.writeFieldEnd(); - } - if (struct.isSetUnSeqFileNum()) { - oprot.writeFieldBegin(UN_SEQ_FILE_NUM_FIELD_DESC); - oprot.writeI32(struct.unSeqFileNum); - oprot.writeFieldEnd(); - } - if (struct.isSetSequenceChunkNum()) { - oprot.writeFieldBegin(SEQUENCE_CHUNK_NUM_FIELD_DESC); - oprot.writeI32(struct.sequenceChunkNum); - oprot.writeFieldEnd(); - } - if (struct.isSetSequenceChunkPointNum()) { - oprot.writeFieldBegin(SEQUENCE_CHUNK_POINT_NUM_FIELD_DESC); - oprot.writeI64(struct.sequenceChunkPointNum); - oprot.writeFieldEnd(); - } - if (struct.isSetUnsequenceChunkNum()) { - oprot.writeFieldBegin(UNSEQUENCE_CHUNK_NUM_FIELD_DESC); - oprot.writeI32(struct.unsequenceChunkNum); - oprot.writeFieldEnd(); - } - if (struct.isSetUnsequenceChunkPointNum()) { - oprot.writeFieldBegin(UNSEQUENCE_CHUNK_POINT_NUM_FIELD_DESC); - oprot.writeI64(struct.unsequenceChunkPointNum); - oprot.writeFieldEnd(); - } - if (struct.isSetTotalPageNum()) { - oprot.writeFieldBegin(TOTAL_PAGE_NUM_FIELD_DESC); - oprot.writeI32(struct.totalPageNum); - oprot.writeFieldEnd(); - } - if (struct.isSetOverlappedPageNum()) { - oprot.writeFieldBegin(OVERLAPPED_PAGE_NUM_FIELD_DESC); - oprot.writeI32(struct.overlappedPageNum); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSTracingInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSTracingInfoTupleScheme getScheme() { - return new TSTracingInfoTupleScheme(); - } - } - - private static class TSTracingInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSTracingInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - oprot.writeI32(struct.activityList.size()); - for (java.lang.String _iter40 : struct.activityList) - { - oprot.writeString(_iter40); - } - } - { - oprot.writeI32(struct.elapsedTimeList.size()); - for (long _iter41 : struct.elapsedTimeList) - { - oprot.writeI64(_iter41); - } - } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSeriesPathNum()) { - optionals.set(0); - } - if (struct.isSetSeqFileNum()) { - optionals.set(1); - } - if (struct.isSetUnSeqFileNum()) { - optionals.set(2); - } - if (struct.isSetSequenceChunkNum()) { - optionals.set(3); - } - if (struct.isSetSequenceChunkPointNum()) { - optionals.set(4); - } - if (struct.isSetUnsequenceChunkNum()) { - optionals.set(5); - } - if (struct.isSetUnsequenceChunkPointNum()) { - optionals.set(6); - } - if (struct.isSetTotalPageNum()) { - optionals.set(7); - } - if (struct.isSetOverlappedPageNum()) { - optionals.set(8); - } - oprot.writeBitSet(optionals, 9); - if (struct.isSetSeriesPathNum()) { - oprot.writeI32(struct.seriesPathNum); - } - if (struct.isSetSeqFileNum()) { - oprot.writeI32(struct.seqFileNum); - } - if (struct.isSetUnSeqFileNum()) { - oprot.writeI32(struct.unSeqFileNum); - } - if (struct.isSetSequenceChunkNum()) { - oprot.writeI32(struct.sequenceChunkNum); - } - if (struct.isSetSequenceChunkPointNum()) { - oprot.writeI64(struct.sequenceChunkPointNum); - } - if (struct.isSetUnsequenceChunkNum()) { - oprot.writeI32(struct.unsequenceChunkNum); - } - if (struct.isSetUnsequenceChunkPointNum()) { - oprot.writeI64(struct.unsequenceChunkPointNum); - } - if (struct.isSetTotalPageNum()) { - oprot.writeI32(struct.totalPageNum); - } - if (struct.isSetOverlappedPageNum()) { - oprot.writeI32(struct.overlappedPageNum); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSTracingInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); - struct.activityList = new java.util.ArrayList(_list42.size); - @org.apache.thrift.annotation.Nullable java.lang.String _elem43; - for (int _i44 = 0; _i44 < _list42.size; ++_i44) - { - _elem43 = iprot.readString(); - struct.activityList.add(_elem43); - } - } - struct.setActivityListIsSet(true); - { - org.apache.thrift.protocol.TList _list45 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64); - struct.elapsedTimeList = new java.util.ArrayList(_list45.size); - long _elem46; - for (int _i47 = 0; _i47 < _list45.size; ++_i47) - { - _elem46 = iprot.readI64(); - struct.elapsedTimeList.add(_elem46); - } - } - struct.setElapsedTimeListIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(9); - if (incoming.get(0)) { - struct.seriesPathNum = iprot.readI32(); - struct.setSeriesPathNumIsSet(true); - } - if (incoming.get(1)) { - struct.seqFileNum = iprot.readI32(); - struct.setSeqFileNumIsSet(true); - } - if (incoming.get(2)) { - struct.unSeqFileNum = iprot.readI32(); - struct.setUnSeqFileNumIsSet(true); - } - if (incoming.get(3)) { - struct.sequenceChunkNum = iprot.readI32(); - struct.setSequenceChunkNumIsSet(true); - } - if (incoming.get(4)) { - struct.sequenceChunkPointNum = iprot.readI64(); - struct.setSequenceChunkPointNumIsSet(true); - } - if (incoming.get(5)) { - struct.unsequenceChunkNum = iprot.readI32(); - struct.setUnsequenceChunkNumIsSet(true); - } - if (incoming.get(6)) { - struct.unsequenceChunkPointNum = iprot.readI64(); - struct.setUnsequenceChunkPointNumIsSet(true); - } - if (incoming.get(7)) { - struct.totalPageNum = iprot.readI32(); - struct.setTotalPageNumIsSet(true); - } - if (incoming.get(8)) { - struct.overlappedPageNum = iprot.readI32(); - struct.setOverlappedPageNumIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSUnsetSchemaTemplateReq.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSUnsetSchemaTemplateReq.java deleted file mode 100644 index 2d0455755eaf6..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSUnsetSchemaTemplateReq.java +++ /dev/null @@ -1,579 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSUnsetSchemaTemplateReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSUnsetSchemaTemplateReq"); - - private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField PREFIX_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixPath", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField TEMPLATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("templateName", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSUnsetSchemaTemplateReqStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSUnsetSchemaTemplateReqTupleSchemeFactory(); - - public long sessionId; // required - public @org.apache.thrift.annotation.Nullable java.lang.String prefixPath; // required - public @org.apache.thrift.annotation.Nullable java.lang.String templateName; // 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 { - SESSION_ID((short)1, "sessionId"), - PREFIX_PATH((short)2, "prefixPath"), - TEMPLATE_NAME((short)3, "templateName"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SESSION_ID - return SESSION_ID; - case 2: // PREFIX_PATH - return PREFIX_PATH; - case 3: // TEMPLATE_NAME - return TEMPLATE_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SESSIONID_ISSET_ID = 0; - 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.PREFIX_PATH, new org.apache.thrift.meta_data.FieldMetaData("prefixPath", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TEMPLATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("templateName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSUnsetSchemaTemplateReq.class, metaDataMap); - } - - public TSUnsetSchemaTemplateReq() { - } - - public TSUnsetSchemaTemplateReq( - long sessionId, - java.lang.String prefixPath, - java.lang.String templateName) - { - this(); - this.sessionId = sessionId; - setSessionIdIsSet(true); - this.prefixPath = prefixPath; - this.templateName = templateName; - } - - /** - * Performs a deep copy on other. - */ - public TSUnsetSchemaTemplateReq(TSUnsetSchemaTemplateReq other) { - __isset_bitfield = other.__isset_bitfield; - this.sessionId = other.sessionId; - if (other.isSetPrefixPath()) { - this.prefixPath = other.prefixPath; - } - if (other.isSetTemplateName()) { - this.templateName = other.templateName; - } - } - - @Override - public TSUnsetSchemaTemplateReq deepCopy() { - return new TSUnsetSchemaTemplateReq(this); - } - - @Override - public void clear() { - setSessionIdIsSet(false); - this.sessionId = 0; - this.prefixPath = null; - this.templateName = null; - } - - public long getSessionId() { - return this.sessionId; - } - - public TSUnsetSchemaTemplateReq setSessionId(long sessionId) { - this.sessionId = sessionId; - setSessionIdIsSet(true); - return this; - } - - public void unsetSessionId() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetSessionId() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID); - } - - public void setSessionIdIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPrefixPath() { - return this.prefixPath; - } - - public TSUnsetSchemaTemplateReq setPrefixPath(@org.apache.thrift.annotation.Nullable java.lang.String prefixPath) { - this.prefixPath = prefixPath; - return this; - } - - public void unsetPrefixPath() { - this.prefixPath = null; - } - - /** Returns true if field prefixPath is set (has been assigned a value) and false otherwise */ - public boolean isSetPrefixPath() { - return this.prefixPath != null; - } - - public void setPrefixPathIsSet(boolean value) { - if (!value) { - this.prefixPath = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getTemplateName() { - return this.templateName; - } - - public TSUnsetSchemaTemplateReq setTemplateName(@org.apache.thrift.annotation.Nullable java.lang.String templateName) { - this.templateName = templateName; - return this; - } - - public void unsetTemplateName() { - this.templateName = null; - } - - /** Returns true if field templateName is set (has been assigned a value) and false otherwise */ - public boolean isSetTemplateName() { - return this.templateName != null; - } - - public void setTemplateNameIsSet(boolean value) { - if (!value) { - this.templateName = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SESSION_ID: - if (value == null) { - unsetSessionId(); - } else { - setSessionId((java.lang.Long)value); - } - break; - - case PREFIX_PATH: - if (value == null) { - unsetPrefixPath(); - } else { - setPrefixPath((java.lang.String)value); - } - break; - - case TEMPLATE_NAME: - if (value == null) { - unsetTemplateName(); - } else { - setTemplateName((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SESSION_ID: - return getSessionId(); - - case PREFIX_PATH: - return getPrefixPath(); - - case TEMPLATE_NAME: - return getTemplateName(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SESSION_ID: - return isSetSessionId(); - case PREFIX_PATH: - return isSetPrefixPath(); - case TEMPLATE_NAME: - return isSetTemplateName(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSUnsetSchemaTemplateReq) - return this.equals((TSUnsetSchemaTemplateReq)that); - return false; - } - - public boolean equals(TSUnsetSchemaTemplateReq that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sessionId = true; - boolean that_present_sessionId = true; - if (this_present_sessionId || that_present_sessionId) { - if (!(this_present_sessionId && that_present_sessionId)) - return false; - if (this.sessionId != that.sessionId) - return false; - } - - boolean this_present_prefixPath = true && this.isSetPrefixPath(); - boolean that_present_prefixPath = true && that.isSetPrefixPath(); - if (this_present_prefixPath || that_present_prefixPath) { - if (!(this_present_prefixPath && that_present_prefixPath)) - return false; - if (!this.prefixPath.equals(that.prefixPath)) - return false; - } - - boolean this_present_templateName = true && this.isSetTemplateName(); - boolean that_present_templateName = true && that.isSetTemplateName(); - if (this_present_templateName || that_present_templateName) { - if (!(this_present_templateName && that_present_templateName)) - return false; - if (!this.templateName.equals(that.templateName)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId); - - hashCode = hashCode * 8191 + ((isSetPrefixPath()) ? 131071 : 524287); - if (isSetPrefixPath()) - hashCode = hashCode * 8191 + prefixPath.hashCode(); - - hashCode = hashCode * 8191 + ((isSetTemplateName()) ? 131071 : 524287); - if (isSetTemplateName()) - hashCode = hashCode * 8191 + templateName.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSUnsetSchemaTemplateReq other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetPrefixPath(), other.isSetPrefixPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrefixPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixPath, other.prefixPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetTemplateName(), other.isSetTemplateName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTemplateName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.templateName, other.templateName); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSUnsetSchemaTemplateReq("); - boolean first = true; - - sb.append("sessionId:"); - sb.append(this.sessionId); - first = false; - if (!first) sb.append(", "); - sb.append("prefixPath:"); - if (this.prefixPath == null) { - sb.append("null"); - } else { - sb.append(this.prefixPath); - } - first = false; - if (!first) sb.append(", "); - sb.append("templateName:"); - if (this.templateName == null) { - sb.append("null"); - } else { - sb.append(this.templateName); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator. - if (prefixPath == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'prefixPath' was not present! Struct: " + toString()); - } - if (templateName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'templateName' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSUnsetSchemaTemplateReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSUnsetSchemaTemplateReqStandardScheme getScheme() { - return new TSUnsetSchemaTemplateReqStandardScheme(); - } - } - - private static class TSUnsetSchemaTemplateReqStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSUnsetSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PREFIX_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TEMPLATE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.templateName = iprot.readString(); - struct.setTemplateNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSUnsetSchemaTemplateReq struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); - oprot.writeI64(struct.sessionId); - oprot.writeFieldEnd(); - if (struct.prefixPath != null) { - oprot.writeFieldBegin(PREFIX_PATH_FIELD_DESC); - oprot.writeString(struct.prefixPath); - oprot.writeFieldEnd(); - } - if (struct.templateName != null) { - oprot.writeFieldBegin(TEMPLATE_NAME_FIELD_DESC); - oprot.writeString(struct.templateName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSUnsetSchemaTemplateReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSUnsetSchemaTemplateReqTupleScheme getScheme() { - return new TSUnsetSchemaTemplateReqTupleScheme(); - } - } - - private static class TSUnsetSchemaTemplateReqTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSUnsetSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeI64(struct.sessionId); - oprot.writeString(struct.prefixPath); - oprot.writeString(struct.templateName); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSUnsetSchemaTemplateReq struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.sessionId = iprot.readI64(); - struct.setSessionIdIsSet(true); - struct.prefixPath = iprot.readString(); - struct.setPrefixPathIsSet(true); - struct.templateName = iprot.readString(); - struct.setTemplateNameIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncIdentityInfo.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncIdentityInfo.java deleted file mode 100644 index 7a8b8c284a425..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncIdentityInfo.java +++ /dev/null @@ -1,680 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSyncIdentityInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSyncIdentityInfo"); - - private static final org.apache.thrift.protocol.TField PIPE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pipeName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSyncIdentityInfoStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSyncIdentityInfoTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.lang.String pipeName; // required - public long createTime; // required - public @org.apache.thrift.annotation.Nullable java.lang.String version; // required - public @org.apache.thrift.annotation.Nullable java.lang.String database; // 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 { - PIPE_NAME((short)1, "pipeName"), - CREATE_TIME((short)2, "createTime"), - VERSION((short)3, "version"), - DATABASE((short)4, "database"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PIPE_NAME - return PIPE_NAME; - case 2: // CREATE_TIME - return CREATE_TIME; - case 3: // VERSION - return VERSION; - case 4: // DATABASE - return DATABASE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CREATETIME_ISSET_ID = 0; - 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.PIPE_NAME, new org.apache.thrift.meta_data.FieldMetaData("pipeName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSyncIdentityInfo.class, metaDataMap); - } - - public TSyncIdentityInfo() { - } - - public TSyncIdentityInfo( - java.lang.String pipeName, - long createTime, - java.lang.String version, - java.lang.String database) - { - this(); - this.pipeName = pipeName; - this.createTime = createTime; - setCreateTimeIsSet(true); - this.version = version; - this.database = database; - } - - /** - * Performs a deep copy on other. - */ - public TSyncIdentityInfo(TSyncIdentityInfo other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPipeName()) { - this.pipeName = other.pipeName; - } - this.createTime = other.createTime; - if (other.isSetVersion()) { - this.version = other.version; - } - if (other.isSetDatabase()) { - this.database = other.database; - } - } - - @Override - public TSyncIdentityInfo deepCopy() { - return new TSyncIdentityInfo(this); - } - - @Override - public void clear() { - this.pipeName = null; - setCreateTimeIsSet(false); - this.createTime = 0; - this.version = null; - this.database = null; - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getPipeName() { - return this.pipeName; - } - - public TSyncIdentityInfo setPipeName(@org.apache.thrift.annotation.Nullable java.lang.String pipeName) { - this.pipeName = pipeName; - return this; - } - - public void unsetPipeName() { - this.pipeName = null; - } - - /** Returns true if field pipeName is set (has been assigned a value) and false otherwise */ - public boolean isSetPipeName() { - return this.pipeName != null; - } - - public void setPipeNameIsSet(boolean value) { - if (!value) { - this.pipeName = null; - } - } - - public long getCreateTime() { - return this.createTime; - } - - public TSyncIdentityInfo setCreateTime(long createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - return this; - } - - public void unsetCreateTime() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ - public boolean isSetCreateTime() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getVersion() { - return this.version; - } - - public TSyncIdentityInfo setVersion(@org.apache.thrift.annotation.Nullable java.lang.String version) { - this.version = version; - return this; - } - - public void unsetVersion() { - this.version = null; - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return this.version != null; - } - - public void setVersionIsSet(boolean value) { - if (!value) { - this.version = null; - } - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getDatabase() { - return this.database; - } - - public TSyncIdentityInfo setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) { - this.database = database; - return this; - } - - public void unsetDatabase() { - this.database = null; - } - - /** Returns true if field database is set (has been assigned a value) and false otherwise */ - public boolean isSetDatabase() { - return this.database != null; - } - - public void setDatabaseIsSet(boolean value) { - if (!value) { - this.database = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case PIPE_NAME: - if (value == null) { - unsetPipeName(); - } else { - setPipeName((java.lang.String)value); - } - break; - - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((java.lang.Long)value); - } - break; - - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((java.lang.String)value); - } - break; - - case DATABASE: - if (value == null) { - unsetDatabase(); - } else { - setDatabase((java.lang.String)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case PIPE_NAME: - return getPipeName(); - - case CREATE_TIME: - return getCreateTime(); - - case VERSION: - return getVersion(); - - case DATABASE: - return getDatabase(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case PIPE_NAME: - return isSetPipeName(); - case CREATE_TIME: - return isSetCreateTime(); - case VERSION: - return isSetVersion(); - case DATABASE: - return isSetDatabase(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSyncIdentityInfo) - return this.equals((TSyncIdentityInfo)that); - return false; - } - - public boolean equals(TSyncIdentityInfo that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_pipeName = true && this.isSetPipeName(); - boolean that_present_pipeName = true && that.isSetPipeName(); - if (this_present_pipeName || that_present_pipeName) { - if (!(this_present_pipeName && that_present_pipeName)) - return false; - if (!this.pipeName.equals(that.pipeName)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_version = true && this.isSetVersion(); - boolean that_present_version = true && that.isSetVersion(); - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (!this.version.equals(that.version)) - return false; - } - - boolean this_present_database = true && this.isSetDatabase(); - boolean that_present_database = true && that.isSetDatabase(); - if (this_present_database || that_present_database) { - if (!(this_present_database && that_present_database)) - return false; - if (!this.database.equals(that.database)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetPipeName()) ? 131071 : 524287); - if (isSetPipeName()) - hashCode = hashCode * 8191 + pipeName.hashCode(); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createTime); - - hashCode = hashCode * 8191 + ((isSetVersion()) ? 131071 : 524287); - if (isSetVersion()) - hashCode = hashCode * 8191 + version.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287); - if (isSetDatabase()) - hashCode = hashCode * 8191 + database.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(TSyncIdentityInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetPipeName(), other.isSetPipeName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPipeName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pipeName, other.pipeName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDatabase(), other.isSetDatabase()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDatabase()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSyncIdentityInfo("); - boolean first = true; - - sb.append("pipeName:"); - if (this.pipeName == null) { - sb.append("null"); - } else { - sb.append(this.pipeName); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("version:"); - if (this.version == null) { - sb.append("null"); - } else { - sb.append(this.version); - } - first = false; - if (!first) sb.append(", "); - sb.append("database:"); - if (this.database == null) { - sb.append("null"); - } else { - sb.append(this.database); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (pipeName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'pipeName' was not present! Struct: " + toString()); - } - // alas, we cannot check 'createTime' because it's a primitive and you chose the non-beans generator. - if (version == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not present! Struct: " + toString()); - } - if (database == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'database' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSyncIdentityInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSyncIdentityInfoStandardScheme getScheme() { - return new TSyncIdentityInfoStandardScheme(); - } - } - - private static class TSyncIdentityInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSyncIdentityInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PIPE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.pipeName = iprot.readString(); - struct.setPipeNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // CREATE_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.createTime = iprot.readI64(); - struct.setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.version = iprot.readString(); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DATABASE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.database = iprot.readString(); - struct.setDatabaseIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetCreateTime()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'createTime' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSyncIdentityInfo struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.pipeName != null) { - oprot.writeFieldBegin(PIPE_NAME_FIELD_DESC); - oprot.writeString(struct.pipeName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI64(struct.createTime); - oprot.writeFieldEnd(); - if (struct.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeString(struct.version); - oprot.writeFieldEnd(); - } - if (struct.database != null) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - oprot.writeString(struct.database); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSyncIdentityInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSyncIdentityInfoTupleScheme getScheme() { - return new TSyncIdentityInfoTupleScheme(); - } - } - - private static class TSyncIdentityInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSyncIdentityInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.pipeName); - oprot.writeI64(struct.createTime); - oprot.writeString(struct.version); - oprot.writeString(struct.database); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSyncIdentityInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.pipeName = iprot.readString(); - struct.setPipeNameIsSet(true); - struct.createTime = iprot.readI64(); - struct.setCreateTimeIsSet(true); - struct.version = iprot.readString(); - struct.setVersionIsSet(true); - struct.database = iprot.readString(); - struct.setDatabaseIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncTransportMetaInfo.java b/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncTransportMetaInfo.java deleted file mode 100644 index 4205f85b015e1..0000000000000 --- a/gen-java/org/apache/iotdb/service/rpc/thrift/TSyncTransportMetaInfo.java +++ /dev/null @@ -1,478 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.20.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.iotdb.service.rpc.thrift; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-05-09") -public class TSyncTransportMetaInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSyncTransportMetaInfo"); - - private static final org.apache.thrift.protocol.TField FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fileName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField START_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("startIndex", org.apache.thrift.protocol.TType.I64, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSyncTransportMetaInfoStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSyncTransportMetaInfoTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable java.lang.String fileName; // required - public long startIndex; // 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 { - FILE_NAME((short)1, "fileName"), - START_INDEX((short)2, "startIndex"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FILE_NAME - return FILE_NAME; - case 2: // START_INDEX - return START_INDEX; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __STARTINDEX_ISSET_ID = 0; - 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.FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("fileName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.START_INDEX, new org.apache.thrift.meta_data.FieldMetaData("startIndex", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSyncTransportMetaInfo.class, metaDataMap); - } - - public TSyncTransportMetaInfo() { - } - - public TSyncTransportMetaInfo( - java.lang.String fileName, - long startIndex) - { - this(); - this.fileName = fileName; - this.startIndex = startIndex; - setStartIndexIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public TSyncTransportMetaInfo(TSyncTransportMetaInfo other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetFileName()) { - this.fileName = other.fileName; - } - this.startIndex = other.startIndex; - } - - @Override - public TSyncTransportMetaInfo deepCopy() { - return new TSyncTransportMetaInfo(this); - } - - @Override - public void clear() { - this.fileName = null; - setStartIndexIsSet(false); - this.startIndex = 0; - } - - @org.apache.thrift.annotation.Nullable - public java.lang.String getFileName() { - return this.fileName; - } - - public TSyncTransportMetaInfo setFileName(@org.apache.thrift.annotation.Nullable java.lang.String fileName) { - this.fileName = fileName; - return this; - } - - public void unsetFileName() { - this.fileName = null; - } - - /** Returns true if field fileName is set (has been assigned a value) and false otherwise */ - public boolean isSetFileName() { - return this.fileName != null; - } - - public void setFileNameIsSet(boolean value) { - if (!value) { - this.fileName = null; - } - } - - public long getStartIndex() { - return this.startIndex; - } - - public TSyncTransportMetaInfo setStartIndex(long startIndex) { - this.startIndex = startIndex; - setStartIndexIsSet(true); - return this; - } - - public void unsetStartIndex() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTINDEX_ISSET_ID); - } - - /** Returns true if field startIndex is set (has been assigned a value) and false otherwise */ - public boolean isSetStartIndex() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTINDEX_ISSET_ID); - } - - public void setStartIndexIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTINDEX_ISSET_ID, value); - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case FILE_NAME: - if (value == null) { - unsetFileName(); - } else { - setFileName((java.lang.String)value); - } - break; - - case START_INDEX: - if (value == null) { - unsetStartIndex(); - } else { - setStartIndex((java.lang.Long)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case FILE_NAME: - return getFileName(); - - case START_INDEX: - return getStartIndex(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case FILE_NAME: - return isSetFileName(); - case START_INDEX: - return isSetStartIndex(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof TSyncTransportMetaInfo) - return this.equals((TSyncTransportMetaInfo)that); - return false; - } - - public boolean equals(TSyncTransportMetaInfo that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_fileName = true && this.isSetFileName(); - boolean that_present_fileName = true && that.isSetFileName(); - if (this_present_fileName || that_present_fileName) { - if (!(this_present_fileName && that_present_fileName)) - return false; - if (!this.fileName.equals(that.fileName)) - return false; - } - - boolean this_present_startIndex = true; - boolean that_present_startIndex = true; - if (this_present_startIndex || that_present_startIndex) { - if (!(this_present_startIndex && that_present_startIndex)) - return false; - if (this.startIndex != that.startIndex) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetFileName()) ? 131071 : 524287); - if (isSetFileName()) - hashCode = hashCode * 8191 + fileName.hashCode(); - - hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startIndex); - - return hashCode; - } - - @Override - public int compareTo(TSyncTransportMetaInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetFileName(), other.isSetFileName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFileName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileName, other.fileName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetStartIndex(), other.isSetStartIndex()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartIndex()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startIndex, other.startIndex); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("TSyncTransportMetaInfo("); - boolean first = true; - - sb.append("fileName:"); - if (this.fileName == null) { - sb.append("null"); - } else { - sb.append(this.fileName); - } - first = false; - if (!first) sb.append(", "); - sb.append("startIndex:"); - sb.append(this.startIndex); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (fileName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileName' was not present! Struct: " + toString()); - } - // alas, we cannot check 'startIndex' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - 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); - } - } - - private static class TSyncTransportMetaInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSyncTransportMetaInfoStandardScheme getScheme() { - return new TSyncTransportMetaInfoStandardScheme(); - } - } - - private static class TSyncTransportMetaInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, TSyncTransportMetaInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // FILE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.fileName = iprot.readString(); - struct.setFileNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // START_INDEX - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.startIndex = iprot.readI64(); - struct.setStartIndexIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetStartIndex()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'startIndex' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, TSyncTransportMetaInfo struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.fileName != null) { - oprot.writeFieldBegin(FILE_NAME_FIELD_DESC); - oprot.writeString(struct.fileName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(START_INDEX_FIELD_DESC); - oprot.writeI64(struct.startIndex); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TSyncTransportMetaInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public TSyncTransportMetaInfoTupleScheme getScheme() { - return new TSyncTransportMetaInfoTupleScheme(); - } - } - - private static class TSyncTransportMetaInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TSyncTransportMetaInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.fileName); - oprot.writeI64(struct.startIndex); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TSyncTransportMetaInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.fileName = iprot.readString(); - struct.setFileNameIsSet(true); - struct.startIndex = iprot.readI64(); - struct.setStartIndexIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - From e59dd30b6099c4e2e49d32e6de6a5faf79471836 Mon Sep 17 00:00:00 2001 From: Tian Jiang Date: Tue, 1 Jul 2025 19:00:40 +0800 Subject: [PATCH 21/25] refactor compression --- .../org/apache/iotdb/session/Session.java | 39 ++-- .../session/rpccompress/ColumnEntry.java | 144 ------------ .../iotdb/session/rpccompress/MetaHead.java | 140 ----------- .../session/rpccompress/RpcCompressor.java | 79 ------- .../session/rpccompress/RpcUncompressor.java | 73 ------ .../session/rpccompress/TabletEncoder.java | 115 ++++++++++ .../decoder/ChimpColumnDecoder.java | 103 --------- .../rpccompress/decoder/ColumnDecoder.java | 49 ---- .../decoder/DictionaryColumnDecoder.java | 78 ------- .../decoder/GorillaColumnDecoder.java | 103 --------- .../decoder/PlainColumnDecoder.java | 152 ------------ .../decoder/RlbeColumnDecoder.java | 104 --------- .../rpccompress/decoder/RleColumnDecoder.java | 112 --------- .../rpccompress/decoder/RpcDecoder.java | 125 ---------- .../decoder/SprintzColumnDecoder.java | 104 --------- .../decoder/Ts2DiffColumnDecoder.java | 98 -------- .../decoder/ZigzagColumnDecoder.java | 95 -------- .../encoder/ChimpColumnEncoder.java | 168 -------------- .../rpccompress/encoder/ColumnEncoder.java | 94 -------- .../encoder/DictionaryColumnEncoder.java | 111 --------- .../encoder/GorillaColumnEncoder.java | 164 ------------- .../encoder/PlainColumnEncoder.java | 217 ------------------ .../encoder/RlbeColumnEncoder.java | 164 ------------- .../rpccompress/encoder/RleColumnEncoder.java | 182 --------------- .../rpccompress/encoder/RpcEncoder.java | 203 ---------------- .../encoder/SprintzColumnEncoder.java | 164 ------------- .../encoder/Ts2DiffColumnEncoder.java | 148 ------------ .../encoder/ZigzagColumnEncoder.java | 127 ---------- .../payload/SubscriptionSessionDataSet.java | 1 - .../iotdb/session/util/SessionUtils.java | 125 ++++++++++ .../iotdb/session/SessionCacheLeaderTest.java | 2 +- .../plan/parser/StatementGenerator.java | 140 +++-------- .../org/apache/iotdb/util/TabletDecoder.java | 197 ++++++++++++++++ .../table/column/TsTableColumnCategory.java | 2 +- .../src/main/thrift/client.thrift | 4 +- 35 files changed, 493 insertions(+), 3433 deletions(-) delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/ColumnEntry.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/MetaHead.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java create mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java delete mode 100644 iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java create mode 100644 iotdb-core/datanode/src/main/java/org/apache/iotdb/util/TabletDecoder.java diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index a127c55b3ae79..300c80af7eeb7 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -56,8 +56,7 @@ import org.apache.iotdb.service.rpc.thrift.TSQueryTemplateResp; import org.apache.iotdb.service.rpc.thrift.TSSetSchemaTemplateReq; import org.apache.iotdb.service.rpc.thrift.TSUnsetSchemaTemplateReq; -import org.apache.iotdb.session.rpccompress.RpcCompressor; -import org.apache.iotdb.session.rpccompress.encoder.RpcEncoder; +import org.apache.iotdb.session.rpccompress.TabletEncoder; import org.apache.iotdb.session.template.MeasurementNode; import org.apache.iotdb.session.template.TemplateQueryType; import org.apache.iotdb.session.util.SessionUtils; @@ -2980,28 +2979,34 @@ private TSInsertTabletReq genTSInsertTabletReq(Tablet tablet, boolean sorted, bo request.setPrefixPath(tablet.getDeviceId()); request.setIsAligned(isAligned); - if (this.enableRPCCompression) { - request.setIsCompressed(true); + List encodingTypes; + if (enableRPCCompression) { + encodingTypes = new ArrayList<>(tablet.getSchemas().size() + 1); + encodingTypes.add(this.columnEncodersMap.get(TSDataType.INT64).serialize()); for (IMeasurementSchema measurementSchema : tablet.getSchemas()) { if (measurementSchema.getMeasurementName() == null) { throw new IllegalArgumentException("measurement should be non null value"); } - request.addToEncodingTypes( - this.columnEncodersMap.get(measurementSchema.getType()).ordinal()); - } - final long startTime = System.nanoTime(); - try { - RpcEncoder rpcEncoder = new RpcEncoder(this.columnEncodersMap); - RpcCompressor rpcCompressor = new RpcCompressor(this.compressionType); - request.setCompressType(this.compressionType.serialize()); - request.setTimestamps(rpcCompressor.compress(rpcEncoder.encodeTimestamps(tablet))); - request.setValues(rpcCompressor.compress(rpcEncoder.encodeValues(tablet))); - } finally { + encodingTypes.add(this.columnEncodersMap.get(measurementSchema.getType()).serialize()); } } else { - request.setTimestamps(SessionUtils.getTimeBuffer(tablet)); - request.setValues(SessionUtils.getValueBuffer(tablet)); + encodingTypes = + Collections.nCopies(tablet.getSchemas().size() + 1, TSEncoding.PLAIN.serialize()); + } + + TabletEncoder encoder = + new TabletEncoder( + this.compressionType, + encodingTypes.stream().map(TSEncoding::deserialize).collect(Collectors.toList())); + + request.setIsCompressed(this.enableRPCCompression); + if (this.enableRPCCompression) { + request.setCompressType(compressionType.serialize()); + request.setEncodingTypes(encodingTypes); } + request.setTimestamps(encoder.encodeTime(tablet)); + request.setValues(encoder.encodeValues(tablet)); + request.setSize(tablet.getRowSize()); return request; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/ColumnEntry.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/ColumnEntry.java deleted file mode 100644 index c3824f53303ea..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/ColumnEntry.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress; - -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; - -import java.io.Serializable; -import java.nio.ByteBuffer; - -public class ColumnEntry implements Serializable { - - private Integer compressedSize; - private Integer unCompressedSize; - private TSDataType dataType; - private TSEncoding encodingType; - - /** The number of bytes occupied by ColumnEntry */ - private Integer size; - - public ColumnEntry() { - updateSize(); - } - - public ColumnEntry( - Integer compressedSize, - Integer unCompressedSize, - TSDataType dataType, - TSEncoding encodingType) { - this.compressedSize = compressedSize; - this.unCompressedSize = unCompressedSize; - this.dataType = dataType; - this.encodingType = encodingType; - updateSize(); - } - - /** - * Update the total size of the column entry Total size = compressedSize (4 bytes) + - * unCompressedSize (4 bytes) + dataType (1 byte) + encodingType (1 byte) + offset (4 bytes) - */ - public void updateSize() { - int totalSize = 0; - totalSize += 4; - totalSize += 4; - totalSize += 1; - totalSize += 1; - this.size = totalSize; - } - - public Integer getCompressedSize() { - return compressedSize; - } - - public Integer getUnCompressedSize() { - return unCompressedSize; - } - - public TSDataType getDataType() { - return dataType; - } - - public TSEncoding getEncodingType() { - return encodingType; - } - - public Integer getSize() { - return size; - } - - public void setCompressedSize(Integer compressedSize) { - this.compressedSize = compressedSize; - } - - public void setUnCompressedSize(Integer unCompressedSize) { - this.unCompressedSize = unCompressedSize; - } - - public void setDataType(TSDataType dataType) { - this.dataType = dataType; - } - - public void setEncodingType(TSEncoding encodingType) { - this.encodingType = encodingType; - } - - public void setSize(Integer size) { - this.size = size; - } - - @Override - public String toString() { - return "ColumnEntry{" - + "compressedSize=" - + compressedSize - + ", unCompressedSize=" - + unCompressedSize - + ", dataType=" - + dataType - + ", encodingType=" - + encodingType - + ", size=" - + size - + '}'; - } - - public byte[] toBytes() { - ByteBuffer buffer = ByteBuffer.allocate(getSize()); - buffer.putInt(compressedSize != null ? compressedSize : 0); - buffer.putInt(unCompressedSize != null ? unCompressedSize : 0); - buffer.put((byte) (dataType != null ? dataType.ordinal() : 0)); - buffer.put((byte) (encodingType != null ? encodingType.ordinal() : 0)); - return buffer.array(); - } - - public static ColumnEntry fromBytes(ByteBuffer buffer) { - int compressedSize = buffer.getInt(); - int unCompressedSize = buffer.getInt(); - TSDataType dataType = TSDataType.values()[buffer.get()]; - TSEncoding encodingType = TSEncoding.values()[buffer.get()]; - ColumnEntry entry = new ColumnEntry(); - entry.setCompressedSize(compressedSize); - entry.setUnCompressedSize(unCompressedSize); - entry.setDataType(dataType); - entry.setEncodingType(encodingType); - entry.updateSize(); - return entry; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/MetaHead.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/MetaHead.java deleted file mode 100644 index c66ff9afe21cc..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/MetaHead.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress; - -import java.io.Serializable; -import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.List; - -public class MetaHead implements Serializable { - - /** Number of columns in the compressed file. */ - private Integer numberOfColumns; - - /** The size of the metadata header. */ - private Integer size; - - /** ColumnEntry list */ - private List columnEntries; - - public MetaHead() { - this.columnEntries = new ArrayList<>(); - updateSize(); - } - - public MetaHead(Integer numberOfColumns, List columnEntries) { - this.numberOfColumns = numberOfColumns; - this.columnEntries = columnEntries; - updateSize(); - } - - public Integer getNumberOfColumns() { - return numberOfColumns; - } - - public Integer getSize() { - return size; - } - - public List getColumnEntries() { - return columnEntries; - } - - /** - * Append ColumnEntry - * - * @param entry ColumnEntry - */ - public void addColumnEntry(ColumnEntry entry) { - if (columnEntries == null) { - columnEntries = new ArrayList<>(); - } - columnEntries.add(entry); - numberOfColumns = columnEntries.size(); - updateSize(); - } - - /** - * Update the size of the metadata header. The total size of MetaHead = MetaHead header size + the - * size of all ColumnEntry. MetaHead header size = numberOfColumns (4 bytes) + size (4 bytes). - */ - private void updateSize() { - // MetaHead header size, numberOfColumns(4 byte) + size(4 byte) - int totalSize = 8; - - // Accumulate the size of all ColumnEntry - if (columnEntries != null) { - for (ColumnEntry entry : columnEntries) { - if (entry != null && entry.getSize() != null) { - totalSize += entry.getSize(); - } - } - } - this.size = totalSize; - } - - /** Serialize to byte array */ - public byte[] toBytes() { - // 1. Calculate total length - int totalSize = 8; // numberOfColumns(4字节) + size(4字节) - for (ColumnEntry entry : columnEntries) { - totalSize += entry.getSize(); - } - ByteBuffer buffer = ByteBuffer.allocate(totalSize); - - // 2. Write numberOfColumns and size - buffer.putInt(numberOfColumns != null ? numberOfColumns : 0); - buffer.putInt(size != null ? size : 0); - - // 3. Write each ColumnEntry - for (ColumnEntry entry : columnEntries) { - buffer.put(entry.toBytes()); - } - - return buffer.array(); - } - - /** Deserialize from byte array */ - public static MetaHead fromBytes(byte[] bytes) { - ByteBuffer buffer = ByteBuffer.wrap(bytes); - int numberOfColumns = buffer.getInt(); - int size = buffer.getInt(); - List columnEntries = new ArrayList<>(); - for (int i = 0; i < numberOfColumns; i++) { - ColumnEntry entry = ColumnEntry.fromBytes(buffer); - columnEntries.add(entry); - } - MetaHead metaHead = new MetaHead(numberOfColumns, columnEntries); - metaHead.size = size; - return metaHead; - } - - @Override - public String toString() { - return "MetaHead{" - + "numberOfColumns=" - + numberOfColumns - + ", size=" - + size - + ", columnEntries=" - + columnEntries - + '}'; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java deleted file mode 100644 index 356a2cb84a519..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcCompressor.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress; - -import org.apache.tsfile.compress.ICompressor; -import org.apache.tsfile.file.metadata.enums.CompressionType; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.nio.ByteBuffer; - -public class RpcCompressor { - - public static ICompressor compressor; - - public RpcCompressor(CompressionType name) { - compressor = ICompressor.getCompressor(name); - } - - public ByteBuffer compress(ByteArrayOutputStream input) { - try { - byte[] data = input.toByteArray(); - int length = data.length; - - byte[] compressed = compress(data); - ByteBuffer buffer = ByteBuffer.allocate(compressed.length + Integer.BYTES); - buffer.put(compressed).putInt(length); - buffer.flip(); - return buffer; - } catch (IOException e) { - throw new RuntimeException("Compression failed", e); - } - } - - public byte[] compress(byte[] data) throws IOException { - return compressor.compress(data); - } - - public byte[] compress(byte[] data, int offset, int length) throws IOException { - return compressor.compress(data, offset, length); - } - - public int compress(byte[] data, int offset, int length, byte[] compressed) throws IOException { - return compressor.compress(data, offset, length, compressed); - } - - /** - * Compress ByteBuffer, this method is better for longer data - * - * @return byte length of compressed data. - */ - public int compress(ByteBuffer data, ByteBuffer compressed) throws IOException { - return compressor.compress(data, compressed); - } - - public int getMaxBytesForCompression(int uncompressedDataSize) { - return compressor.getMaxBytesForCompression(uncompressedDataSize); - } - - public CompressionType getType() { - return compressor.getType(); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java deleted file mode 100644 index e38cf6c27f9e0..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/RpcUncompressor.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress; - -import org.apache.tsfile.compress.IUnCompressor; -import org.apache.tsfile.file.metadata.enums.CompressionType; - -import java.io.IOException; -import java.nio.ByteBuffer; - -public class RpcUncompressor { - public static IUnCompressor unCompressor; - - public RpcUncompressor(CompressionType name) { - unCompressor = IUnCompressor.getUnCompressor(name); - } - - public ByteBuffer uncompress(ByteBuffer byteArray) { - try { - int uncompressedLength = byteArray.getInt(byteArray.limit() - 4); - ByteBuffer output = ByteBuffer.allocate(uncompressedLength); - byte[] compressedData = new byte[byteArray.remaining() - 4]; - byteArray.slice().get(compressedData); - byte[] uncompressedData = unCompressor.uncompress(compressedData); - output.put(uncompressedData); - output.flip(); - return output; - } catch (IOException e) { - throw new RuntimeException("Failed to decompress buffer", e); - } - } - - public int getUncompressedLength(byte[] array, int offset, int length) throws IOException { - return unCompressor.getUncompressedLength(array, offset, length); - } - - public int getUncompressedLength(ByteBuffer buffer) throws IOException { - return unCompressor.getUncompressedLength(buffer); - } - - public byte[] uncompress(byte[] byteArray) throws IOException { - return unCompressor.uncompress(byteArray); - } - - public int uncompress(byte[] byteArray, int offset, int length, byte[] output, int outOffset) - throws IOException { - return unCompressor.uncompress(byteArray, offset, length, output, outOffset); - } - - public int uncompress(ByteBuffer compressed, ByteBuffer uncompressed) throws IOException { - return unCompressor.uncompress(compressed, uncompressed); - } - - public CompressionType getCodecName() { - return unCompressor.getCodecName(); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java new file mode 100644 index 0000000000000..3c8a97416e400 --- /dev/null +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java @@ -0,0 +1,115 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.iotdb.session.rpccompress; + +import org.apache.iotdb.session.util.SessionUtils; + +import org.apache.tsfile.compress.ICompressor; +import org.apache.tsfile.encoding.encoder.Encoder; +import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.CompressionType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.BitMap; +import org.apache.tsfile.utils.BytesUtils; +import org.apache.tsfile.utils.PublicBAOS; +import org.apache.tsfile.write.record.Tablet; +import org.apache.tsfile.write.schema.IMeasurementSchema; + +import java.io.DataOutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.List; + +public class TabletEncoder { + private final CompressionType compressionType; + private final List encodingList; + + /** + * @param compressionType compression type + * @param encodingList the first element is for the time column + */ + public TabletEncoder(CompressionType compressionType, List encodingList) { + this.compressionType = compressionType; + this.encodingList = encodingList; + } + + public ByteBuffer encodeTime(Tablet tablet) { + Encoder encoder = + TSEncodingBuilder.getEncodingBuilder(encodingList.get(0)).getEncoder(TSDataType.INT64); + PublicBAOS baos = new PublicBAOS(); + for (int i = 0; i < tablet.getRowSize(); i++) { + encoder.encode(tablet.getTimestamp(i), baos); + } + try { + encoder.flush(baos); + } catch (IOException e) { + throw new IllegalStateException(e); + } + ByteBuffer buffer = ByteBuffer.wrap(baos.getBuf(), 0, baos.size()); + return compressBuffer(buffer); + } + + public ByteBuffer encodeValues(Tablet tablet) { + PublicBAOS baos = new PublicBAOS(); + List schemas = tablet.getSchemas(); + for (int j = 0, schemasSize = schemas.size(); j < schemasSize; j++) { + IMeasurementSchema schema = schemas.get(j); + TSDataType dataType = schema.getType(); + TSEncoding encoding = encodingList.get(j + 1); + Encoder encoder = TSEncodingBuilder.getEncodingBuilder(encoding).getEncoder(dataType); + SessionUtils.encodeValue(dataType, tablet, j, encoder, baos); + } + + BitMap[] bitMaps = tablet.getBitMaps(); + if (bitMaps != null) { + try (DataOutputStream dataOutputStream = new DataOutputStream(baos)) { + for (BitMap bitMap : bitMaps) { + boolean columnHasNull = bitMap != null && !bitMap.isAllUnmarked(tablet.getRowSize()); + dataOutputStream.writeByte(BytesUtils.boolToByte(columnHasNull)); + if (columnHasNull) { + dataOutputStream.write(bitMap.getTruncatedByteArray(tablet.getRowSize())); + } + } + } catch (IOException e) { + throw new IllegalStateException(e); + } + } + + ByteBuffer buffer = ByteBuffer.wrap(baos.getBuf(), 0, baos.size()); + return compressBuffer(buffer); + } + + private ByteBuffer compressBuffer(ByteBuffer buffer) { + if (compressionType != CompressionType.UNCOMPRESSED) { + ICompressor compressor = ICompressor.getCompressor(compressionType); + ByteBuffer compressed = + ByteBuffer.allocate(compressor.getMaxBytesForCompression(buffer.remaining())); + try { + compressor.compress(buffer, compressed); + buffer = compressed; + buffer.flip(); + } catch (IOException e) { + throw new IllegalStateException(e); + } + } + return buffer; + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java deleted file mode 100644 index e2720a37dd6ab..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ChimpColumnDecoder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.nio.ByteBuffer; - -public class ChimpColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public ChimpColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.CHIMP); - } - - @Override - public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - switch (dataType) { - case FLOAT: - return decodeFloatColumn(buffer, columnEntry, rowCount); - case DOUBLE: - return decodeDoubleColumn(buffer, columnEntry, rowCount); - case INT32: - case DATE: - return decodeIntColumn(buffer, columnEntry, rowCount); - case INT64: - case TIMESTAMP: - return decodeLongColumn(buffer, columnEntry, rowCount); - default: - throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); - } - } - - @Override - public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); - } - - @Override - public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } - - @Override - public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } - - @Override - public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } - - @Override - public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; - } - - @Override - public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java deleted file mode 100644 index aaae5e2e17387..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ColumnDecoder.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; - -import java.nio.ByteBuffer; - -public interface ColumnDecoder { - - Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); - - boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); - - int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); - - long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); - - float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); - - double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); - - Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount); - - default Decoder getDecoder(TSDataType type, TSEncoding encodingType) { - return Decoder.getDecoderByType(encodingType, type); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java deleted file mode 100644 index 098540817afc4..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/DictionaryColumnDecoder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.nio.ByteBuffer; - -public class DictionaryColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public DictionaryColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.DICTIONARY); - } - - @Override - public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - return decodeBinaryColumn(buffer, columnEntry, rowCount); - } - - @Override - public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - Binary[] result = new Binary[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBinary(buffer); - } - return result; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java deleted file mode 100644 index 877d4f0fe8794..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/GorillaColumnDecoder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; - -import java.nio.ByteBuffer; - -public class GorillaColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public GorillaColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.GORILLA); - } - - @Override - public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - switch (dataType) { - case FLOAT: - return decodeFloatColumn(buffer, columnEntry, rowCount); - case DOUBLE: - return decodeDoubleColumn(buffer, columnEntry, rowCount); - case INT32: - case DATE: - return decodeIntColumn(buffer, columnEntry, rowCount); - case INT64: - case VECTOR: - case TIMESTAMP: - return decodeLongColumn(buffer, columnEntry, rowCount); - default: - throw new UnsupportedOperationException("Gorilla doesn't support data type: " + dataType); - } - } - - @Override - public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnsupportedOperationException("Gorilla doesn't support data type: " + dataType); - } - - @Override - public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } - - @Override - public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } - - @Override - public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } - - @Override - public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; - } - - @Override - public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnsupportedOperationException("Gorilla doesn't support data type: " + dataType); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java deleted file mode 100644 index 941638cb83a4f..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/PlainColumnDecoder.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; - -import java.nio.ByteBuffer; - -public class PlainColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public PlainColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.PLAIN); - } - - @Override - public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - switch (dataType) { - case BOOLEAN: - { - boolean[] result = new boolean[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBoolean(buffer); - } - return result; - } - case INT32: - case DATE: - { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } - case INT64: - case TIMESTAMP: - { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } - case FLOAT: - { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } - case DOUBLE: - { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; - } - case TEXT: - case STRING: - case BLOB: - { - Binary[] result = new Binary[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBinary(buffer); - } - return result; - } - default: - throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); - } - } - - @Override - public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - boolean[] result = new boolean[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBoolean(buffer); - } - return result; - } - - @Override - public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } - - @Override - public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } - - @Override - public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } - - @Override - public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; - } - - @Override - public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - Binary[] result = new Binary[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBinary(buffer); - } - return result; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java deleted file mode 100644 index cb89d478a005b..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RlbeColumnDecoder.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.exception.encoding.TsFileDecodingException; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; - -import java.nio.ByteBuffer; - -public class RlbeColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public RlbeColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.RLBE); - } - - @Override - public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - switch (dataType) { - case INT32: - case DATE: - return decodeIntColumn(buffer, columnEntry, rowCount); - case INT64: - case TIMESTAMP: - return decodeLongColumn(buffer, columnEntry, rowCount); - case FLOAT: - return decodeFloatColumn(buffer, columnEntry, rowCount); - case DOUBLE: - return decodeDoubleColumn(buffer, columnEntry, rowCount); - default: - throw new TsFileDecodingException( - String.format("RLBE doesn't support data type: " + dataType)); - } - } - - @Override - public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new TsFileDecodingException(String.format("RLBE doesn't support data type: " + dataType)); - } - - @Override - public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } - - @Override - public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } - - @Override - public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } - - @Override - public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; - } - - @Override - public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new TsFileDecodingException(String.format("RLBE doesn't support data type: " + dataType)); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java deleted file mode 100644 index bbaa5cb3c7362..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RleColumnDecoder.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.nio.ByteBuffer; - -public class RleColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public RleColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.RLE); - } - - @Override - public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - switch (dataType) { - case BOOLEAN: - return decodeBooleanColumn(buffer, columnEntry, rowCount); - case INT32: - case DATE: - return decodeIntColumn(buffer, columnEntry, rowCount); - case INT64: - case TIMESTAMP: - return decodeLongColumn(buffer, columnEntry, rowCount); - case FLOAT: - return decodeFloatColumn(buffer, columnEntry, rowCount); - case DOUBLE: - return decodeDoubleColumn(buffer, columnEntry, rowCount); - case TEXT: - case STRING: - case BLOB: - default: - throw new UnsupportedOperationException("PLAIN doesn't support data type: " + dataType); - } - } - - @Override - public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - boolean[] result = new boolean[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readBoolean(buffer); - } - return result; - } - - @Override - public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } - - @Override - public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } - - @Override - public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } - - @Override - public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; - } - - @Override - public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("RLE doesn't support data type: " + dataType); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java deleted file mode 100644 index 151d84522074e..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/RpcDecoder.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; -import org.apache.iotdb.session.rpccompress.EncodingTypeNotSupportedException; -import org.apache.iotdb.session.rpccompress.MetaHead; - -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; - -import java.nio.ByteBuffer; -import java.util.function.Consumer; - -public class RpcDecoder { - private MetaHead timeMeta = new MetaHead(); - private MetaHead valueMeta = new MetaHead(); - - private Integer timeMetaLen = 0; - private Integer valueMetaLen = 0; - - /** - * read timestamps - * - * @param buffer ByteBuffer - * @param size Number of rows - */ - public long[] readTimesFromBuffer(ByteBuffer buffer, int size) { - int savePosition = buffer.position(); - readMetaHeadForTimeStamp(buffer); - buffer.position(savePosition); - return decodeColumnForTimeStamp(buffer, size); - } - - public void readMetaHeadForTimeStamp(ByteBuffer buffer) { - this.timeMeta = readMetaHead(buffer, length -> this.timeMetaLen = length); - } - - public void readMetaHeadForValues(ByteBuffer buffer) { - this.valueMeta = readMetaHead(buffer, length -> this.valueMetaLen = length); - } - - public MetaHead readMetaHead(ByteBuffer buffer, Consumer length) { - // 1. read metaHeader length - int MetaHeaderLength = buffer.getInt(buffer.limit() - Integer.BYTES); - length.accept(MetaHeaderLength); - // 2. read metaHeader - byte[] metaBytes = new byte[MetaHeaderLength]; - buffer.position(buffer.limit() - Integer.BYTES - MetaHeaderLength); - buffer.get(metaBytes); - // 3. Deserialize metaHeader - return MetaHead.fromBytes(metaBytes); - } - - public long[] decodeColumnForTimeStamp(ByteBuffer buffer, int rowCount) { - ColumnEntry columnEntry = timeMeta.getColumnEntries().get(0); - TSDataType dataType = columnEntry.getDataType(); - TSEncoding encodingType = columnEntry.getEncodingType(); - ColumnDecoder columnDecoder = createDecoder(dataType, encodingType); - - return columnDecoder.decodeLongColumn(buffer, columnEntry, rowCount); - } - - public Object[] decodeValues(ByteBuffer buffer, int rowCount) { - int savePosition = buffer.position(); - readMetaHeadForValues(buffer); - buffer.position(savePosition); - int columnNum = valueMeta.getColumnEntries().size(); - Object[] values = new Object[columnNum]; - for (int i = 0; i < columnNum; i++) { - values[i] = decodeColumn(i, buffer, rowCount); - } - return values; - } - - public Object decodeColumn(int columnIndex, ByteBuffer buffer, int rowCount) { - ColumnEntry columnEntry = valueMeta.getColumnEntries().get(columnIndex); - TSDataType dataType = columnEntry.getDataType(); - TSEncoding encodingType = columnEntry.getEncodingType(); - ColumnDecoder columnDecoder = createDecoder(dataType, encodingType); - - return columnDecoder.decode(buffer, columnEntry, rowCount); - } - - private ColumnDecoder createDecoder(TSDataType dataType, TSEncoding encodingType) { - switch (encodingType) { - case PLAIN: - return new PlainColumnDecoder(dataType); - case RLE: - return new RleColumnDecoder(dataType); - case TS_2DIFF: - return new Ts2DiffColumnDecoder(dataType); - case GORILLA: - return new GorillaColumnDecoder(dataType); - case ZIGZAG: - return new ZigzagColumnDecoder(dataType); - case CHIMP: - return new ChimpColumnDecoder(dataType); - case SPRINTZ: - return new SprintzColumnDecoder(dataType); - case RLBE: - return new RlbeColumnDecoder(dataType); - case DICTIONARY: - return new DictionaryColumnDecoder(dataType); - default: - throw new EncodingTypeNotSupportedException(encodingType.name()); - } - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java deleted file mode 100644 index 5785ed3cd914d..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/SprintzColumnDecoder.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.exception.encoding.TsFileDecodingException; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.nio.ByteBuffer; - -public class SprintzColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public SprintzColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.SPRINTZ); - } - - @Override - public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - switch (dataType) { - case INT32: - case DATE: - return decodeIntColumn(buffer, columnEntry, rowCount); - case INT64: - case TIMESTAMP: - return decodeLongColumn(buffer, columnEntry, rowCount); - case FLOAT: - return decodeFloatColumn(buffer, columnEntry, rowCount); - case DOUBLE: - return decodeDoubleColumn(buffer, columnEntry, rowCount); - default: - throw new TsFileDecodingException("Sprintz doesn't support data type: " + dataType); - } - } - - @Override - public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); - } - - @Override - public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } - - @Override - public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } - - @Override - public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } - - @Override - public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - double[] result = new double[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readDouble(buffer); - } - return result; - } - - @Override - public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java deleted file mode 100644 index 56efc54f7e006..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/Ts2DiffColumnDecoder.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.nio.ByteBuffer; - -public class Ts2DiffColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public Ts2DiffColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.TS_2DIFF); - } - - @Override - public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - switch (dataType) { - case INT32: - case DATE: - return decodeIntColumn(buffer, columnEntry, rowCount); - case INT64: - case TIMESTAMP: - return decodeLongColumn(buffer, columnEntry, rowCount); - case FLOAT: - case DOUBLE: - return decodeFloatColumn(buffer, columnEntry, rowCount); - default: - throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); - } - } - - @Override - public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); - } - - @Override - public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } - - @Override - public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } - - @Override - public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - float[] result = new float[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readFloat(buffer); - } - return result; - } - - @Override - public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); - } - - @Override - public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java deleted file mode 100644 index a87bae6669c1e..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/decoder/ZigzagColumnDecoder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.decoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.decoder.Decoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.exception.encoding.TsFileDecodingException; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; - -import java.nio.ByteBuffer; - -public class ZigzagColumnDecoder implements ColumnDecoder { - private final Decoder decoder; - private final TSDataType dataType; - - public ZigzagColumnDecoder(TSDataType dataType) { - this.dataType = dataType; - this.decoder = getDecoder(dataType, TSEncoding.ZIGZAG); - } - - @Override - public Object decode(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - switch (dataType) { - case INT32: - case DATE: - return decodeIntColumn(buffer, columnEntry, rowCount); - case INT64: - case TIMESTAMP: - return decodeLongColumn(buffer, columnEntry, rowCount); - default: - throw new TsFileDecodingException( - String.format("Zigzag doesn't support data type: " + dataType)); - } - } - - @Override - public boolean[] decodeBooleanColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new TsFileDecodingException("Zigzag doesn't support data type: " + dataType); - } - - @Override - public int[] decodeIntColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - int[] result = new int[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readInt(buffer); - } - return result; - } - - @Override - public long[] decodeLongColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - long[] result = new long[rowCount]; - for (int i = 0; i < rowCount; i++) { - result[i] = decoder.readLong(buffer); - } - return result; - } - - @Override - public float[] decodeFloatColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new TsFileDecodingException( - String.format("Zigzag doesn't support data type: " + dataType)); - } - - @Override - public double[] decodeDoubleColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new TsFileDecodingException( - String.format("Zigzag doesn't support data type: " + dataType)); - } - - @Override - public Binary[] decodeBinaryColumn(ByteBuffer buffer, ColumnEntry columnEntry, int rowCount) { - throw new TsFileDecodingException( - String.format("Zigzag doesn't support data type: " + dataType)); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java deleted file mode 100644 index 98cb490871372..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ChimpColumnEncoder.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class ChimpColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - - public ChimpColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.CHIMP); - columnEntry = new ColumnEntry(); - } - - @Override - public void encode(boolean[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); - } - - @Override - public void encode(int[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (int value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(long[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (long value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(float[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (float value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(double[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (double value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(Binary[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("CHIMP doesn't support data type: " + dataType); - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.CHIMP; - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } - - private int getUncompressedDataSize(int len) { - return getUncompressedDataSize(len, null, dataType); - } - - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.CHIMP); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java deleted file mode 100644 index 4651c28b78fa3..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ColumnEncoder.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.TSEncodingBuilder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; - -import java.io.ByteArrayOutputStream; - -/** Column encoder interface, which defines the encoding and decoding operations of column data */ -public interface ColumnEncoder { - - void encode(boolean[] values, ByteArrayOutputStream out); - - void encode(int[] values, ByteArrayOutputStream out); - - void encode(long[] values, ByteArrayOutputStream out); - - void encode(float[] values, ByteArrayOutputStream out); - - void encode(double[] values, ByteArrayOutputStream out); - - void encode(Binary[] values, ByteArrayOutputStream out); - - TSDataType getDataType(); - - TSEncoding getEncodingType(); - - ColumnEntry getColumnEntry(); - - /** - * Calculates the uncompressed size in bytes for a column of data, based on the data type and - * number of entries. - * - * @param len the length of arrayList - */ - default int getUncompressedDataSize(int len, Binary[] values, TSDataType dataType) { - int unCompressedSize = 0; - switch (dataType) { - case BOOLEAN: - unCompressedSize = 1 * len; - break; - case INT32: - case DATE: - unCompressedSize = 4 * len; - break; - case INT64: - case TIMESTAMP: - unCompressedSize = 8 * len; - break; - case FLOAT: - unCompressedSize = 4 * len; - break; - case DOUBLE: - unCompressedSize = 8 * len; - break; - case TEXT: - case STRING: - case BLOB: - for (Binary binary : values) { - unCompressedSize += binary.getLength(); - } - break; - default: - throw new UnsupportedOperationException("Doesn't support data type: " + dataType); - } - return unCompressedSize; - } - - default Encoder getEncoder(TSDataType type, TSEncoding encodingType) { - return TSEncodingBuilder.getEncodingBuilder(encodingType).getEncoder(type); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java deleted file mode 100644 index 6fd8c4ab10c3e..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/DictionaryColumnEncoder.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class DictionaryColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - - public DictionaryColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.SPRINTZ); - columnEntry = new ColumnEntry(); - } - - @Override - public void encode(boolean[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public void encode(int[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public void encode(long[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public void encode(float[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public void encode(double[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Dictionary doesn't support data type: " + dataType); - } - - @Override - public void encode(Binary[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, values, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (Binary value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.DICTIONARY; - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } - - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = - new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.DICTIONARY); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java deleted file mode 100644 index c32f8c770c18e..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/GorillaColumnEncoder.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class GorillaColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - - public GorillaColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.GORILLA); - columnEntry = new ColumnEntry(); - } - - @Override - public void encode(boolean[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Gorilla doesn't support data type: " + dataType); - } - - @Override - public void encode(int[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (int value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(long[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (long value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(float[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (float value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(double[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (double value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(Binary[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Gorilla doesn't support data type: " + dataType); - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.GORILLA; - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } - - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.GORILLA); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java deleted file mode 100644 index f04928073335a..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/PlainColumnEncoder.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.encoding.encoder.PlainEncoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class PlainColumnEncoder implements ColumnEncoder { - /** The encoder used to encode the data */ - private final Encoder encoder; - - private final TSDataType dataType; - - /** ColumnEntry stores metadata for a column's encoded data */ - private ColumnEntry columnEntry; - - private static final int DEFAULT_MAX_STRING_LENGTH = 0xffff; - - public PlainColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = new PlainEncoder(dataType, DEFAULT_MAX_STRING_LENGTH); - } - - /** - * Encodes a column of data using the PLAIN encoding algorithm. - * - * @param values values the input boolean array to be encoded - * @param out out the output stream to write the encoded binary data - */ - @Override - public void encode(boolean[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (boolean value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(int[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (int value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(long[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (long value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(float[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (float value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(double[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (double value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(Binary[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, values, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (Binary value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - /** - * Set column entry metadata - * - * @param compressedSize the size of the encoded data in bytes after compression - * @param unCompressedSize the original size of the data in bytes before compression - */ - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.PLAIN); - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.PLAIN; - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java deleted file mode 100644 index a3f3a48779e39..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RlbeColumnEncoder.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class RlbeColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - - public RlbeColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.RLBE); - columnEntry = new ColumnEntry(); - } - - @Override - public void encode(boolean[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("RLBE doesn't support data type: " + dataType); - } - - @Override - public void encode(int[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (int value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(long[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (long value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(float[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (float value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(double[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (double value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(Binary[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("RLBE doesn't support data type: " + dataType); - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.RLBE; - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } - - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.RLBE); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java deleted file mode 100644 index 7fc2fdf7ac994..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RleColumnEncoder.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class RleColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - - public RleColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.RLE); - columnEntry = new ColumnEntry(); - } - - @Override - public void encode(boolean[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (boolean value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(int[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (int value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(long[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (long value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(float[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (float value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(double[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (double value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(Binary[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("RLE doesn't support data type: " + dataType); - } - - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.RLE); - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.RLE; - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java deleted file mode 100644 index 8f244ec3022f8..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/RpcEncoder.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.EncodingTypeNotSupportedException; -import org.apache.iotdb.session.rpccompress.MetaHead; - -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; -import org.apache.tsfile.write.record.Tablet; -import org.apache.tsfile.write.schema.IMeasurementSchema; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.Map; - -public class RpcEncoder { - /** MetaHead for values */ - private final MetaHead metaHeadForValues; - - /** MetaHead for timestamps */ - private final MetaHead metaHeadForTimeStamp; - - /** - * User-specified encoding configurations for time series columns. Can be modified to apply - * different encoding strategies per data type. - */ - private final Map columnEncodersMap; - - /** Store the length of the MetaHead using a 4-byte integer. */ - private final int metaHeadLengthInBytes = 4; - - public RpcEncoder(Map columnEncodersMap) { - this.columnEncodersMap = columnEncodersMap; - this.metaHeadForValues = new MetaHead(); - this.metaHeadForTimeStamp = new MetaHead(); - } - - /** - * Get the timestamp column in tablet - * - * @param tablet data - * @throws IOException An IO exception occurs - */ - public ByteArrayOutputStream encodeTimestamps(Tablet tablet) { - // 1.encoder - PublicBAOS publicBAOS = new PublicBAOS(); - ColumnEncoder encoder = - createEncoder( - TSDataType.INT64, columnEncodersMap.getOrDefault(TSDataType.INT64, TSEncoding.PLAIN)); - try { - long[] timestamps = tablet.getTimestamps(); - encoder.encode(timestamps, publicBAOS); - - // 2.Get ColumnEntry content and add to metaHead - metaHeadForTimeStamp.addColumnEntry(encoder.getColumnEntry()); - - // 3.Serialize metaHead and append it to the output stream - byte[] metaHeadEncoder = getMetaHeadForTimeStamp().toBytes(); - - publicBAOS.write(metaHeadEncoder); - - // 4.Write the length of the serialized metaHead as a 4-byte big-endian integer - publicBAOS.write(intToBytes(metaHeadEncoder.length)); - - } catch (IOException e) { - throw new RuntimeException(e); - } - return publicBAOS; - } - - /** - * Create the corresponding encoder based on the data type and encoding type - * - * @param dataType data type - * @param encodingType encoding Type - * @return columnEncoder - */ - private ColumnEncoder createEncoder(TSDataType dataType, TSEncoding encodingType) { - switch (encodingType) { - case PLAIN: - return new PlainColumnEncoder(dataType); - case RLE: - return new RleColumnEncoder(dataType); - case TS_2DIFF: - return new Ts2DiffColumnEncoder(dataType); - case GORILLA: - return new GorillaColumnEncoder(dataType); - case ZIGZAG: - return new ZigzagColumnEncoder(dataType); - case CHIMP: - return new ChimpColumnEncoder(dataType); - case SPRINTZ: - return new SprintzColumnEncoder(dataType); - case RLBE: - return new RlbeColumnEncoder(dataType); - case DICTIONARY: - return new DictionaryColumnEncoder(dataType); - default: - throw new EncodingTypeNotSupportedException(encodingType.name()); - } - } - - /** Get the value columns from the tablet and encode them into encodedValues */ - public ByteArrayOutputStream encodeValues(Tablet tablet) { - // 1.Encode each column - PublicBAOS out = new PublicBAOS(); - for (int i = 0; i < tablet.getSchemas().size(); i++) { - IMeasurementSchema schema = tablet.getSchemas().get(i); - encodeColumn(schema.getType(), tablet, i, out); - } - - try { - // 2.Serializing MetaHead and append it to the output stream - byte[] metaHeadEncoder = getMetaHead().toBytes(); - out.write(metaHeadEncoder); - // 3.Write the length of the serialized metaHead as a 4-byte big-endian integer - out.write(intToBytes(metaHeadEncoder.length)); - } catch (IOException e) { - throw new RuntimeException(e); - } - return out; - } - - public void encodeColumn( - TSDataType dataType, Tablet tablet, int columnIndex, ByteArrayOutputStream out) { - // 1.Get the encoding type - TSEncoding encoding = columnEncodersMap.getOrDefault(dataType, TSEncoding.PLAIN); - ColumnEncoder encoder = createEncoder(dataType, encoding); - - // 2.Get the data of the column - Object columnValues = tablet.getValues()[columnIndex]; - - // 3.encode - switch (dataType) { - case INT32: - encoder.encode((int[]) columnValues, out); - break; - case INT64: - encoder.encode((long[]) columnValues, out); - break; - case FLOAT: - encoder.encode((float[]) columnValues, out); - break; - case DOUBLE: - encoder.encode((double[]) columnValues, out); - break; - case BOOLEAN: - encoder.encode((boolean[]) columnValues, out); - break; - case STRING: - case BLOB: - case TEXT: - encoder.encode((Binary[]) columnValues, out); - break; - default: - throw new UnsupportedOperationException("Unsupported data types: " + dataType); - } - - // 4.Get ColumnEntry content and add to metaHead - metaHeadForValues.addColumnEntry(encoder.getColumnEntry()); - } - - public static byte[] intToBytes(int value) { - return new byte[] { - (byte) ((value >>> 24) & 0xFF), - (byte) ((value >>> 16) & 0xFF), - (byte) ((value >>> 8) & 0xFF), - (byte) (value & 0xFF) - }; - } - - /** - * Get metadata header - * - * @return metaHeader - */ - public MetaHead getMetaHead() { - return metaHeadForValues; - } - - public MetaHead getMetaHeadForTimeStamp() { - return metaHeadForTimeStamp; - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java deleted file mode 100644 index 228af3388c96d..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/SprintzColumnEncoder.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class SprintzColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - - public SprintzColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.SPRINTZ); - columnEntry = new ColumnEntry(); - } - - @Override - public void encode(boolean[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); - } - - @Override - public void encode(int[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (int value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(long[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (long value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(float[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (float value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(double[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (double value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(Binary[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("Sprintz doesn't support data type: " + dataType); - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.SPRINTZ; - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } - - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.SPRINTZ); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java deleted file mode 100644 index 11f5444767267..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/Ts2DiffColumnEncoder.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; -import org.apache.tsfile.write.UnSupportedDataTypeException; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class Ts2DiffColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - - public Ts2DiffColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.TS_2DIFF); - columnEntry = new ColumnEntry(); - } - - @Override - public void encode(boolean[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); - } - - @Override - public void encode( - int[] values, - ByteArrayOutputStream - out) { // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (int value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(long[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (long value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(float[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (float value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(double[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); - } - - @Override - public void encode(Binary[] values, ByteArrayOutputStream out) { - throw new UnSupportedDataTypeException("TS_2DIFF doesn't support data type: " + dataType); - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.TS_2DIFF; - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } - - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.TS_2DIFF); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java deleted file mode 100644 index 301f9db8b6471..0000000000000 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/encoder/ZigzagColumnEncoder.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.iotdb.session.rpccompress.encoder; - -import org.apache.iotdb.session.rpccompress.ColumnEntry; - -import org.apache.tsfile.encoding.encoder.Encoder; -import org.apache.tsfile.enums.TSDataType; -import org.apache.tsfile.file.metadata.enums.TSEncoding; -import org.apache.tsfile.utils.Binary; -import org.apache.tsfile.utils.PublicBAOS; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class ZigzagColumnEncoder implements ColumnEncoder { - private final Encoder encoder; - private final TSDataType dataType; - private ColumnEntry columnEntry; - - public ZigzagColumnEncoder(TSDataType dataType) { - this.dataType = dataType; - this.encoder = getEncoder(dataType, TSEncoding.ZIGZAG); - columnEntry = new ColumnEntry(); - } - - @Override - public void encode(boolean[] values, ByteArrayOutputStream out) { - throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); - } - - @Override - public void encode(int[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (int value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(long[] values, ByteArrayOutputStream out) { - // 1. Calculate the uncompressed size in bytes for the column of data. - int unCompressedSize = getUncompressedDataSize(values.length, null, dataType); - PublicBAOS outputStream = new PublicBAOS(unCompressedSize); - try { - // 2. Encodes the input array using the corresponding encoder from TsFile. - for (long value : values) { - encoder.encode(value, outputStream); - } - // 3.Flushes any buffered encoding data into the outputStream. - encoder.flush(outputStream); - byte[] encodedData = outputStream.toByteArray(); - // 4. Set column entry metadata - setColumnEntry(encodedData.length, unCompressedSize); - if (out != null) { - out.write(encodedData); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void encode(float[] values, ByteArrayOutputStream out) { - throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); - } - - @Override - public void encode(double[] values, ByteArrayOutputStream out) { - throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); - } - - @Override - public void encode(Binary[] values, ByteArrayOutputStream out) { - throw new UnsupportedOperationException("Zigzag doesn't support data type: " + dataType); - } - - @Override - public TSDataType getDataType() { - return dataType; - } - - @Override - public TSEncoding getEncodingType() { - return TSEncoding.ZIGZAG; - } - - @Override - public ColumnEntry getColumnEntry() { - return columnEntry; - } - - private void setColumnEntry(Integer compressedSize, Integer unCompressedSize) { - columnEntry = new ColumnEntry(compressedSize, unCompressedSize, dataType, TSEncoding.ZIGZAG); - } -} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionSessionDataSet.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionSessionDataSet.java index 6bb4a8d7b861c..a3f7f8e3f26d1 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionSessionDataSet.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionSessionDataSet.java @@ -31,7 +31,6 @@ import org.apache.tsfile.utils.DateUtils; import org.apache.tsfile.write.UnSupportedDataTypeException; import org.apache.tsfile.write.record.Tablet; -import org.apache.tsfile.write.record.Tablet.ColumnCategory; import org.apache.tsfile.write.schema.IMeasurementSchema; import java.time.LocalDate; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java index 8534b808754e7..6867a7134f600 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java @@ -24,6 +24,7 @@ import org.apache.iotdb.rpc.UrlUtils; import org.apache.tsfile.common.conf.TSFileConfig; +import org.apache.tsfile.encoding.encoder.Encoder; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.IDeviceID; import org.apache.tsfile.utils.Binary; @@ -35,6 +36,7 @@ import org.apache.tsfile.write.record.Tablet; import org.apache.tsfile.write.schema.IMeasurementSchema; +import java.io.ByteArrayOutputStream; import java.nio.ByteBuffer; import java.time.LocalDate; import java.util.ArrayList; @@ -346,6 +348,129 @@ private static void getValueBufferOfDataType( } } + public static void encodeValue( + TSDataType dataType, + Tablet tablet, + int i, + Encoder encoder, + ByteArrayOutputStream outputStream) { + + switch (dataType) { + case INT32: + int[] intValues = (int[]) tablet.getValues()[i]; + for (int index = 0; index < tablet.getRowSize(); index++) { + if (!tablet.isNull(index, i)) { + encoder.encode(intValues[index], outputStream); + } else { + // use the previous value as the placeholder of nulls to increase encoding performance + if (index == 0) { + encoder.encode(intValues[index], outputStream); + } else { + encoder.encode(intValues[index - 1], outputStream); + } + } + } + break; + case INT64: + case TIMESTAMP: + long[] longValues = (long[]) tablet.getValues()[i]; + for (int index = 0; index < tablet.getRowSize(); index++) { + if (!tablet.isNull(index, i)) { + encoder.encode(longValues[index], outputStream); + } else { + // use the previous value as the placeholder of nulls to increase encoding performance + if (index == 0) { + encoder.encode(longValues[index], outputStream); + } else { + encoder.encode(longValues[index - 1], outputStream); + } + } + } + break; + case FLOAT: + float[] floatValues = (float[]) tablet.getValues()[i]; + for (int index = 0; index < tablet.getRowSize(); index++) { + if (!tablet.isNull(index, i)) { + encoder.encode(floatValues[index], outputStream); + } else { + // use the previous value as the placeholder of nulls to increase encoding performance + if (index == 0) { + encoder.encode(floatValues[index], outputStream); + } else { + encoder.encode(floatValues[index - 1], outputStream); + } + } + } + break; + case DOUBLE: + double[] doubleValues = (double[]) tablet.getValues()[i]; + for (int index = 0; index < tablet.getRowSize(); index++) { + if (!tablet.isNull(index, i)) { + encoder.encode(doubleValues[index], outputStream); + } else { + // use the previous value as the placeholder of nulls to increase encoding performance + if (index == 0) { + encoder.encode(doubleValues[index], outputStream); + } else { + encoder.encode(doubleValues[index - 1], outputStream); + } + } + } + break; + case BOOLEAN: + boolean[] boolValues = (boolean[]) tablet.getValues()[i]; + for (int index = 0; index < tablet.getRowSize(); index++) { + if (!tablet.isNull(index, i)) { + encoder.encode(boolValues[index], outputStream); + } else { + // use the previous value as the placeholder of nulls to increase encoding performance + if (index == 0) { + encoder.encode(boolValues[index], outputStream); + } else { + encoder.encode(boolValues[index - 1], outputStream); + } + } + } + break; + case TEXT: + case STRING: + case BLOB: + Binary[] binaryValues = (Binary[]) tablet.getValues()[i]; + for (int index = 0; index < tablet.getRowSize(); index++) { + if (!tablet.isNull(index, i)) { + encoder.encode(binaryValues[index], outputStream); + } else { + // use the previous value as the placeholder of nulls to increase encoding performance + if (index == 0) { + encoder.encode(Binary.EMPTY_VALUE, outputStream); + } else { + encoder.encode(binaryValues[index - 1], outputStream); + } + } + } + break; + case DATE: + LocalDate[] dateValues = (LocalDate[]) tablet.getValues()[i]; + for (int index = 0; index < tablet.getRowSize(); index++) { + if (!tablet.isNull(index, i)) { + encoder.encode(DateUtils.parseDateExpressionToInt(dateValues[index]), outputStream); + } else { + // use the previous value as the placeholder of nulls to increase encoding performance + if (index == 0) { + encoder.encode(EMPTY_DATE_INT, outputStream); + } else { + encoder.encode( + DateUtils.parseDateExpressionToInt(dateValues[index - 1]), outputStream); + } + } + } + break; + default: + throw new UnSupportedDataTypeException( + String.format("Data type %s is not supported.", dataType)); + } + } + /* Used for table model insert only. */ public static boolean isTabletContainsSingleDevice(Tablet tablet) { if (tablet.getRowSize() == 1) { diff --git a/iotdb-client/session/src/test/java/org/apache/iotdb/session/SessionCacheLeaderTest.java b/iotdb-client/session/src/test/java/org/apache/iotdb/session/SessionCacheLeaderTest.java index a969c8d0c708c..40268a54cd340 100644 --- a/iotdb-client/session/src/test/java/org/apache/iotdb/session/SessionCacheLeaderTest.java +++ b/iotdb-client/session/src/test/java/org/apache/iotdb/session/SessionCacheLeaderTest.java @@ -32,11 +32,11 @@ import org.apache.iotdb.service.rpc.thrift.TSInsertTabletReq; import org.apache.iotdb.service.rpc.thrift.TSInsertTabletsReq; +import org.apache.tsfile.enums.ColumnCategory; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.IDeviceID; import org.apache.tsfile.file.metadata.StringArrayDeviceID; import org.apache.tsfile.write.record.Tablet; -import org.apache.tsfile.write.record.Tablet.ColumnCategory; import org.apache.tsfile.write.schema.IMeasurementSchema; import org.apache.tsfile.write.schema.MeasurementSchema; import org.junit.Assert; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java index 8087a3f94f9f6..8d5fe8d48f015 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java @@ -27,7 +27,6 @@ import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; import org.apache.iotdb.commons.service.metric.PerformanceOverviewMetrics; import org.apache.iotdb.db.exception.query.QueryProcessException; -import org.apache.iotdb.db.protocol.thrift.handler.RPCServiceThriftHandlerMetrics; import org.apache.iotdb.db.qp.sql.IoTDBSqlParser; import org.apache.iotdb.db.qp.sql.SqlLexer; import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.DataNodeDevicePathCache; @@ -92,8 +91,7 @@ import org.apache.iotdb.service.rpc.thrift.TSRawDataQueryReq; import org.apache.iotdb.service.rpc.thrift.TSSetSchemaTemplateReq; import org.apache.iotdb.service.rpc.thrift.TSUnsetSchemaTemplateReq; -import org.apache.iotdb.session.rpccompress.RpcUncompressor; -import org.apache.iotdb.session.rpccompress.decoder.RpcDecoder; +import org.apache.iotdb.util.TabletDecoder; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; @@ -101,12 +99,13 @@ import org.antlr.v4.runtime.atn.PredictionMode; import org.antlr.v4.runtime.tree.ParseTree; import org.apache.tsfile.common.constant.TsFileConstant; +import org.apache.tsfile.enums.ColumnCategory; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.CompressionType; import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Pair; import org.apache.tsfile.utils.ReadWriteIOUtils; import org.apache.tsfile.utils.TimeDuration; -import org.apache.tsfile.write.record.Tablet.ColumnCategory; import java.nio.ByteBuffer; import java.time.ZoneId; @@ -116,6 +115,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** Convert SQL and RPC requests to {@link Statement}. */ public class StatementGenerator { @@ -335,117 +335,37 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl insertStatement.setDevicePath( DEVICE_PATH_CACHE.getPartialPath(insertTabletReq.getPrefixPath())); insertStatement.setMeasurements(insertTabletReq.getMeasurements().toArray(new String[0])); - long[] timestamps; - - long startDeCompressedTimes = 0L; - long endDeCompressedTimes = 0L; - long startDecodeTime = 0L; - long endDecodeTime = 0L; - - long startDeCompressedValue = 0L; - long endDeCompressedValue = 0L; - long startDecodeValue = 0L; - long endDecodeValue = 0L; - - int uncompressedTimestampsSize = 0; - int uncompressedValuesSize = 0; - - try { - if (insertTabletReq.isIsCompressed()) { - startDeCompressedTimes = System.nanoTime(); - RpcDecoder rpcDecoder = new RpcDecoder(); - RpcUncompressor rpcUncompressor = - new RpcUncompressor( - CompressionType.deserialize((byte) insertTabletReq.getCompressType())); - ByteBuffer uncompressedTimestamps = rpcUncompressor.uncompress(insertTabletReq.timestamps); - uncompressedTimestampsSize = uncompressedTimestamps.remaining(); - endDeCompressedTimes = System.nanoTime(); - - startDecodeTime = System.nanoTime(); - timestamps = rpcDecoder.readTimesFromBuffer(uncompressedTimestamps, insertTabletReq.size); - endDecodeTime = System.nanoTime(); - } else { - timestamps = - QueryDataSetUtils.readTimesFromBuffer(insertTabletReq.timestamps, insertTabletReq.size); - } - - if (timestamps.length != 0) { - TimestampPrecisionUtils.checkTimestampPrecision(timestamps[timestamps.length - 1]); - } - insertStatement.setTimes(timestamps); - // decode values - if (insertTabletReq.isIsCompressed()) { - startDeCompressedValue = System.nanoTime(); - RpcDecoder rpcDecoder = new RpcDecoder(); - RpcUncompressor rpcUncompressor = - new RpcUncompressor( - CompressionType.deserialize((byte) insertTabletReq.getCompressType())); - ByteBuffer uncompressedValues = rpcUncompressor.uncompress(insertTabletReq.values); - uncompressedValuesSize = uncompressedValues.remaining(); - endDeCompressedValue = System.nanoTime(); - - startDecodeValue = System.nanoTime(); - insertStatement.setColumns( - rpcDecoder.decodeValues(uncompressedValues, insertTabletReq.size)); - endDecodeValue = System.nanoTime(); - } else { - insertStatement.setColumns( - QueryDataSetUtils.readTabletValuesFromBuffer( - insertTabletReq.values, - insertTabletReq.types, - insertTabletReq.types.size(), - insertTabletReq.size)); - insertStatement.setBitMaps( - QueryDataSetUtils.readBitMapsFromBuffer( - insertTabletReq.values, insertTabletReq.types.size(), insertTabletReq.size) - .orElse(null)); - } - } finally { - System.out.println("YYM"); - RPCServiceThriftHandlerMetrics.getInstance() - .recordDecompressLatencyTimer( - (endDeCompressedValue - - startDeCompressedValue - + endDeCompressedTimes - - startDeCompressedTimes)); - - RPCServiceThriftHandlerMetrics.getInstance() - .recordDecodeLatencyTimer( - (endDecodeValue - startDecodeValue + endDecodeTime - startDecodeTime)); - - if (insertTabletReq.isIsCompressed()) { - RPCServiceThriftHandlerMetrics.getInstance() - .recordUnCompressionSizeTimer((uncompressedTimestampsSize + uncompressedValuesSize)); - - long memoryUsage = - uncompressedTimestampsSize - + uncompressedValuesSize - + insertTabletReq.timestamps.remaining() - + insertTabletReq.values.remaining(); - System.out.println(memoryUsage); - RPCServiceThriftHandlerMetrics.getInstance().recordMemoryUsage(memoryUsage); - } else { - RPCServiceThriftHandlerMetrics.getInstance() - .recordUnCompressionSizeTimer( - (insertTabletReq.timestamps.remaining() + insertTabletReq.values.remaining())); - - long memoryUsage = - insertTabletReq.timestamps.remaining() + insertTabletReq.values.remaining(); - RPCServiceThriftHandlerMetrics.getInstance().recordMemoryUsage(memoryUsage); - } - - RPCServiceThriftHandlerMetrics.getInstance() - .recordCompressionSizeTimer( - (insertTabletReq.timestamps.remaining() + insertTabletReq.values.remaining())); - System.out.println( - insertTabletReq.timestamps.remaining() + insertTabletReq.values.remaining()); - } - insertStatement.setRowCount(insertTabletReq.size); TSDataType[] dataTypes = new TSDataType[insertTabletReq.types.size()]; for (int i = 0; i < insertTabletReq.types.size(); i++) { dataTypes[i] = TSDataType.deserialize((byte) insertTabletReq.types.get(i).intValue()); } insertStatement.setDataTypes(dataTypes); + + TabletDecoder tabletDecoder = + new TabletDecoder( + insertTabletReq.isIsCompressed() + ? CompressionType.deserialize(insertTabletReq.getCompressType()) + : CompressionType.UNCOMPRESSED, + dataTypes, + insertTabletReq.isIsCompressed() + ? insertTabletReq.encodingTypes.stream() + .map(TSEncoding::deserialize) + .collect(Collectors.toList()) + : Collections.nCopies(dataTypes.length + 1, TSEncoding.PLAIN), + insertTabletReq.size); + + long[] timestamps = tabletDecoder.decodeTime(insertTabletReq.timestamps); + Pair valueAndRemainingBuffer = + tabletDecoder.decodeValues(insertTabletReq.values); + insertStatement.setTimes(timestamps); + insertStatement.setColumns(valueAndRemainingBuffer.left); + insertStatement.setBitMaps( + QueryDataSetUtils.readBitMapsFromBuffer( + valueAndRemainingBuffer.right, insertTabletReq.types.size(), insertTabletReq.size) + .orElse(null)); + + insertStatement.setRowCount(insertTabletReq.size); + insertStatement.setAligned(insertTabletReq.isAligned); insertStatement.setWriteToTable(insertTabletReq.isWriteToTable()); if (insertTabletReq.isWriteToTable()) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/util/TabletDecoder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/util/TabletDecoder.java new file mode 100644 index 0000000000000..66afdc3dd0300 --- /dev/null +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/util/TabletDecoder.java @@ -0,0 +1,197 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.util; + +import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.db.protocol.thrift.handler.RPCServiceThriftHandlerMetrics; +import org.apache.iotdb.rpc.TSStatusCode; + +import org.apache.tsfile.compress.IUnCompressor; +import org.apache.tsfile.encoding.decoder.Decoder; +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.CompressionType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.Pair; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.List; + +public class TabletDecoder { + + private final CompressionType compressionType; + private final TSDataType[] dataTypes; + private final List columnEncodings; + private final IUnCompressor unCompressor; + private final int rowSize; + + /** + * @param compressionType the overall compression + * @param dataTypes data types of each column + * @param columnEncodings encoding method of each column, the first column is the time column + * @param rowSize number of rows + */ + public TabletDecoder( + CompressionType compressionType, + TSDataType[] dataTypes, + List columnEncodings, + int rowSize) { + this.compressionType = compressionType; + this.dataTypes = dataTypes; + this.columnEncodings = columnEncodings; + this.unCompressor = IUnCompressor.getUnCompressor(compressionType); + this.rowSize = rowSize; + } + + public long[] decodeTime(ByteBuffer buffer) { + int compressedSize = buffer.remaining(); + + ByteBuffer uncompressedBuffer = uncompress(buffer); + RPCServiceThriftHandlerMetrics.getInstance() + .recordUnCompressionSizeTimer(uncompressedBuffer.remaining()); + RPCServiceThriftHandlerMetrics.getInstance().recordCompressionSizeTimer(compressedSize); + + long memoryUsage = + compressionType == CompressionType.UNCOMPRESSED + ? uncompressedBuffer.remaining() + : uncompressedBuffer.remaining() + compressedSize; + RPCServiceThriftHandlerMetrics.getInstance().recordMemoryUsage(memoryUsage); + + long startDecodeTime = System.nanoTime(); + long[] timeStamps = decodeColumnForTimeStamp(uncompressedBuffer, rowSize); + RPCServiceThriftHandlerMetrics.getInstance() + .recordDecodeLatencyTimer((System.nanoTime() - startDecodeTime)); + return timeStamps; + } + + private ByteBuffer uncompress(ByteBuffer compressedBuffer) { + long startUncompressTime = System.nanoTime(); + if (compressionType == CompressionType.UNCOMPRESSED) { + return compressedBuffer; + } + try { + int uncompressedLength = compressedBuffer.getInt(compressedBuffer.limit() - 4); + ByteBuffer output = ByteBuffer.allocate(uncompressedLength); + byte[] compressedData = new byte[compressedBuffer.remaining() - 4]; + compressedBuffer.slice().get(compressedData); + byte[] uncompressedData = unCompressor.uncompress(compressedData); + output.put(uncompressedData); + output.flip(); + RPCServiceThriftHandlerMetrics.getInstance() + .recordDecompressLatencyTimer(System.nanoTime() - startUncompressTime); + return output; + } catch (IOException e) { + throw new IoTDBRuntimeException( + "Failed to decompress compressedBuffer", + e, + TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); + } + } + + private long[] decodeColumnForTimeStamp(ByteBuffer buffer, int rowCount) { + TSDataType dataType = TSDataType.INT64; + TSEncoding encodingType = columnEncodings.get(0); + + Decoder decoder = Decoder.getDecoderByType(encodingType, dataType); + long[] result = new long[rowCount]; + for (int i = 0; i < rowCount; i++) { + result[i] = decoder.readLong(buffer); + } + return result; + } + + public Pair decodeValues(ByteBuffer buffer) { + int compressedSize = buffer.remaining(); + ByteBuffer uncompressed = uncompress(buffer); + RPCServiceThriftHandlerMetrics.getInstance() + .recordUnCompressionSizeTimer(uncompressed.remaining()); + RPCServiceThriftHandlerMetrics.getInstance().recordCompressionSizeTimer(compressedSize); + + long startDecodeTime = System.nanoTime(); + Object[] columns = new Object[dataTypes.length]; + for (int i = 0; i < dataTypes.length; i++) { + columns[i] = decodeColumn(uncompressed, i); + } + + RPCServiceThriftHandlerMetrics.getInstance() + .recordDecodeLatencyTimer(System.nanoTime() - startDecodeTime); + return new Pair<>(columns, uncompressed); + } + + private Object decodeColumn(ByteBuffer uncompressed, int columnIndex) { + TSDataType dataType = dataTypes[columnIndex]; + TSEncoding encoding = columnEncodings.get(columnIndex + 1); + + Decoder decoder = Decoder.getDecoderByType(encoding, dataType); + Object column = null; + switch (dataType) { + case DATE: + case INT32: + int[] intCol = new int[rowSize]; + for (int j = 0; j < rowSize; j++) { + intCol[j] = decoder.readInt(uncompressed); + } + column = intCol; + break; + case INT64: + case TIMESTAMP: + long[] longCol = new long[rowSize]; + for (int j = 0; j < rowSize; j++) { + longCol[j] = decoder.readLong(uncompressed); + } + column = longCol; + break; + case FLOAT: + float[] floatCol = new float[rowSize]; + for (int j = 0; j < rowSize; j++) { + floatCol[j] = decoder.readFloat(uncompressed); + } + column = floatCol; + break; + case DOUBLE: + double[] doubleCol = new double[rowSize]; + for (int j = 0; j < rowSize; j++) { + doubleCol[j] = decoder.readDouble(uncompressed); + } + column = doubleCol; + break; + case BOOLEAN: + boolean[] boolCol = new boolean[rowSize]; + for (int j = 0; j < rowSize; j++) { + boolCol[j] = decoder.readBoolean(uncompressed); + } + column = boolCol; + break; + case STRING: + case BLOB: + case TEXT: + Binary[] binaryCol = new Binary[rowSize]; + for (int j = 0; j < rowSize; j++) { + binaryCol[j] = decoder.readBinary(uncompressed); + } + column = binaryCol; + break; + case UNKNOWN: + case VECTOR: + throw new IllegalArgumentException("Unsupported data type: " + dataType); + } + return column; + } +} diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnCategory.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnCategory.java index 9f6dcd6019c37..0ee7133b2d072 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnCategory.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/column/TsTableColumnCategory.java @@ -19,8 +19,8 @@ package org.apache.iotdb.commons.schema.table.column; +import org.apache.tsfile.enums.ColumnCategory; import org.apache.tsfile.utils.ReadWriteIOUtils; -import org.apache.tsfile.write.record.Tablet.ColumnCategory; import java.io.IOException; import java.io.InputStream; diff --git a/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift b/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift index ebd37cdfa895d..635eec8299312 100644 --- a/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift +++ b/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift @@ -243,8 +243,8 @@ struct TSInsertTabletReq { 9: optional bool writeToTable 10: optional list columnCategories 11: optional bool isCompressed - 12: optional list encodingTypes - 13: optional i32 compressType + 12: optional list encodingTypes + 13: optional byte compressType } struct TSInsertTabletsReq { From b87fd7cf578e694508027bdfa821af08333fd9a1 Mon Sep 17 00:00:00 2001 From: Tian Jiang Date: Thu, 3 Jul 2025 12:30:27 +0800 Subject: [PATCH 22/25] add test --- .../session/it/IoTDBSessionCompressedIT.java | 322 ++++++++++++++++++ .../org/apache/iotdb/session/Session.java | 2 +- .../session/rpccompress/TabletEncoder.java | 13 +- 3 files changed, 331 insertions(+), 6 deletions(-) create mode 100644 integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java diff --git a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java new file mode 100644 index 0000000000000..23a3ac0e5a1a0 --- /dev/null +++ b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java @@ -0,0 +1,322 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iotdb.session.it; + +import org.apache.iotdb.commons.conf.CommonDescriptor; +import org.apache.iotdb.isession.ITableSession; +import org.apache.iotdb.isession.SessionDataSet; +import org.apache.iotdb.it.env.EnvFactory; +import org.apache.iotdb.it.env.cluster.node.AbstractNodeWrapper; +import org.apache.iotdb.rpc.IoTDBConnectionException; +import org.apache.iotdb.rpc.StatementExecutionException; +import org.apache.iotdb.session.TableSessionBuilder; + +import org.apache.tsfile.enums.TSDataType; +import org.apache.tsfile.file.metadata.enums.CompressionType; +import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.read.common.RowRecord; +import org.apache.tsfile.utils.Binary; +import org.apache.tsfile.utils.BitMap; +import org.apache.tsfile.write.record.Tablet; +import org.apache.tsfile.write.schema.IMeasurementSchema; +import org.apache.tsfile.write.schema.MeasurementSchema; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +public class IoTDBSessionCompressedIT { + + private static ITableSession session1; + private static ITableSession session2; + private static ITableSession session3; + private static ITableSession session4; + + @BeforeClass + public static void setUpClass() throws IoTDBConnectionException { + EnvFactory.getEnv().initClusterEnvironment(); + + List nodeUrls = + EnvFactory.getEnv().getDataNodeWrapperList().stream() + .map(AbstractNodeWrapper::getIpAndPortString) + .collect(Collectors.toList()); + session1 = + new TableSessionBuilder() + .nodeUrls(nodeUrls) + .username(CommonDescriptor.getInstance().getConfig().getAdminName()) + .password(CommonDescriptor.getInstance().getConfig().getAdminPassword()) + .enableCompression(false) + .enableRedirection(true) + .enableAutoFetch(false) + .isCompressed(true) + .withCompressionType(CompressionType.SNAPPY) + .withBooleanEncoding(TSEncoding.PLAIN) + .withInt32Encoding(TSEncoding.CHIMP) + .withInt64Encoding(TSEncoding.CHIMP) + .withFloatEncoding(TSEncoding.CHIMP) + .withDoubleEncoding(TSEncoding.CHIMP) + .withBlobEncoding(TSEncoding.PLAIN) + .withStringEncoding(TSEncoding.PLAIN) + .withTextEncoding(TSEncoding.PLAIN) + .withDateEncoding(TSEncoding.PLAIN) + .withTimeStampEncoding(TSEncoding.PLAIN) + .build(); + session2 = + new TableSessionBuilder() + .nodeUrls(nodeUrls) + .username(CommonDescriptor.getInstance().getConfig().getAdminName()) + .password(CommonDescriptor.getInstance().getConfig().getAdminPassword()) + .enableCompression(false) + .enableRedirection(true) + .enableAutoFetch(false) + .isCompressed(true) + .withCompressionType(CompressionType.SNAPPY) + .withBooleanEncoding(TSEncoding.PLAIN) + .withInt32Encoding(TSEncoding.SPRINTZ) + .withInt64Encoding(TSEncoding.SPRINTZ) + .withFloatEncoding(TSEncoding.RLBE) + .withDoubleEncoding(TSEncoding.RLBE) + .withBlobEncoding(TSEncoding.PLAIN) + .withStringEncoding(TSEncoding.PLAIN) + .withTextEncoding(TSEncoding.PLAIN) + .withDateEncoding(TSEncoding.PLAIN) + .withTimeStampEncoding(TSEncoding.SPRINTZ) + .build(); + session3 = + new TableSessionBuilder() + .nodeUrls(nodeUrls) + .username(CommonDescriptor.getInstance().getConfig().getAdminName()) + .password(CommonDescriptor.getInstance().getConfig().getAdminPassword()) + .enableCompression(false) + .enableRedirection(true) + .enableAutoFetch(false) + .isCompressed(true) + .withCompressionType(CompressionType.GZIP) + .withBooleanEncoding(TSEncoding.RLE) + .withInt32Encoding(TSEncoding.TS_2DIFF) + .withInt64Encoding(TSEncoding.RLE) + .withFloatEncoding(TSEncoding.TS_2DIFF) + .withDoubleEncoding(TSEncoding.RLE) + .withBlobEncoding(TSEncoding.PLAIN) + .withStringEncoding(TSEncoding.PLAIN) + .withTextEncoding(TSEncoding.PLAIN) + .withDateEncoding(TSEncoding.RLE) + .withTimeStampEncoding(TSEncoding.RLE) + .build(); + session4 = + new TableSessionBuilder() + .nodeUrls(nodeUrls) + .username(CommonDescriptor.getInstance().getConfig().getAdminName()) + .password(CommonDescriptor.getInstance().getConfig().getAdminPassword()) + .enableCompression(false) + .enableRedirection(true) + .enableAutoFetch(false) + .isCompressed(true) + .withCompressionType(CompressionType.LZMA2) + .withBooleanEncoding(TSEncoding.PLAIN) + .withInt32Encoding(TSEncoding.GORILLA) + .withInt64Encoding(TSEncoding.ZIGZAG) + .withFloatEncoding(TSEncoding.GORILLA) + .withDoubleEncoding(TSEncoding.GORILLA) + .withBlobEncoding(TSEncoding.PLAIN) + .withStringEncoding(TSEncoding.PLAIN) + .withTextEncoding(TSEncoding.PLAIN) + .withDateEncoding(TSEncoding.RLE) + .withTimeStampEncoding(TSEncoding.ZIGZAG) + .build(); + } + + @AfterClass + public static void tearDownClass() throws IoTDBConnectionException { + if (session1 != null) { + session1.close(); + } + if (session2 != null) { + session2.close(); + } + if (session3 != null) { + session3.close(); + } + if (session4 != null) { + session4.close(); + } + EnvFactory.getEnv().cleanClusterEnvironment(); + } + + @Test + public void testRpcCompressed() throws IoTDBConnectionException, StatementExecutionException { + List schemas = new ArrayList<>(); + MeasurementSchema schema = new MeasurementSchema(); + schema.setMeasurementName("pressure0"); + schema.setDataType(TSDataType.INT32); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure1"); + schema.setDataType(TSDataType.INT64); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure2"); + schema.setDataType(TSDataType.FLOAT); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure3"); + schema.setDataType(TSDataType.DOUBLE); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure4"); + schema.setDataType(TSDataType.TEXT); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure5"); + schema.setDataType(TSDataType.BOOLEAN); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure6"); + schema.setDataType(TSDataType.STRING); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + schema = new MeasurementSchema(); + schema.setMeasurementName("pressure7"); + schema.setDataType(TSDataType.BLOB); + schema.setCompressionType(CompressionType.SNAPPY); + schema.setEncoding(TSEncoding.PLAIN); + schemas.add(schema); + + long[] timestamp = new long[] {3L, 4L, 5L, 6L}; + Object[] values = new Object[8]; + values[0] = new int[] {1, 2, 8, 15}; + values[1] = new long[] {1L, 2L, 8L, 15L}; + values[2] = new float[] {1.1f, 1.2f, 8.8f, 15.5f}; + values[3] = new double[] {0.707, 0.708, 8.8, 15.5}; + values[4] = + new Binary[] { + new Binary(new byte[] {(byte) 32}), + new Binary(new byte[] {(byte) 16}), + new Binary(new byte[] {(byte) 1}), + new Binary(new byte[] {(byte) 56}) + }; + values[5] = new boolean[] {true, false, true, false}; + values[6] = + new Binary[] { + new Binary(new byte[] {(byte) 32}), + new Binary(new byte[] {(byte) 16}), + new Binary(new byte[] {(byte) 1}), + new Binary(new byte[] {(byte) 56}) + }; + values[7] = + new Binary[] { + new Binary(new byte[] {(byte) 32}), + new Binary(new byte[] {(byte) 16}), + new Binary(new byte[] {(byte) 1}), + new Binary(new byte[] {(byte) 56}) + }; + BitMap[] partBitMap = new BitMap[8]; + + String tableName = "table_13"; + Tablet tablet = new Tablet(tableName, schemas, timestamp, values, partBitMap, 4); + + session1.executeNonQueryStatement("create database IF NOT EXISTS dbTest_0"); + session1.executeNonQueryStatement("use dbTest_0"); + session2.executeNonQueryStatement("use dbTest_0"); + session3.executeNonQueryStatement("use dbTest_0"); + session4.executeNonQueryStatement("use dbTest_0"); + + // 1. insert + session1.insert(tablet); + session2.insert(tablet); + session3.insert(tablet); + session4.insert(tablet); + + // 2. assert + SessionDataSet sessionDataSet1 = + session1.executeQueryStatement("select * from dbTest_0." + tableName); + SessionDataSet sessionDataSet2 = + session2.executeQueryStatement("select * from dbTest_0." + tableName); + SessionDataSet sessionDataSet3 = + session3.executeQueryStatement("select * from dbTest_0." + tableName); + SessionDataSet sessionDataSet4 = + session4.executeQueryStatement("select * from dbTest_0." + tableName); + + if (sessionDataSet1.hasNext()) { + RowRecord next = sessionDataSet1.next(); + Assert.assertEquals(3L, next.getFields().get(0).getLongV()); + Assert.assertEquals(1, next.getFields().get(1).getIntV()); + Assert.assertEquals(1L, next.getFields().get(2).getLongV()); + Assert.assertEquals(1.1f, next.getFields().get(3).getFloatV(), 0.01); + Assert.assertEquals(0.707, next.getFields().get(4).getDoubleV(), 0.01); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(5).getBinaryV()); + Assert.assertEquals(true, next.getFields().get(6).getBoolV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(7).getBinaryV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(8).getBinaryV()); + } + if (sessionDataSet2.hasNext()) { + RowRecord next = sessionDataSet2.next(); + Assert.assertEquals(3L, next.getFields().get(0).getLongV()); + Assert.assertEquals(1, next.getFields().get(1).getIntV()); + Assert.assertEquals(1L, next.getFields().get(2).getLongV()); + Assert.assertEquals(1.1f, next.getFields().get(3).getFloatV(), 0.01); + Assert.assertEquals(0.707, next.getFields().get(4).getDoubleV(), 0.01); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(5).getBinaryV()); + Assert.assertEquals(true, next.getFields().get(6).getBoolV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(7).getBinaryV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(8).getBinaryV()); + } + if (sessionDataSet3.hasNext()) { + RowRecord next = sessionDataSet3.next(); + Assert.assertEquals(3L, next.getFields().get(0).getLongV()); + Assert.assertEquals(1, next.getFields().get(1).getIntV()); + Assert.assertEquals(1L, next.getFields().get(2).getLongV()); + Assert.assertEquals(1.1f, next.getFields().get(3).getFloatV(), 0.01); + Assert.assertEquals(0.707, next.getFields().get(4).getDoubleV(), 0.01); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(5).getBinaryV()); + Assert.assertEquals(true, next.getFields().get(6).getBoolV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(7).getBinaryV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(8).getBinaryV()); + } + if (sessionDataSet4.hasNext()) { + RowRecord next = sessionDataSet4.next(); + Assert.assertEquals(3L, next.getFields().get(0).getLongV()); + Assert.assertEquals(1, next.getFields().get(1).getIntV()); + Assert.assertEquals(1L, next.getFields().get(2).getLongV()); + Assert.assertEquals(1.1f, next.getFields().get(3).getFloatV(), 0.01); + Assert.assertEquals(0.707, next.getFields().get(4).getDoubleV(), 0.01); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(5).getBinaryV()); + Assert.assertEquals(true, next.getFields().get(6).getBoolV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(7).getBinaryV()); + Assert.assertEquals(new Binary(new byte[] {(byte) 32}), next.getFields().get(8).getBinaryV()); + } + } +} diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index 2340003ae1de7..647bc76e466a1 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -3015,7 +3015,7 @@ private TSInsertTabletReq genTSInsertTabletReq(Tablet tablet, boolean sorted, bo TabletEncoder encoder = new TabletEncoder( - this.compressionType, + enableRPCCompression ? this.compressionType : CompressionType.UNCOMPRESSED, encodingTypes.stream().map(TSEncoding::deserialize).collect(Collectors.toList())); request.setIsCompressed(this.enableRPCCompression); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java index 3c8a97416e400..7ad02a53bbcf9 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java @@ -100,12 +100,15 @@ public ByteBuffer encodeValues(Tablet tablet) { private ByteBuffer compressBuffer(ByteBuffer buffer) { if (compressionType != CompressionType.UNCOMPRESSED) { ICompressor compressor = ICompressor.getCompressor(compressionType); - ByteBuffer compressed = - ByteBuffer.allocate(compressor.getMaxBytesForCompression(buffer.remaining())); + byte[] compressed = new byte[compressor.getMaxBytesForCompression(buffer.remaining())]; try { - compressor.compress(buffer, compressed); - buffer = compressed; - buffer.flip(); + int compressedLength = + compressor.compress( + buffer.array(), + buffer.arrayOffset() + buffer.position(), + buffer.remaining(), + compressed); + buffer = ByteBuffer.wrap(compressed, 0, compressedLength); } catch (IOException e) { throw new IllegalStateException(e); } From cb602edcc539eb272de51ed2e8bff35d8afa1e8e Mon Sep 17 00:00:00 2001 From: Tian Jiang Date: Mon, 14 Jul 2025 17:28:56 +0800 Subject: [PATCH 23/25] revert changes regarding compact protocol --- .../java/org/apache/iotdb/session/SessionConnection.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java index e027c310a4eca..477eba234eb35 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java @@ -69,6 +69,7 @@ import org.apache.thrift.TException; import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TCompactProtocol; import org.apache.thrift.transport.TTransport; import org.apache.thrift.transport.TTransportException; import org.apache.tsfile.utils.Pair; @@ -206,7 +207,11 @@ private void init(TEndPoint endPoint, boolean useSSL, String trustStore, String throw new IoTDBConnectionException(e); } - client = new IClientRPCService.Client(new TBinaryProtocol(transport)); + if (session.enableRPCCompression) { + client = new IClientRPCService.Client(new TCompactProtocol(transport)); + } else { + client = new IClientRPCService.Client(new TBinaryProtocol(transport)); + } client = RpcUtils.newSynchronizedClient(client); TSOpenSessionReq openReq = new TSOpenSessionReq(); From be542c9d09bab66dc0ead4f5aedbfd215bf795fb Mon Sep 17 00:00:00 2001 From: Tian Jiang Date: Tue, 15 Jul 2025 19:03:37 +0800 Subject: [PATCH 24/25] refactor configurations --- .../session/it/IoTDBSessionCompressedIT.java | 12 ++-- .../iotdb/tool/data/ImportDataTable.java | 2 +- .../iotdb/tool/schema/ExportSchemaTable.java | 2 +- .../iotdb/tool/schema/ImportSchemaTable.java | 2 +- .../iotdb/isession/pool/ISessionPool.java | 2 +- .../iotdb/session/AbstractSessionBuilder.java | 2 + .../org/apache/iotdb/session/Session.java | 29 ++++++-- .../iotdb/session/SessionConnection.java | 2 +- .../iotdb/session/TableSessionBuilder.java | 8 +-- .../pool/AbstractSessionPoolBuilder.java | 1 - .../iotdb/session/pool/SessionPool.java | 67 +++++++++++++------ .../session/pool/TableSessionPoolBuilder.java | 9 ++- .../iotdb/session/RpcCompressedTest.java | 12 ++-- .../iotdb/session/pool/SessionPoolTest.java | 4 +- 14 files changed, 97 insertions(+), 57 deletions(-) diff --git a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java index 23a3ac0e5a1a0..82d28c34ff680 100644 --- a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java @@ -65,10 +65,9 @@ public static void setUpClass() throws IoTDBConnectionException { .nodeUrls(nodeUrls) .username(CommonDescriptor.getInstance().getConfig().getAdminName()) .password(CommonDescriptor.getInstance().getConfig().getAdminPassword()) - .enableCompression(false) + .enableCompression(true) .enableRedirection(true) .enableAutoFetch(false) - .isCompressed(true) .withCompressionType(CompressionType.SNAPPY) .withBooleanEncoding(TSEncoding.PLAIN) .withInt32Encoding(TSEncoding.CHIMP) @@ -86,10 +85,9 @@ public static void setUpClass() throws IoTDBConnectionException { .nodeUrls(nodeUrls) .username(CommonDescriptor.getInstance().getConfig().getAdminName()) .password(CommonDescriptor.getInstance().getConfig().getAdminPassword()) - .enableCompression(false) + .enableCompression(true) .enableRedirection(true) .enableAutoFetch(false) - .isCompressed(true) .withCompressionType(CompressionType.SNAPPY) .withBooleanEncoding(TSEncoding.PLAIN) .withInt32Encoding(TSEncoding.SPRINTZ) @@ -107,10 +105,9 @@ public static void setUpClass() throws IoTDBConnectionException { .nodeUrls(nodeUrls) .username(CommonDescriptor.getInstance().getConfig().getAdminName()) .password(CommonDescriptor.getInstance().getConfig().getAdminPassword()) - .enableCompression(false) + .enableCompression(true) .enableRedirection(true) .enableAutoFetch(false) - .isCompressed(true) .withCompressionType(CompressionType.GZIP) .withBooleanEncoding(TSEncoding.RLE) .withInt32Encoding(TSEncoding.TS_2DIFF) @@ -128,10 +125,9 @@ public static void setUpClass() throws IoTDBConnectionException { .nodeUrls(nodeUrls) .username(CommonDescriptor.getInstance().getConfig().getAdminName()) .password(CommonDescriptor.getInstance().getConfig().getAdminPassword()) - .enableCompression(false) + .enableCompression(true) .enableRedirection(true) .enableAutoFetch(false) - .isCompressed(true) .withCompressionType(CompressionType.LZMA2) .withBooleanEncoding(TSEncoding.PLAIN) .withInt32Encoding(TSEncoding.GORILLA) diff --git a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ImportDataTable.java b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ImportDataTable.java index 1b3e2689e9cc1..9be471d265ba1 100644 --- a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ImportDataTable.java +++ b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ImportDataTable.java @@ -72,7 +72,7 @@ public void init() throws InterruptedException { .user(username) .password(password) .maxSize(threadNum + 1) - .enableCompression(false) + .enableThriftCompression(false) .enableRedirection(false) .enableAutoFetch(false) .database(database) diff --git a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ExportSchemaTable.java b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ExportSchemaTable.java index e80bdeac82e71..8a322665fcaef 100644 --- a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ExportSchemaTable.java +++ b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ExportSchemaTable.java @@ -58,7 +58,7 @@ public void init() throws InterruptedException { .user(username) .password(password) .maxSize(threadNum + 1) - .enableCompression(false) + .enableThriftCompression(false) .enableRedirection(false) .enableAutoFetch(false) .database(database) diff --git a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ImportSchemaTable.java b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ImportSchemaTable.java index 25119e48623e4..c4e86fdeaad66 100644 --- a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ImportSchemaTable.java +++ b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ImportSchemaTable.java @@ -54,7 +54,7 @@ public void init() throws InterruptedException { .user(username) .password(password) .maxSize(threadNum + 1) - .enableCompression(false) + .enableThriftCompression(false) .enableRedirection(false) .enableAutoFetch(false) .database(database) diff --git a/iotdb-client/isession/src/main/java/org/apache/iotdb/isession/pool/ISessionPool.java b/iotdb-client/isession/src/main/java/org/apache/iotdb/isession/pool/ISessionPool.java index 1193435889db6..acf3a9bac913c 100644 --- a/iotdb-client/isession/src/main/java/org/apache/iotdb/isession/pool/ISessionPool.java +++ b/iotdb-client/isession/src/main/java/org/apache/iotdb/isession/pool/ISessionPool.java @@ -535,7 +535,7 @@ SessionDataSetWrapper executeAggregationQuery( long getWaitToGetSessionTimeoutInMs(); - boolean isEnableCompression(); + boolean isEnableThriftCompression(); void setEnableRedirection(boolean enableRedirection); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/AbstractSessionBuilder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/AbstractSessionBuilder.java index ec828ea2aa507..1f406f94c147c 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/AbstractSessionBuilder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/AbstractSessionBuilder.java @@ -77,6 +77,8 @@ public abstract class AbstractSessionBuilder { public Boolean isCompressed = false; + public Boolean isCompacted = false; + public CompressionType compressionType = CompressionType.UNCOMPRESSED; public Map columnEncodersMap; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index 647bc76e466a1..43b9a27cdc07b 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -138,6 +138,7 @@ public class Session implements ISession { */ private long queryTimeoutInMs = -1; + protected boolean enableRPCCompaction; protected boolean enableRPCCompression; protected int connectionTimeoutInMs; protected ZoneId zoneId; @@ -453,6 +454,7 @@ public Session(AbstractSessionBuilder builder) { this.defaultEndPoint = new TEndPoint(builder.host, builder.rpcPort); this.enableQueryRedirection = builder.enableRedirection; } + this.enableRPCCompaction = builder.isCompacted; this.enableRPCCompression = builder.isCompressed; this.compressionType = builder.compressionType; this.columnEncodersMap = builder.columnEncodersMap; @@ -502,12 +504,12 @@ public synchronized void open() throws IoTDBConnectionException { } @Override - public synchronized void open(boolean enableRPCCompression) throws IoTDBConnectionException { - open(enableRPCCompression, SessionConfig.DEFAULT_CONNECTION_TIMEOUT_MS); + public synchronized void open(boolean enableRPCCompaction) throws IoTDBConnectionException { + open(enableRPCCompaction, SessionConfig.DEFAULT_CONNECTION_TIMEOUT_MS); } @Override - public synchronized void open(boolean enableRPCCompression, int connectionTimeoutInMs) + public synchronized void open(boolean enableRPCCompaction, int connectionTimeoutInMs) throws IoTDBConnectionException { if (!isClosed) { return; @@ -537,13 +539,12 @@ public synchronized void open(boolean enableRPCCompression, int connectionTimeou useSSL, trustStore, trustStorePwd, - enableRPCCompression, + enableRPCCompaction, version.toString()); } else { this.availableNodes = new DummyNodesSupplier(getNodeUrls()); } - this.enableRPCCompression = enableRPCCompression; this.connectionTimeoutInMs = connectionTimeoutInMs; setDefaultSessionConnection(constructSessionConnection(this, defaultEndPoint, zoneId)); getDefaultSessionConnection().setEnableRedirect(enableQueryRedirection); @@ -4232,6 +4233,14 @@ protected void setDefaultSessionConnection(SessionConnection defaultSessionConne this.defaultSessionConnection = defaultSessionConnection; } + public boolean isEnableRPCCompaction() { + return enableRPCCompaction; + } + + public void setEnableRPCCompaction(boolean enableRPCCompaction) { + this.enableRPCCompaction = enableRPCCompaction; + } + public static class Builder extends AbstractSessionBuilder { public Builder host(String host) { @@ -4264,6 +4273,16 @@ public Builder zoneId(ZoneId zoneId) { return this; } + public Builder isCompressed(boolean isCompressed) { + this.isCompressed = isCompressed; + return this; + } + + public Builder isCompacted(boolean isCompacted) { + this.isCompacted = isCompacted; + return this; + } + public Builder thriftDefaultBufferSize(int thriftDefaultBufferSize) { this.thriftDefaultBufferSize = thriftDefaultBufferSize; return this; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java index 477eba234eb35..c8b94c4e6da03 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java @@ -207,7 +207,7 @@ private void init(TEndPoint endPoint, boolean useSSL, String trustStore, String throw new IoTDBConnectionException(e); } - if (session.enableRPCCompression) { + if (session.enableRPCCompaction) { client = new IClientRPCService.Client(new TCompactProtocol(transport)); } else { client = new IClientRPCService.Client(new TBinaryProtocol(transport)); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java index 27c642507c6d0..6f8c8da7e05cd 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/TableSessionBuilder.java @@ -247,7 +247,7 @@ public TableSessionBuilder trustStorePwd(String keyStorePwd) { * @defaultValue false */ public TableSessionBuilder enableCompression(boolean enableCompression) { - this.enableCompression = enableCompression; + this.isCompressed = enableCompression; return this; } @@ -263,8 +263,8 @@ public TableSessionBuilder connectionTimeoutInMs(int connectionTimeoutInMs) { return this; } - public TableSessionBuilder isCompressed(Boolean isCompressed) { - this.isCompressed = isCompressed; + public TableSessionBuilder enableCompaction(boolean enableCompaction) { + this.isCompacted = enableCompaction; return this; } @@ -385,7 +385,7 @@ public ITableSession build() throws IoTDBConnectionException { newSession.enableRPCCompression = isCompressed; try { - newSession.open(enableCompression, connectionTimeoutInMs); + newSession.open(isCompacted, connectionTimeoutInMs); } catch (IoTDBConnectionException e) { newSession.close(); throw e; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/AbstractSessionPoolBuilder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/AbstractSessionPoolBuilder.java index cbadc8cf932c1..91c93d8dd63b8 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/AbstractSessionPoolBuilder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/AbstractSessionPoolBuilder.java @@ -25,6 +25,5 @@ public class AbstractSessionPoolBuilder extends AbstractSessionBuilder { int maxSize = SessionConfig.DEFAULT_SESSION_POOL_MAX_SIZE; long waitToGetSessionTimeoutInMs = 60_000; - boolean enableCompression = false; int connectionTimeoutInMs = SessionConfig.DEFAULT_CONNECTION_TIMEOUT_MS; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java index 1ed3d7a8531e6..36e1888b46787 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java @@ -145,7 +145,8 @@ public class SessionPool implements ISessionPool { // parameters for Session#open() private final int connectionTimeoutInMs; - private final boolean enableCompression; + private final boolean enableIoTDBRpcCompression; + private final boolean enableThriftCompression; // whether the queue is closed. private boolean closed; @@ -244,7 +245,12 @@ public SessionPool(List nodeUrls, String user, String password, int maxS } public SessionPool( - String host, int port, String user, String password, int maxSize, boolean enableCompression) { + String host, + int port, + String user, + String password, + int maxSize, + boolean enableThriftCompression) { this( host, port, @@ -253,7 +259,7 @@ public SessionPool( maxSize, SessionConfig.DEFAULT_FETCH_SIZE, 60_000, - enableCompression, + enableThriftCompression, null, SessionConfig.DEFAULT_REDIRECTION_MODE, SessionConfig.DEFAULT_CONNECTION_TIMEOUT_MS, @@ -263,7 +269,11 @@ public SessionPool( } public SessionPool( - List nodeUrls, String user, String password, int maxSize, boolean enableCompression) { + List nodeUrls, + String user, + String password, + int maxSize, + boolean enableThriftCompression) { this( nodeUrls, user, @@ -271,7 +281,7 @@ public SessionPool( maxSize, SessionConfig.DEFAULT_FETCH_SIZE, 60_000, - enableCompression, + enableThriftCompression, null, SessionConfig.DEFAULT_REDIRECTION_MODE, SessionConfig.DEFAULT_CONNECTION_TIMEOUT_MS, @@ -286,7 +296,7 @@ public SessionPool( String user, String password, int maxSize, - boolean enableCompression, + boolean enableThriftCompression, boolean enableRedirection) { this( host, @@ -296,7 +306,7 @@ public SessionPool( maxSize, SessionConfig.DEFAULT_FETCH_SIZE, 60_000, - enableCompression, + enableThriftCompression, null, enableRedirection, SessionConfig.DEFAULT_CONNECTION_TIMEOUT_MS, @@ -310,7 +320,7 @@ public SessionPool( String user, String password, int maxSize, - boolean enableCompression, + boolean enableThriftCompression, boolean enableRedirection) { this( nodeUrls, @@ -319,7 +329,7 @@ public SessionPool( maxSize, SessionConfig.DEFAULT_FETCH_SIZE, 60_000, - enableCompression, + enableThriftCompression, null, enableRedirection, SessionConfig.DEFAULT_CONNECTION_TIMEOUT_MS, @@ -374,7 +384,7 @@ public SessionPool( int maxSize, int fetchSize, long waitToGetSessionTimeoutInMs, - boolean enableCompression, + boolean enableThriftCompression, ZoneId zoneId, boolean enableRedirection, int connectionTimeoutInMs, @@ -389,7 +399,8 @@ public SessionPool( this.password = password; this.fetchSize = fetchSize; this.waitToGetSessionTimeoutInMs = waitToGetSessionTimeoutInMs; - this.enableCompression = enableCompression; + this.enableThriftCompression = enableThriftCompression; + this.enableIoTDBRpcCompression = false; this.zoneId = zoneId; this.enableRedirection = enableRedirection; if (this.enableRedirection) { @@ -413,7 +424,7 @@ public SessionPool( int maxSize, int fetchSize, long waitToGetSessionTimeoutInMs, - boolean enableCompression, + boolean enableThriftCompression, ZoneId zoneId, boolean enableRedirection, int connectionTimeoutInMs, @@ -431,7 +442,8 @@ public SessionPool( this.password = password; this.fetchSize = fetchSize; this.waitToGetSessionTimeoutInMs = waitToGetSessionTimeoutInMs; - this.enableCompression = enableCompression; + this.enableThriftCompression = enableThriftCompression; + this.enableIoTDBRpcCompression = false; this.zoneId = zoneId; this.enableRedirection = enableRedirection; if (this.enableRedirection) { @@ -458,7 +470,7 @@ public SessionPool( int maxSize, int fetchSize, long waitToGetSessionTimeoutInMs, - boolean enableCompression, + boolean enableThriftCompression, ZoneId zoneId, boolean enableRedirection, int connectionTimeoutInMs, @@ -476,7 +488,8 @@ public SessionPool( this.password = password; this.fetchSize = fetchSize; this.waitToGetSessionTimeoutInMs = waitToGetSessionTimeoutInMs; - this.enableCompression = enableCompression; + this.enableThriftCompression = enableThriftCompression; + this.enableIoTDBRpcCompression = false; this.zoneId = zoneId; this.enableRedirection = enableRedirection; if (this.enableRedirection) { @@ -498,7 +511,8 @@ public SessionPool(AbstractSessionPoolBuilder builder) { this.password = builder.pw; this.fetchSize = builder.fetchSize; this.waitToGetSessionTimeoutInMs = builder.waitToGetSessionTimeoutInMs; - this.enableCompression = builder.enableCompression; + this.enableThriftCompression = builder.isCompacted; + this.enableIoTDBRpcCompression = builder.isCompressed; this.zoneId = builder.zoneId; this.enableRedirection = builder.enableRedirection; if (this.enableRedirection) { @@ -576,6 +590,8 @@ private Session constructNewSession() { .sqlDialect(sqlDialect) .database(database) .timeOut(queryTimeoutInMs) + .isCompressed(enableIoTDBRpcCompression) + .isCompacted(enableThriftCompression) .build(); } else { // Construct redirect-able Session @@ -599,6 +615,8 @@ private Session constructNewSession() { .sqlDialect(sqlDialect) .database(database) .timeOut(queryTimeoutInMs) + .isCompressed(enableIoTDBRpcCompression) + .isCompacted(enableThriftCompression) .build(); } session.setEnableQueryRedirection(enableQueryRedirection); @@ -636,7 +654,7 @@ private void initAvailableNodes(List endPointList) { useSSL, trustStore, trustStorePwd, - enableCompression, + enableThriftCompression, version.toString()); } @@ -710,7 +728,7 @@ private ISession getSession() throws IoTDBConnectionException { try { session.open( - enableCompression, + enableThriftCompression, connectionTimeoutInMs, deviceIdToEndpoint, tableModelDeviceIdToEndpoint, @@ -824,7 +842,7 @@ private void tryConstructNewSession() { Session session = constructNewSession(); try { session.open( - enableCompression, + enableThriftCompression, connectionTimeoutInMs, deviceIdToEndpoint, tableModelDeviceIdToEndpoint, @@ -3473,8 +3491,8 @@ public long getWaitToGetSessionTimeoutInMs() { } @Override - public boolean isEnableCompression() { - return enableCompression; + public boolean isEnableThriftCompression() { + return enableThriftCompression; } @Override @@ -3663,8 +3681,13 @@ public Builder thriftMaxFrameSize(int thriftMaxFrameSize) { return this; } + public Builder enableCompaction(boolean enableCompaction) { + this.isCompacted = enableCompaction; + return this; + } + public Builder enableCompression(boolean enableCompression) { - this.enableCompression = enableCompression; + this.isCompressed = enableCompression; return this; } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionPoolBuilder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionPoolBuilder.java index 4deb94239463d..dd1d5ee58d3af 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionPoolBuilder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionPoolBuilder.java @@ -175,8 +175,13 @@ public TableSessionPoolBuilder thriftMaxFrameSize(int thriftMaxFrameSize) { * @return the current {@link TableSessionPoolBuilder} instance. * @defaultValue false */ - public TableSessionPoolBuilder enableCompression(boolean enableCompression) { - this.enableCompression = enableCompression; + public TableSessionPoolBuilder enableIoTDBRpcCompression(boolean enableCompression) { + this.isCompressed = enableCompression; + return this; + } + + public TableSessionPoolBuilder enableThriftCompression(boolean enableCompression) { + this.isCompacted = enableCompression; return this; } diff --git a/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java index 157271317a2f3..7caf4dfc84106 100644 --- a/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java +++ b/iotdb-client/session/src/test/java/org/apache/iotdb/session/RpcCompressedTest.java @@ -60,10 +60,9 @@ public void setUp() throws IoTDBConnectionException, StatementExecutionException .nodeUrls(nodeUrls) .username("root") .password("root") - .enableCompression(false) + .enableCompression(true) .enableRedirection(true) .enableAutoFetch(false) - .isCompressed(true) .withCompressionType(CompressionType.SNAPPY) .withBooleanEncoding(TSEncoding.PLAIN) .withInt32Encoding(TSEncoding.CHIMP) @@ -81,10 +80,9 @@ public void setUp() throws IoTDBConnectionException, StatementExecutionException .nodeUrls(nodeUrls) .username("root") .password("root") - .enableCompression(false) + .enableCompression(true) .enableRedirection(true) .enableAutoFetch(false) - .isCompressed(true) .withCompressionType(CompressionType.SNAPPY) .withBooleanEncoding(TSEncoding.PLAIN) .withInt32Encoding(TSEncoding.SPRINTZ) @@ -102,10 +100,9 @@ public void setUp() throws IoTDBConnectionException, StatementExecutionException .nodeUrls(nodeUrls) .username("root") .password("root") - .enableCompression(false) + .enableCompression(true) .enableRedirection(true) .enableAutoFetch(false) - .isCompressed(true) .withCompressionType(CompressionType.GZIP) .withBooleanEncoding(TSEncoding.RLE) .withInt32Encoding(TSEncoding.TS_2DIFF) @@ -123,10 +120,9 @@ public void setUp() throws IoTDBConnectionException, StatementExecutionException .nodeUrls(nodeUrls) .username("root") .password("root") - .enableCompression(false) + .enableCompression(true) .enableRedirection(true) .enableAutoFetch(false) - .isCompressed(true) .withCompressionType(CompressionType.LZMA2) .withBooleanEncoding(TSEncoding.PLAIN) .withInt32Encoding(TSEncoding.GORILLA) diff --git a/iotdb-client/session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest.java b/iotdb-client/session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest.java index 650d0087eb603..fa7c8c611c28a 100644 --- a/iotdb-client/session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest.java +++ b/iotdb-client/session/src/test/java/org/apache/iotdb/session/pool/SessionPoolTest.java @@ -125,7 +125,7 @@ public void testBuilder() { assertEquals(1, pool.getFetchSize()); assertEquals(2, pool.getWaitToGetSessionTimeoutInMs()); assertTrue(pool.isEnableRedirection()); - assertTrue(pool.isEnableCompression()); + assertTrue(pool.isEnableThriftCompression()); assertEquals(3, pool.getConnectionTimeoutInMs()); assertEquals(ZoneOffset.UTC, pool.getZoneId()); assertEquals(Version.V_1_0, pool.getVersion()); @@ -157,7 +157,7 @@ public void testBuilder2() { assertEquals(1, pool.getFetchSize()); assertEquals(2, pool.getWaitToGetSessionTimeoutInMs()); assertTrue(pool.isEnableRedirection()); - assertTrue(pool.isEnableCompression()); + assertTrue(pool.isEnableThriftCompression()); assertEquals(3, pool.getConnectionTimeoutInMs()); assertEquals(ZoneOffset.UTC, pool.getZoneId()); assertEquals(Version.V_1_0, pool.getVersion()); From e3e9b69ffb662c4a0073922f8c2093a362170415 Mon Sep 17 00:00:00 2001 From: Tian Jiang Date: Thu, 17 Jul 2025 14:20:25 +0800 Subject: [PATCH 25/25] fix compression --- .../iotdb/it/env/remote/env/RemoteServerEnv.java | 4 ++-- .../iotdb/session/it/IoTDBSessionCompressedIT.java | 5 +++-- .../iotdb/session/rpccompress/TabletEncoder.java | 10 +++++++--- .../apache/iotdb/session/util/SessionUtils.java | 6 ++++++ .../java/org/apache/iotdb/util/TabletDecoder.java | 14 ++++++++------ 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/remote/env/RemoteServerEnv.java b/integration-test/src/main/java/org/apache/iotdb/it/env/remote/env/RemoteServerEnv.java index c2308cfe10393..824a2206ce895 100644 --- a/integration-test/src/main/java/org/apache/iotdb/it/env/remote/env/RemoteServerEnv.java +++ b/integration-test/src/main/java/org/apache/iotdb/it/env/remote/env/RemoteServerEnv.java @@ -246,7 +246,7 @@ public ITableSessionPool getTableSessionPool(int maxSize) { .maxSize(maxSize) .fetchSize(SessionConfig.DEFAULT_FETCH_SIZE) .waitToGetSessionTimeoutInMs(60_000) - .enableCompression(false) + .enableThriftCompression(false) .zoneId(null) .enableRedirection(SessionConfig.DEFAULT_REDIRECTION_MODE) .connectionTimeoutInMs(SessionConfig.DEFAULT_CONNECTION_TIMEOUT_MS) @@ -267,7 +267,7 @@ public ITableSessionPool getTableSessionPool(int maxSize, String database) { .maxSize(maxSize) .fetchSize(SessionConfig.DEFAULT_FETCH_SIZE) .waitToGetSessionTimeoutInMs(60_000) - .enableCompression(false) + .enableThriftCompression(false) .zoneId(null) .enableRedirection(SessionConfig.DEFAULT_REDIRECTION_MODE) .connectionTimeoutInMs(SessionConfig.DEFAULT_CONNECTION_TIMEOUT_MS) diff --git a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java index 82d28c34ff680..b04ea0f83c212 100644 --- a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionCompressedIT.java @@ -22,7 +22,7 @@ import org.apache.iotdb.isession.ITableSession; import org.apache.iotdb.isession.SessionDataSet; import org.apache.iotdb.it.env.EnvFactory; -import org.apache.iotdb.it.env.cluster.node.AbstractNodeWrapper; +import org.apache.iotdb.it.env.cluster.node.DataNodeWrapper; import org.apache.iotdb.rpc.IoTDBConnectionException; import org.apache.iotdb.rpc.StatementExecutionException; import org.apache.iotdb.session.TableSessionBuilder; @@ -58,8 +58,9 @@ public static void setUpClass() throws IoTDBConnectionException { List nodeUrls = EnvFactory.getEnv().getDataNodeWrapperList().stream() - .map(AbstractNodeWrapper::getIpAndPortString) + .map(DataNodeWrapper::getIpAndPortString) .collect(Collectors.toList()); + // List nodeUrls = Collections.singletonList("127.0.0.1:6667"); session1 = new TableSessionBuilder() .nodeUrls(nodeUrls) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java index 7ad02a53bbcf9..49b88b921808f 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/rpccompress/TabletEncoder.java @@ -100,15 +100,19 @@ public ByteBuffer encodeValues(Tablet tablet) { private ByteBuffer compressBuffer(ByteBuffer buffer) { if (compressionType != CompressionType.UNCOMPRESSED) { ICompressor compressor = ICompressor.getCompressor(compressionType); - byte[] compressed = new byte[compressor.getMaxBytesForCompression(buffer.remaining())]; + int uncompressedSize = buffer.remaining(); + byte[] compressed = new byte[compressor.getMaxBytesForCompression(uncompressedSize) + 4]; try { int compressedLength = compressor.compress( buffer.array(), buffer.arrayOffset() + buffer.position(), - buffer.remaining(), + uncompressedSize, compressed); - buffer = ByteBuffer.wrap(compressed, 0, compressedLength); + buffer = ByteBuffer.wrap(compressed, 0, compressedLength + 4); + buffer.position(compressedLength); + buffer.putInt(uncompressedSize); + buffer.rewind(); } catch (IOException e) { throw new IllegalStateException(e); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java index 6867a7134f600..bae3665c10aa5 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java @@ -37,6 +37,7 @@ import org.apache.tsfile.write.schema.IMeasurementSchema; import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.nio.ByteBuffer; import java.time.LocalDate; import java.util.ArrayList; @@ -469,6 +470,11 @@ public static void encodeValue( throw new UnSupportedDataTypeException( String.format("Data type %s is not supported.", dataType)); } + try { + encoder.flush(outputStream); + } catch (IOException e) { + throw new IllegalStateException(e); + } } /* Used for table model insert only. */ diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/util/TabletDecoder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/util/TabletDecoder.java index 66afdc3dd0300..198444cdc3479 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/util/TabletDecoder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/util/TabletDecoder.java @@ -88,12 +88,14 @@ private ByteBuffer uncompress(ByteBuffer compressedBuffer) { } try { int uncompressedLength = compressedBuffer.getInt(compressedBuffer.limit() - 4); - ByteBuffer output = ByteBuffer.allocate(uncompressedLength); - byte[] compressedData = new byte[compressedBuffer.remaining() - 4]; - compressedBuffer.slice().get(compressedData); - byte[] uncompressedData = unCompressor.uncompress(compressedData); - output.put(uncompressedData); - output.flip(); + byte[] uncompressedBytes = new byte[uncompressedLength]; + unCompressor.uncompress( + compressedBuffer.array(), + compressedBuffer.arrayOffset() + compressedBuffer.position(), + compressedBuffer.remaining() - 4, + uncompressedBytes, + 0); + ByteBuffer output = ByteBuffer.wrap(uncompressedBytes); RPCServiceThriftHandlerMetrics.getInstance() .recordDecompressLatencyTimer(System.nanoTime() - startUncompressTime); return output;