You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by "Edward J. Yoon" <ed...@udanax.org> on 2008/04/19 00:12:56 UTC
TestDU.testDU() throws assertionfailederror
Hi, community.
In my local computer (CentOS 5), TestDU.testDU() throws assertionfailederror.
What is the "4096 byte"?
Testsuite: org.apache.hadoop.fs.TestDU
Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 5.143 sec
Testcase: testDU took 5.138 sec
FAILED
expected:<32768> but was:<36864>
junit.framework.AssertionFailedError: expected:<32768> but was:<36864>
at org.apache.hadoop.fs.TestDU.testDU(TestDU.java:77)
[root@udanax hadoop]# df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda1 ext3 52980472 11103380 39185808 23% /
none tmpfs 516924 0 516924 0% /dev/shm
Thanks.
--
B. Regards,
Edward J. Yoon
Re: TestDU.testDU() throws assertionfailederror
Posted by Konstantin Shvachko <sh...@yahoo-inc.com>.
Edward,
testDU() writes a 32K file to the local fs and then verifies whether the value reported by du
changes exactly to the amount written.
Although this is true for most block oriented file systems it might not be true for some.
I suspect that in your case the file is written to tmpfs, which is a memory fs and thus
creates an inode a directory entry and may be something else in memory (4K total) in addition
to the actual data. That is why du returns a different value and test fails.
Although TestDU is not universal we still want it to run in order to prevent bugs in DU on "real" file systems.
Thanks,
--Konstantin
Edward J. Yoon wrote:
> Hi, community.
>
> In my local computer (CentOS 5), TestDU.testDU() throws assertionfailederror.
> What is the "4096 byte"?
>
> Testsuite: org.apache.hadoop.fs.TestDU
> Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 5.143 sec
>
> Testcase: testDU took 5.138 sec
> FAILED
> expected:<32768> but was:<36864>
> junit.framework.AssertionFailedError: expected:<32768> but was:<36864>
> at org.apache.hadoop.fs.TestDU.testDU(TestDU.java:77)
>
> [root@udanax hadoop]# df -T
> Filesystem Type 1K-blocks Used Available Use% Mounted on
> /dev/sda1 ext3 52980472 11103380 39185808 23% /
> none tmpfs 516924 0 516924 0% /dev/shm
>
> Thanks.