You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The AvailableSpaceBlockPlacementPolicy has made some optimizations such as HDFS-14578 can have local node optimization and HDFS-17210 can avoid choosing nodes with higher storage, the AvailableSpaceRackFaultTolerantBlockPlacementPolicy need keep same logics of optimization same as ASBPP.
Currently considering implementing a public class, such as AvailableSpaceBlockPlacementPolicyUtils, and abstract some public methods such as chooseLocalStorage, swapStorageTypes, select, compareDataNode, the AvailableSpaceBlockPlacementPolicy and AvailableSpaceRackFaultTolerantBlockPlacementPolicy can call related methods in AvailableSpaceBlockPlacementPolicyUtils. If there are related optimizations later, they can be modified based on AvailableSpaceBlockPlacementPolicyUtils.
Improve some doc descriptions and configuration parameters
haiyang1987
changed the title
HDFS-17247. Improve AvailableSpaceRackFaultTolerantBlockPlacementPoli…
HDFS-17247. Improve AvailableSpaceRackFaultTolerantBlockPlacementPolicy logic
Nov 2, 2023
The implementation logic in both the AvailableSpaceBlockPlacementPolicy and AvailableSpaceRackFaultTolerantBlockPlacementPolicy is essentially identical.
therefore, a public class called AvailableSpaceBlockPlacementPolicyUtils has been created.
this enables any potential future optimizations to be made to AvailableSpaceBlockPlacementPolicyUtils, allowing for easy modifications to both policies.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
https://issues.apache.org/jira/browse/HDFS-17247
The AvailableSpaceBlockPlacementPolicy has made some optimizations such as HDFS-14578 can have local node optimization and HDFS-17210 can avoid choosing nodes with higher storage, the AvailableSpaceRackFaultTolerantBlockPlacementPolicy need keep same logics of optimization same as ASBPP.
Currently considering implementing a public class, such as AvailableSpaceBlockPlacementPolicyUtils, and abstract some public methods such as
chooseLocalStorage, swapStorageTypes, select, compareDataNode
, the AvailableSpaceBlockPlacementPolicy and AvailableSpaceRackFaultTolerantBlockPlacementPolicy can call related methods in AvailableSpaceBlockPlacementPolicyUtils. If there are related optimizations later, they can be modified based on AvailableSpaceBlockPlacementPolicyUtils.Improve some doc descriptions and configuration parameters