ExternalSPSContext@Private
@Evolving
public interface Context
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.hadoop.hdfs.protocol.HdfsFileStatus |
getFileInfo(long file) |
Get the file info for a specific file.
|
org.apache.hadoop.hdfs.server.protocol.DatanodeStorageReport[] |
getLiveDatanodeStorageReport() |
Returns all the live datanodes and its storage details.
|
org.apache.hadoop.net.NetworkTopology |
getNetworkTopology(StoragePolicySatisfier.DatanodeMap datanodeMap) |
Gets the network topology.
|
java.lang.Long |
getNextSPSPath() |
|
int |
getNumLiveDataNodes() |
Gets the number of live datanodes in the cluster.
|
org.apache.hadoop.hdfs.protocol.BlockStoragePolicy |
getStoragePolicy(byte policyId) |
Gets the storage policy details for the given policy ID.
|
boolean |
isFileExist(long filePath) |
Returns true if the give file exists in the Namespace.
|
boolean |
isInSafeMode() |
Returns true if the Namenode in safe mode, false otherwise.
|
boolean |
isRunning() |
Returns true if the SPS is running, false otherwise.
|
void |
notifyMovementTriedBlocks(org.apache.hadoop.hdfs.protocol.Block[] moveAttemptFinishedBlks) |
This can be used to notify to the SPS about block movement attempt
finished.
|
void |
removeSPSHint(long spsPath) |
Remove the hint which was added to track SPS call.
|
void |
scanAndCollectFiles(long filePath) |
Do scan and collects the files under that directory and adds to the given
BlockStorageMovementNeeded.
|
void |
submitMoveTask(BlockStorageMovementCommand.BlockMovingInfo blkMovingInfo) |
Handles the block move tasks.
|
boolean isRunning()
boolean isInSafeMode()
org.apache.hadoop.net.NetworkTopology getNetworkTopology(StoragePolicySatisfier.DatanodeMap datanodeMap)
datanodeMap - target datanodesboolean isFileExist(long filePath)
filePath - - file infoorg.apache.hadoop.hdfs.protocol.BlockStoragePolicy getStoragePolicy(byte policyId)
policyId - - Storage policy IDvoid removeSPSHint(long spsPath)
throws java.io.IOException
spsPath - - user invoked satisfier pathjava.io.IOExceptionint getNumLiveDataNodes()
org.apache.hadoop.hdfs.protocol.HdfsFileStatus getFileInfo(long file)
throws java.io.IOException
file - file pathjava.io.IOExceptionorg.apache.hadoop.hdfs.server.protocol.DatanodeStorageReport[] getLiveDatanodeStorageReport()
throws java.io.IOException
java.io.IOExceptionjava.lang.Long getNextSPSPath()
void scanAndCollectFiles(long filePath)
throws java.io.IOException,
java.lang.InterruptedException
filePath - file pathjava.io.IOExceptionjava.lang.InterruptedExceptionvoid submitMoveTask(BlockStorageMovementCommand.BlockMovingInfo blkMovingInfo) throws java.io.IOException
java.io.IOExceptionvoid notifyMovementTriedBlocks(org.apache.hadoop.hdfs.protocol.Block[] moveAttemptFinishedBlks)
moveAttemptFinishedBlks - list of movement attempt finished blocksCopyright © 2008–2025 Apache Software Foundation. All rights reserved.