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

Chris Nauroth updated HDFS-7382:
--------------------------------
    Attachment: HDFS-7382.2.patch

Thank you for the code reviews, Nicholas and Yongjun.

Yongjun, I'm uploading patch v2 with the log message fixed like you suggested.  
Nice catch!  I'm going to commit this version based on the prior +1 from 
Nicholas, and this new version is only changing a string literal in a log 
message.

You're right that there are a few different places checking for a port number < 
1024.  We might benefit from a shared {{isPrivilegedPort}} method somewhere.  
One interesting aspect is that Windows has no concept of privileged ports, so 
perhaps this method would return false always on Windows.  I won't address it 
here, but I do encourage you to file a jira for that chnage.

bq. -1 tests included. The patch doesn't appear to include any new or modified 
tests.

This turned up in internal system testing that involved restart DataNodes while 
running jobs.  It would be very difficult to put this into a predictable test.

The failure in {{TestWebHDFSForHA}} looks unrelated.  The test passed locally.

> DataNode in secure mode may throw NullPointerException if client connects 
> before DataNode registers itself with NameNode.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-7382
>                 URL: https://issues.apache.org/jira/browse/HDFS-7382
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode, security
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>            Priority: Minor
>         Attachments: HDFS-7382.1.patch, HDFS-7382.2.patch
>
>
> {{SaslDataTransferServer#receive}} needs to check if the DataNode is 
> listening on a privileged port.  It does this by checking the address from 
> the {{DatanodeID}}.  However, there is a window of time when this will be 
> {{null}}.  If a client is still holding a {{LocatedBlock}} that references 
> that DataNode and chooses to connect, then there is a risk of getting a 
> {{NullPointerException}}.



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

Reply via email to