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

Stephen O'Donnell updated HDDS-3079:
------------------------------------
    Description: 
The Ratis pipeline provider uses a class PipelinePlacementPolicy to selection 
datanodes for new pipelines in a rack aware fashion. This class also considers 
server load when selecting hosts and in the future, it may have more features.

However, SCMContainerPlacementPolicyRackAware implements very similar rack 
aware node choosing logic and is used by the replication manager.

Previous discussion indicated that we should not bring these two 
implementations into one, but it would be preferable to extract the common rack 
specific logic into a common parent in the inheritence chain.

Aright now all placement policies inherit from SCMCommonPlacementPolicy, so it 
would make sense to have a new abstract class that extends Common, called 
SCMCommonRackAwarePolicy, and have the others inherit from it.

Note that as part of this move, the rack specific logic in 
SCMCommonPlacementPolicy.validateContainerPlacement() should be extracted and 
moved into this common parent too.

  was:
The Ratis pipeline provider uses a class PipelinePlacementPolicy to selection 
datanodes for new pipelines in a rack aware fashion. This class also considers 
server load when selecting hosts and in the future, it may have more features.

However, SCMContainerPlacementPolicyRackAware implements very similar rack 
aware node choosing logic and is used by the replication manager.

It is possible these two implementations could diverge and it also means we 
have two places to make changes if there are any improvements made.

It would be worth investigating if at least the rack aware node choosing logic 
can be shared between these two classes, or even better the same class can be 
used for both.


> Extract Rack Specific code from Container and Pipeline placement policies 
> into a common parent
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDDS-3079
>                 URL: https://issues.apache.org/jira/browse/HDDS-3079
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>    Affects Versions: 0.6.0
>            Reporter: Stephen O'Donnell
>            Priority: Major
>
> The Ratis pipeline provider uses a class PipelinePlacementPolicy to selection 
> datanodes for new pipelines in a rack aware fashion. This class also 
> considers server load when selecting hosts and in the future, it may have 
> more features.
> However, SCMContainerPlacementPolicyRackAware implements very similar rack 
> aware node choosing logic and is used by the replication manager.
> Previous discussion indicated that we should not bring these two 
> implementations into one, but it would be preferable to extract the common 
> rack specific logic into a common parent in the inheritence chain.
> Aright now all placement policies inherit from SCMCommonPlacementPolicy, so 
> it would make sense to have a new abstract class that extends Common, called 
> SCMCommonRackAwarePolicy, and have the others inherit from it.
> Note that as part of this move, the rack specific logic in 
> SCMCommonPlacementPolicy.validateContainerPlacement() should be extracted and 
> moved into this common parent too.



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

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

Reply via email to