public interface ResourceQuotas
| Modifier and Type | Method and Description |
|---|---|
ResourceQuota |
getDefaultResourceQuota()
Get default resource quota for new resource bundles.
|
ResourceQuota |
getNamespaceBundleResourceQuota(String namespace,
String bundle)
Get resource quota of a namespace bundle.
|
void |
resetNamespaceBundleResourceQuota(String namespace,
String bundle)
Reset resource quota for a namespace bundle to default value.
|
void |
setDefaultResourceQuota(ResourceQuota quota)
Set default resource quota for new namespace bundles.
|
void |
setNamespaceBundleResourceQuota(String namespace,
String bundle,
ResourceQuota quota)
Set resource quota for a namespace bundle.
|
ResourceQuota getDefaultResourceQuota() throws PulsarAdminException
Get default resource quota for new resource bundles.
Response example:
{
"msgRateIn" : 10,
"msgRateOut" : 30,
"bandwidthIn" : 10000,
"bandwidthOut" : 30000,
"memory" : 100,
"dynamic" : true
}
PulsarAdminException.NotAuthorizedException - Permission deniedPulsarAdminException - Unexpected errorvoid setDefaultResourceQuota(ResourceQuota quota) throws PulsarAdminException
Set default resource quota for new namespace bundles.
The resource quota can be set with these properties:
msgRateIn : The maximum incoming messages per second.
msgRateOut : The maximum outgoing messages per second.
bandwidthIn : The maximum inbound bandwidth used.
bandwidthOut : The maximum outbound bandwidth used.
memory : The maximum memory used.
dynamic : allow the quota to be dynamically re-calculated.
Request parameter example:
{
"msgRateIn" : 10,
"msgRateOut" : 30,
"bandwidthIn" : 10000,
"bandwidthOut" : 30000,
"memory" : 100,
"dynamic" : false
}
quota - The new ResourceQuotaPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException - Unexpected errorResourceQuota getNamespaceBundleResourceQuota(String namespace, String bundle) throws PulsarAdminException
Get resource quota of a namespace bundle.
Response example:
{
"msgRateIn" : 10,
"msgRateOut" : 30,
"bandwidthIn" : 10000,
"bandwidthOut" : 30000,
"memory" : 100,
"dynamic" : true
}
namespace - Namespace namebundle - Range of bundle {start}_{end}PulsarAdminException.NotAuthorizedException - Permission deniedPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorvoid setNamespaceBundleResourceQuota(String namespace, String bundle, ResourceQuota quota) throws PulsarAdminException
Set resource quota for a namespace bundle.
The resource quota can be set with these properties:
msgRateIn : The maximum incoming messages per second.
msgRateOut : The maximum outgoing messages per second.
bandwidthIn : The maximum inbound bandwidth used.
bandwidthOut : The maximum outbound bandwidth used.
memory : The maximum memory used.
dynamic : allow the quota to be dynamically re-calculated.
Request parameter example:
{
"msgRateIn" : 10,
"msgRateOut" : 30,
"bandwidthIn" : 10000,
"bandwidthOut" : 30000,
"memory" : 100,
"dynamic" : false
}
namespace - Namespace namebundle - Bundle range {start}_{end}quota - The new ResourceQuotaPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorvoid resetNamespaceBundleResourceQuota(String namespace, String bundle) throws PulsarAdminException
Reset resource quota for a namespace bundle to default value.
The resource quota policy will fall back to the default.
namespace - Namespace namebundle - Bundle range {start}_{end}PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorCopyright © 2017–2018 Apache Software Foundation. All rights reserved.