Class StorageGroupManager


  • public class StorageGroupManager
    extends java.lang.Object
    Each storage group that set by users corresponds to a StorageGroupManager
    • Constructor Detail

      • StorageGroupManager

        public StorageGroupManager()
      • StorageGroupManager

        public StorageGroupManager​(boolean needRecovering)
    • Method Detail

      • 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
      • 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 mnode
        pool - thread pool to run virtual storage group recover task
        futures - 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.IOException
        push 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()