Class StorageGroupManager
- java.lang.Object
-
- org.apache.iotdb.db.engine.storagegroup.dataregion.StorageGroupManager
-
public class StorageGroupManager extends java.lang.ObjectEach storage group that set by users corresponds to a StorageGroupManager
-
-
Constructor Summary
Constructors Constructor Description StorageGroupManager()StorageGroupManager(boolean needRecovering)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabortCompaction()voidasyncRecover(IStorageGroupMNode storageGroupMNode, java.util.concurrent.ExecutorService pool, java.util.List<java.util.concurrent.Future<java.lang.Void>> futures)async recover all virtual storage groups in this logical storage groupvoidcheckTTL()push check ttl down to all sgvoidcloseStorageGroupProcessor(boolean isSeq, boolean isSync)push closeStorageGroupProcessor operation down to all virtual storage group processorsvoidcloseStorageGroupProcessor(long partitionId, boolean isSeq, boolean isSync)push closeStorageGroupProcessor operation down to all virtual storage group processorsintcountUpgradeFiles()push countUpgradeFiles operation down to all virtual storage group processorsvoiddelete(org.apache.iotdb.commons.path.PartialPath path, long startTime, long endTime, long planIndex, DataRegion.TimePartitionFilter timePartitionFilter)push delete operation down to all virtual storage group processorsvoiddeleteStorageGroupSystemFolder(java.lang.String systemDir)push deleteStorageGroup operation down to all virtual storage group processorsvoidforceCloseAllWorkingTsFileProcessors()push forceCloseAllWorkingTsFileProcessors down to all sgvoidgetAllClosedStorageGroupTsFile(org.apache.iotdb.commons.path.PartialPath storageGroupName, java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.Map<java.lang.Long,java.util.List<TsFileResource>>> ret)push getAllClosedStorageGroupTsFile operation down to all virtual storage group processorsjava.util.concurrent.atomic.AtomicBooleangetIsSettling()longgetMonitorSeriesValue()DataRegiongetProcessor(int dataRegionId, IStorageGroupMNode storageGroupMNode)get processor from data region idDataRegiongetProcessor(org.apache.iotdb.commons.path.PartialPath partialPath, IStorageGroupMNode storageGroupMNode)get processor from device idDataRegiongetProcessor(IStorageGroupMNode storageGroupMNode, int dataRegionId)voidgetResourcesToBeSettled(java.util.List<TsFileResource> seqResourcesToBeSettled, java.util.List<TsFileResource> unseqResourcesToBeSettled, java.util.List<java.lang.String> tsFilePaths)voidgetWorkingStorageGroupPartitions(java.lang.String storageGroupName, java.util.Map<java.lang.String,java.util.List<org.apache.iotdb.tsfile.utils.Pair<java.lang.Long,java.lang.Boolean>>> res)push getWorkingStorageGroupPartitions operation down to all virtual storage group processorsvoidmergeAll()push mergeAll operation down to all virtual storage group processorsvoidremovePartitions(DataRegion.TimePartitionFilter filter)push removePartitions operation down to all virtual storage group processorsvoidreset()only for testvoidsetAllowCompaction(boolean allowCompaction)voidsetMonitorSeriesValue(long monitorSeriesValue)voidsetPartitionVersionToMax(long partitionId, long newMaxVersion)push setPartitionVersionToMax operation down to all virtual storage group processorsvoidsetSettling(boolean settling)voidsetTTL(long dataTTL)push setTTL operation down to all virtual storage group processorsvoidstopSchedulerPool()voidsyncCloseAllWorkingTsFileProcessors()push syncCloseAllWorkingTsFileProcessors down to all sgvoidsyncDeleteDataFiles()push syncDeleteDataFiles operation down to all virtual storage group processorsvoidtimedFlushSeqMemTable()push check sequence memtable flush interval down to all sgvoidtimedFlushUnseqMemTable()push check unsequence memtable flush interval down to all sgvoidupdateMonitorSeriesValue(int successPointsNum)voidupgradeAll()push upgradeAll operation down to all virtual storage group processors
-
-
-
Method Detail
-
forceCloseAllWorkingTsFileProcessors
public void forceCloseAllWorkingTsFileProcessors() throws TsFileProcessorExceptionpush forceCloseAllWorkingTsFileProcessors down to all sg- Throws:
TsFileProcessorException
-
syncCloseAllWorkingTsFileProcessors
public void syncCloseAllWorkingTsFileProcessors()
push syncCloseAllWorkingTsFileProcessors down to all sg
-
checkTTL
public void checkTTL()
push check ttl down to all sg
-
timedFlushSeqMemTable
public void timedFlushSeqMemTable()
push check sequence memtable flush interval down to all sg
-
timedFlushUnseqMemTable
public void timedFlushUnseqMemTable()
push check unsequence memtable flush interval down to all sg
-
getProcessor
public DataRegion getProcessor(org.apache.iotdb.commons.path.PartialPath partialPath, IStorageGroupMNode storageGroupMNode) throws DataRegionException, StorageEngineException
get processor from device id- Parameters:
partialPath- device path- Returns:
- virtual storage group processor
- Throws:
DataRegionExceptionStorageEngineException
-
getProcessor
public DataRegion getProcessor(int dataRegionId, IStorageGroupMNode storageGroupMNode) throws DataRegionException, StorageEngineException
get processor from data region id- Parameters:
dataRegionId- dataRegionId- Returns:
- virtual storage group processor
- Throws:
DataRegionExceptionStorageEngineException
-
getProcessor
public DataRegion getProcessor(IStorageGroupMNode storageGroupMNode, int dataRegionId) throws DataRegionException, StorageEngineException
-
asyncRecover
public void asyncRecover(IStorageGroupMNode storageGroupMNode, java.util.concurrent.ExecutorService pool, java.util.List<java.util.concurrent.Future<java.lang.Void>> futures)
async recover all virtual storage groups in this logical storage group- Parameters:
storageGroupMNode- logical sg mnodepool- thread pool to run virtual storage group recover taskfutures- virtual storage group recover tasks
-
getMonitorSeriesValue
public long getMonitorSeriesValue()
-
setMonitorSeriesValue
public void setMonitorSeriesValue(long monitorSeriesValue)
-
updateMonitorSeriesValue
public void updateMonitorSeriesValue(int successPointsNum)
-
closeStorageGroupProcessor
public void closeStorageGroupProcessor(boolean isSeq, boolean isSync)push closeStorageGroupProcessor operation down to all virtual storage group processors
-
closeStorageGroupProcessor
public void closeStorageGroupProcessor(long partitionId, boolean isSeq, boolean isSync)push closeStorageGroupProcessor operation down to all virtual storage group processors
-
delete
public void delete(org.apache.iotdb.commons.path.PartialPath path, long startTime, long endTime, long planIndex, DataRegion.TimePartitionFilter timePartitionFilter) throws java.io.IOExceptionpush delete operation down to all virtual storage group processors- Throws:
java.io.IOException
-
countUpgradeFiles
public int countUpgradeFiles()
push countUpgradeFiles operation down to all virtual storage group processors
-
upgradeAll
public void upgradeAll()
push upgradeAll operation down to all virtual storage group processors
-
getResourcesToBeSettled
public void getResourcesToBeSettled(java.util.List<TsFileResource> seqResourcesToBeSettled, java.util.List<TsFileResource> unseqResourcesToBeSettled, java.util.List<java.lang.String> tsFilePaths)
-
mergeAll
public void mergeAll()
push mergeAll operation down to all virtual storage group processors
-
syncDeleteDataFiles
public void syncDeleteDataFiles()
push syncDeleteDataFiles operation down to all virtual storage group processors
-
setTTL
public void setTTL(long dataTTL)
push setTTL operation down to all virtual storage group processors
-
deleteStorageGroupSystemFolder
public void deleteStorageGroupSystemFolder(java.lang.String systemDir)
push deleteStorageGroup operation down to all virtual storage group processors
-
getAllClosedStorageGroupTsFile
public void getAllClosedStorageGroupTsFile(org.apache.iotdb.commons.path.PartialPath storageGroupName, java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.Map<java.lang.Long,java.util.List<TsFileResource>>> ret)push getAllClosedStorageGroupTsFile operation down to all virtual storage group processors
-
setPartitionVersionToMax
public void setPartitionVersionToMax(long partitionId, long newMaxVersion)push setPartitionVersionToMax operation down to all virtual storage group processors
-
removePartitions
public void removePartitions(DataRegion.TimePartitionFilter filter)
push removePartitions operation down to all virtual storage group processors
-
getWorkingStorageGroupPartitions
public void getWorkingStorageGroupPartitions(java.lang.String storageGroupName, java.util.Map<java.lang.String,java.util.List<org.apache.iotdb.tsfile.utils.Pair<java.lang.Long,java.lang.Boolean>>> res)push getWorkingStorageGroupPartitions operation down to all virtual storage group processors
-
reset
public void reset()
only for test
-
stopSchedulerPool
public void stopSchedulerPool()
-
setSettling
public void setSettling(boolean settling)
-
setAllowCompaction
public void setAllowCompaction(boolean allowCompaction)
-
abortCompaction
public void abortCompaction()
-
getIsSettling
public java.util.concurrent.atomic.AtomicBoolean getIsSettling()
-
-