Class InsertRowsPlan
- java.lang.Object
-
- org.apache.iotdb.db.qp.physical.PhysicalPlan
-
- org.apache.iotdb.db.qp.physical.crud.InsertPlan
-
- org.apache.iotdb.db.qp.physical.crud.InsertRowsPlan
-
- All Implemented Interfaces:
org.apache.iotdb.consensus.common.request.IConsensusRequest,BatchPlan
public class InsertRowsPlan extends InsertPlan implements BatchPlan
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.iotdb.db.qp.physical.PhysicalPlan
PhysicalPlan.Factory, PhysicalPlan.PhysicalPlanType
-
-
Field Summary
-
Fields inherited from class org.apache.iotdb.db.qp.physical.crud.InsertPlan
dataTypes, deviceID, devicePath, isAligned, measurementMNodes, measurements
-
Fields inherited from class org.apache.iotdb.db.qp.physical.PhysicalPlan
canBeSplit, index
-
-
Constructor Summary
Constructors Constructor Description InsertRowsPlan()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOneInsertRowPlan(InsertRowPlan plan, int index)voidcheckIntegrity()Check the integrity of the plan in case that the plan is generated by a careless user through Session API.voiddeserialize(java.nio.ByteBuffer buffer)Deserialize the plan from the given buffer.booleanequals(java.lang.Object o)intgetBatchSize()Return how many sub-plans are in the planorg.apache.iotdb.common.rpc.thrift.TSStatus[]getFailingStatus()org.apache.iotdb.commons.path.PartialPathgetFirstDeviceId()java.lang.ObjectgetFirstValueOfIndex(int index)java.util.List<java.lang.Integer>getInsertRowPlanIndexList()java.util.List<InsertRowPlan>getInsertRowPlanList()longgetMinTime()java.util.List<org.apache.iotdb.commons.path.PartialPath>getPaths()InsertPlangetPlanFromFailed()Reconstruct this plan with the failed measurements.java.util.List<org.apache.iotdb.commons.path.PartialPath>getPrefixPaths()Return prefix paths of all sub-plansjava.util.Map<java.lang.Integer,org.apache.iotdb.common.rpc.thrift.TSStatus>getResults()Return execution status for each pathintgetRowCount()inthashCode()booleanisExecuted(int i)Whether the sub-plan at position i has been executed.voidrecoverFromFailure()Reset measurements from failed measurements (if any), as if no failure had ever happened.voidserialize(java.io.DataOutputStream stream)Serialize the plan into the given buffer.voidserializeImpl(java.nio.ByteBuffer buffer)voidsetIndex(long index)voidsetIsExecuted(int i)Mark the sub-plan at position i as executed.java.lang.StringtoString()voidunsetIsExecuted(int i)Mark the sub-plan at position i as not executed.-
Methods inherited from class org.apache.iotdb.db.qp.physical.crud.InsertPlan
getDataTypes, getDeviceID, getDevicePath, getFailedExceptions, getFailedMeasurementNumber, getFailedMeasurements, getMeasurementMNodes, getMeasurements, hasValidMeasurements, isAligned, markFailedMeasurementInsertion, setAligned, setDataTypes, setDeviceID, setDevicePath, setMeasurementMNodes, setMeasurements
-
Methods inherited from class org.apache.iotdb.db.qp.physical.PhysicalPlan
canBeSplit, deserialize, getAggregations, getAuthPaths, getIndex, getLoginUserName, getOperatorName, getOperatorType, isAuthenticationRequired, isDebug, isPrefixMatch, isQuery, isSelectInto, putString, putString, putStrings, putStrings, readString, readStrings, serialize, serializeToByteBuffer, setDebug, setLoginUserName, setOperatorType, setPaths, setPrefixMatch, setQuery
-
-
-
-
Method Detail
-
getMinTime
public long getMinTime()
- Specified by:
getMinTimein classInsertPlan
-
getFirstValueOfIndex
public java.lang.Object getFirstValueOfIndex(int index)
- Specified by:
getFirstValueOfIndexin classInsertPlan
-
getPaths
public java.util.List<org.apache.iotdb.commons.path.PartialPath> getPaths()
- Specified by:
getPathsin classPhysicalPlan
-
getPrefixPaths
public java.util.List<org.apache.iotdb.commons.path.PartialPath> getPrefixPaths()
Description copied from interface:BatchPlanReturn prefix paths of all sub-plans- Specified by:
getPrefixPathsin interfaceBatchPlan- Returns:
- prefix paths of all sub-plans
-
checkIntegrity
public void checkIntegrity() throws QueryProcessExceptionDescription copied from class:PhysicalPlanCheck the integrity of the plan in case that the plan is generated by a careless user through Session API.- Overrides:
checkIntegrityin classInsertPlan- Throws:
QueryProcessException- when the check fails
-
recoverFromFailure
public void recoverFromFailure()
Description copied from class:InsertPlanReset measurements from failed measurements (if any), as if no failure had ever happened.- Overrides:
recoverFromFailurein classInsertPlan
-
getPlanFromFailed
public InsertPlan getPlanFromFailed()
Description copied from class:InsertPlanReconstruct this plan with the failed measurements.- Overrides:
getPlanFromFailedin classInsertPlan- Returns:
- the plan itself, with measurements replaced with the previously failed ones.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
serializeImpl
public void serializeImpl(java.nio.ByteBuffer buffer)
- Overrides:
serializeImplin classPhysicalPlan
-
serialize
public void serialize(java.io.DataOutputStream stream) throws java.io.IOExceptionDescription copied from class:PhysicalPlanSerialize the plan into the given buffer. All necessary fields will be serialized.- Overrides:
serializein classPhysicalPlan- Throws:
java.io.IOException
-
deserialize
public void deserialize(java.nio.ByteBuffer buffer) throws org.apache.iotdb.commons.exception.IllegalPathExceptionDescription copied from class:PhysicalPlanDeserialize the plan from the given buffer.- Overrides:
deserializein classPhysicalPlan- Throws:
org.apache.iotdb.commons.exception.IllegalPathException
-
setIndex
public void setIndex(long index)
- Overrides:
setIndexin classPhysicalPlan
-
getResults
public java.util.Map<java.lang.Integer,org.apache.iotdb.common.rpc.thrift.TSStatus> getResults()
Description copied from interface:BatchPlanReturn execution status for each path- Specified by:
getResultsin interfaceBatchPlan- Returns:
- execution status for each path
-
addOneInsertRowPlan
public void addOneInsertRowPlan(InsertRowPlan plan, int index)
-
getInsertRowPlanIndexList
public java.util.List<java.lang.Integer> getInsertRowPlanIndexList()
-
getInsertRowPlanList
public java.util.List<InsertRowPlan> getInsertRowPlanList()
-
getRowCount
public int getRowCount()
-
getFirstDeviceId
public org.apache.iotdb.commons.path.PartialPath getFirstDeviceId()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getFailingStatus
public org.apache.iotdb.common.rpc.thrift.TSStatus[] getFailingStatus()
-
setIsExecuted
public void setIsExecuted(int i)
Description copied from interface:BatchPlanMark the sub-plan at position i as executed.- Specified by:
setIsExecutedin interfaceBatchPlan- Parameters:
i- the position of the sub-plan
-
isExecuted
public boolean isExecuted(int i)
Description copied from interface:BatchPlanWhether the sub-plan at position i has been executed.- Specified by:
isExecutedin interfaceBatchPlan- Parameters:
i- the position of the sub-plan- Returns:
- whether the sub-plan at position i has been executed.
-
getBatchSize
public int getBatchSize()
Description copied from interface:BatchPlanReturn how many sub-plans are in the plan- Specified by:
getBatchSizein interfaceBatchPlan- Returns:
- how many sub-plans are in the plan.
-
unsetIsExecuted
public void unsetIsExecuted(int i)
Description copied from interface:BatchPlanMark the sub-plan at position i as not executed.- Specified by:
unsetIsExecutedin interfaceBatchPlan- Parameters:
i- the position of the sub-plan
-
-