otdb.timechodb-thrift.1.3.3.2.source-code.client.thrift Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timechodb-thrift Show documentation
Show all versions of timechodb-thrift Show documentation
RPC (Thrift) framework for client and DataNodes.
The newest version!
/*
* 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.
*/
include "common.thrift"
namespace java org.apache.iotdb.service.rpc.thrift
namespace py iotdb.thrift.rpc
namespace go rpc
struct TSQueryDataSet{
// ByteBuffer for time column
1: required binary time
// ByteBuffer for each column values
2: required list valueList
// Bitmap for each column to indicate whether it is a null value
3: required list bitmapList
}
struct TSQueryNonAlignDataSet{
// ByteBuffer for each time column
1: required list timeList
// ByteBuffer for each column values
2: required list valueList
}
struct TSTracingInfo{
1: required list activityList
2: required list elapsedTimeList
3: optional i32 seriesPathNum
4: optional i32 seqFileNum
5: optional i32 unSeqFileNum
6: optional i32 sequenceChunkNum
7: optional i64 sequenceChunkPointNum
8: optional i32 unsequenceChunkNum
9: optional i64 unsequenceChunkPointNum
10: optional i32 totalPageNum
11: optional i32 overlappedPageNum
}
struct TSExecuteStatementResp {
1: required common.TSStatus status
2: optional i64 queryId
// Column names in select statement of SQL
3: optional list columns
4: optional string operationType
5: optional bool ignoreTimeStamp
// Data type list of columns in select statement of SQL
6: optional list dataTypeList
7: optional TSQueryDataSet queryDataSet
// for disable align statements, queryDataSet is null and nonAlignQueryDataSet is not null
8: optional TSQueryNonAlignDataSet nonAlignQueryDataSet
9: optional map columnNameIndexMap
10: optional list sgColumns
11: optional list aliasColumns
12: optional TSTracingInfo tracingInfo
13: optional list queryResult
14: optional bool moreData
}
enum TSProtocolVersion {
IOTDB_SERVICE_PROTOCOL_V1,
IOTDB_SERVICE_PROTOCOL_V2,//V2 is the first version that we can check version compatibility
IOTDB_SERVICE_PROTOCOL_V3,//V3 is incompatible with V2
}
struct TSOpenSessionResp {
1: required common.TSStatus status
// The protocol version that the server is using.
2: required TSProtocolVersion serverProtocolVersion = TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V1
// Session id
3: optional i64 sessionId
// The configuration settings for this session.
4: optional map configuration
}
// OpenSession()
// Open a session (connection) on the server against which operations may be executed.
struct TSOpenSessionReq {
1: required TSProtocolVersion client_protocol = TSProtocolVersion.IOTDB_SERVICE_PROTOCOL_V3
2: required string zoneId
3: required string username
4: optional string password
5: optional map configuration
}
// CloseSession()
// Closes the specified session and frees any resources currently allocated to that session.
// Any open operations in that session will be canceled.
struct TSCloseSessionReq {
1: required i64 sessionId
}
// ExecuteStatement()
//
// Execute a statement.
// The returned OperationHandle can be used to check on the status of the statement, and to fetch results once the
// statement has finished executing.
struct TSExecuteStatementReq {
// The session to execute the statement against
1: required i64 sessionId
// The statement to be executed (DML, DDL, SET, etc)
2: required string statement
// statementId
3: required i64 statementId
4: optional i32 fetchSize
5: optional i64 timeout
6: optional bool enableRedirectQuery;
7: optional bool jdbcQuery;
}
struct TSExecuteBatchStatementReq{
// The session to execute the statement against
1: required i64 sessionId
// The statements to be executed (DML, DDL, SET, etc)
2: required list statements
}
struct TSGetOperationStatusReq {
1: required i64 sessionId
// Session to run this request against
2: required i64 queryId
}
// CancelOperation()
//
// Cancels processing on the specified operation handle and frees any resources which were allocated.
struct TSCancelOperationReq {
1: required i64 sessionId
// Operation to cancel
2: required i64 queryId
}
// CloseOperation()
struct TSCloseOperationReq {
1: required i64 sessionId
2: optional i64 queryId
3: optional i64 statementId
}
struct TSFetchResultsReq{
1: required i64 sessionId
2: required string statement
3: required i32 fetchSize
4: required i64 queryId
5: required bool isAlign
6: optional i64 timeout
}
struct TSFetchResultsResp{
1: required common.TSStatus status
2: required bool hasResultSet
3: required bool isAlign
4: optional TSQueryDataSet queryDataSet
5: optional TSQueryNonAlignDataSet nonAlignQueryDataSet
6: optional list queryResult
7: optional bool moreData
}
struct TSFetchMetadataResp{
1: required common.TSStatus status
2: optional string metadataInJson
3: optional list columnsList
4: optional string dataType
}
struct TSFetchMetadataReq{
1: required i64 sessionId
2: required string type
3: optional string columnPath
}
struct TSGetTimeZoneResp {
1: required common.TSStatus status
2: required string timeZone
}
struct TSSetTimeZoneReq {
1: required i64 sessionId
2: required string timeZone
}
// for session
struct TSInsertRecordReq {
1: required i64 sessionId
2: required string prefixPath
3: required list measurements
4: required binary values
5: required i64 timestamp
6: optional bool isAligned
}
struct TSInsertStringRecordReq {
1: required i64 sessionId
2: required string prefixPath
3: required list measurements
4: required list values
5: required i64 timestamp
6: optional bool isAligned
7: optional i64 timeout
}
struct TSInsertTabletReq {
1: required i64 sessionId
2: required string prefixPath
3: required list measurements
4: required binary values
5: required binary timestamps
6: required list types
7: required i32 size
8: optional bool isAligned
}
struct TSInsertTabletsReq {
1: required i64 sessionId
2: required list prefixPaths
3: required list> measurementsList
4: required list valuesList
5: required list timestampsList
6: required list> typesList
7: required list sizeList
8: optional bool isAligned
}
struct TSInsertRecordsReq {
1: required i64 sessionId
2: required list prefixPaths
3: required list> measurementsList
4: required list valuesList
5: required list timestamps
6: optional bool isAligned
}
struct TSInsertRecordsOfOneDeviceReq {
1: required i64 sessionId
2: required string prefixPath
3: required list> measurementsList
4: required list valuesList
5: required list timestamps
6: optional bool isAligned
}
struct TSInsertStringRecordsOfOneDeviceReq {
1: required i64 sessionId
2: required string prefixPath
3: required list> measurementsList
4: required list> valuesList
5: required list timestamps
6: optional bool isAligned
}
struct TSInsertStringRecordsReq {
1: required i64 sessionId
2: required list prefixPaths
3: required list> measurementsList
4: required list> valuesList
5: required list timestamps
6: optional bool isAligned
}
struct TSDeleteDataReq {
1: required i64 sessionId
2: required list paths
3: required i64 startTime
4: required i64 endTime
}
struct TSCreateTimeseriesReq {
1: required i64 sessionId
2: required string path
3: required i32 dataType
4: required i32 encoding
5: required i32 compressor
6: optional map props
7: optional map tags
8: optional map attributes
9: optional string measurementAlias
}
struct TSCreateAlignedTimeseriesReq {
1: required i64 sessionId
2: required string prefixPath
3: required list measurements
4: required list dataTypes
5: required list encodings
6: required list compressors
7: optional list measurementAlias
8: optional list