@InterfaceAudience.Public @InterfaceStability.Evolving public class QuotaUsage extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
QUOTA_HEADER |
protected static String[] |
QUOTA_HEADER_FIELDS |
protected static String |
QUOTA_STRING_FORMAT
Output format:
|----12----| |----15----| |----15----| |----15----| |-------18-------|
QUOTA REMAINING_QUOTA SPACE_QUOTA SPACE_QUOTA_REM FILE_NAME
|
protected static String |
SPACE_QUOTA_STRING_FORMAT |
Modifier | Constructor and Description |
---|---|
protected |
QuotaUsage() |
protected |
QuotaUsage(org.apache.hadoop.fs.QuotaUsage.Builder builder)
Build the instance based on the builder.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getFileAndDirectoryCount()
Return the directory count.
|
static String |
getHeader()
Return the header of the output.
|
long |
getQuota()
Return the directory quota.
|
protected String |
getQuotaUsage(boolean hOption) |
long |
getSpaceConsumed()
Return (disk) space consumed.
|
long |
getSpaceQuota()
Return (disk) space quota.
|
static String |
getStorageTypeHeader(List<StorageType> storageTypes)
return the header of with the StorageTypes.
|
long |
getTypeConsumed(StorageType type)
Return storage type consumed.
|
long |
getTypeQuota(StorageType type)
Return storage type quota.
|
protected String |
getTypesQuotaUsage(boolean hOption,
List<StorageType> types) |
int |
hashCode() |
boolean |
isTypeConsumedAvailable()
Return true if any storage type consumption information is available.
|
boolean |
isTypeQuotaSet()
Return true if any storage type quota has been set.
|
protected void |
setQuota(long quota) |
protected void |
setSpaceConsumed(long spaceConsumed) |
protected void |
setSpaceQuota(long spaceQuota) |
String |
toString() |
String |
toString(boolean hOption) |
String |
toString(boolean hOption,
boolean tOption,
List<StorageType> types)
Return the string representation of the object in the output format.
|
protected static final String QUOTA_STRING_FORMAT
protected static final String SPACE_QUOTA_STRING_FORMAT
protected static final String[] QUOTA_HEADER_FIELDS
protected static final String QUOTA_HEADER
protected QuotaUsage()
protected QuotaUsage(org.apache.hadoop.fs.QuotaUsage.Builder builder)
protected void setQuota(long quota)
protected void setSpaceConsumed(long spaceConsumed)
protected void setSpaceQuota(long spaceQuota)
public long getFileAndDirectoryCount()
public long getQuota()
public long getSpaceConsumed()
public long getSpaceQuota()
public long getTypeQuota(StorageType type)
public long getTypeConsumed(StorageType type)
public boolean isTypeQuotaSet()
public boolean isTypeConsumedAvailable()
public static String getHeader()
public String toString(boolean hOption)
public String toString(boolean hOption, boolean tOption, List<StorageType> types)
hOption
- a flag indicating if human readable output if to be usedprotected String getQuotaUsage(boolean hOption)
protected String getTypesQuotaUsage(boolean hOption, List<StorageType> types)
public static String getStorageTypeHeader(List<StorageType> storageTypes)
storageTypes
- Copyright © 2022 Apache Software Foundation. All rights reserved.