[
https://issues.apache.org/jira/browse/HDFS-13583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16532577#comment-16532577
]
Yiqun Lin commented on HDFS-13583:
----------------------------------
Sorry for the delay repsonse, [~dibyendu_hadoop]. I am agreed with your
comment. Some comments from me:
*RouterQuotaUsage*
{code}
- if (getQuota() == HdfsConstants.QUOTA_DONT_SET) {
+ if (getQuota() == HdfsConstants.QUOTA_DONT_SET ||
+ getQuota() == HdfsConstants.QUOTA_RESET) {
nsQuota = "-";
nsCount = "-";
}
{code}
Actually {{HdfsConstants.QUOTA_DONT_SET}} won't not be set into mount table
after this patch. We can just use {{HdfsConstants.QUOTA_RESET}} to replace
{{HdfsConstants.QUOTA_DONT_SET}}.
*RouterAdmin*
{code}
- if (nsQuota <= 0 || ssQuota <= 0) {
+ if ((nsQuota <= 0 && nsQuota != HdfsConstants.QUOTA_DONT_SET
+ && nsQuota != HdfsConstants.QUOTA_RESET)
+ || ssQuota <= 0 && ssQuota != HdfsConstants.QUOTA_DONT_SET
+ && ssQuota != HdfsConstants.QUOTA_RESET) {
throw new IllegalArgumentException(
"Input quota value should be a positive number.");
}
{code}
Current check for quota logic should be okay and no need to change. We assume
users must set a positive number, set to -1 is also not allowed.
*TestRouterAdmin*
The change under this class is not related with current issue. Can we remove
this change?
*TestRouterAdminCLI*
{code}
+ cluster.startCluster();
// Start routers
cluster.startRouters();
+ cluster.waitClusterUp();
+
+ cluster.registerNamenodes();
+ cluster.waitNamenodeRegistration();
routerContext = cluster.getRandomRouter();
Router router = routerContext.getRouter();
@@ -100,12 +102,6 @@ public static void globalSetUp() throws Exception {
admin = new RouterAdmin(routerConf);
client = routerContext.getAdminClient();
- // Add two fake name services to testing disabling them
- ActiveNamenodeResolver membership = router.getNamenodeResolver();
- membership.registerNamenode(
- createNamenodeReport("ns0", "nn1", HAServiceState.ACTIVE));
- membership.registerNamenode(
- createNamenodeReport("ns1", "nn1", HAServiceState.ACTIVE));
stateStore.refreshCaches(true);
{code}
This change also can be removed. Use fake name services should be okay. I mean
we don't need to start full cluster and it will take longer time to run unit
test.
> RBF: Router admin clrQuota is not synchronized with nameservice
> ---------------------------------------------------------------
>
> Key: HDFS-13583
> URL: https://issues.apache.org/jira/browse/HDFS-13583
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Dibyendu Karmakar
> Assignee: Dibyendu Karmakar
> Priority: Major
> Attachments: HDFS-13583-000.patch, HDFS-13583-001.patch,
> HDFS-13583-branch-2-001.patch
>
>
> Router admin -clrQuota command is removing the quota from the mount table
> only, it is not getting synchronized with nameservice.
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]