| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Constructor | Description |
|---|---|
ExternalSPSContext(SPSService service,
NameNodeConnector nnc) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
closeMetrics() |
|
org.apache.hadoop.hdfs.protocol.HdfsFileStatus |
getFileInfo(long path) |
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.
|
ExternalSPSBeanMetrics |
getSpsBeanMetrics() |
|
org.apache.hadoop.hdfs.protocol.BlockStoragePolicy |
getStoragePolicy(byte policyId) |
Gets the storage policy details for the given policy ID.
|
void |
initMetrics(StoragePolicySatisfier sps) |
|
boolean |
isFileExist(long path) |
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 inodeId) |
Remove the hint which was added to track SPS call.
|
void |
scanAndCollectFiles(long path) |
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.
|
public ExternalSPSContext(SPSService service, NameNodeConnector nnc)
public boolean isRunning()
Contextpublic boolean isInSafeMode()
ContextisInSafeMode in interface Contextpublic org.apache.hadoop.net.NetworkTopology getNetworkTopology(StoragePolicySatisfier.DatanodeMap datanodeMap)
ContextgetNetworkTopology in interface ContextdatanodeMap - target datanodespublic boolean isFileExist(long path)
ContextisFileExist in interface Contextpath - - file infopublic org.apache.hadoop.hdfs.protocol.BlockStoragePolicy getStoragePolicy(byte policyId)
ContextgetStoragePolicy in interface ContextpolicyId - - Storage policy IDpublic void removeSPSHint(long inodeId)
throws java.io.IOException
ContextremoveSPSHint in interface ContextinodeId - - user invoked satisfier pathjava.io.IOExceptionpublic int getNumLiveDataNodes()
ContextgetNumLiveDataNodes in interface Contextpublic org.apache.hadoop.hdfs.protocol.HdfsFileStatus getFileInfo(long path)
throws java.io.IOException
ContextgetFileInfo in interface Contextpath - file pathjava.io.IOExceptionpublic org.apache.hadoop.hdfs.server.protocol.DatanodeStorageReport[] getLiveDatanodeStorageReport()
throws java.io.IOException
ContextgetLiveDatanodeStorageReport in interface Contextjava.io.IOExceptionpublic java.lang.Long getNextSPSPath()
getNextSPSPath in interface Contextpublic void scanAndCollectFiles(long path)
throws java.io.IOException,
java.lang.InterruptedException
ContextscanAndCollectFiles in interface Contextpath - file pathjava.io.IOExceptionjava.lang.InterruptedExceptionpublic void submitMoveTask(BlockStorageMovementCommand.BlockMovingInfo blkMovingInfo) throws java.io.IOException
ContextsubmitMoveTask in interface Contextjava.io.IOExceptionpublic void notifyMovementTriedBlocks(org.apache.hadoop.hdfs.protocol.Block[] moveAttemptFinishedBlks)
ContextnotifyMovementTriedBlocks in interface ContextmoveAttemptFinishedBlks - list of movement attempt finished blockspublic void initMetrics(StoragePolicySatisfier sps)
public void closeMetrics()
@VisibleForTesting public ExternalSPSBeanMetrics getSpsBeanMetrics()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.