Class Session
- java.lang.Object
-
- org.apache.iotdb.session.Session
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSession.Builder
-
Field Summary
Fields Modifier and Type Field Description protected intconnectionTimeoutInMsprotected org.apache.iotdb.common.rpc.thrift.TEndPointdefaultEndPointprotected SessionConnectiondefaultSessionConnectionprotected java.util.Map<java.lang.String,org.apache.iotdb.common.rpc.thrift.TEndPoint>deviceIdToEndpointprotected booleanenableQueryRedirectionprotected booleanenableRedirectionprotected booleanenableRPCCompressionprotected java.util.Map<org.apache.iotdb.common.rpc.thrift.TEndPoint,SessionConnection>endPointToSessionConnectionprotected intfetchSizestatic java.lang.StringMSG_DONOT_ENABLE_REDIRECTstatic java.lang.StringMSG_UNSUPPORTED_DATA_TYPEprotected java.util.List<java.lang.String>nodeUrlsprotected java.lang.Stringpasswordprotected static org.apache.iotdb.service.rpc.thrift.TSProtocolVersionprotocolVersionprotected intthriftDefaultBufferSizeprotected intthriftMaxFrameSizeprotected java.lang.Stringusernameprotected Versionversionprotected java.time.ZoneIdzoneId
-
Constructor Summary
Constructors Constructor Description Session(java.lang.String host, int rpcPort)Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password)Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, boolean enableRedirection)Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, int fetchSize)Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, int fetchSize, long queryTimeoutInMs)Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, int fetchSize, java.time.ZoneId zoneId, boolean enableRedirection)Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, int fetchSize, java.time.ZoneId zoneId, int thriftDefaultBufferSize, int thriftMaxFrameSize, boolean enableRedirection, Version version)Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, java.time.ZoneId zoneId)Session(java.lang.String host, java.lang.String rpcPort, java.lang.String username, java.lang.String password)Session(java.util.List<java.lang.String> nodeUrls, java.lang.String username, java.lang.String password)Session(java.util.List<java.lang.String> nodeUrls, java.lang.String username, java.lang.String password, int fetchSize)Multiple nodeUrl,If one node down, connect to the next oneSession(java.util.List<java.lang.String> nodeUrls, java.lang.String username, java.lang.String password, int fetchSize, java.time.ZoneId zoneId, int thriftDefaultBufferSize, int thriftMaxFrameSize, boolean enableRedirection, Version version)Session(java.util.List<java.lang.String> nodeUrls, java.lang.String username, java.lang.String password, java.time.ZoneId zoneId)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAlignedMeasurementInTemplate(java.lang.String templateName, java.lang.String measurementPath, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressor)voidaddAlignedMeasurementsInTemplate(java.lang.String templateName, java.util.List<java.lang.String> measurementsPath, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors)voidaddUnalignedMeasurementInTemplate(java.lang.String templateName, java.lang.String measurementPath, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressor)voidaddUnalignedMeasurementsInTemplate(java.lang.String templateName, java.util.List<java.lang.String> measurementsPath, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors)booleancheckTimeseriesExists(java.lang.String path)voidclose()SessionConnectionconstructSessionConnection(Session session, org.apache.iotdb.common.rpc.thrift.TEndPoint endpoint, java.time.ZoneId zoneId)intcountMeasurementsInTemplate(java.lang.String name)voidcreateAlignedTimeseries(java.lang.String deviceId, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors, java.util.List<java.lang.String> measurementAliasList)voidcreateAlignedTimeseries(java.lang.String deviceId, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors, java.util.List<java.lang.String> measurementAliasList, java.util.List<java.util.Map<java.lang.String,java.lang.String>> tagsList, java.util.List<java.util.Map<java.lang.String,java.lang.String>> attributesList)voidcreateDatabase(java.lang.String database)voidcreateMultiTimeseries(java.util.List<java.lang.String> paths, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors, java.util.List<java.util.Map<java.lang.String,java.lang.String>> propsList, java.util.List<java.util.Map<java.lang.String,java.lang.String>> tagsList, java.util.List<java.util.Map<java.lang.String,java.lang.String>> attributesList, java.util.List<java.lang.String> measurementAliasList)voidcreateSchemaTemplate(java.lang.String name, java.util.List<java.lang.String> schemaNames, java.util.List<java.util.List<java.lang.String>> measurements, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> dataTypes, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding>> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors)Deprecated.voidcreateSchemaTemplate(java.lang.String templateName, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors, boolean isAligned)Create a template with flat measurements, not tree structured.voidcreateSchemaTemplate(Template template)Construct Template at session and create it at server.voidcreateTimeseries(java.lang.String path, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressor)voidcreateTimeseries(java.lang.String path, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressor, java.util.Map<java.lang.String,java.lang.String> props, java.util.Map<java.lang.String,java.lang.String> tags, java.util.Map<java.lang.String,java.lang.String> attributes, java.lang.String measurementAlias)voiddeleteData(java.lang.String path, long endTime)delete data <= time in one timeseriesvoiddeleteData(java.util.List<java.lang.String> paths, long endTime)delete data <= time in multiple timeseriesvoiddeleteData(java.util.List<java.lang.String> paths, long startTime, long endTime)delete data >= startTime and data <= endTime in multiple timeseriesvoiddeleteDatabase(java.lang.String database)voiddeleteDatabases(java.util.List<java.lang.String> databases)voiddeleteNodeInTemplate(java.lang.String templateName, java.lang.String path)voiddeleteStorageGroup(java.lang.String storageGroup)voiddeleteStorageGroups(java.util.List<java.lang.String> storageGroups)voiddeleteTimeseries(java.lang.String path)delete a timeseries, including data and schemavoiddeleteTimeseries(java.util.List<java.lang.String> paths)delete some timeseries, including data and schemavoiddropSchemaTemplate(java.lang.String templateName)SessionDataSetexecuteLastDataQuery(java.util.List<java.lang.String> paths)query eg.SessionDataSetexecuteLastDataQuery(java.util.List<java.lang.String> paths, long LastTime, long timeOut)query e.g.voidexecuteNonQueryStatement(java.lang.String sql)execute non query statementSessionDataSetexecuteQueryStatement(java.lang.String sql)execute query sqlSessionDataSetexecuteQueryStatement(java.lang.String sql, long timeoutInMs)execute query sql with explicit timeoutSessionDataSetexecuteRawDataQuery(java.util.List<java.lang.String> paths, long startTime, long endTime, long timeOut)query eg.org.apache.iotdb.service.rpc.thrift.TSConnectionInfoRespfetchAllConnections()intgetFetchSize()longgetQueryTimeout()java.lang.StringgetTimestampPrecision()java.lang.StringgetTimeZone()VersiongetVersion()voidinsertAlignedRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<java.lang.String> values)insert aligned data in one row, if you want improve your performance, please use insertAlignedRecords method or insertTablet method.voidinsertAlignedRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> types, java.util.List<java.lang.Object> values)insert aligned data in one row, if you want improve your performance, please use insertAlignedRecords method or insertTablet method.voidinsertAlignedRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList)Insert aligned multiple rows, which can reduce the overhead of network.voidinsertAlignedRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList)Insert aligned multiple rows, which can reduce the overhead of network.voidinsertAlignedRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList)Insert aligned multiple rows, which can reduce the overhead of network.voidinsertAlignedRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList, boolean haveSorted)Insert aligned multiple rows, which can reduce the overhead of network.voidinsertAlignedStringRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList)Insert aligned multiple rows with String format data, which can reduce the overhead of network.voidinsertAlignedStringRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList, boolean haveSorted)Insert multiple rows with String format data, which can reduce the overhead of network.voidinsertAlignedTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet)insert the aligned timeseries data of a device.voidinsertAlignedTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet, boolean sorted)insert the aligned timeseries data of a device.voidinsertAlignedTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets)insert aligned data of several deivces.voidinsertAlignedTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets, boolean sorted)insert aligned data of several devices.voidinsertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<java.lang.String> values)insert data in one row, if you want improve your performance, please use insertRecords method or insertTablet methodvoidinsertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> types, java.lang.Object... values)insert data in one row, if you want to improve your performance, please use insertRecords method or insertTablet methodvoidinsertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> types, java.util.List<java.lang.Object> values)insert data in one row, if you want improve your performance, please use insertRecords method or insertTablet methodvoidinsertRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList)Insert multiple rows, which can reduce the overhead of network.voidinsertRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList)Insert multiple rows, which can reduce the overhead of network.voidinsertRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList)Insert multiple rows, which can reduce the overhead of network.voidinsertRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList, boolean haveSorted)Insert multiple rows, which can reduce the overhead of network.voidinsertStringRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList)Insert multiple rows with String format data, which can reduce the overhead of network.voidinsertStringRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList, boolean haveSorted)Insert multiple rows with String format data, which can reduce the overhead of network.voidinsertTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet)insert the data of a device.voidinsertTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet, boolean sorted)insert a TabletvoidinsertTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets)insert the data of several deivces.voidinsertTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets, boolean sorted)insert the data of several devices.booleanisEnableQueryRedirection()booleanisEnableRedirection()booleanisMeasurementInTemplate(java.lang.String templateName, java.lang.String path)booleanisPathExistInTemplate(java.lang.String templateName, java.lang.String path)voidopen()voidopen(boolean enableRPCCompression)voidopen(boolean enableRPCCompression, int connectionTimeoutInMs)voidsetEnableQueryRedirection(boolean enableQueryRedirection)voidsetEnableRedirection(boolean enableRedirection)voidsetFetchSize(int fetchSize)voidsetQueryTimeout(long timeoutInMs)voidsetSchemaTemplate(java.lang.String templateName, java.lang.String prefixPath)voidsetStorageGroup(java.lang.String storageGroup)voidsetTimeZone(java.lang.String zoneId)voidsetTimeZoneOfSession(java.lang.String zoneId)Only changes the member variable of the Session object without sending it to server.voidsetVersion(Version version)java.util.List<java.lang.String>showAllTemplates()java.util.List<java.lang.String>showMeasurementsInTemplate(java.lang.String templateName)java.util.List<java.lang.String>showMeasurementsInTemplate(java.lang.String templateName, java.lang.String pattern)java.util.List<java.lang.String>showPathsTemplateSetOn(java.lang.String templateName)java.util.List<java.lang.String>showPathsTemplateUsingOn(java.lang.String templateName)voidsortTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet)voidtestInsertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<java.lang.String> values)This method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in clientvoidtestInsertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> types, java.util.List<java.lang.Object> values)This method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in clientvoidtestInsertRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList)This method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in clientvoidtestInsertRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList)This method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in clientvoidtestInsertTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet)This method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in clientvoidtestInsertTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet, boolean sorted)This method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in clientvoidtestInsertTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets)This method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in clientvoidtestInsertTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets, boolean sorted)This method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in clientvoidunsetSchemaTemplate(java.lang.String prefixPath, java.lang.String templateName)
-
-
-
Field Detail
-
protocolVersion
protected static final org.apache.iotdb.service.rpc.thrift.TSProtocolVersion protocolVersion
-
MSG_UNSUPPORTED_DATA_TYPE
public static final java.lang.String MSG_UNSUPPORTED_DATA_TYPE
- See Also:
- Constant Field Values
-
MSG_DONOT_ENABLE_REDIRECT
public static final java.lang.String MSG_DONOT_ENABLE_REDIRECT
- See Also:
- Constant Field Values
-
nodeUrls
protected java.util.List<java.lang.String> nodeUrls
-
username
protected java.lang.String username
-
password
protected java.lang.String password
-
fetchSize
protected int fetchSize
-
enableRPCCompression
protected boolean enableRPCCompression
-
connectionTimeoutInMs
protected int connectionTimeoutInMs
-
zoneId
protected java.time.ZoneId zoneId
-
thriftDefaultBufferSize
protected int thriftDefaultBufferSize
-
thriftMaxFrameSize
protected int thriftMaxFrameSize
-
defaultEndPoint
protected org.apache.iotdb.common.rpc.thrift.TEndPoint defaultEndPoint
-
defaultSessionConnection
protected SessionConnection defaultSessionConnection
-
enableRedirection
protected boolean enableRedirection
-
deviceIdToEndpoint
protected volatile java.util.Map<java.lang.String,org.apache.iotdb.common.rpc.thrift.TEndPoint> deviceIdToEndpoint
-
endPointToSessionConnection
protected volatile java.util.Map<org.apache.iotdb.common.rpc.thrift.TEndPoint,SessionConnection> endPointToSessionConnection
-
enableQueryRedirection
protected boolean enableQueryRedirection
-
version
protected Version version
-
-
Constructor Detail
-
Session
public Session(java.lang.String host, int rpcPort)
-
Session
public Session(java.lang.String host, java.lang.String rpcPort, java.lang.String username, java.lang.String password)
-
Session
public Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password)
-
Session
public Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, int fetchSize)
-
Session
public Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, int fetchSize, long queryTimeoutInMs)
-
Session
public Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, java.time.ZoneId zoneId)
-
Session
public Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, boolean enableRedirection)
-
Session
public Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, int fetchSize, java.time.ZoneId zoneId, boolean enableRedirection)
-
Session
public Session(java.lang.String host, int rpcPort, java.lang.String username, java.lang.String password, int fetchSize, java.time.ZoneId zoneId, int thriftDefaultBufferSize, int thriftMaxFrameSize, boolean enableRedirection, Version version)
-
Session
public Session(java.util.List<java.lang.String> nodeUrls, java.lang.String username, java.lang.String password)
-
Session
public Session(java.util.List<java.lang.String> nodeUrls, java.lang.String username, java.lang.String password, int fetchSize)Multiple nodeUrl,If one node down, connect to the next one- Parameters:
nodeUrls- ListMultiple ip:rpcPort eg.127.0.0.1:9001
-
Session
public Session(java.util.List<java.lang.String> nodeUrls, java.lang.String username, java.lang.String password, java.time.ZoneId zoneId)
-
Session
public Session(java.util.List<java.lang.String> nodeUrls, java.lang.String username, java.lang.String password, int fetchSize, java.time.ZoneId zoneId, int thriftDefaultBufferSize, int thriftMaxFrameSize, boolean enableRedirection, Version version)
-
-
Method Detail
-
setFetchSize
public void setFetchSize(int fetchSize)
- Specified by:
setFetchSizein interfaceISession
-
getFetchSize
public int getFetchSize()
- Specified by:
getFetchSizein interfaceISession
-
getVersion
public Version getVersion()
- Specified by:
getVersionin interfaceISession
-
setVersion
public void setVersion(Version version)
- Specified by:
setVersionin interfaceISession
-
open
public void open() throws org.apache.iotdb.rpc.IoTDBConnectionException
-
open
public void open(boolean enableRPCCompression) throws org.apache.iotdb.rpc.IoTDBConnectionException
-
open
public void open(boolean enableRPCCompression, int connectionTimeoutInMs) throws org.apache.iotdb.rpc.IoTDBConnectionException
-
close
public void close() throws org.apache.iotdb.rpc.IoTDBConnectionException
-
constructSessionConnection
public SessionConnection constructSessionConnection(Session session, org.apache.iotdb.common.rpc.thrift.TEndPoint endpoint, java.time.ZoneId zoneId) throws org.apache.iotdb.rpc.IoTDBConnectionException
- Specified by:
constructSessionConnectionin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionException
-
getTimeZone
public java.lang.String getTimeZone()
- Specified by:
getTimeZonein interfaceISession
-
setTimeZone
public void setTimeZone(java.lang.String zoneId) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
setTimeZonein interfaceISession- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
setTimeZoneOfSession
public void setTimeZoneOfSession(java.lang.String zoneId)
Only changes the member variable of the Session object without sending it to server.- Specified by:
setTimeZoneOfSessionin interfaceISession
-
setStorageGroup
public void setStorageGroup(java.lang.String storageGroup) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
setStorageGroupin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteStorageGroup
public void deleteStorageGroup(java.lang.String storageGroup) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
deleteStorageGroupin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteStorageGroups
public void deleteStorageGroups(java.util.List<java.lang.String> storageGroups) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
deleteStorageGroupsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
createDatabase
public void createDatabase(java.lang.String database) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
createDatabasein interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteDatabase
public void deleteDatabase(java.lang.String database) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
deleteDatabasein interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteDatabases
public void deleteDatabases(java.util.List<java.lang.String> databases) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
deleteDatabasesin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
createTimeseries
public void createTimeseries(java.lang.String path, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressor) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
createTimeseriesin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
createTimeseries
public void createTimeseries(java.lang.String path, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressor, java.util.Map<java.lang.String,java.lang.String> props, java.util.Map<java.lang.String,java.lang.String> tags, java.util.Map<java.lang.String,java.lang.String> attributes, java.lang.String measurementAlias) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
createTimeseriesin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
createAlignedTimeseries
public void createAlignedTimeseries(java.lang.String deviceId, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors, java.util.List<java.lang.String> measurementAliasList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
createAlignedTimeseriesin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
createAlignedTimeseries
public void createAlignedTimeseries(java.lang.String deviceId, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors, java.util.List<java.lang.String> measurementAliasList, java.util.List<java.util.Map<java.lang.String,java.lang.String>> tagsList, java.util.List<java.util.Map<java.lang.String,java.lang.String>> attributesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
createAlignedTimeseriesin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
createMultiTimeseries
public void createMultiTimeseries(java.util.List<java.lang.String> paths, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors, java.util.List<java.util.Map<java.lang.String,java.lang.String>> propsList, java.util.List<java.util.Map<java.lang.String,java.lang.String>> tagsList, java.util.List<java.util.Map<java.lang.String,java.lang.String>> attributesList, java.util.List<java.lang.String> measurementAliasList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
createMultiTimeseriesin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
checkTimeseriesExists
public boolean checkTimeseriesExists(java.lang.String path) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
checkTimeseriesExistsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
setQueryTimeout
public void setQueryTimeout(long timeoutInMs)
-
getQueryTimeout
public long getQueryTimeout()
-
executeQueryStatement
public SessionDataSet executeQueryStatement(java.lang.String sql) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException
execute query sql- Specified by:
executeQueryStatementin interfaceISession- Parameters:
sql- query statement- Returns:
- result set
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
executeQueryStatement
public SessionDataSet executeQueryStatement(java.lang.String sql, long timeoutInMs) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException
execute query sql with explicit timeout- Specified by:
executeQueryStatementin interfaceISession- Parameters:
sql- query statementtimeoutInMs- the timeout of this query, in milliseconds- Returns:
- result set
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
executeNonQueryStatement
public void executeNonQueryStatement(java.lang.String sql) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionexecute non query statement- Specified by:
executeNonQueryStatementin interfaceISession- Parameters:
sql- non query statement- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
executeRawDataQuery
public SessionDataSet executeRawDataQuery(java.util.List<java.lang.String> paths, long startTime, long endTime, long timeOut) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException
query eg. select * from paths where time >= startTime and time < endTime time interval include startTime and exclude endTime- Specified by:
executeRawDataQueryin interfaceISession- Parameters:
paths- series pathstartTime- includedendTime- excluded- Returns:
- data set
- Throws:
org.apache.iotdb.rpc.StatementExecutionException- statement is not rightorg.apache.iotdb.rpc.IoTDBConnectionException- the network is not good
-
executeLastDataQuery
public SessionDataSet executeLastDataQuery(java.util.List<java.lang.String> paths, long LastTime, long timeOut) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException
query e.g. select last data from paths where time >= lastTime- Specified by:
executeLastDataQueryin interfaceISession- Parameters:
paths- timeSeries eg. root.ln.d1.s1,root.ln.d1.s2LastTime- get the last data, whose timestamp is greater than or equal LastTime e.g. 1621326244168- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
executeLastDataQuery
public SessionDataSet executeLastDataQuery(java.util.List<java.lang.String> paths) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException
query eg. select last status from root.ln.wf01.wt01;+ = - Specified by:
executeLastDataQueryin interfaceISession- Parameters:
paths- timeSeries. eg.root.ln.d1.s1,root.ln.d1.s2- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
insertRecord
public void insertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> types, java.lang.Object... values) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert data in one row, if you want to improve your performance, please use insertRecords method or insertTablet method- Specified by:
insertRecordin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertRecords(List, List, List, List, List),insertTablet(Tablet)
-
getTimestampPrecision
public java.lang.String getTimestampPrecision() throws org.apache.thrift.TException- Specified by:
getTimestampPrecisionin interfaceISession- Throws:
org.apache.thrift.TException
-
insertRecord
public void insertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> types, java.util.List<java.lang.Object> values) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert data in one row, if you want improve your performance, please use insertRecords method or insertTablet method- Specified by:
insertRecordin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertRecords(List, List, List, List, List),insertTablet(Tablet)
-
insertAlignedRecord
public void insertAlignedRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> types, java.util.List<java.lang.Object> values) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert aligned data in one row, if you want improve your performance, please use insertAlignedRecords method or insertTablet method.- Specified by:
insertAlignedRecordin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertAlignedRecords(List, List, List, List, List),insertTablet(Tablet)
-
insertRecord
public void insertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<java.lang.String> values) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert data in one row, if you want improve your performance, please use insertRecords method or insertTablet method- Specified by:
insertRecordin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertRecords(List, List, List, List, List),insertTablet(Tablet)
-
insertAlignedRecord
public void insertAlignedRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<java.lang.String> values) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert aligned data in one row, if you want improve your performance, please use insertAlignedRecords method or insertTablet method.- Specified by:
insertAlignedRecordin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertAlignedRecords(List, List, List, List, List),insertTablet(Tablet)
-
insertRecords
public void insertRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert multiple rows, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row is independent, which could have different deviceId, time, number of measurements
- Specified by:
insertRecordsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertTablet(Tablet)
-
insertAlignedRecords
public void insertAlignedRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert aligned multiple rows, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row is independent, which could have different prefixPath, time, number of subMeasurements
- Specified by:
insertAlignedRecordsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertTablet(Tablet)
-
insertRecords
public void insertRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert multiple rows, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row is independent, which could have different deviceId, time, number of measurements
- Specified by:
insertRecordsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertTablet(Tablet)
-
insertAlignedRecords
public void insertAlignedRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert aligned multiple rows, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row is independent, which could have different prefixPath, time, number of subMeasurements
- Specified by:
insertAlignedRecordsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertTablet(Tablet)
-
insertRecordsOfOneDevice
public void insertRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert multiple rows, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row could have same deviceId but different time, number of measurements
- Specified by:
insertRecordsOfOneDevicein interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertTablet(Tablet)
-
insertRecordsOfOneDevice
public void insertRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList, boolean haveSorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert multiple rows, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row could have same deviceId but different time, number of measurements
- Specified by:
insertRecordsOfOneDevicein interfaceISession- Parameters:
haveSorted- deprecated, whether the times have been sorted- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertTablet(Tablet)
-
insertStringRecordsOfOneDevice
public void insertStringRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList, boolean haveSorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert multiple rows with String format data, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row could have same deviceId but different time, number of measurements, number of values as String
- Specified by:
insertStringRecordsOfOneDevicein interfaceISession- Parameters:
haveSorted- deprecated, whether the times have been sorted- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
insertStringRecordsOfOneDevice
public void insertStringRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert multiple rows with String format data, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row could have same deviceId but different time, number of measurements, number of values as String
- Specified by:
insertStringRecordsOfOneDevicein interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
insertAlignedRecordsOfOneDevice
public void insertAlignedRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert aligned multiple rows, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row could have same prefixPath but different time, number of measurements
- Specified by:
insertAlignedRecordsOfOneDevicein interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertTablet(Tablet)
-
insertAlignedRecordsOfOneDevice
public void insertAlignedRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList, boolean haveSorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert aligned multiple rows, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row could have same prefixPath but different time, number of measurements
- Specified by:
insertAlignedRecordsOfOneDevicein interfaceISession- Parameters:
haveSorted- deprecated, whether the times have been sorted- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertTablet(Tablet)
-
insertAlignedStringRecordsOfOneDevice
public void insertAlignedStringRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList, boolean haveSorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert multiple rows with String format data, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row could have same deviceId but different time, number of measurements, number of values as String
- Specified by:
insertAlignedStringRecordsOfOneDevicein interfaceISession- Parameters:
haveSorted- deprecated, whether the times have been sorted- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
insertAlignedStringRecordsOfOneDevice
public void insertAlignedStringRecordsOfOneDevice(java.lang.String deviceId, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionInsert aligned multiple rows with String format data, which can reduce the overhead of network. This method is just like jdbc executeBatch, we pack some insert request in batch and send them to server. If you want improve your performance, please see insertTablet methodEach row could have same prefixPath but different time, number of measurements, number of values as String
- Specified by:
insertAlignedStringRecordsOfOneDevicein interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
insertTablet(Tablet)
-
insertTablet
public void insertTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionExceptioninsert the data of a device. For each timestamp, the number of measurements is the same.a Tablet example: device1 time s1, s2, s3 1, 1, 1, 1 2, 2, 2, 2 3, 3, 3, 3
times in Tablet may be not in ascending order
- Specified by:
insertTabletin interfaceISession- Parameters:
tablet- data batch- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
insertTablet
public void insertTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet, boolean sorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert a Tablet- Specified by:
insertTabletin interfaceISession- Parameters:
tablet- data batchsorted- deprecated, whether times in Tablet are in ascending order- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
insertAlignedTablet
public void insertAlignedTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionExceptioninsert the aligned timeseries data of a device. For each timestamp, the number of measurements is the same.a Tablet example: device1 time s1, s2, s3 1, 1, 1, 1 2, 2, 2, 2 3, 3, 3, 3
times in Tablet may be not in ascending order
- Specified by:
insertAlignedTabletin interfaceISession- Parameters:
tablet- data batch- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
insertAlignedTablet
public void insertAlignedTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet, boolean sorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert the aligned timeseries data of a device.- Specified by:
insertAlignedTabletin interfaceISession- Parameters:
tablet- data batchsorted- deprecated, whether times in Tablet are in ascending order- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
insertTablets
public void insertTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert the data of several deivces. Given a deivce, for each timestamp, the number of measurements is the same.Times in each Tablet may not be in ascending order
- Specified by:
insertTabletsin interfaceISession- Parameters:
tablets- data batch in multiple device- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
insertTablets
public void insertTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets, boolean sorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert the data of several devices. Given a device, for each timestamp, the number of measurements is the same.- Specified by:
insertTabletsin interfaceISession- Parameters:
tablets- data batch in multiple devicesorted- deprecated, whether times in each Tablet are in ascending order- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
insertAlignedTablets
public void insertAlignedTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert aligned data of several deivces. Given a deivce, for each timestamp, the number of measurements is the same.Times in each Tablet may not be in ascending order
- Specified by:
insertAlignedTabletsin interfaceISession- Parameters:
tablets- data batch in multiple device- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
insertAlignedTablets
public void insertAlignedTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets, boolean sorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptioninsert aligned data of several devices. Given a device, for each timestamp, the number of measurements is the same.- Specified by:
insertAlignedTabletsin interfaceISession- Parameters:
tablets- data batch in multiple devicesorted- deprecated, whether times in each Tablet are in ascending order- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
testInsertTablet
public void testInsertTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionThis method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client- Specified by:
testInsertTabletin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
testInsertTablet
public void testInsertTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet, boolean sorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionThis method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client- Specified by:
testInsertTabletin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
testInsertTablets
public void testInsertTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionThis method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client- Specified by:
testInsertTabletsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
testInsertTablets
public void testInsertTablets(java.util.Map<java.lang.String,org.apache.iotdb.tsfile.write.record.Tablet> tablets, boolean sorted) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionThis method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client- Specified by:
testInsertTabletsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
testInsertRecords
public void testInsertRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<java.lang.String>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionThis method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client- Specified by:
testInsertRecordsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
testInsertRecords
public void testInsertRecords(java.util.List<java.lang.String> deviceIds, java.util.List<java.lang.Long> times, java.util.List<java.util.List<java.lang.String>> measurementsList, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> typesList, java.util.List<java.util.List<java.lang.Object>> valuesList) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionThis method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client- Specified by:
testInsertRecordsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
testInsertRecord
public void testInsertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<java.lang.String> values) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionThis method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client- Specified by:
testInsertRecordin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
testInsertRecord
public void testInsertRecord(java.lang.String deviceId, long time, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> types, java.util.List<java.lang.Object> values) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionThis method NOT insert data into database and the server just return after accept the request, this method should be used to test other time cost in client- Specified by:
testInsertRecordin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteTimeseries
public void deleteTimeseries(java.lang.String path) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptiondelete a timeseries, including data and schema- Specified by:
deleteTimeseriesin interfaceISession- Parameters:
path- timeseries to delete, should be a whole path- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteTimeseries
public void deleteTimeseries(java.util.List<java.lang.String> paths) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptiondelete some timeseries, including data and schema- Specified by:
deleteTimeseriesin interfaceISession- Parameters:
paths- timeseries to delete, should be a whole path- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteData
public void deleteData(java.lang.String path, long endTime) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptiondelete data <= time in one timeseries- Specified by:
deleteDatain interfaceISession- Parameters:
path- data in which time series to deleteendTime- data with time stamp less than or equal to time will be deleted- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteData
public void deleteData(java.util.List<java.lang.String> paths, long endTime) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptiondelete data <= time in multiple timeseries- Specified by:
deleteDatain interfaceISession- Parameters:
paths- data in which time series to deleteendTime- data with time stamp less than or equal to time will be deleted- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteData
public void deleteData(java.util.List<java.lang.String> paths, long startTime, long endTime) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptiondelete data >= startTime and data <= endTime in multiple timeseries- Specified by:
deleteDatain interfaceISession- Parameters:
paths- data in which time series to deletestartTime- delete range start timeendTime- delete range end time- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
sortTablet
public void sortTablet(org.apache.iotdb.tsfile.write.record.Tablet tablet)
- Specified by:
sortTabletin interfaceISession
-
setSchemaTemplate
public void setSchemaTemplate(java.lang.String templateName, java.lang.String prefixPath) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
setSchemaTemplatein interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
createSchemaTemplate
public void createSchemaTemplate(Template template) throws java.io.IOException, org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException
Construct Template at session and create it at server.The template instance constructed within session is SUGGESTED to be a flat measurement template, which has no internal nodes inside a template.
For example, template(s1, s2, s3) is a flat measurement template, while template2(GPS.x, GPS.y, s1) is not.
Tree-structured template, which is contrary to flat measurement template, may not be supported in further version of IoTDB
- Specified by:
createSchemaTemplatein interfaceISession- Throws:
java.io.IOExceptionorg.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException- See Also:
Template
-
createSchemaTemplate
public void createSchemaTemplate(java.lang.String templateName, java.util.List<java.lang.String> measurements, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors, boolean isAligned) throws java.io.IOException, org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionCreate a template with flat measurements, not tree structured. Need to specify datatype, encoding and compressor of each measurement, and alignment of these measurements at once.- Specified by:
createSchemaTemplatein interfaceISession- Parameters:
measurements- flat measurements of the template, cannot contain character dotdataTypes- datatype of each measurement in the templateencodings- encodings of each measurement in the templatecompressors- compression type of each measurement in the templateisAligned- specify whether these flat measurements are aligned- Throws:
java.io.IOExceptionorg.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
createSchemaTemplate
@Deprecated public void createSchemaTemplate(java.lang.String name, java.util.List<java.lang.String> schemaNames, java.util.List<java.util.List<java.lang.String>> measurements, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>> dataTypes, java.util.List<java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding>> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionDeprecated.Compatible for rel/0.12, this method will create an unaligned flat template as a result. Notice that there is no aligned concept in 0.12, so only the first measurement in each nested list matters.- Specified by:
createSchemaTemplatein interfaceISession- Parameters:
name- name of the templateschemaNames- it works as a virtual layer inside template in 0.12, and makes no difference after 0.13measurements- the first measurement in each nested list will constitute the final flat templatedataTypes- the data type of each measurement, only the first one in each nested list matters as aboveencodings- the encoding of each measurement, only the first one in each nested list matters as abovecompressors- the compressor of each measurement- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
addAlignedMeasurementsInTemplate
public void addAlignedMeasurementsInTemplate(java.lang.String templateName, java.util.List<java.lang.String> measurementsPath, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors) throws java.io.IOException, org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
addAlignedMeasurementsInTemplatein interfaceISession- Parameters:
templateName- Template to add aligned measurements.measurementsPath- If measurements get different prefix, or the prefix already exists in template but not aligned, throw exception.dataTypes- Data type of these measurements.encodings- Encoding of these measurements.compressors- CompressionType of these measurements.- Throws:
java.io.IOExceptionorg.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
addAlignedMeasurementInTemplate
public void addAlignedMeasurementInTemplate(java.lang.String templateName, java.lang.String measurementPath, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressor) throws java.io.IOException, org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
addAlignedMeasurementInTemplatein interfaceISession- Parameters:
templateName- Template to add a single aligned measurement.measurementPath- If prefix of the path exists in template and not aligned, throw exception.- Throws:
java.io.IOExceptionorg.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
addUnalignedMeasurementsInTemplate
public void addUnalignedMeasurementsInTemplate(java.lang.String templateName, java.util.List<java.lang.String> measurementsPath, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodings, java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.CompressionType> compressors) throws java.io.IOException, org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
addUnalignedMeasurementsInTemplatein interfaceISession- Parameters:
templateName- Template to add unaligned measurements.measurementsPath- If prefix of any path exist in template but aligned, throw exception.- Throws:
java.io.IOExceptionorg.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
addUnalignedMeasurementInTemplate
public void addUnalignedMeasurementInTemplate(java.lang.String templateName, java.lang.String measurementPath, org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressor) throws java.io.IOException, org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
addUnalignedMeasurementInTemplatein interfaceISession- Parameters:
templateName- Template to add a single unaligned measurement.measurementPath- If prefix of path exists in template but aligned, throw exception.- Throws:
java.io.IOExceptionorg.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
deleteNodeInTemplate
public void deleteNodeInTemplate(java.lang.String templateName, java.lang.String path) throws java.io.IOException, org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
deleteNodeInTemplatein interfaceISession- Parameters:
templateName- Template to prune.path- Remove node from template specified by the path, including its children nodes.- Throws:
java.io.IOExceptionorg.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
countMeasurementsInTemplate
public int countMeasurementsInTemplate(java.lang.String name) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
countMeasurementsInTemplatein interfaceISession- Returns:
- Amount of measurements in the template
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
isMeasurementInTemplate
public boolean isMeasurementInTemplate(java.lang.String templateName, java.lang.String path) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
isMeasurementInTemplatein interfaceISession- Returns:
- If the node specified by the path is a measurement.
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
isPathExistInTemplate
public boolean isPathExistInTemplate(java.lang.String templateName, java.lang.String path) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
isPathExistInTemplatein interfaceISession- Returns:
- if there is a node correspond to the path in the template.
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
showMeasurementsInTemplate
public java.util.List<java.lang.String> showMeasurementsInTemplate(java.lang.String templateName) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
showMeasurementsInTemplatein interfaceISession- Returns:
- All paths of measurements in the template.
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
showMeasurementsInTemplate
public java.util.List<java.lang.String> showMeasurementsInTemplate(java.lang.String templateName, java.lang.String pattern) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
showMeasurementsInTemplatein interfaceISession- Returns:
- All paths of measurements under the pattern in the template.
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
showAllTemplates
public java.util.List<java.lang.String> showAllTemplates() throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
showAllTemplatesin interfaceISession- Returns:
- All template names.
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
showPathsTemplateSetOn
public java.util.List<java.lang.String> showPathsTemplateSetOn(java.lang.String templateName) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
showPathsTemplateSetOnin interfaceISession- Returns:
- All paths have been set to designated template.
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
showPathsTemplateUsingOn
public java.util.List<java.lang.String> showPathsTemplateUsingOn(java.lang.String templateName) throws org.apache.iotdb.rpc.StatementExecutionException, org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
showPathsTemplateUsingOnin interfaceISession- Returns:
- All paths are using designated template.
- Throws:
org.apache.iotdb.rpc.StatementExecutionExceptionorg.apache.iotdb.rpc.IoTDBConnectionException
-
unsetSchemaTemplate
public void unsetSchemaTemplate(java.lang.String prefixPath, java.lang.String templateName) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
unsetSchemaTemplatein interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
dropSchemaTemplate
public void dropSchemaTemplate(java.lang.String templateName) throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionException- Specified by:
dropSchemaTemplatein interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
isEnableQueryRedirection
public boolean isEnableQueryRedirection()
- Specified by:
isEnableQueryRedirectionin interfaceISession
-
setEnableQueryRedirection
public void setEnableQueryRedirection(boolean enableQueryRedirection)
- Specified by:
setEnableQueryRedirectionin interfaceISession
-
isEnableRedirection
public boolean isEnableRedirection()
- Specified by:
isEnableRedirectionin interfaceISession
-
setEnableRedirection
public void setEnableRedirection(boolean enableRedirection)
- Specified by:
setEnableRedirectionin interfaceISession
-
fetchAllConnections
public org.apache.iotdb.service.rpc.thrift.TSConnectionInfoResp fetchAllConnections() throws org.apache.iotdb.rpc.IoTDBConnectionException- Specified by:
fetchAllConnectionsin interfaceISession- Throws:
org.apache.iotdb.rpc.IoTDBConnectionException
-
-