Class DistributedWorkQueueWorkAssigner

    • Constructor Detail

      • DistributedWorkQueueWorkAssigner

        public DistributedWorkQueueWorkAssigner()
    • Method Detail

      • setMaxQueueSize

        protected void setMaxQueueSize​(int maxQueueSize)
      • setZooCache

        protected void setZooCache​(ZooCache zooCache)
      • initializeWorkQueue

        protected void initializeWorkQueue​(AccumuloConfiguration conf)
        Initialize the DistributedWorkQueue using the proper ZK location
      • createWork

        protected void createWork()
        Scan over the ReplicationSchema.WorkSection of the replication table adding work for entries that have data to replicate and have not already been queued.
      • shouldQueueWork

        protected abstract boolean shouldQueueWork​(ReplicationTarget target)
        Returns:
        Can replication work for the given ReplicationTarget be submitted to be worked on.
      • getQueueSize

        protected abstract int getQueueSize()
        Returns:
        the size of the queued work
      • initializeQueuedWork

        protected abstract void initializeQueuedWork()
        Set up any internal state before using the WorkAssigner
      • queueWork

        protected abstract boolean queueWork​(org.apache.hadoop.fs.Path path,
                                             ReplicationTarget target)
        Queue the given work for the target
        Parameters:
        path - File to replicate
        target - Target for the work
        Returns:
        True if the work was queued, false otherwise
      • getQueuedWork

        protected abstract Set<String> getQueuedWork​(ReplicationTarget target)
        Parameters:
        target - Target for the work
        Returns:
        Queued work for the given target
      • removeQueuedWork

        protected abstract void removeQueuedWork​(ReplicationTarget target,
                                                 String queueKey)
        Remove the given work from the internal state
      • cleanupFinishedWork

        protected abstract void cleanupFinishedWork()
        Remove finished replication work from the internal state