[
https://issues.apache.org/jira/browse/HDFS-14537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16855850#comment-16855850
]
Erik Krogen commented on HDFS-14537:
------------------------------------
Thanks for the ping [~brahmareddy]! Instead of using a redundant local
variable, can we just:
{code}
if (conf.getBoolean(DFSConfigKeys.DFS_HA_TAILEDITS_INPROGRESS_KEY,
DFSConfigKeys.DFS_HA_TAILEDITS_INPROGRESS_DEFAULT)) {
return new JournaledEditsCache(conf);
} else {
return null;
}
{code}
Other than that and method visibility as Brahma mentioned, LGTM, good catch
folks!
> Journaled Edits Cache is not cleared when formatting the JN
> -----------------------------------------------------------
>
> Key: HDFS-14537
> URL: https://issues.apache.org/jira/browse/HDFS-14537
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Ranith Sardar
> Assignee: Ranith Sardar
> Priority: Major
> Attachments: HDFS-14537.001.patch
>
>
> {code:java}
> private final JournaledEditsCache cache;
> {code}
> When formatting the journal node, not clearing the cache value.
> {code:java}
> void format(NamespaceInfo nsInfo, boolean force) throws IOException {
> Preconditions.checkState(nsInfo.getNamespaceID() != 0,
> "can't format with uninitialized namespace info: %s",
> nsInfo);
> LOG.info("Formatting journal id : " + journalId + " with namespace info:
> " +
> nsInfo + " and force: " + force);
> storage.format(nsInfo, force);
> refreshCachedData();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]