Class AbstractDirectorPartitionManager

    • Constructor Detail

      • AbstractDirectorPartitionManager

        public AbstractDirectorPartitionManager​(GatewayContext context,
                                                java.lang.String dsName,
                                                int driverId)
    • Method Detail

      • isValid

        protected abstract boolean isValid​(Partition parition)
        Returns whether the given partition, which is the one loaded from the db, fits our expectations. If false, it was probably a partition created by a different type of partition manager.
      • createNewPartition

        protected abstract Partition createNewPartition​(long startTime,
                                                        long windowSize)
        Instantiate a new partition object. Doesn't do any actual work, just defines the partition (name, span, resolution).
      • getPartition

        public Partition getPartition​(long time,
                                      long windowSize)
                               throws java.lang.Exception
        Gets the name of the partition (and creates the partition, if necessary). Optimized for moving forward, but supports backfill data as well.
        Specified by:
        getPartition in interface PartitionManager
        Overrides:
        getPartition in class BasicDatasourcePartitionManager
        Throws:
        java.lang.Exception
      • queryOrCreatePartition

        protected Partition queryOrCreatePartition​(long time,
                                                   long windowSize)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getNextPartition

        protected Partition getNextPartition​(SRConnection conn,
                                             long time,
                                             long windowSize)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createPartitionTable

        protected void createPartitionTable​(java.lang.String name,
                                            SRConnection conn,
                                            boolean includeVType)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception