Class PlanExecutor

    • Method Detail

      • processQuery

        public org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet processQuery​(PhysicalPlan queryPlan,
                                                                                    QueryContext context)
                                                                             throws java.io.IOException,
                                                                                    StorageEngineException,
                                                                                    org.apache.iotdb.tsfile.exception.filter.QueryFilterOptimizationException,
                                                                                    QueryProcessException,
                                                                                    org.apache.iotdb.commons.exception.MetadataException,
                                                                                    java.lang.InterruptedException
        Description copied from interface: IPlanExecutor
        process query plan of qp layer, construct queryDataSet.
        Specified by:
        processQuery in interface IPlanExecutor
        Parameters:
        queryPlan - QueryPlan
        Returns:
        QueryDataSet
        Throws:
        java.io.IOException
        StorageEngineException
        org.apache.iotdb.tsfile.exception.filter.QueryFilterOptimizationException
        QueryProcessException
        org.apache.iotdb.commons.exception.MetadataException
        java.lang.InterruptedException
      • operateClearCache

        public static void operateClearCache()
      • processShowQuery

        protected org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet processShowQuery​(ShowPlan showPlan,
                                                                                           QueryContext context)
                                                                                    throws QueryProcessException,
                                                                                           org.apache.iotdb.commons.exception.MetadataException
        Throws:
        QueryProcessException
        org.apache.iotdb.commons.exception.MetadataException
      • getDevicesNum

        protected int getDevicesNum​(org.apache.iotdb.commons.path.PartialPath path,
                                    boolean isPrefixMatch)
                             throws org.apache.iotdb.commons.exception.MetadataException
        Throws:
        org.apache.iotdb.commons.exception.MetadataException
      • getPathsNum

        protected int getPathsNum​(org.apache.iotdb.commons.path.PartialPath path,
                                  boolean isPrefixMatch)
                           throws org.apache.iotdb.commons.exception.MetadataException
        Throws:
        org.apache.iotdb.commons.exception.MetadataException
      • getNodesNumInGivenLevel

        protected int getNodesNumInGivenLevel​(org.apache.iotdb.commons.path.PartialPath path,
                                              int level,
                                              boolean isPrefixMatch)
                                       throws org.apache.iotdb.commons.exception.MetadataException
        Throws:
        org.apache.iotdb.commons.exception.MetadataException
      • getPathsName

        protected java.util.List<MeasurementPath> getPathsName​(org.apache.iotdb.commons.path.PartialPath path)
                                                        throws org.apache.iotdb.commons.exception.MetadataException
        Throws:
        org.apache.iotdb.commons.exception.MetadataException
      • getNodesList

        protected java.util.List<org.apache.iotdb.commons.path.PartialPath> getNodesList​(org.apache.iotdb.commons.path.PartialPath schemaPattern,
                                                                                         int level)
                                                                                  throws org.apache.iotdb.commons.exception.MetadataException
        Throws:
        org.apache.iotdb.commons.exception.MetadataException
      • getPathNextChildren

        protected java.util.Set<org.apache.iotdb.common.rpc.thrift.TSchemaNode> getPathNextChildren​(org.apache.iotdb.commons.path.PartialPath path)
                                                                                             throws org.apache.iotdb.commons.exception.MetadataException
        Throws:
        org.apache.iotdb.commons.exception.MetadataException
      • getNodeNextChildren

        protected java.util.Set<java.lang.String> getNodeNextChildren​(org.apache.iotdb.commons.path.PartialPath path)
                                                               throws org.apache.iotdb.commons.exception.MetadataException
        Throws:
        org.apache.iotdb.commons.exception.MetadataException
      • getStorageGroupNames

        protected java.util.List<org.apache.iotdb.commons.path.PartialPath> getStorageGroupNames​(org.apache.iotdb.commons.path.PartialPath path,
                                                                                                 boolean isPrefixMatch)
                                                                                          throws org.apache.iotdb.commons.exception.MetadataException
        Throws:
        org.apache.iotdb.commons.exception.MetadataException
      • getAllStorageGroupNodes

        protected java.util.List<IStorageGroupMNode> getAllStorageGroupNodes()
      • update

        public void update​(org.apache.iotdb.commons.path.PartialPath path,
                           long startTime,
                           long endTime,
                           java.lang.String value)
        Description copied from interface: IPlanExecutor
        execute update command and return whether the operator is successful.
        Specified by:
        update in interface IPlanExecutor
        Parameters:
        path - : update series seriesPath
        startTime - start time in update command
        endTime - end time in update command
        value - - in type of string
      • delete

        public void delete​(org.apache.iotdb.commons.path.PartialPath path,
                           long startTime,
                           long endTime,
                           long planIndex,
                           DataRegion.TimePartitionFilter timePartitionFilter)
                    throws QueryProcessException
        Description copied from interface: IPlanExecutor
        execute delete command and return whether the operator is successful.
        Specified by:
        delete in interface IPlanExecutor
        Parameters:
        path - delete series seriesPath
        startTime - start time in delete command
        endTime - end time in delete command
        planIndex - index of the deletion plan
        timePartitionFilter - specify involving time partitions, if null, all partitions are involved
        Throws:
        QueryProcessException
      • checkStorageGroupExist

        public static java.util.List<org.apache.iotdb.commons.path.PartialPath> checkStorageGroupExist​(java.util.List<org.apache.iotdb.commons.path.PartialPath> storageGroups)
        Parameters:
        storageGroups - the storage groups to check
        Returns:
        List of PartialPath the storage groups that not exist