@ThreadSafe public final class DefaultReplicationHandler extends java.lang.Object implements ReplicationHandler
ReplicationHandler that utilizes job service.| Constructor and Description |
|---|
DefaultReplicationHandler(JobMasterClientPool jobMasterClientPool)
Creates a new instance of
DefaultReplicationHandler. |
| Modifier and Type | Method and Description |
|---|---|
long |
evict(AlluxioURI uri,
long blockId,
int numReplicas)
Decreases the block replication level by a target number of replicas.
|
java.util.List<java.lang.Long> |
findJobs(java.lang.String jobName,
java.util.Set<Status> status) |
Status |
getJobStatus(long jobId) |
long |
migrate(AlluxioURI uri,
long blockId,
java.lang.String workerHost,
java.lang.String mediumType)
Migrate blocks to the correctly pinned locations.
|
long |
replicate(AlluxioURI uri,
long blockId,
int numReplicas)
Increases the block replication level by a target number of replicas.
|
public DefaultReplicationHandler(JobMasterClientPool jobMasterClientPool)
DefaultReplicationHandler.jobMasterClientPool - job master client poolpublic Status getJobStatus(long jobId) throws java.io.IOException
getJobStatus in interface ReplicationHandlerjobId - the job id returned by evict, replicate, or migratejava.io.IOException - if a non-Alluxio error is encounteredpublic java.util.List<java.lang.Long> findJobs(java.lang.String jobName,
java.util.Set<Status> status)
throws java.io.IOException
findJobs in interface ReplicationHandlerjobName - name of the jobstatus - job statusjava.io.IOException - if a non-Alluxio error is encounteredpublic long evict(AlluxioURI uri, long blockId, int numReplicas) throws AlluxioException, java.io.IOException
ReplicationHandlerevict in interface ReplicationHandleruri - URI of the file the block belongs toblockId - ID of the blocknumReplicas - how many replicas to removeAlluxioException - if an Alluxio error is encounteredjava.io.IOException - if a non-Alluxio error is encounteredpublic long replicate(AlluxioURI uri, long blockId, int numReplicas) throws AlluxioException, java.io.IOException
ReplicationHandlerreplicate in interface ReplicationHandleruri - URI of the file the block belongs toblockId - ID of the blocknumReplicas - how many replicas to addAlluxioException - if an Alluxio error is encounteredjava.io.IOException - if a non-Alluxio error is encounteredpublic long migrate(AlluxioURI uri, long blockId, java.lang.String workerHost, java.lang.String mediumType) throws AlluxioException, java.io.IOException
ReplicationHandlermigrate in interface ReplicationHandleruri - URI of the file the block belongs toblockId - ID of the blockworkerHost - worker host this block is located atmediumType - medium type to migrate this block toAlluxioException - if an Alluxio error is encounteredjava.io.IOException - if a non-Alluxio error is encounteredCopyright © 2022. All Rights Reserved.