[
https://issues.apache.org/jira/browse/HADOOP-16107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16779422#comment-16779422
]
Masatake Iwasaki commented on HADOOP-16107:
-------------------------------------------
The attached 003 fixed failure of TestJobCounters on my local too. LGTM.
For reviewers' convenience,
{code:java}
[ERROR] Failures:
[ERROR]
TestLocalFileSystem.testCRCwithCreateChecksumOpt:887->assertWritesCRC:827 Bytes
written in create with checksum opt; stats=169 bytes read, 193 bytes written, 0
read ops, 0 large read ops, 0 write ops expected:<22> but was:<10>
[ERROR]
TestLocalFileSystem.testCRCwithCreateNonRecursiveCreateFlags:930->assertWritesCRC:827
Bytes written in create with checksum opt; stats=181 bytes read, 220 bytes
written, 0 read ops, 0 large read ops, 0 write ops expected:<22> but was:<10>
[ERROR]
TestLocalFileSystem.testReadIncludesCRCwithBuilders:958->assertWritesCRC:827
Bytes written in createFile(); stats=3245672 bytes read, 192167 bytes written,
0 read ops, 0 large read ops, 0 write ops expected:<22> but was:<10>
[ERROR]
TestLocalFileSystem.testWriteWithBuildersRecursive:995->assertWritesCRC:827
Bytes written in createFile(); stats=64 bytes read, 105 bytes written, 0 read
ops, 0 large read ops, 0 write ops expected:<22> but was:<10>
{code}
When I applied only TestLocalFileSystem part of the patch, 4 tests failed.
TestLocalFileSystem#testCRCwithClassicAPIs and
TestLocalFileSystem#testCRCwithCreate7 succeeded without the fix. I thought
these non-builder APIs are relevant to MAPREDUCE-7184 at first glance but not.
> FilterFileSystem doesn't wrap all create() or new builder calls; may skip CRC
> logic
> -----------------------------------------------------------------------------------
>
> Key: HADOOP-16107
> URL: https://issues.apache.org/jira/browse/HADOOP-16107
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 3.0.3, 3.3.0
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Blocker
> Attachments: HADOOP-16107-001.patch, HADOOP-16107-003.patch
>
>
> LocalFS is a subclass of filterFS, but overrides create and open so that
> checksums are created and read.
> MAPREDUCE-7184 has thrown up that the new builder openFile() call is being
> forwarded to the innerFS without CRC checking. Reviewing/fixing that has
> shown that some of the create methods aren't being correctly wrapped, so not
> generating CRCs
> * createFile() builder
> The following create calls
> {code}
> public FSDataOutputStream createNonRecursive(final Path f,
> final FsPermission permission,
> final EnumSet<CreateFlag> flags,
> final int bufferSize,
> final short replication,
> final long blockSize,
> final Progressable progress) throws IOException;
> public FSDataOutputStream create(final Path f,
> final FsPermission permission,
> final EnumSet<CreateFlag> flags,
> final int bufferSize,
> final short replication,
> final long blockSize,
> final Progressable progress,
> final Options.ChecksumOpt checksumOpt) throws IOException {
> return super.create(f, permission, flags, bufferSize, replication,
> blockSize, progress, checksumOpt);
> }
> {code}
> This means that applications using these methods, directly or indirectly to
> create files aren't actually generating checksums.
> Fix: implement these methods & relay to local create calls, not to the inner
> FS.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]