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

ASF GitHub Bot updated HDDS-2671:
---------------------------------
    Labels: pull-request-available  (was: )

> Have NodeManager.getNodeStatus throw NodeNotFoundException
> ----------------------------------------------------------
>
>                 Key: HDDS-2671
>                 URL: https://issues.apache.org/jira/browse/HDDS-2671
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>          Components: SCM
>    Affects Versions: 0.5.0
>            Reporter: Stephen O'Donnell
>            Assignee: Stephen O'Donnell
>            Priority: Major
>              Labels: pull-request-available
>
> Currently, the SCM node manager method getNodeStatus catches any 
> NodeNotFoundException and returns null.
> {code}
>   /**
>    * Returns the node status of a specific node.
>    *
>    * @param datanodeDetails Datanode Details
>    * @return NodeStatus for the node
>    */
>   @Override
>   public NodeStatus getNodeStatus(DatanodeDetails datanodeDetails) {
>     try {
>       return nodeStateManager.getNodeStatus(datanodeDetails);
>     } catch (NodeNotFoundException e) {
>       // TODO: should we throw NodeNotFoundException?
>       return null;
>     }
>   }
> {code}
> This should probably throw the exception to ensure downstream code does not 
> need to perform a null check each time it is called.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to