Class ReplicationUtil


  • public class ReplicationUtil
    extends Object
    • Field Detail

      • STATUS_FORMATTER_CLASS_NAME

        public static final String STATUS_FORMATTER_CLASS_NAME
    • Method Detail

      • getMaxReplicationThreads

        public int getMaxReplicationThreads​(MasterMonitorInfo mmi)
      • getPeers

        public Map<String,​String> getPeers()
        Extract replication peers from system configuration
        Returns:
        Configured replication peers
      • getPendingReplicationPaths

        public Set<org.apache.hadoop.fs.Path> getPendingReplicationPaths()
      • getAbsolutePath

        public String getAbsolutePath​(Connector conn,
                                      String workQueuePath,
                                      String queueKey)
        Fetches the absolute path of the file to be replicated.
        Parameters:
        conn - Accumulo Connector
        workQueuePath - Root path for the Replication WorkQueue
        queueKey - The Replication work queue key
        Returns:
        The absolute path for the file, or null if the key is no longer in ZooKeeper
      • getProgress

        public String getProgress​(Connector conn,
                                  String path,
                                  ReplicationTarget target)
        Compute a progress string for the replication of the given WAL
        Parameters:
        conn - Accumulo Connector
        path - Absolute path to a WAL, or null
        target - ReplicationTarget the WAL is being replicated to
        Returns:
        A status message for a file being replicated