类 ClusterSchemaInfo

  • 所有已实现的接口:
    org.apache.iotdb.commons.snapshot.SnapshotProcessor

    public class ClusterSchemaInfo
    extends java.lang.Object
    implements org.apache.iotdb.commons.snapshot.SnapshotProcessor
    The ClusterSchemaInfo stores cluster schema. The cluster schema including: 1. StorageGroupSchema 2. Template (Not implement yet)
    • 构造器详细资料

      • ClusterSchemaInfo

        public ClusterSchemaInfo()
                          throws java.io.IOException
        抛出:
        java.io.IOException
    • 方法详细资料

      • setStorageGroup

        public org.apache.iotdb.common.rpc.thrift.TSStatus setStorageGroup​(SetStorageGroupPlan plan)
        Cache StorageGroupSchema
        参数:
        plan - SetStorageGroupPlan
        返回:
        SUCCESS_STATUS if the StorageGroup is set successfully. CACHE_FAILURE if fail to set StorageGroup in MTreeAboveSG.
      • deleteStorageGroup

        public org.apache.iotdb.common.rpc.thrift.TSStatus deleteStorageGroup​(DeleteStorageGroupPlan plan)
        Delete StorageGroup
        参数:
        plan - DeleteStorageGroupPlan
        返回:
        SUCCESS_STATUS
      • getMatchedStorageGroupSchemas

        public StorageGroupSchemaResp getMatchedStorageGroupSchemas​(GetStorageGroupPlan plan)
        返回:
        All StorageGroupSchemas that matches to the specific StorageGroup pattern
      • setTTL

        public org.apache.iotdb.common.rpc.thrift.TSStatus setTTL​(SetTTLPlan plan)
      • setDataReplicationFactor

        public org.apache.iotdb.common.rpc.thrift.TSStatus setDataReplicationFactor​(SetDataReplicationFactorPlan plan)
      • setTimePartitionInterval

        public org.apache.iotdb.common.rpc.thrift.TSStatus setTimePartitionInterval​(SetTimePartitionIntervalPlan plan)
      • adjustMaxRegionGroupCount

        public org.apache.iotdb.common.rpc.thrift.TSStatus adjustMaxRegionGroupCount​(AdjustMaxRegionGroupNumPlan plan)
        Adjust the maximum RegionGroup count of each StorageGroup
        参数:
        plan - AdjustMaxRegionGroupCountPlan
        返回:
        SUCCESS_STATUS
      • getStorageGroupNames

        public java.util.List<java.lang.String> getStorageGroupNames()
        Only leader use this interface.
        返回:
        List, all storageGroups' name
      • checkContainsStorageGroup

        public void checkContainsStorageGroup​(java.lang.String storageName)
                                       throws org.apache.iotdb.commons.exception.MetadataException
        Only leader use this interface. Check if the specific StorageGroup already exists.
        参数:
        storageName - The specific StorageGroup's name
        抛出:
        org.apache.iotdb.commons.exception.MetadataException - If the specific StorageGroup already exists
      • getMatchedStorageGroupSchemaByName

        public org.apache.iotdb.confignode.rpc.thrift.TStorageGroupSchema getMatchedStorageGroupSchemaByName​(java.lang.String storageGroup)
                                                                                                      throws StorageGroupNotExistsException
        Only leader use this interface. Get the specific StorageGroupSchema
        参数:
        storageGroup - StorageGroupName
        返回:
        The specific StorageGroupSchema
        抛出:
        StorageGroupNotExistsException - When the specific StorageGroup doesn't exist
      • getMatchedStorageGroupSchemasByName

        public java.util.Map<java.lang.String,​org.apache.iotdb.confignode.rpc.thrift.TStorageGroupSchema> getMatchedStorageGroupSchemasByName​(java.util.List<java.lang.String> rawPathList)
        Only leader use this interface. Get the matched StorageGroupSchemas.
        参数:
        rawPathList - StorageGroups' path patterns or full paths
        返回:
        All StorageGroupSchemas that matches to the specific StorageGroup patterns
      • getMaxRegionGroupNum

        public int getMaxRegionGroupNum​(java.lang.String storageGroup,
                                        org.apache.iotdb.common.rpc.thrift.TConsensusGroupType consensusGroupType)
        Only leader use this interface. Get the maxRegionGroupNum of specific StorageGroup.
        参数:
        storageGroup - StorageGroupName
        consensusGroupType - SchemaRegion or DataRegion
        返回:
        maxSchemaRegionGroupNum or maxDataRegionGroupNum
      • processTakeSnapshot

        public boolean processTakeSnapshot​(java.io.File snapshotDir)
                                    throws java.io.IOException
        指定者:
        processTakeSnapshot 在接口中 org.apache.iotdb.commons.snapshot.SnapshotProcessor
        抛出:
        java.io.IOException
      • processMtreeTakeSnapshot

        public boolean processMtreeTakeSnapshot​(java.io.File snapshotDir)
                                         throws java.io.IOException
        抛出:
        java.io.IOException
      • processLoadSnapshot

        public void processLoadSnapshot​(java.io.File snapshotDir)
                                 throws java.io.IOException
        指定者:
        processLoadSnapshot 在接口中 org.apache.iotdb.commons.snapshot.SnapshotProcessor
        抛出:
        java.io.IOException
      • processMtreeLoadSnapshot

        public void processMtreeLoadSnapshot​(java.io.File snapshotDir)
                                      throws java.io.IOException
        抛出:
        java.io.IOException
      • getNodesListInGivenLevel

        public org.apache.iotdb.tsfile.utils.Pair<java.util.List<org.apache.iotdb.commons.path.PartialPath>,​java.util.Set<org.apache.iotdb.commons.path.PartialPath>> getNodesListInGivenLevel​(org.apache.iotdb.commons.path.PartialPath partialPath,
                                                                                                                                                                                                     int level)
      • getChildNodePathInNextLevel

        public org.apache.iotdb.tsfile.utils.Pair<java.util.Set<org.apache.iotdb.common.rpc.thrift.TSchemaNode>,​java.util.Set<org.apache.iotdb.commons.path.PartialPath>> getChildNodePathInNextLevel​(org.apache.iotdb.commons.path.PartialPath partialPath)
      • getChildNodeNameInNextLevel

        public org.apache.iotdb.tsfile.utils.Pair<java.util.Set<java.lang.String>,​java.util.Set<org.apache.iotdb.commons.path.PartialPath>> getChildNodeNameInNextLevel​(org.apache.iotdb.commons.path.PartialPath partialPath)
      • createSchemaTemplate

        public org.apache.iotdb.common.rpc.thrift.TSStatus createSchemaTemplate​(CreateSchemaTemplatePlan createSchemaTemplatePlan)
      • setSchemaTemplate

        public org.apache.iotdb.common.rpc.thrift.TSStatus setSchemaTemplate​(SetSchemaTemplatePlan setSchemaTemplatePlan)
      • getTemplateSetInfo

        public TemplateSetInfoResp getTemplateSetInfo​(GetTemplateSetInfoPlan plan)
        Get the templateId set on paths covered by input path pattern. Resolve the input path patterns into specified path pattern start with template set path. The result set is organized as specified path pattern -> template id
      • preUnsetSchemaTemplate

        public org.apache.iotdb.common.rpc.thrift.TSStatus preUnsetSchemaTemplate​(PreUnsetSchemaTemplatePlan plan)
      • unsetSchemaTemplate

        public org.apache.iotdb.common.rpc.thrift.TSStatus unsetSchemaTemplate​(UnsetSchemaTemplatePlan plan)
      • dropSchemaTemplate

        public org.apache.iotdb.common.rpc.thrift.TSStatus dropSchemaTemplate​(DropSchemaTemplatePlan dropSchemaTemplatePlan)
      • getMatchedStorageGroupSchemasByOneName

        public java.util.Map<java.lang.String,​org.apache.iotdb.confignode.rpc.thrift.TStorageGroupSchema> getMatchedStorageGroupSchemasByOneName​(java.lang.String[] storageGroupPathPattern)
      • clear

        public void clear()