[ 
https://issues.apache.org/jira/browse/HADOOP-13157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mike Yoder updated HADOOP-13157:
--------------------------------
    Status: Patch Available  (was: Open)

{quote}
File 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/JavaKeyStoreProvider.java:
Line 147:
Could this be a static helper?
{quote}
Changed. Now the env var and filename are passed in.

{quote}
Line 161: new
The javadoc says it returns null in this situation. This is also a difference 
from the implementation in the AbstractJKSP. Intentional?
{quote}
This line came in as a part of 
https://issues.apache.org/jira/browse/HADOOP-10224. With that work, the 
JavaKeyStoreProvider was given a more sophisticated old/new corruption 
prevention dance that the AbstractJKSP lacks. I'd lean towards leaving it alone 
and using this version for both.

{quote}
Line 175: private void locateKeystore() throws IOException {
static helper? for the construct*Path methods too?
{quote}
locateKeystore hits a bunch of member variables: password, path, keyStore, fs, 
permissions... so please no. construct*Path() - sure, changed.

{quote}
File 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java:
Line 50: @VisibleForTesting public static final String NO_VALID_PROVIDERS =
FYI for the future, our coding style is to put annotations on their own 
separate line.
File 
{quote}
Done. Can this rule be added to the checkstyle rules?

{quote}
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/AbstractJavaKeyStoreProvider.java:
Line 326: private char[] locatePassword() throws IOException {
this method looks very similar to the one in JavaKeyStoreProvider, except the 
env var it looks for is different, is there potential for code reuse?
{quote}
Yes. Moved to ProviderUtils along with some other stuff.

{quote}
Line 394: " o In the environment variable " +
Using a "*" is the usual way of doing a bullet point, e.g. markdown and wiki 
syntax.
{quote}
Fixed, both here and JavaKeyStoreProvider

{quote}
Line 399: "http://hadoop.apache.org/docs/current/hadoop-project-dist/"; +
This link is not tied to a version, so could be inaccurate.
{quote}
Made generic without link.


> Follow-on improvements to HADOOP-12942
> --------------------------------------
>
>                 Key: HADOOP-13157
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13157
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.8.0
>            Reporter: Mike Yoder
>            Assignee: Mike Yoder
>         Attachments: HADOOP-13157.001.patch
>
>
> [~andrew.wang] had some follow-up code review comments from HADOOP-12942. 
> Hence this issue.
> Ping [~lmccay] as well.  
> The comments:
> {quote}
> Overall this looks okay, the only correctness question I have is about the 
> difference in behavior when the pwfile doesn't exist.
> The rest are all nits, would be nice to do these cleanups though.
> File 
> hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/JavaKeyStoreProvider.java:
> Line 147:
> Could this be a static helper?
> Line 161: new
> The javadoc says it returns null in this situation. This is also a difference 
> from the implementation in the AbstractJKSP. Intentional?
> Line 175:   private void locateKeystore() throws IOException {
> static helper? for the construct*Path methods too?
> File 
> hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java:
> Line 50:   @VisibleForTesting public static final String NO_VALID_PROVIDERS =
> FYI for the future, our coding style is to put annotations on their own 
> separate line.
> File 
> hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/AbstractJavaKeyStoreProvider.java:
> Line 326:   private char[] locatePassword() throws IOException {
> this method looks very similar to the one in JavaKeyStoreProvider, except the 
> env var it looks for is different, is there potential for code reuse?
> Line 394:           "    o In the environment variable " +
> Using a "*" is the usual way of doing a bullet point, e.g. markdown and wiki 
> syntax.
> Line 399:           
> "http://hadoop.apache.org/docs/current/hadoop-project-dist/"; +
> This link is not tied to a version, so could be inaccurate.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to