|
@@ -80,6 +80,9 @@ public class Quota {
|
|
*/
|
|
*/
|
|
public void setQuota(String path, long namespaceQuota, long storagespaceQuota,
|
|
public void setQuota(String path, long namespaceQuota, long storagespaceQuota,
|
|
StorageType type, boolean checkMountEntry) throws IOException {
|
|
StorageType type, boolean checkMountEntry) throws IOException {
|
|
|
|
+ if (!router.isQuotaEnabled()) {
|
|
|
|
+ throw new IOException("The quota system is disabled in Router.");
|
|
|
|
+ }
|
|
if (checkMountEntry && isMountEntry(path)) {
|
|
if (checkMountEntry && isMountEntry(path)) {
|
|
throw new AccessControlException(
|
|
throw new AccessControlException(
|
|
"Permission denied: " + RouterRpcServer.getRemoteUser()
|
|
"Permission denied: " + RouterRpcServer.getRemoteUser()
|
|
@@ -101,9 +104,6 @@ public class Quota {
|
|
long namespaceQuota, long storagespaceQuota, StorageType type)
|
|
long namespaceQuota, long storagespaceQuota, StorageType type)
|
|
throws IOException {
|
|
throws IOException {
|
|
rpcServer.checkOperation(OperationCategory.WRITE);
|
|
rpcServer.checkOperation(OperationCategory.WRITE);
|
|
- if (!router.isQuotaEnabled()) {
|
|
|
|
- throw new IOException("The quota system is disabled in Router.");
|
|
|
|
- }
|
|
|
|
|
|
|
|
// Set quota for current path and its children mount table path.
|
|
// Set quota for current path and its children mount table path.
|
|
if (locations == null) {
|
|
if (locations == null) {
|