public class Quota
extends java.lang.Object
ClientProtocol.setQuota(String, long, long, StorageType)
and
ClientProtocol.getQuotaUsage(String)
in the RouterRpcServer.| Constructor | Description |
|---|---|
Quota(Router router,
RouterRpcServer server) |
| Modifier and Type | Method | Description |
|---|---|---|
static boolean |
andByStorageType(java.util.function.Predicate<org.apache.hadoop.fs.StorageType> predicate) |
Invoke predicate by each storage type and bitwise AND the results.
|
static void |
eachByStorageType(java.util.function.Consumer<org.apache.hadoop.fs.StorageType> consumer) |
Invoke consumer by each storage type.
|
org.apache.hadoop.fs.QuotaUsage |
getQuotaUsage(java.lang.String path) |
Get aggregated quota usage for the federation path.
|
static boolean |
orByStorageType(java.util.function.Predicate<org.apache.hadoop.fs.StorageType> predicate) |
Invoke predicate by each storage type and bitwise inclusive OR the results.
|
void |
setQuota(java.lang.String path,
long namespaceQuota,
long storagespaceQuota,
org.apache.hadoop.fs.StorageType type,
boolean checkMountEntry) |
Set quota for the federation path.
|
public Quota(Router router, RouterRpcServer server)
public void setQuota(java.lang.String path,
long namespaceQuota,
long storagespaceQuota,
org.apache.hadoop.fs.StorageType type,
boolean checkMountEntry)
throws java.io.IOException
path - Federation path.namespaceQuota - Name space quota.storagespaceQuota - Storage space quota.type - StorageType that the space quota is intended to be set on.checkMountEntry - whether to check the path is a mount entry.java.io.IOException - If the quota system is disabled or if
checkMountEntry is true and the path is a mount entry.public org.apache.hadoop.fs.QuotaUsage getQuotaUsage(java.lang.String path)
throws java.io.IOException
path - Federation path.java.io.IOException - If the quota system is disabled.public static void eachByStorageType(java.util.function.Consumer<org.apache.hadoop.fs.StorageType> consumer)
consumer - the function consuming the storage type.public static boolean orByStorageType(java.util.function.Predicate<org.apache.hadoop.fs.StorageType> predicate)
predicate - the function test the storage type.public static boolean andByStorageType(java.util.function.Predicate<org.apache.hadoop.fs.StorageType> predicate)
predicate - the function test the storage type.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.