类 ClusterSchemaInfo
- java.lang.Object
-
- org.apache.iotdb.confignode.persistence.schema.ClusterSchemaInfo
-
- 所有已实现的接口:
org.apache.iotdb.commons.snapshot.SnapshotProcessor
public class ClusterSchemaInfo extends java.lang.Object implements org.apache.iotdb.commons.snapshot.SnapshotProcessorThe ClusterSchemaInfo stores cluster schema. The cluster schema including: 1. StorageGroupSchema 2. Template (Not implement yet)
-
-
构造器概要
构造器 构造器 说明 ClusterSchemaInfo()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.apache.iotdb.common.rpc.thrift.TSStatusadjustMaxRegionGroupCount(AdjustMaxRegionGroupNumPlan plan)Adjust the maximum RegionGroup count of each StorageGroupvoidcheckContainsStorageGroup(java.lang.String storageName)Only leader use this interface.TemplateInfoRespcheckTemplateSettable(CheckTemplateSettablePlan checkTemplateSettablePlan)voidclear()CountStorageGroupRespcountMatchedStorageGroups(CountStorageGroupPlan plan)org.apache.iotdb.common.rpc.thrift.TSStatuscreateSchemaTemplate(CreateSchemaTemplatePlan createSchemaTemplatePlan)org.apache.iotdb.common.rpc.thrift.TSStatusdeleteStorageGroup(DeleteStorageGroupPlan plan)Delete StorageGrouporg.apache.iotdb.common.rpc.thrift.TSStatusdropSchemaTemplate(DropSchemaTemplatePlan dropSchemaTemplatePlan)TemplateInfoRespgetAllTemplates()AllTemplateSetInfoRespgetAllTemplateSetInfo()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)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)org.apache.iotdb.confignode.rpc.thrift.TStorageGroupSchemagetMatchedStorageGroupSchemaByName(java.lang.String storageGroup)Only leader use this interface.StorageGroupSchemaRespgetMatchedStorageGroupSchemas(GetStorageGroupPlan plan)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.java.util.Map<java.lang.String,org.apache.iotdb.confignode.rpc.thrift.TStorageGroupSchema>getMatchedStorageGroupSchemasByOneName(java.lang.String[] storageGroupPathPattern)intgetMaxRegionGroupNum(java.lang.String storageGroup, org.apache.iotdb.common.rpc.thrift.TConsensusGroupType consensusGroupType)Only leader use this interface.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)PathInfoRespgetPathsSetTemplate(GetPathsSetTemplatePlan getPathsSetTemplatePlan)java.util.List<java.lang.String>getStorageGroupNames()Only leader use this interface.TemplateInfoRespgetTemplate(GetSchemaTemplatePlan getSchemaTemplatePlan)TemplateSetInfoRespgetTemplateSetInfo(GetTemplateSetInfoPlan plan)Get the templateId set on paths covered by input path pattern.org.apache.iotdb.common.rpc.thrift.TSStatuspreUnsetSchemaTemplate(PreUnsetSchemaTemplatePlan plan)voidprocessLoadSnapshot(java.io.File snapshotDir)voidprocessMtreeLoadSnapshot(java.io.File snapshotDir)booleanprocessMtreeTakeSnapshot(java.io.File snapshotDir)booleanprocessTakeSnapshot(java.io.File snapshotDir)org.apache.iotdb.common.rpc.thrift.TSStatusrollbackUnsetSchemaTemplate(RollbackPreUnsetSchemaTemplatePlan plan)org.apache.iotdb.common.rpc.thrift.TSStatussetDataReplicationFactor(SetDataReplicationFactorPlan plan)org.apache.iotdb.common.rpc.thrift.TSStatussetSchemaReplicationFactor(SetSchemaReplicationFactorPlan plan)org.apache.iotdb.common.rpc.thrift.TSStatussetSchemaTemplate(SetSchemaTemplatePlan setSchemaTemplatePlan)org.apache.iotdb.common.rpc.thrift.TSStatussetStorageGroup(SetStorageGroupPlan plan)Cache StorageGroupSchemaorg.apache.iotdb.common.rpc.thrift.TSStatussetTimePartitionInterval(SetTimePartitionIntervalPlan plan)org.apache.iotdb.common.rpc.thrift.TSStatussetTTL(SetTTLPlan plan)org.apache.iotdb.common.rpc.thrift.TSStatusunsetSchemaTemplate(UnsetSchemaTemplatePlan plan)
-
-
-
方法详细资料
-
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
-
countMatchedStorageGroups
public CountStorageGroupResp countMatchedStorageGroups(CountStorageGroupPlan plan)
- 返回:
- The number of matched StorageGroups by the specific StorageGroup pattern
-
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)
-
setSchemaReplicationFactor
public org.apache.iotdb.common.rpc.thrift.TSStatus setSchemaReplicationFactor(SetSchemaReplicationFactorPlan 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.MetadataExceptionOnly 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 StorageGroupNotExistsExceptionOnly 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- StorageGroupNameconsensusGroupType- 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)
-
getAllTemplates
public TemplateInfoResp getAllTemplates()
-
getTemplate
public TemplateInfoResp getTemplate(GetSchemaTemplatePlan getSchemaTemplatePlan)
-
checkTemplateSettable
public TemplateInfoResp checkTemplateSettable(CheckTemplateSettablePlan checkTemplateSettablePlan)
-
setSchemaTemplate
public org.apache.iotdb.common.rpc.thrift.TSStatus setSchemaTemplate(SetSchemaTemplatePlan setSchemaTemplatePlan)
-
getPathsSetTemplate
public PathInfoResp getPathsSetTemplate(GetPathsSetTemplatePlan getPathsSetTemplatePlan)
-
getAllTemplateSetInfo
public AllTemplateSetInfoResp getAllTemplateSetInfo()
-
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)
-
rollbackUnsetSchemaTemplate
public org.apache.iotdb.common.rpc.thrift.TSStatus rollbackUnsetSchemaTemplate(RollbackPreUnsetSchemaTemplatePlan 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()
-
-