[
https://issues.apache.org/jira/browse/HDFS-14121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16719123#comment-16719123
]
Daniel Templeton commented on HDFS-14121:
-----------------------------------------
Thanks, [~zvenczel]. I agree with Kitti that the patch could be more verbose.
Specifically, it should be actionable. If we're going to issue a warning, it
should explain how to make it go away. Also, I'd rather have the warning
printed after we know whether using the old parser worked. If using the old
parser also fails, there's no reason to say we tried it.
> Log message about the old hosts file format is misleading
> ---------------------------------------------------------
>
> Key: HDFS-14121
> URL: https://issues.apache.org/jira/browse/HDFS-14121
> Project: Hadoop HDFS
> Issue Type: Improvement
> Affects Versions: 3.0.0
> Reporter: Daniel Templeton
> Assignee: Zsolt Venczel
> Priority: Major
> Attachments: HDFS-14121.01.patch
>
>
> In {{CombinedHostsFileReader.readFile()}} we have the following:
> {code} LOG.warn("{} has invalid JSON format." +
> "Try the old format without top-level token defined.",
> hostsFile);{code}
> That message is trying to say that we tried parsing the hosts file as a
> well-formed JSON file and failed, so we're going to try again assuming that
> it's in the old badly-formed format. What it actually says is that the hosts
> fie is bad, and the admin should try switching to the old format. Those are
> two very different things.
> While were in there, we should refactor the logging so that instead of
> reporting that we're going to try using a different parser (who the heck
> cares?), we report that the we had to use the old parser to successfully
> parse the hosts file.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]