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

Ajay Kumar commented on HDDS-448:
---------------------------------

[~GeLiXin] thanks for updating the patch.
{quote}The interface of getNodeStat in NodeManager didn't throws an exception, 
it will results butterfly-effect if we throws the NodeNotFoundException: there 
will have many functions need to be modified. Since the callers of getNodeStat 
handles the null case well, can we let it stay the same or just another Jira if 
needed?{quote}

Seems NodeStateManager#getNodeStat is called from two places. 
SCMNodeManager#updateNodeStat handles the null case but it is not handled in 
SCMNodeManager#getNodeStat. Passing null to SCMNodeManager#getNodeStat will 
result in NPE in SCMCommonPolicy#hasEnoughSpace. I think we can avoid this by 
throwing NNFE from NodeStateManager#getNodeStat is it is new API, while keeping 
NodeManager#getNodeStat API unchanged. 
+1 with this handled.



> Move NodeStat to NodeStatemanager from SCMNodeManager.
> ------------------------------------------------------
>
>                 Key: HDDS-448
>                 URL: https://issues.apache.org/jira/browse/HDDS-448
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>            Reporter: LiXin Ge
>            Assignee: LiXin Ge
>            Priority: Major
>         Attachments: HDDS-448.000.patch, HDDS-448.001.patch, 
> HDDS-448.002.patch
>
>
> This issue try to make the SCMNodeManager clear and clean, as the stat 
> information should be kept by NodeStatemanager (NodeStateMap). It's also 
> described by [~nandakumar131] as something \{{TODO}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to