hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry McCay (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10224) JavaKeyStoreProvider has to protect against corrupting underlying store
Date Thu, 07 Aug 2014 13:50:16 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-10224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089228#comment-14089228
] 

Larry McCay commented on HADOOP-10224:
--------------------------------------

Hi [~asuresh] - 

Sorry for taking longer than I anticipated to review this.
I understood what you were doing with the methods but something doesn't feel quite right about
how similar they actually are. There are a couple things that I think would make it easier
to understand:

* javadocs on those private methods that really explain what is being done
* the tryLoadFromPath takes a path argument but is being passed the oldPath which seems wrong
from where it is being called. You have to read the method to understand that it is being
passed to clean up or to fallback to. Either pass both paths as arguments, make them all member
variables or somehow change the name of the method to make it more clear that it is the right
argument to pass.
* inside flush - I think you could extract a couple methods like backupOld, restoreOld or
something to that effect. We are basically implementing a common pattern of backup, write-new
and swap the current to new or old versions. We should be able to code to methods that are
representing that pattern clearly.

Functionally, it all seems to hold together to me.
Given sufficient javadocs and maybe some new methods and names - I think it will be ready
to go.

Thanks!

> JavaKeyStoreProvider has to protect against corrupting underlying store
> -----------------------------------------------------------------------
>
>                 Key: HADOOP-10224
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10224
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>            Reporter: Larry McCay
>            Assignee: Arun Suresh
>         Attachments: HADOOP-10224.1.patch, HADOOP-10224.2.patch, HADOOP-10224.3.patch,
HADOOP-10224.4.patch, HADOOP-10224.5.patch, HADOOP-10224.6.patch, HADOOP-10224.7.patch, HADOOP-10224.8.patch
>
>
> Java keystores get corrupted at times. A key management operation that writes the store
to disk could cause a corruption and all protected data would then be unaccessible.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message