Class InsertRowsPlan

  • All Implemented Interfaces:
    org.apache.iotdb.consensus.common.request.IConsensusRequest, BatchPlan

    public class InsertRowsPlan
    extends InsertPlan
    implements BatchPlan
    • Constructor Detail

      • InsertRowsPlan

        public InsertRowsPlan()
    • Method Detail

      • getPaths

        public java.util.List<org.apache.iotdb.commons.path.PartialPath> getPaths()
        Specified by:
        getPaths in class PhysicalPlan
      • getPrefixPaths

        public java.util.List<org.apache.iotdb.commons.path.PartialPath> getPrefixPaths()
        Description copied from interface: BatchPlan
        Return prefix paths of all sub-plans
        Specified by:
        getPrefixPaths in interface BatchPlan
        Returns:
        prefix paths of all sub-plans
      • recoverFromFailure

        public void recoverFromFailure()
        Description copied from class: InsertPlan
        Reset measurements from failed measurements (if any), as if no failure had ever happened.
        Overrides:
        recoverFromFailure in class InsertPlan
      • getPlanFromFailed

        public InsertPlan getPlanFromFailed()
        Description copied from class: InsertPlan
        Reconstruct this plan with the failed measurements.
        Overrides:
        getPlanFromFailed in class InsertPlan
        Returns:
        the plan itself, with measurements replaced with the previously failed ones.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • serialize

        public void serialize​(java.io.DataOutputStream stream)
                       throws java.io.IOException
        Description copied from class: PhysicalPlan
        Serialize the plan into the given buffer. All necessary fields will be serialized.
        Overrides:
        serialize in class PhysicalPlan
        Throws:
        java.io.IOException
      • deserialize

        public void deserialize​(java.nio.ByteBuffer buffer)
                         throws org.apache.iotdb.commons.exception.IllegalPathException
        Description copied from class: PhysicalPlan
        Deserialize the plan from the given buffer.
        Overrides:
        deserialize in class PhysicalPlan
        Throws:
        org.apache.iotdb.commons.exception.IllegalPathException
      • getResults

        public java.util.Map<java.lang.Integer,​org.apache.iotdb.common.rpc.thrift.TSStatus> getResults()
        Description copied from interface: BatchPlan
        Return execution status for each path
        Specified by:
        getResults in interface BatchPlan
        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:
        toString in class java.lang.Object
      • getFailingStatus

        public org.apache.iotdb.common.rpc.thrift.TSStatus[] getFailingStatus()
      • setIsExecuted

        public void setIsExecuted​(int i)
        Description copied from interface: BatchPlan
        Mark the sub-plan at position i as executed.
        Specified by:
        setIsExecuted in interface BatchPlan
        Parameters:
        i - the position of the sub-plan
      • isExecuted

        public boolean isExecuted​(int i)
        Description copied from interface: BatchPlan
        Whether the sub-plan at position i has been executed.
        Specified by:
        isExecuted in interface BatchPlan
        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: BatchPlan
        Return how many sub-plans are in the plan
        Specified by:
        getBatchSize in interface BatchPlan
        Returns:
        how many sub-plans are in the plan.
      • unsetIsExecuted

        public void unsetIsExecuted​(int i)
        Description copied from interface: BatchPlan
        Mark the sub-plan at position i as not executed.
        Specified by:
        unsetIsExecuted in interface BatchPlan
        Parameters:
        i - the position of the sub-plan