[
https://issues.apache.org/jira/browse/HDFS-14977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17048637#comment-17048637
]
Surendra Singh Lilhore edited comment on HDFS-14977 at 3/1/20 5:23 PM:
-----------------------------------------------------------------------
Thanks [~hemanthboyina] for patch.
Changes looks good. Some comments for test code.
Simplify the variables like below. Remove string variables.
{code:java}
Path root = new Path("/");
Path dirPath = new Path(root,"dir");
assertTrue(fs.mkdirs(dirPath));;
Path filePath = new Path(dirPath, "file");
{code}
[~elgoiri], Can we remove {{csSpaceConsumed, qoSpaceConsumed}} variables and
add function call in assert like below ?
{code:java}
assertEquals(fs.getContentSummary(root).getSpaceConsumed(),
fs.getQuotaUsage(root).getSpaceConsumed());{code}
was (Author: surendrasingh):
Thanks [~hemanthboyina] for patch.
Changes looks good. Some comments for test code.
Simplify the variables like below. Remove string variables.
{code:java}
Path root = new Path("/");
Path dirPath = new Path(root,"dir");
assertTrue(fs.mkdirs(dirPath));;
Path filePath = new Path(dirPath, "file");
{code}
[~elgoiri], Can we remove \{{ csSpaceConsumed, qoSpaceConsumed}} variables and
add function call in assert like below ?
{code:java}
assertEquals(fs.getContentSummary(root).getSpaceConsumed(),
fs.getQuotaUsage(root).getSpaceConsumed());{code}
> Quota Usage and Content summary are not same in Truncate with Snapshot
> -----------------------------------------------------------------------
>
> Key: HDFS-14977
> URL: https://issues.apache.org/jira/browse/HDFS-14977
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: hemanthboyina
> Assignee: hemanthboyina
> Priority: Major
> Attachments: HDFS-14977.001.patch, HDFS-14977.002.patch
>
>
> steps : hdfs dfs -mkdir /dir
> hdfs dfs -put file /dir (file size = 10bytes)
> hdfs dfsadmin -allowSnapshot /dir
> hdfs dfs -createSnapshot /dir s1
> space consumed with Quotausage and Content Summary is 30bytes
> hdfs dfs -truncate -w 5 /dir/file
> space consumed with Quotausage , Content Summary is 45 bytes
> hdfs dfs -deleteSnapshot /dir s1
> space consumed with Quotausage is 45bytes and Content Summary is 15bytes
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]