Class LocalConfigNode
- java.lang.Object
-
- org.apache.iotdb.db.localconfignode.LocalConfigNode
-
public class LocalConfigNode extends java.lang.ObjectThis class simulates the behaviour of configNode to manage the configs locally. The schema configs include storage group, schema region and template. The data config is dataRegion.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendSchemaTemplate(AppendTemplatePlan plan)booleancheckStorageGroupByPath(org.apache.iotdb.commons.path.PartialPath path)Check whether the given path contains a storage groupbooleancheckUserPrivileges(java.lang.String username, java.lang.String path, int permission)voidclear()intcountMeasurementsInTemplate(java.lang.String templateName)org.apache.iotdb.common.rpc.thrift.TSStatuscreatePipe(CreatePipeStatement createPipeStatement)org.apache.iotdb.common.rpc.thrift.TSStatuscreatePipeSink(CreatePipeSinkStatement createPipeSinkStatement)voidcreateSchemaTemplate(CreateTemplatePlan plan)voiddeleteStorageGroup(org.apache.iotdb.commons.path.PartialPath storageGroup)voiddeleteStorageGroups(java.util.List<org.apache.iotdb.commons.path.PartialPath> storageGroups)Delete storage groups of given paths from MTree.org.apache.iotdb.common.rpc.thrift.TSStatusdropPipe(java.lang.String pipeName)org.apache.iotdb.common.rpc.thrift.TSStatusdropPipeSink(java.lang.String pipeSinkName)voiddropSchemaTemplate(DropTemplatePlan plan)org.apache.iotdb.common.rpc.thrift.TSStatusexecuteClearCacheOperation()org.apache.iotdb.common.rpc.thrift.TSStatusexecuteFlushOperation(org.apache.iotdb.common.rpc.thrift.TFlushReq tFlushReq)java.util.Map<java.lang.String,java.util.List<java.lang.String>>executeListRolePrivileges(AuthorStatement authorStatement)java.util.Map<java.lang.String,java.util.List<java.lang.String>>executeListRoles(AuthorStatement authorStatement)java.util.Map<java.lang.String,java.util.List<java.lang.String>>executeListRoleUsers(AuthorStatement authorStatement)java.util.Map<java.lang.String,java.util.List<java.lang.String>>executeListUserPrivileges(AuthorStatement authorStatement)org.apache.iotdb.common.rpc.thrift.TSStatusexecuteLoadConfigurationOperation()org.apache.iotdb.common.rpc.thrift.TSStatusexecuteMergeOperation()org.apache.iotdb.common.rpc.thrift.TSStatusexecuteSetSystemStatus(org.apache.iotdb.commons.cluster.NodeStatus status)voidforceMlog()java.util.List<IStorageGroupMNode>getAllStorageGroupNodes()Get all storage group MNodesjava.util.List<org.apache.iotdb.commons.path.PartialPath>getAllStorageGroupPaths()Get all storage group pathsjava.util.Set<java.lang.String>getAllTemplates()org.apache.iotdb.commons.consensus.DataRegionIdgetBelongedDataRegionId(org.apache.iotdb.commons.path.PartialPath path)Get the target DataRegionIds, which the given path belongs to.org.apache.iotdb.commons.consensus.DataRegionIdgetBelongedDataRegionIdWithAutoCreate(org.apache.iotdb.commons.path.PartialPath path)org.apache.iotdb.commons.consensus.SchemaRegionIdgetBelongedSchemaRegionId(org.apache.iotdb.commons.path.PartialPath path)Get the target SchemaRegionIds, which the given path belongs to.org.apache.iotdb.commons.consensus.SchemaRegionIdgetBelongedSchemaRegionIdWithAutoCreate(org.apache.iotdb.commons.path.PartialPath path)org.apache.iotdb.commons.path.PartialPathgetBelongedStorageGroup(org.apache.iotdb.commons.path.PartialPath path)Get storage group name by pathjava.util.List<org.apache.iotdb.commons.path.PartialPath>getBelongedStorageGroups(org.apache.iotdb.commons.path.PartialPath pathPattern)Get the storage group that given path pattern matches or belongs to.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 pathPattern)Get child node path in the next level of the given path pattern.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 pathPattern)Get child node path in the next level of the given path pattern.org.apache.iotdb.commons.partition.DataPartitiongetDataPartition(java.util.Map<java.lang.String,java.util.List<org.apache.iotdb.commons.partition.DataPartitionQueryParam>> sgNameToQueryParamsMap)java.util.List<org.apache.iotdb.commons.consensus.DataRegionId>getDataRegionIdsByStorageGroup(org.apache.iotdb.commons.path.PartialPath storageGroup)static LocalConfigNodegetInstance()java.util.List<org.apache.iotdb.commons.consensus.SchemaRegionId>getInvolvedSchemaRegionIds(org.apache.iotdb.commons.path.PartialPath pathPattern, boolean isPrefixMatch)Get the target SchemaRegionIds, which will be involved/covered by the given pathPattern.java.util.List<org.apache.iotdb.commons.path.PartialPath>getMatchedStorageGroups(org.apache.iotdb.commons.path.PartialPath pathPattern, boolean isPrefixMatch)Get all storage group matching given path pattern.java.util.List<java.lang.String>getMeasurementsInTemplate(java.lang.String templateName, java.lang.String path)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 pathPattern, int nodeLevel, boolean isPrefixMatch, LocalSchemaProcessor.StorageGroupFilter filter)To collect nodes in the given level for given path pattern.org.apache.iotdb.commons.partition.DataPartitiongetOrCreateDataPartition(java.util.Map<java.lang.String,java.util.List<org.apache.iotdb.commons.partition.DataPartitionQueryParam>> sgNameToQueryParamsMap)java.util.Map<java.lang.String,java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet>>getOrCreateSchemaPartition(PathPatternTree patternTree)java.util.Set<java.lang.String>getPathsSetTemplate(java.lang.String templateName)Get all paths set designated templatejava.util.Set<java.lang.String>getPathsUsingTemplate(java.lang.String templateName)java.util.Map<java.lang.String,java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet>>getSchemaPartition(PathPatternTree patternTree)java.util.List<org.apache.iotdb.commons.consensus.SchemaRegionId>getSchemaRegionIdsByStorageGroup(org.apache.iotdb.commons.path.PartialPath storageGroup)java.util.List<org.apache.iotdb.tsfile.utils.Pair<java.lang.String,org.apache.iotdb.tsfile.write.schema.IMeasurementSchema>>getSchemasInTemplate(java.lang.String templateName, java.lang.String path)IStorageGroupMNodegetStorageGroupNodeByPath(org.apache.iotdb.commons.path.PartialPath path)Get storage group node by path.intgetStorageGroupNum(org.apache.iotdb.commons.path.PartialPath pathPattern, boolean isPrefixMatch)To calculate the count of storage group for given path pattern.java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.lang.Long>getStorageGroupsTTL()get all storageGroups ttljava.util.Map<java.lang.String,java.util.List<org.apache.iotdb.commons.path.PartialPath>>groupPathByStorageGroup(org.apache.iotdb.commons.path.PartialPath path)For a path, infer all storage groups it may belong to.voidinit()booleanisMeasurementInTemplate(java.lang.String templateName, java.lang.String path)booleanisPathExistsInTemplate(java.lang.String templateName, java.lang.String path)booleanisStorageGroup(org.apache.iotdb.commons.path.PartialPath path)Check if the given path is storage group or not.booleanisStorageGroupAlreadySet(org.apache.iotdb.commons.path.PartialPath path)Check whether the storage group of given path is set.booleanlogin(java.lang.String username, java.lang.String password)voidoperatorPermission(AuthorStatement authorStatement)voidpruneSchemaTemplate(PruneTemplatePlan plan)java.util.Map<java.lang.String,java.util.List<java.lang.String>>queryPermission(AuthorStatement authorStatement)voidsetSchemaTemplate(SetTemplatePlan plan)voidsetStorageGroup(org.apache.iotdb.commons.path.PartialPath storageGroup)Set storage group of the given path to MTree.voidsetTTL(org.apache.iotdb.commons.path.PartialPath storageGroup, long dataTTL)voidsetUsingSchemaTemplate(ActivateTemplatePlan plan)org.apache.iotdb.confignode.rpc.thrift.TShowPipeRespshowPipe(java.lang.String pipeName)java.util.List<PipeSink>showPipeSink(java.lang.String pipeSinkName)org.apache.iotdb.common.rpc.thrift.TSStatusstartPipe(java.lang.String pipeName)org.apache.iotdb.common.rpc.thrift.TSStatusstopPipe(java.lang.String pipeName)voidunsetSchemaTemplate(UnsetTemplatePlan plan)
-
-
-
Method Detail
-
getInstance
public static LocalConfigNode getInstance()
-
init
public void init()
-
clear
public void clear()
-
forceMlog
public void forceMlog()
-
setStorageGroup
public void setStorageGroup(org.apache.iotdb.commons.path.PartialPath storageGroup) throws org.apache.iotdb.commons.exception.MetadataExceptionSet storage group of the given path to MTree.- Parameters:
storageGroup- root.node.(node)*- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
deleteStorageGroup
public void deleteStorageGroup(org.apache.iotdb.commons.path.PartialPath storageGroup) throws org.apache.iotdb.commons.exception.MetadataException- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
deleteStorageGroups
public void deleteStorageGroups(java.util.List<org.apache.iotdb.commons.path.PartialPath> storageGroups) throws org.apache.iotdb.commons.exception.MetadataExceptionDelete storage groups of given paths from MTree.- Parameters:
storageGroups- list of paths to be deleted.- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
setTTL
public void setTTL(org.apache.iotdb.commons.path.PartialPath storageGroup, long dataTTL) throws org.apache.iotdb.commons.exception.MetadataException, java.io.IOException- Throws:
org.apache.iotdb.commons.exception.MetadataExceptionjava.io.IOException
-
isStorageGroup
public boolean isStorageGroup(org.apache.iotdb.commons.path.PartialPath path)
Check if the given path is storage group or not.- Parameters:
path- Format: root.node.(node)*
-
checkStorageGroupByPath
public boolean checkStorageGroupByPath(org.apache.iotdb.commons.path.PartialPath path)
Check whether the given path contains a storage group
-
isStorageGroupAlreadySet
public boolean isStorageGroupAlreadySet(org.apache.iotdb.commons.path.PartialPath path)
Check whether the storage group of given path is set. The path may be a prefix path of some storage group. Besides, the given path may be also beyond the MTreeAboveSG scope, then return true if the covered part exists, which means there's storage group on this path. The rest part will be checked by certain storage group subTree.- Parameters:
path- a full path or a prefix path
-
getStorageGroupNum
public int getStorageGroupNum(org.apache.iotdb.commons.path.PartialPath pathPattern, boolean isPrefixMatch) throws org.apache.iotdb.commons.exception.MetadataExceptionTo calculate the count of storage group for given path pattern. If using prefix match, the path pattern is used to match prefix path. All timeseries start with the matched prefix path will be counted.- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getBelongedStorageGroup
public org.apache.iotdb.commons.path.PartialPath getBelongedStorageGroup(org.apache.iotdb.commons.path.PartialPath path) throws StorageGroupNotSetExceptionGet storage group name by pathe.g., root.sg1 is a storage group and path = root.sg1.d1, return root.sg1
- Parameters:
path- only full path, cannot be path pattern- Returns:
- storage group in the given path
- Throws:
StorageGroupNotSetException
-
getBelongedStorageGroups
public java.util.List<org.apache.iotdb.commons.path.PartialPath> getBelongedStorageGroups(org.apache.iotdb.commons.path.PartialPath pathPattern) throws org.apache.iotdb.commons.exception.MetadataExceptionGet the storage group that given path pattern matches or belongs to.Suppose we have (root.sg1.d1.s1, root.sg2.d2.s2), refer the following cases: 1. given path "root.sg1", ("root.sg1") will be returned. 2. given path "root.*", ("root.sg1", "root.sg2") will be returned. 3. given path "root.*.d1.s1", ("root.sg1", "root.sg2") will be returned.
- Parameters:
pathPattern- a path pattern or a full path- Returns:
- a list contains all storage groups related to given path pattern
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getMatchedStorageGroups
public java.util.List<org.apache.iotdb.commons.path.PartialPath> getMatchedStorageGroups(org.apache.iotdb.commons.path.PartialPath pathPattern, boolean isPrefixMatch) throws org.apache.iotdb.commons.exception.MetadataExceptionGet all storage group matching given path pattern. If using prefix match, the path pattern is used to match prefix path. All timeseries start with the matched prefix path will be collected.- Parameters:
pathPattern- a pattern of a full pathisPrefixMatch- if true, the path pattern is used to match prefix path- Returns:
- A ArrayList instance which stores storage group paths matching given path pattern.
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getAllStorageGroupPaths
public java.util.List<org.apache.iotdb.commons.path.PartialPath> getAllStorageGroupPaths()
Get all storage group paths
-
groupPathByStorageGroup
public java.util.Map<java.lang.String,java.util.List<org.apache.iotdb.commons.path.PartialPath>> groupPathByStorageGroup(org.apache.iotdb.commons.path.PartialPath path) throws org.apache.iotdb.commons.exception.MetadataExceptionFor a path, infer all storage groups it may belong to. The path can have wildcards. Resolve the path or path pattern into StorageGroupName-FullPath pairs that FullPath matches the given path.Consider the path into two parts: (1) the sub path which can not contain a storage group name and (2) the sub path which is substring that begin after the storage group name.
(1) Suppose the part of the path can not contain a storage group name (e.g., "root".contains("root.sg") == false), then: For each one level wildcard *, only one level will be inferred and the wildcard will be removed. For each multi level wildcard **, then the inference will go on until the storage groups are found and the wildcard will be kept. (2) Suppose the part of the path is a substring that begin after the storage group name. (e.g., For "root.*.sg1.a.*.b.*" and "root.x.sg1" is a storage group, then this part is "a.*.b.*"). For this part, keep what it is.
Assuming we have three SGs: root.group1, root.group2, root.area1.group3 Eg1: for input "root.**", returns ("root.group1", "root.group1.**"), ("root.group2", "root.group2.**") ("root.area1.group3", "root.area1.group3.**") Eg2: for input "root.*.s1", returns ("root.group1", "root.group1.s1"), ("root.group2", "root.group2.s1")
Eg3: for input "root.area1.**", returns ("root.area1.group3", "root.area1.group3.**")
- Parameters:
path- can be a path pattern or a full path.- Returns:
- StorageGroupName-FullPath pairs
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getStorageGroupsTTL
public java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.lang.Long> getStorageGroupsTTL()
get all storageGroups ttl- Returns:
- key-> storageGroupPath, value->ttl
-
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 pathPattern, int nodeLevel, boolean isPrefixMatch, LocalSchemaProcessor.StorageGroupFilter filter) throws org.apache.iotdb.commons.exception.MetadataExceptionTo collect nodes in the given level for given path pattern. If using prefix match, the path pattern is used to match prefix path. All nodes start with the matched prefix path will be collected. This method only count in nodes above storage group. Nodes below storage group, including storage group node will be collected by certain SchemaRegion. The involved storage groups will be collected to fetch schemaRegion.- Parameters:
pathPattern- a path pattern or a full pathnodeLevel- the level should match the level of the pathisPrefixMatch- if true, the path pattern is used to match prefix path- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
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 pathPattern) throws org.apache.iotdb.commons.exception.MetadataExceptionGet child node path in the next level of the given path pattern. This method only count in nodes above storage group. Nodes below storage group, including storage group node will be counted by certain Storage Group.give pathPattern and the child nodes is those matching pathPattern.*
e.g., MTree has [root.a.sg1.d1.s1, root.b.sg1.d1.s2, root.c.sg1.d2.s1] given path = root return [root.a, root.b]
- Parameters:
pathPattern- The given path- Returns:
- All child nodes' seriesPath(s) of given seriesPath.
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
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 pathPattern) throws org.apache.iotdb.commons.exception.MetadataExceptionGet child node path in the next level of the given path pattern. This method only count in nodes above storage group. Nodes below storage group, including storage group node will be counted by certain Storage Group.give pathPattern and the child nodes is those matching pathPattern.*
e.g., MTree has [root.a.sg1.d1.s1, root.b.sg1.d1.s2, root.c.sg1.d2.s1] given path = root return [a, b]
- Parameters:
pathPattern- The given path- Returns:
- All child nodes' seriesPath(s) of given seriesPath.
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getStorageGroupNodeByPath
public IStorageGroupMNode getStorageGroupNodeByPath(org.apache.iotdb.commons.path.PartialPath path) throws org.apache.iotdb.commons.exception.MetadataException
Get storage group node by path. the give path don't need to be storage group path.- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getAllStorageGroupNodes
public java.util.List<IStorageGroupMNode> getAllStorageGroupNodes()
Get all storage group MNodes
-
getBelongedSchemaRegionId
public org.apache.iotdb.commons.consensus.SchemaRegionId getBelongedSchemaRegionId(org.apache.iotdb.commons.path.PartialPath path) throws org.apache.iotdb.commons.exception.MetadataExceptionGet the target SchemaRegionIds, which the given path belongs to. The path must be a fullPath without wildcards, * or **. This method is the first step when there's a task on one certain path, e.g., root.sg1 is a storage group and path = root.sg1.d1, return SchemaRegionId of root.sg1. If there's no storage group on the given path, StorageGroupNotSetException will be thrown.- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getBelongedSchemaRegionIdWithAutoCreate
public org.apache.iotdb.commons.consensus.SchemaRegionId getBelongedSchemaRegionIdWithAutoCreate(org.apache.iotdb.commons.path.PartialPath path) throws org.apache.iotdb.commons.exception.MetadataException- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getInvolvedSchemaRegionIds
public java.util.List<org.apache.iotdb.commons.consensus.SchemaRegionId> getInvolvedSchemaRegionIds(org.apache.iotdb.commons.path.PartialPath pathPattern, boolean isPrefixMatch) throws org.apache.iotdb.commons.exception.MetadataExceptionGet the target SchemaRegionIds, which will be involved/covered by the given pathPattern. The path may contain wildcards, * or **. This method is the first step when there's a task on multiple paths represented by the given pathPattern. If isPrefixMatch, all storage groups under the prefixPath that matches the given pathPattern will be collected.- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getSchemaRegionIdsByStorageGroup
public java.util.List<org.apache.iotdb.commons.consensus.SchemaRegionId> getSchemaRegionIdsByStorageGroup(org.apache.iotdb.commons.path.PartialPath storageGroup)
-
createSchemaTemplate
public void createSchemaTemplate(CreateTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
appendSchemaTemplate
public void appendSchemaTemplate(AppendTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
pruneSchemaTemplate
public void pruneSchemaTemplate(PruneTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
countMeasurementsInTemplate
public int countMeasurementsInTemplate(java.lang.String templateName) throws org.apache.iotdb.commons.exception.MetadataException- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
isMeasurementInTemplate
public boolean isMeasurementInTemplate(java.lang.String templateName, java.lang.String path) throws org.apache.iotdb.commons.exception.MetadataException- Parameters:
templateName- name of template to checkpath- full path to check- Returns:
- if path correspond to a measurement in template
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
isPathExistsInTemplate
public boolean isPathExistsInTemplate(java.lang.String templateName, java.lang.String path) throws org.apache.iotdb.commons.exception.MetadataException- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getMeasurementsInTemplate
public java.util.List<java.lang.String> getMeasurementsInTemplate(java.lang.String templateName, java.lang.String path) throws org.apache.iotdb.commons.exception.MetadataException- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getSchemasInTemplate
public java.util.List<org.apache.iotdb.tsfile.utils.Pair<java.lang.String,org.apache.iotdb.tsfile.write.schema.IMeasurementSchema>> getSchemasInTemplate(java.lang.String templateName, java.lang.String path) throws org.apache.iotdb.commons.exception.MetadataException- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getAllTemplates
public java.util.Set<java.lang.String> getAllTemplates()
-
getPathsSetTemplate
public java.util.Set<java.lang.String> getPathsSetTemplate(java.lang.String templateName) throws org.apache.iotdb.commons.exception.MetadataExceptionGet all paths set designated template- Parameters:
templateName- designated template name, blank string for any template exists- Returns:
- paths set
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getPathsUsingTemplate
public java.util.Set<java.lang.String> getPathsUsingTemplate(java.lang.String templateName) throws org.apache.iotdb.commons.exception.MetadataException- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
dropSchemaTemplate
public void dropSchemaTemplate(DropTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
setSchemaTemplate
public void setSchemaTemplate(SetTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
unsetSchemaTemplate
public void unsetSchemaTemplate(UnsetTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
setUsingSchemaTemplate
public void setUsingSchemaTemplate(ActivateTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getBelongedDataRegionId
public org.apache.iotdb.commons.consensus.DataRegionId getBelongedDataRegionId(org.apache.iotdb.commons.path.PartialPath path) throws org.apache.iotdb.commons.exception.MetadataException, DataRegionExceptionGet the target DataRegionIds, which the given path belongs to. The path must be a fullPath without wildcards, * or **. This method is the first step when there's a task on one certain path, e.g., root.sg1 is a storage group and path = root.sg1.d1, return DataRegionId of root.sg1. If there's no storage group on the given path, StorageGroupNotSetException will be thrown.- Throws:
org.apache.iotdb.commons.exception.MetadataExceptionDataRegionException
-
getBelongedDataRegionIdWithAutoCreate
public org.apache.iotdb.commons.consensus.DataRegionId getBelongedDataRegionIdWithAutoCreate(org.apache.iotdb.commons.path.PartialPath path) throws org.apache.iotdb.commons.exception.MetadataException, DataRegionException- Throws:
org.apache.iotdb.commons.exception.MetadataExceptionDataRegionException
-
getDataRegionIdsByStorageGroup
public java.util.List<org.apache.iotdb.commons.consensus.DataRegionId> getDataRegionIdsByStorageGroup(org.apache.iotdb.commons.path.PartialPath storageGroup)
-
getSchemaPartition
public java.util.Map<java.lang.String,java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet>> getSchemaPartition(PathPatternTree patternTree)
-
getOrCreateSchemaPartition
public java.util.Map<java.lang.String,java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet>> getOrCreateSchemaPartition(PathPatternTree patternTree)
-
getDataPartition
public org.apache.iotdb.commons.partition.DataPartition getDataPartition(java.util.Map<java.lang.String,java.util.List<org.apache.iotdb.commons.partition.DataPartitionQueryParam>> sgNameToQueryParamsMap) throws org.apache.iotdb.commons.exception.MetadataException, DataRegionException- Throws:
org.apache.iotdb.commons.exception.MetadataExceptionDataRegionException
-
getOrCreateDataPartition
public org.apache.iotdb.commons.partition.DataPartition getOrCreateDataPartition(java.util.Map<java.lang.String,java.util.List<org.apache.iotdb.commons.partition.DataPartitionQueryParam>> sgNameToQueryParamsMap) throws org.apache.iotdb.commons.exception.MetadataException, DataRegionException- Throws:
org.apache.iotdb.commons.exception.MetadataExceptionDataRegionException
-
operatorPermission
public void operatorPermission(AuthorStatement authorStatement) throws org.apache.iotdb.commons.auth.AuthException
- Throws:
org.apache.iotdb.commons.auth.AuthException
-
queryPermission
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> queryPermission(AuthorStatement authorStatement) throws org.apache.iotdb.commons.auth.AuthException
- Throws:
org.apache.iotdb.commons.auth.AuthException
-
executeListRoleUsers
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> executeListRoleUsers(AuthorStatement authorStatement) throws org.apache.iotdb.commons.auth.AuthException
- Throws:
org.apache.iotdb.commons.auth.AuthException
-
executeListRoles
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> executeListRoles(AuthorStatement authorStatement) throws org.apache.iotdb.commons.auth.AuthException
- Throws:
org.apache.iotdb.commons.auth.AuthException
-
executeListRolePrivileges
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> executeListRolePrivileges(AuthorStatement authorStatement) throws org.apache.iotdb.commons.auth.AuthException
- Throws:
org.apache.iotdb.commons.auth.AuthException
-
executeListUserPrivileges
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> executeListUserPrivileges(AuthorStatement authorStatement) throws org.apache.iotdb.commons.auth.AuthException
- Throws:
org.apache.iotdb.commons.auth.AuthException
-
login
public boolean login(java.lang.String username, java.lang.String password) throws org.apache.iotdb.commons.auth.AuthException- Throws:
org.apache.iotdb.commons.auth.AuthException
-
checkUserPrivileges
public boolean checkUserPrivileges(java.lang.String username, java.lang.String path, int permission) throws org.apache.iotdb.commons.auth.AuthException- Throws:
org.apache.iotdb.commons.auth.AuthException
-
executeMergeOperation
public org.apache.iotdb.common.rpc.thrift.TSStatus executeMergeOperation()
-
executeFlushOperation
public org.apache.iotdb.common.rpc.thrift.TSStatus executeFlushOperation(org.apache.iotdb.common.rpc.thrift.TFlushReq tFlushReq)
-
executeClearCacheOperation
public org.apache.iotdb.common.rpc.thrift.TSStatus executeClearCacheOperation()
-
executeLoadConfigurationOperation
public org.apache.iotdb.common.rpc.thrift.TSStatus executeLoadConfigurationOperation()
-
executeSetSystemStatus
public org.apache.iotdb.common.rpc.thrift.TSStatus executeSetSystemStatus(org.apache.iotdb.commons.cluster.NodeStatus status)
-
createPipeSink
public org.apache.iotdb.common.rpc.thrift.TSStatus createPipeSink(CreatePipeSinkStatement createPipeSinkStatement)
-
dropPipeSink
public org.apache.iotdb.common.rpc.thrift.TSStatus dropPipeSink(java.lang.String pipeSinkName)
-
showPipeSink
public java.util.List<PipeSink> showPipeSink(java.lang.String pipeSinkName)
-
createPipe
public org.apache.iotdb.common.rpc.thrift.TSStatus createPipe(CreatePipeStatement createPipeStatement)
-
startPipe
public org.apache.iotdb.common.rpc.thrift.TSStatus startPipe(java.lang.String pipeName)
-
stopPipe
public org.apache.iotdb.common.rpc.thrift.TSStatus stopPipe(java.lang.String pipeName)
-
dropPipe
public org.apache.iotdb.common.rpc.thrift.TSStatus dropPipe(java.lang.String pipeName)
-
showPipe
public org.apache.iotdb.confignode.rpc.thrift.TShowPipeResp showPipe(java.lang.String pipeName)
-
-