Interface IDTable
-
- All Known Implementing Classes:
IDTableHashmapImpl
public interface IDTable
-
-
Field Summary
Fields Modifier and Type Field Description static IoTDBConfigconfigiotdb configstatic org.slf4j.Loggerloggerlogger
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()clear id table and close filevoidcreateAlignedTimeseries(CreateAlignedTimeSeriesPlan plan)create aligned timeseriesvoidcreateTimeseries(CreateTimeSeriesPlan plan)create timeseriesorg.apache.iotdb.tsfile.utils.Pair<java.lang.Integer,java.util.Set<java.lang.String>>deleteTimeseries(java.util.List<org.apache.iotdb.commons.path.PartialPath> fullPaths)Delete all timeseries matching the given pathsvoidderegisterTrigger(org.apache.iotdb.commons.path.PartialPath fullPath, IMeasurementMNode measurementMNode)deregister trigger to the timeseriesjava.util.List<DeviceEntry>getAllDeviceEntry()get all device entriesDeviceEntrygetDeviceEntry(java.lang.String deviceName)get device entry from device pathjava.util.List<DiskSchemaEntry>getDiskSchemaEntries(java.util.List<SchemaEntry> schemaEntries)get DiskSchemaEntries from disk fileIDiskSchemaManagergetIDiskSchemaManager()java.util.Map<IDeviceID,DeviceEntry>[]getIdTables()org.apache.iotdb.tsfile.read.TimeValuePairgetLastCache(TimeseriesID timeseriesID)get last cache of the timeseiesorg.apache.iotdb.tsfile.write.schema.IMeasurementSchemagetSeriesSchema(java.lang.String deviceName, java.lang.String measurementName)get schema from device and measurementsIDeviceIDgetSeriesSchemas(InsertPlan plan)check inserting timeseries existence and fill their measurement mnodevoidputSchemaEntry(java.lang.String devicePath, java.lang.String measurement, SchemaEntry schemaEntry, boolean isAligned)put schema entry to id table, currently used in recovervoidregisterTrigger(org.apache.iotdb.commons.path.PartialPath fullPath, IMeasurementMNode measurementMNode)register trigger to the timeseriesstatic org.apache.iotdb.commons.path.PartialPathtranslateQueryPath(org.apache.iotdb.commons.path.PartialPath fullPath)translate query path's device path to device idvoidupdateLastCache(TimeseriesID timeseriesID, org.apache.iotdb.tsfile.read.TimeValuePair pair, boolean highPriorityUpdate, java.lang.Long latestFlushedTime)update last cache of the timeseies
-
-
-
Field Detail
-
logger
static final org.slf4j.Logger logger
logger
-
config
static final IoTDBConfig config
iotdb config
-
-
Method Detail
-
createAlignedTimeseries
void createAlignedTimeseries(CreateAlignedTimeSeriesPlan plan) throws org.apache.iotdb.commons.exception.MetadataException
create aligned timeseries- Parameters:
plan- create aligned timeseries plan- Throws:
org.apache.iotdb.commons.exception.MetadataException- if the device is not aligned, throw it
-
createTimeseries
void createTimeseries(CreateTimeSeriesPlan plan) throws org.apache.iotdb.commons.exception.MetadataException
create timeseries- Parameters:
plan- create timeseries plan- Throws:
org.apache.iotdb.commons.exception.MetadataException- if the device is aligned, throw it
-
deleteTimeseries
org.apache.iotdb.tsfile.utils.Pair<java.lang.Integer,java.util.Set<java.lang.String>> deleteTimeseries(java.util.List<org.apache.iotdb.commons.path.PartialPath> fullPaths) throws org.apache.iotdb.commons.exception.MetadataExceptionDelete all timeseries matching the given paths- Parameters:
fullPaths- paths to be deleted- Returns:
- deletion failed Timeseries
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getSeriesSchemas
IDeviceID getSeriesSchemas(InsertPlan plan) throws org.apache.iotdb.commons.exception.MetadataException
check inserting timeseries existence and fill their measurement mnode- Parameters:
plan- insert plan- Returns:
- reusable device id
- Throws:
org.apache.iotdb.commons.exception.MetadataException- if insert plan's aligned value is inconsistent with device
-
registerTrigger
void registerTrigger(org.apache.iotdb.commons.path.PartialPath fullPath, IMeasurementMNode measurementMNode) throws org.apache.iotdb.commons.exception.MetadataExceptionregister trigger to the timeseries- Parameters:
fullPath- full path of the timeseriesmeasurementMNode- the timeseries measurement mnode- Throws:
org.apache.iotdb.commons.exception.MetadataException- if the timeseries is not exits
-
deregisterTrigger
void deregisterTrigger(org.apache.iotdb.commons.path.PartialPath fullPath, IMeasurementMNode measurementMNode) throws org.apache.iotdb.commons.exception.MetadataExceptionderegister trigger to the timeseries- Parameters:
fullPath- full path of the timeseriesmeasurementMNode- the timeseries measurement mnode- Throws:
org.apache.iotdb.commons.exception.MetadataException- if the timeseries is not exits
-
getLastCache
org.apache.iotdb.tsfile.read.TimeValuePair getLastCache(TimeseriesID timeseriesID) throws org.apache.iotdb.commons.exception.MetadataException
get last cache of the timeseies- Parameters:
timeseriesID- timeseries ID of the timeseries- Throws:
org.apache.iotdb.commons.exception.MetadataException- if the timeseries is not exits
-
updateLastCache
void updateLastCache(TimeseriesID timeseriesID, org.apache.iotdb.tsfile.read.TimeValuePair pair, boolean highPriorityUpdate, java.lang.Long latestFlushedTime) throws org.apache.iotdb.commons.exception.MetadataException
update last cache of the timeseies- Parameters:
timeseriesID- timeseries ID of the timeseriespair- last time value pairhighPriorityUpdate- is high priority updatelatestFlushedTime- last flushed time- Throws:
org.apache.iotdb.commons.exception.MetadataException- if the timeseries is not exits
-
clear
void clear() throws java.io.IOExceptionclear id table and close file- Throws:
java.io.IOException
-
getDeviceEntry
DeviceEntry getDeviceEntry(java.lang.String deviceName)
get device entry from device path- Parameters:
deviceName- device name of the time series- Returns:
- device entry of the timeseries
-
getSeriesSchema
org.apache.iotdb.tsfile.write.schema.IMeasurementSchema getSeriesSchema(java.lang.String deviceName, java.lang.String measurementName)get schema from device and measurements- Parameters:
deviceName- device name of the time seriesmeasurementName- measurement name of the time series- Returns:
- schema entry of the timeseries
-
getAllDeviceEntry
java.util.List<DeviceEntry> getAllDeviceEntry()
get all device entries- Returns:
- all device entries
-
putSchemaEntry
void putSchemaEntry(java.lang.String devicePath, java.lang.String measurement, SchemaEntry schemaEntry, boolean isAligned) throws org.apache.iotdb.commons.exception.MetadataExceptionput schema entry to id table, currently used in recover- Parameters:
devicePath- device path (can be device id formed path)measurement- measurement nameschemaEntry- schema entry to putisAligned- is the device aligned- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
translateQueryPath
static org.apache.iotdb.commons.path.PartialPath translateQueryPath(org.apache.iotdb.commons.path.PartialPath fullPath)
translate query path's device path to device id- Parameters:
fullPath- full query path- Returns:
- translated query path
-
getDiskSchemaEntries
java.util.List<DiskSchemaEntry> getDiskSchemaEntries(java.util.List<SchemaEntry> schemaEntries)
get DiskSchemaEntries from disk file- Parameters:
schemaEntries- get the disk pointers from schemaEntries- Returns:
- DiskSchemaEntries
-
getIdTables
java.util.Map<IDeviceID,DeviceEntry>[] getIdTables()
-
getIDiskSchemaManager
IDiskSchemaManager getIDiskSchemaManager()
-
-