AsyncQuota (Apache Hadoop HDFS-RBF 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.federation.router.async, class: AsyncQuota

Package org.apache.hadoop.hdfs.server.federation.router.async

# Class AsyncQuota

java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.Quota
org.apache.hadoop.hdfs.server.federation.router.async.AsyncQuota

public class AsyncQuota extends Quota
Provides asynchronous operations for managing quotas in HDFS Federation. This class extends `Quota` and overrides its methods to perform quota operations in a non-blocking manner, allowing for concurrent execution and improved performance.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AsyncQuota(Router router, RouterRpcServer server)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Map<RemoteLocation,org.apache.hadoop.fs.QuotaUsage>`
  `getEachQuotaUsage(String path)`
  Get quota usage for the federation path.
  `org.apache.hadoop.fs.QuotaUsage`
  `getQuotaUsage(String path)`
  Async get aggregated quota usage for the federation path.

  ### Methods inherited from class org.apache.hadoop.hdfs.server.federation.router.Quota

  `aggregateQuota, andByStorageType, eachByStorageType, getValidQuotaLocations, orByStorageType, setQuota`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AsyncQuota

    public AsyncQuota(Router router, RouterRpcServer server)

- ## Method Details

  - ### getQuotaUsage

    public org.apache.hadoop.fs.QuotaUsage getQuotaUsage(String path) throws IOException
    Async get aggregated quota usage for the federation path.
    Overrides:
      `getQuotaUsage` in class `Quota`
    Parameters:
      `path` - Federation path.
    Returns:
      Aggregated quota.
    Throws:
      `IOException` - If the quota system is disabled.

  - ### getEachQuotaUsage

    protected Map<RemoteLocation,org.apache.hadoop.fs.QuotaUsage> getEachQuotaUsage(String path) throws IOException
    Get quota usage for the federation path.
    Overrides:
      `getEachQuotaUsage` in class `Quota`
    Parameters:
      `path` - Federation path.
    Returns:
      quota usage for each remote location.
    Throws:
      `IOException` - If the quota system is disabled.