You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Ayush Saxena (JIRA)" <ji...@apache.org> on 2019/07/21 09:52:00 UTC

[jira] [Commented] (HDFS-14519) NameQuota is not update after concat operation, so namequota is wrong

    [ https://issues.apache.org/jira/browse/HDFS-14519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16889700#comment-16889700 ] 

Ayush Saxena commented on HDFS-14519:
-------------------------------------

Thanx [~RANith] for the patch.

The fix Looks Good.

Couple of comments for the test code :
 * Guess tweaking the block size here isn't required for the use case :

{code:java}
    conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY,
        DFSConfigKeys.DFS_BYTES_PER_CHECKSUM_DEFAULT);{code}
 * No need to explicitly define numDatanodes() as 1, That is by default 1 only. Moreover you can use try with resources for the cluster.

{code:java}
 cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).build();{code}
 * Guess you don't need to get NNRpcServer, you can directlly use filesytem to perform operations, fs for some nnRpc for some doesn't make sense, Let it be at the FS level only.

{code:java}
  NamenodeProtocols nnRpc = cluster.getNameNodeRpc();{code}
 * No need to get in setting spaceQuota stuff, When you just have to verify nsQuota, Or Does this have to do something with space quota(if yes, can you update description), if not..Maybe you can avoid setting Space Quota here :

{code:java}
+      nnRpc.setQuota(dir, 100, 1000000L, null);
{code}
 * This part better use loop :

{code:java}
    // Create 4 files
      String file1 = dir + "/file1";
      String file2 = dir + "/file2";
      String file3 = dir + "/file3";
      String file4 = dir + "/file4";
      DFSTestUtil.createFile(fs, new Path(file1), 512, (short) 1, 0);
      DFSTestUtil.createFile(fs, new Path(file2), 512, (short) 1, 0);
      DFSTestUtil.createFile(fs, new Path(file3), 512, (short) 1, 0);
      DFSTestUtil.createFile(fs, new Path(file4), 512, (short) 1, 0);
{code}
 * Space Quota isn't a concern, Yes?? its only Ns Quota then no need to verify this, Anyway you are concating in the same directory :

{code:java}
 Assert.assertEquals(cs.getSpaceConsumed(), qu.getSpaceConsumed());
{code}

* Checkstyle and whitespace are supposed to be fixed.

> NameQuota is not update after concat operation, so namequota is wrong
> ---------------------------------------------------------------------
>
>                 Key: HDFS-14519
>                 URL: https://issues.apache.org/jira/browse/HDFS-14519
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ranith Sardar
>            Assignee: Ranith Sardar
>            Priority: Major
>         Attachments: HDFS-14519.001.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org