[
https://issues.apache.org/jira/browse/HDDS-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
LiXin Ge updated HDDS-448:
--------------------------
Status: Patch Available (was: Open)
Thanks [~ajayydv] for the reviewing.
{quote}NodeStateMap:getNodeStat Do we need the read lock, since it is
concurrentHashMap?
NodeStateMap: setNodeStat/removeNodeStat: Do we need lock here?
{quote}
There were two simple reason to add lock here at the beginning: 1.Keep format
consistent with the operation of {{stateMap}}. 2. There were two operations in
each function(containsKey, and the get/remove), a lock will ensure the logic
result of the two operations keeps the same.
But, to be honest, I prefer to get rid of the lock and simplify these
functions. Done in the 002 patch.
{quote}NodeStateManager:L425 Lets propagate back the NodeNotFoundException.
{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}SCMNodeManager:L313 Shall we move put operation to L298?
{quote}
Maybe move it to L315 is better? If move to L298, the {{nodeStats}} can't
updated based on the report information. Move it to L315 can guarantee the
update operation no matter what the values of
{{nodeReport.getStorageReportCount()}}.I move it to L315 in patch 002, please
check if it match your requirement.
All the other comments have been fixed in patch 002.
> 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]