Package org.apache.iotdb.db.qp.physical
Class PhysicalPlan
- java.lang.Object
-
- org.apache.iotdb.db.qp.physical.PhysicalPlan
-
- All Implemented Interfaces:
org.apache.iotdb.consensus.common.request.IConsensusRequest
- Direct Known Subclasses:
ActivateTemplateInClusterPlan,ActivateTemplatePlan,AlterTimeSeriesPlan,AppendTemplatePlan,AuthorPlan,AutoCreateDeviceMNodePlan,ChangeAliasPlan,ChangeTagOffsetPlan,ClearCachePlan,CreateAlignedTimeSeriesPlan,CreateContinuousQueryPlan,CreateFunctionPlan,CreateIndexPlan,CreateMultiTimeSeriesPlan,CreatePipePlan,CreatePipeSinkPlan,CreateTemplatePlan,CreateTimeSeriesPlan,CreateTriggerPlan,DataAuthPlan,DeletePartitionPlan,DeletePlan,DeleteStorageGroupPlan,DeleteTimeSeriesPlan,DropContinuousQueryPlan,DropFunctionPlan,DropIndexPlan,DropPipeSinkPlan,DropTemplatePlan,DropTriggerPlan,FlushPlan,InsertPlan,KillQueryPlan,LoadConfigurationPlan,LoadDataPlan,LogPlan,MergePlan,MNodePlan,OperateFilePlan,OperatePipePlan,PruneTemplatePlan,QueryPlan,SelectIntoPlan,SetStorageGroupPlan,SetSystemModePlan,SetTemplatePlan,SettlePlan,SetTTLPlan,ShowPlan,ShowQueryResourcePlan,StartTriggerPlan,StopTriggerPlan,TracingPlan,UnsetTemplatePlan
public abstract class PhysicalPlan extends java.lang.Object implements org.apache.iotdb.consensus.common.request.IConsensusRequestThis class is an abstract class for all type of PhysicalPlan.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPhysicalPlan.Factorystatic classPhysicalPlan.PhysicalPlanTypeIf you want to add new PhysicalPlanType, you must add it in the last.
-
Field Summary
Fields Modifier and Type Field Description protected booleancanBeSplitprotected longindex
-
Constructor Summary
Constructors Modifier Constructor Description protectedPhysicalPlan()protectedPhysicalPlan(Operator.OperatorType operatorType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancanBeSplit()whether the plan can be split into more than one Plans.voidcheckIntegrity()Check the integrity of the plan in case that the plan is generated by a careless user through Session API.voiddeserialize(java.io.DataInputStream stream)voiddeserialize(java.nio.ByteBuffer buffer)Deserialize the plan from the given buffer.java.util.List<java.lang.String>getAggregations()java.util.List<? extends org.apache.iotdb.commons.path.PartialPath>getAuthPaths()Used to check whether a user has the permission to execute the plan with these paths.longgetIndex()java.lang.StringgetLoginUserName()java.lang.StringgetOperatorName()Operator.OperatorTypegetOperatorType()abstract java.util.List<? extends org.apache.iotdb.commons.path.PartialPath>getPaths()booleanisAuthenticationRequired()booleanisDebug()booleanisPrefixMatch()booleanisQuery()booleanisSelectInto()protected voidputString(java.io.DataOutputStream stream, java.lang.String value)protected voidputString(java.nio.ByteBuffer buffer, java.lang.String value)protected voidputStrings(java.io.DataOutputStream stream, java.util.List<java.lang.String> values)protected voidputStrings(java.nio.ByteBuffer buffer, java.util.List<java.lang.String> values)protected java.lang.StringreadString(java.nio.ByteBuffer buffer)protected java.util.List<java.lang.String>readStrings(java.nio.ByteBuffer buffer, int totalSize)voidserialize(java.io.DataOutputStream stream)Serialize the plan into the given buffer.voidserialize(java.nio.ByteBuffer buffer)Serialize the plan into the given buffer.protected voidserializeImpl(java.nio.ByteBuffer buffer)java.nio.ByteBufferserializeToByteBuffer()voidsetDebug(boolean debug)voidsetIndex(long index)voidsetLoginUserName(java.lang.String loginUserName)voidsetOperatorType(Operator.OperatorType operatorType)voidsetPaths(java.util.List<org.apache.iotdb.commons.path.PartialPath> paths)voidsetPrefixMatch(boolean prefixMatch)voidsetQuery(boolean query)
-
-
-
Constructor Detail
-
PhysicalPlan
protected PhysicalPlan()
-
PhysicalPlan
protected PhysicalPlan(Operator.OperatorType operatorType)
-
-
Method Detail
-
canBeSplit
public boolean canBeSplit()
whether the plan can be split into more than one Plans. Only used in the cluster mode.
-
getPaths
public abstract java.util.List<? extends org.apache.iotdb.commons.path.PartialPath> getPaths()
-
setPaths
public void setPaths(java.util.List<org.apache.iotdb.commons.path.PartialPath> paths)
-
isQuery
public boolean isQuery()
-
isSelectInto
public boolean isSelectInto()
-
getOperatorType
public Operator.OperatorType getOperatorType()
-
getOperatorName
public java.lang.String getOperatorName()
-
setOperatorType
public void setOperatorType(Operator.OperatorType operatorType)
-
getAggregations
public java.util.List<java.lang.String> getAggregations()
-
setQuery
public void setQuery(boolean query)
-
isDebug
public boolean isDebug()
-
setDebug
public void setDebug(boolean debug)
-
serialize
public void serialize(java.io.DataOutputStream stream) throws java.io.IOExceptionSerialize the plan into the given buffer. All necessary fields will be serialized.- Parameters:
stream-- Throws:
java.io.IOException
-
serializeToByteBuffer
public java.nio.ByteBuffer serializeToByteBuffer()
- Specified by:
serializeToByteBufferin interfaceorg.apache.iotdb.consensus.common.request.IConsensusRequest
-
deserialize
public void deserialize(java.io.DataInputStream stream) throws java.io.IOException, org.apache.iotdb.commons.exception.IllegalPathException- Throws:
java.io.IOExceptionorg.apache.iotdb.commons.exception.IllegalPathException
-
serialize
public final void serialize(java.nio.ByteBuffer buffer)
Serialize the plan into the given buffer. This is provided for WAL, so fields that can be recovered will not be serialized. If error occurs when serializing this plan, the buffer will be reset.- Parameters:
buffer-
-
serializeImpl
protected void serializeImpl(java.nio.ByteBuffer buffer)
-
deserialize
public void deserialize(java.nio.ByteBuffer buffer) throws org.apache.iotdb.commons.exception.IllegalPathException, java.io.IOExceptionDeserialize the plan from the given buffer.- Parameters:
buffer-- Throws:
org.apache.iotdb.commons.exception.IllegalPathExceptionjava.io.IOException
-
putString
protected void putString(java.nio.ByteBuffer buffer, java.lang.String value)
-
putStrings
protected void putStrings(java.nio.ByteBuffer buffer, java.util.List<java.lang.String> values)
-
putString
protected void putString(java.io.DataOutputStream stream, java.lang.String value) throws java.io.IOException- Throws:
java.io.IOException
-
putStrings
protected void putStrings(java.io.DataOutputStream stream, java.util.List<java.lang.String> values) throws java.io.IOException- Throws:
java.io.IOException
-
readString
protected java.lang.String readString(java.nio.ByteBuffer buffer)
-
readStrings
protected java.util.List<java.lang.String> readStrings(java.nio.ByteBuffer buffer, int totalSize)
-
getLoginUserName
public java.lang.String getLoginUserName()
-
setLoginUserName
public void setLoginUserName(java.lang.String loginUserName)
-
isAuthenticationRequired
public boolean isAuthenticationRequired()
-
getAuthPaths
public java.util.List<? extends org.apache.iotdb.commons.path.PartialPath> getAuthPaths()
Used to check whether a user has the permission to execute the plan with these paths.
-
getIndex
public long getIndex()
-
setIndex
public void setIndex(long index)
-
checkIntegrity
public void checkIntegrity() throws QueryProcessExceptionCheck the integrity of the plan in case that the plan is generated by a careless user through Session API.- Throws:
QueryProcessException- when the check fails
-
isPrefixMatch
public boolean isPrefixMatch()
-
setPrefixMatch
public void setPrefixMatch(boolean prefixMatch)
-
-