Class IDTableHashmapImpl
- java.lang.Object
-
- org.apache.iotdb.db.metadata.idtable.IDTableHashmapImpl
-
-
Field Summary
Fields Modifier and Type Field Description protected static IoTDBConfigconfigiotdb config
-
Constructor Summary
Constructors Constructor Description IDTableHashmapImpl(java.io.File storageGroupDir)
-
Method Summary
All Methods Instance Methods Concrete 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 timeseriesvoidupdateLastCache(TimeseriesID timeseriesID, org.apache.iotdb.tsfile.read.TimeValuePair pair, boolean highPriorityUpdate, java.lang.Long latestFlushedTime)update last cache of the timeseies
-
-
-
Field Detail
-
config
protected static IoTDBConfig config
iotdb config
-
-
Method Detail
-
createAlignedTimeseries
public void createAlignedTimeseries(CreateAlignedTimeSeriesPlan plan) throws org.apache.iotdb.commons.exception.MetadataException
create aligned timeseries- Specified by:
createAlignedTimeseriesin interfaceIDTable- Parameters:
plan- create aligned timeseries plan- Throws:
org.apache.iotdb.commons.exception.MetadataException- if the device is not aligned, throw it
-
createTimeseries
public void createTimeseries(CreateTimeSeriesPlan plan) throws org.apache.iotdb.commons.exception.MetadataException
create timeseries- Specified by:
createTimeseriesin interfaceIDTable- Parameters:
plan- create timeseries plan- Throws:
org.apache.iotdb.commons.exception.MetadataException- if the device is aligned, throw it
-
deleteTimeseries
public 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- Specified by:
deleteTimeseriesin interfaceIDTable- Parameters:
fullPaths- paths to be deleted- Returns:
- deletion failed Timeseries
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getSeriesSchemas
public IDeviceID getSeriesSchemas(InsertPlan plan) throws org.apache.iotdb.commons.exception.MetadataException
check inserting timeseries existence and fill their measurement mnode- Specified by:
getSeriesSchemasin interfaceIDTable- 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
public void registerTrigger(org.apache.iotdb.commons.path.PartialPath fullPath, IMeasurementMNode measurementMNode) throws org.apache.iotdb.commons.exception.MetadataExceptionregister trigger to the timeseries- Specified by:
registerTriggerin interfaceIDTable- 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
public void deregisterTrigger(org.apache.iotdb.commons.path.PartialPath fullPath, IMeasurementMNode measurementMNode) throws org.apache.iotdb.commons.exception.MetadataExceptionderegister trigger to the timeseries- Specified by:
deregisterTriggerin interfaceIDTable- 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
public org.apache.iotdb.tsfile.read.TimeValuePair getLastCache(TimeseriesID timeseriesID) throws org.apache.iotdb.commons.exception.MetadataException
get last cache of the timeseies- Specified by:
getLastCachein interfaceIDTable- Parameters:
timeseriesID- timeseries ID of the timeseries- Throws:
org.apache.iotdb.commons.exception.MetadataException- if the timeseries is not exits
-
updateLastCache
public 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- Specified by:
updateLastCachein interfaceIDTable- 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
public void clear() throws java.io.IOExceptionDescription copied from interface:IDTableclear id table and close file
-
getDeviceEntry
public DeviceEntry getDeviceEntry(java.lang.String deviceName)
get device entry from device path- Specified by:
getDeviceEntryin interfaceIDTable- Parameters:
deviceName- device name of the time series- Returns:
- device entry of the timeseries
-
getSeriesSchema
public org.apache.iotdb.tsfile.write.schema.IMeasurementSchema getSeriesSchema(java.lang.String deviceName, java.lang.String measurementName)get schema from device and measurements- Specified by:
getSeriesSchemain interfaceIDTable- Parameters:
deviceName- device name of the time seriesmeasurementName- measurement name of the time series- Returns:
- schema entry of the timeseries
-
getAllDeviceEntry
public java.util.List<DeviceEntry> getAllDeviceEntry()
Description copied from interface:IDTableget all device entries- Specified by:
getAllDeviceEntryin interfaceIDTable- Returns:
- all device entries
-
putSchemaEntry
public void putSchemaEntry(java.lang.String devicePath, java.lang.String measurement, SchemaEntry schemaEntry, boolean isAligned) throws org.apache.iotdb.commons.exception.MetadataExceptionDescription copied from interface:IDTableput schema entry to id table, currently used in recover- Specified by:
putSchemaEntryin interfaceIDTable- 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
-
getDiskSchemaEntries
public java.util.List<DiskSchemaEntry> getDiskSchemaEntries(java.util.List<SchemaEntry> schemaEntries)
get DiskSchemaEntries from disk file- Specified by:
getDiskSchemaEntriesin interfaceIDTable- Parameters:
schemaEntries- get the disk pointers from schemaEntries- Returns:
- DiskSchemaEntries
-
getIdTables
public java.util.Map<IDeviceID,DeviceEntry>[] getIdTables()
- Specified by:
getIdTablesin interfaceIDTable
-
getIDiskSchemaManager
public IDiskSchemaManager getIDiskSchemaManager()
- Specified by:
getIDiskSchemaManagerin interfaceIDTable
-
-