Class DefaultReplicationHandler

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.Long> findJobs​(java.lang.String jobName, java.util.Set<alluxio.job.wire.Status> status)  
      alluxio.job.wire.Status getJobStatus​(long jobId)  
      long migrate​(alluxio.AlluxioURI uri, long blockId, java.lang.String workerHost, java.lang.String mediumType)
      Migrate blocks to the correctly pinned locations.
      long setReplica​(alluxio.AlluxioURI uri, long blockId, int numReplicas)
      Set the block replication level by a target number of replicas.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getJobStatus

        public alluxio.job.wire.Status getJobStatus​(long jobId)
                                             throws java.io.IOException
        Specified by:
        getJobStatus in interface ReplicationHandler
        Parameters:
        jobId - the job id returned by evict, replicate, or migrate
        Returns:
        the job status (running, completed, failed, etc.)
        Throws:
        java.io.IOException - if a non-Alluxio error is encountered
      • findJobs

        public java.util.List<java.lang.Long> findJobs​(java.lang.String jobName,
                                                       java.util.Set<alluxio.job.wire.Status> status)
                                                throws java.io.IOException
        Specified by:
        findJobs in interface ReplicationHandler
        Parameters:
        jobName - name of the job
        status - job status
        Returns:
        a list of job ids that match the criteria
        Throws:
        java.io.IOException - if a non-Alluxio error is encountered
      • setReplica

        public long setReplica​(alluxio.AlluxioURI uri,
                               long blockId,
                               int numReplicas)
                        throws alluxio.exception.AlluxioException,
                               java.io.IOException
        Description copied from interface: ReplicationHandler
        Set the block replication level by a target number of replicas.
        Specified by:
        setReplica in interface ReplicationHandler
        Parameters:
        uri - URI of the file the block belongs to
        blockId - ID of the block
        numReplicas - how many replicas to add
        Returns:
        the ID of the replicate job
        Throws:
        alluxio.exception.AlluxioException - if an Alluxio error is encountered
        java.io.IOException - if a non-Alluxio error is encountered
      • migrate

        public long migrate​(alluxio.AlluxioURI uri,
                            long blockId,
                            java.lang.String workerHost,
                            java.lang.String mediumType)
                     throws alluxio.exception.AlluxioException,
                            java.io.IOException
        Description copied from interface: ReplicationHandler
        Migrate blocks to the correctly pinned locations.
        Specified by:
        migrate in interface ReplicationHandler
        Parameters:
        uri - URI of the file the block belongs to
        blockId - ID of the block
        workerHost - worker host this block is located at
        mediumType - medium type to migrate this block to
        Returns:
        the ID of the replicate job
        Throws:
        alluxio.exception.AlluxioException - if an Alluxio error is encountered
        java.io.IOException - if a non-Alluxio error is encountered