public class StoragePolicySatisfyManager
extends java.lang.Object
If the configured mode is HdfsConstants.StoragePolicySatisfierMode.EXTERNAL, then
it won't do anything, just maintains the sps invoked path ids. Administrator
requires to start external sps service explicitly, to fetch the sps invoked
path ids from namenode, then do necessary computations and block movement in
order to satisfy the storage policy. Please refer
ExternalStoragePolicySatisfier class to understand more about the
external sps service functionality.
If the configured mode is HdfsConstants.StoragePolicySatisfierMode.NONE, then it
will disable the sps feature completely by clearing all queued up sps path's
hint.
This class is instantiated by the BlockManager.
| Constructor | Description |
|---|---|
StoragePolicySatisfyManager(org.apache.hadoop.conf.Configuration conf,
Namesystem namesystem) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPathId(long id) |
Adds the sps path to SPSPathIds list.
|
void |
changeModeEvent(org.apache.hadoop.hdfs.protocol.HdfsConstants.StoragePolicySatisfierMode newMode) |
Sets new sps mode.
|
org.apache.hadoop.hdfs.protocol.HdfsConstants.StoragePolicySatisfierMode |
getMode() |
|
java.lang.Long |
getNextPathId() |
|
int |
getPendingSPSPaths() |
|
boolean |
isEnabled() |
|
boolean |
isSatisfierRunning() |
|
void |
removeAllPathIds() |
Clean up all sps path ids.
|
void |
start() |
This function will do following logic based on the configured sps mode:
|
void |
stop() |
This function will do following logic based on the configured sps mode:
|
void |
verifyOutstandingPathQLimit() |
Verify that satisfier queue limit exceeds allowed outstanding limit.
|
public StoragePolicySatisfyManager(org.apache.hadoop.conf.Configuration conf,
Namesystem namesystem)
public void start()
If the configured mode is HdfsConstants.StoragePolicySatisfierMode.EXTERNAL, then
it won't do anything. Administrator requires to start external sps service
explicitly.
If the configured mode is HdfsConstants.StoragePolicySatisfierMode.NONE, then the
service is disabled and won't do any action.
public void stop()
If the configured mode is HdfsConstants.StoragePolicySatisfierMode.EXTERNAL, then
it won't do anything. Administrator requires to stop external sps service
explicitly, if needed.
If the configured mode is HdfsConstants.StoragePolicySatisfierMode.NONE, then the
service is disabled and won't do any action.
public void changeModeEvent(org.apache.hadoop.hdfs.protocol.HdfsConstants.StoragePolicySatisfierMode newMode)
@VisibleForTesting public boolean isSatisfierRunning()
public java.lang.Long getNextPathId()
public void verifyOutstandingPathQLimit()
throws java.io.IOException
java.io.IOExceptionpublic void removeAllPathIds()
public void addPathId(long id)
id - public boolean isEnabled()
public org.apache.hadoop.hdfs.protocol.HdfsConstants.StoragePolicySatisfierMode getMode()
public int getPendingSPSPaths()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.