Class DatanodeCacheManager

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.sps.DatanodeCacheManager

@Private public class DatanodeCacheManager extends Object
The Datanode cache Manager handles caching of DatanodeStorageReport. This class is instantiated by StoragePolicySatisifer. It maintains the array of datanode storage reports. It has a configurable refresh interval and periodically refresh the datanode cache by fetching latest Context.getLiveDatanodeStorageReport() once it reaches refresh interval.
  • Constructor Details

    • DatanodeCacheManager

      public DatanodeCacheManager(org.apache.hadoop.conf.Configuration conf)
  • Method Details

    • getLiveDatanodeStorageReport

      public StoragePolicySatisfier.DatanodeMap getLiveDatanodeStorageReport(Context spsContext) throws IOException
      Returns the live datanodes and its storage details, which has available space (> 0) to schedule block moves. This will return array of datanodes from its local cache. It has a configurable refresh interval in millis and periodically refresh the datanode cache by fetching latest Context.getLiveDatanodeStorageReport() once it elapsed refresh interval.
      Throws:
      IOException