[
https://issues.apache.org/jira/browse/HDFS-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13600436#comment-13600436
]
Todd Lipcon commented on HDFS-4538:
-----------------------------------
Looks mostly good. A few things:
+ LOG.info("Using legacy short-circuit local reads.");
This should be DEBUG level to avoid spew.
{code}
+ public boolean useLegacyBlockReaderLocal() {
+ return useLegacyBlockReaderLocal;
+ }
{code}
Rename to {{shouldUseLegacyBlockReaderLocal}}
{code}
+ /**
+ * Get {@link BlockReader} for short circuited local reads.
+ */
+ static BlockReader getLegacyBlockReaderLocal(Configuration conf,
{code}
Amend the javadoc a bit so that it references what "legacy" means in this
context, perhaps with a reference to HDFS-2246.
{code}
+class BlockReaderLocalLegacy implements BlockReader {
{code}
Same here, can you add a note something like:
{quote}
This is the legacy implementation based on HDFS-2246, which requires
permissions on the datanode to be set so that clients can directly access the
blocks. The new implementation based on HDFS-347 should be preferred on Linux
systems where the required native code has been implemented.
{quote}
This will make it easier for new folks to follow the code.
{code}
+ // If the legacy block reader is enabled and we are reading a local block,
+ // try to create a legacy BlockReaderLocal.
{code}
Amend this comment to say "legacy local block reader" or something -- we also
have the concept of the legacy RemoteBlockReader which is a separate config.
----
I'm confused by the test case... it's a replica of the old
TestBlockReaderLocal, but it doesn't seem to verify that the local block reader
path was actually used.
Were you able to test this in a real cluster as well? (eg running a new client
with the legacy path turned on against an old server?)
> allow use of legacy blockreader
> -------------------------------
>
> Key: HDFS-4538
> URL: https://issues.apache.org/jira/browse/HDFS-4538
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: datanode, hdfs-client, performance
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HDFS-4538.001.patch
>
>
> Some users might want to use the legacy block reader, because it is available
> on Windows, whereas the secure solution has not yet been implemented there.
> As described in the mailing list discussion, let's enable this.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira