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 "Eli Collins (JIRA)" <ji...@apache.org> on 2010/11/23 04:58:13 UTC
[jira] Created: (HDFS-1515) Test append and quotas
Test append and quotas
-----------------------
Key: HDFS-1515
URL: https://issues.apache.org/jira/browse/HDFS-1515
Project: Hadoop HDFS
Issue Type: Test
Components: test
Affects Versions: 0.22.0, 0.23.0
Reporter: Eli Collins
Assignee: Eli Collins
Fix For: 0.22.0, 0.23.0
There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-1515) Test append and quotas
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990778#comment-12990778 ]
Konstantin Boudnik commented on HDFS-1515:
------------------------------------------
Looking good! Thank you
> Test append and quotas
> -----------------------
>
> Key: HDFS-1515
> URL: https://issues.apache.org/jira/browse/HDFS-1515
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Eli Collins
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.22.0, 0.23.0
>
> Attachments: DFSClient.append.png
>
>
> There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HDFS-1515) Test append and quotas
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990705#comment-12990705 ]
Konstantin Shvachko commented on HDFS-1515:
-------------------------------------------
It looks like we have both positive and negative tests. Cannot think of anything to add.
Eli, do you?
> Test append and quotas
> -----------------------
>
> Key: HDFS-1515
> URL: https://issues.apache.org/jira/browse/HDFS-1515
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Eli Collins
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.22.0, 0.23.0
>
>
> There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HDFS-1515) Test append and quotas
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Shvachko updated HDFS-1515:
--------------------------------------
Priority: Blocker (was: Major)
Blocker. Quotas with append have zero test coverage.
> Test append and quotas
> -----------------------
>
> Key: HDFS-1515
> URL: https://issues.apache.org/jira/browse/HDFS-1515
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Eli Collins
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.22.0, 0.23.0
>
>
> There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HDFS-1515) Test append and quotas
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Shvachko resolved HDFS-1515.
---------------------------------------
Resolution: Not A Problem
Hadoop Flags: [Reviewed]
> Test append and quotas
> -----------------------
>
> Key: HDFS-1515
> URL: https://issues.apache.org/jira/browse/HDFS-1515
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Eli Collins
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.22.0, 0.23.0
>
> Attachments: DFSClient.append.png
>
>
> There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HDFS-1515) Test append and quotas
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990712#comment-12990712 ]
Konstantin Boudnik commented on HDFS-1515:
------------------------------------------
I'd suggest to run a coverage build and see if the 0-coverage has been addressed.
> Test append and quotas
> -----------------------
>
> Key: HDFS-1515
> URL: https://issues.apache.org/jira/browse/HDFS-1515
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Eli Collins
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.22.0, 0.23.0
>
>
> There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HDFS-1515) Test append and quotas
Posted by "Po Cheung (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990420#comment-12990420 ]
Po Cheung commented on HDFS-1515:
---------------------------------
There exists a testcase for quotas and append in TestQuota.testSpaceCommands. Will that suffice?
{noformat}
// Test Append :
// verify space quota
c = dfs.getContentSummary(quotaDir1);
assertEquals(c.getSpaceQuota(), 4 * fileSpace);
// verify space before append;
c = dfs.getContentSummary(dstPath);
assertEquals(c.getSpaceConsumed(), 3 * fileSpace);
OutputStream out = dfs.append(file2);
// appending 1 fileLen should succeed
out.write(new byte[fileLen]);
out.close();
file2Len += fileLen; // after append
// verify space after append;
c = dfs.getContentSummary(dstPath);
assertEquals(c.getSpaceConsumed(), 4 * fileSpace);
// now increase the quota for quotaDir1
dfs.setQuota(quotaDir1, FSConstants.QUOTA_DONT_SET, 5 * fileSpace);
// Now, appending more than 1 fileLen should result in an error
out = dfs.append(file2);
hasException = false;
try {
out.write(new byte[fileLen + 1024]);
out.flush();
out.close();
} catch (DSQuotaExceededException e) {
hasException = true;
IOUtils.closeStream(out);
}
assertTrue(hasException);
file2Len += fileLen; // after partial append
// verify space after partial append
c = dfs.getContentSummary(dstPath);
assertEquals(c.getSpaceConsumed(), 5 * fileSpace);
{noformat}
> Test append and quotas
> -----------------------
>
> Key: HDFS-1515
> URL: https://issues.apache.org/jira/browse/HDFS-1515
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Eli Collins
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.22.0, 0.23.0
>
>
> There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HDFS-1515) Test append and quotas
Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990905#comment-12990905 ]
Eli Collins commented on HDFS-1515:
-----------------------------------
Looks good, apologies for missing this.
> Test append and quotas
> -----------------------
>
> Key: HDFS-1515
> URL: https://issues.apache.org/jira/browse/HDFS-1515
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Eli Collins
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.22.0, 0.23.0
>
> Attachments: DFSClient.append.png
>
>
> There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HDFS-1515) Test append and quotas
Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982247#action_12982247 ]
Konstantin Boudnik commented on HDFS-1515:
------------------------------------------
Also be aware that now test coverage can report which tests cover what parts of the code.
> Test append and quotas
> -----------------------
>
> Key: HDFS-1515
> URL: https://issues.apache.org/jira/browse/HDFS-1515
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Eli Collins
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.22.0, 0.23.0
>
>
> There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-1515) Test append and quotas
Posted by "Po Cheung (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Po Cheung updated HDFS-1515:
----------------------------
Attachment: DFSClient.append.png
Ran code coverage against TestQuota and verified that DFSClient.append is covered (see attachment).
> Test append and quotas
> -----------------------
>
> Key: HDFS-1515
> URL: https://issues.apache.org/jira/browse/HDFS-1515
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0, 0.23.0
> Reporter: Eli Collins
> Assignee: Eli Collins
> Priority: Blocker
> Fix For: 0.22.0, 0.23.0
>
> Attachments: DFSClient.append.png
>
>
> There is no test coverage for quotas and append. Let's add a test to TestQuota that covers that quotas are updated correctly when appending to a file.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira