-
Notifications
You must be signed in to change notification settings - Fork 619
HDDS-12413. Move field declarations to start of class in hdds-container-service #7968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a423b2d
HDDS-12413. Make hdds-container-service compliant with FieldDeclarati…
ivanzlenko 3b9bfc0
Merge branch 'master' into HDDS-12413
ivanzlenko bcd8df0
HDDS-12413. Fix some missing line breaks
ivanzlenko c3d88fe
Merge branch 'master' into HDDS-12413
ivanzlenko 433de27
HDDS-12413. Revert some formatting changes
ivanzlenko 2bcbd0f
HDDS-12413. Fix comments
ivanzlenko c1db7b9
HDDS-12413. Revert changes to validate
ivanzlenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -277,24 +277,7 @@ public class DatanodeConfiguration extends ReconfigurableConfig { | |
| description = "Timeout for the thread used to process the delete" + | ||
| " block command to wait for the container lock." | ||
| ) | ||
| private long blockDeleteMaxLockWaitTimeoutMs = | ||
| Duration.ofMillis(100).toMillis(); | ||
|
|
||
| public Duration getBlockDeletionInterval() { | ||
| return blockDeletionInterval; | ||
| } | ||
|
|
||
| public void setRecoveringContainerScrubInterval(Duration duration) { | ||
| recoveringContainerScrubInterval = duration; | ||
| } | ||
|
|
||
| public Duration getRecoveringContainerScrubInterval() { | ||
| return recoveringContainerScrubInterval; | ||
| } | ||
|
|
||
| public void setBlockDeletionInterval(Duration duration) { | ||
| blockDeletionInterval = duration; | ||
| } | ||
| private long blockDeleteMaxLockWaitTimeoutMs = Duration.ofMillis(100).toMillis(); | ||
|
|
||
| @Config(key = "block.deleting.limit.per.interval", | ||
| defaultValue = "5000", | ||
|
|
@@ -306,10 +289,6 @@ public void setBlockDeletionInterval(Duration duration) { | |
| ) | ||
| private int blockLimitPerInterval = 5000; | ||
|
|
||
| public int getBlockDeletionLimit() { | ||
| return blockLimitPerInterval; | ||
| } | ||
|
|
||
| @Config(key = "block.deleting.max.lock.holding.time", | ||
| defaultValue = "1s", | ||
| type = ConfigType.TIME, | ||
|
|
@@ -323,20 +302,7 @@ public int getBlockDeletionLimit() { | |
| + "which means the actual execution time may exceed this limit. " | ||
| + "Unit could be defined with postfix (ns,ms,s,m,h,d). " | ||
| ) | ||
| private long blockDeletingMaxLockHoldingTime = | ||
| Duration.ofSeconds(1).toMillis(); | ||
|
|
||
| public Duration getBlockDeletingMaxLockHoldingTime() { | ||
| return Duration.ofMillis(blockDeletingMaxLockHoldingTime); | ||
| } | ||
|
|
||
| public void setBlockDeletingMaxLockHoldingTime(Duration maxLockHoldingTime) { | ||
| blockDeletingMaxLockHoldingTime = maxLockHoldingTime.toMillis(); | ||
| } | ||
|
|
||
| public void setBlockDeletionLimit(int limit) { | ||
| this.blockLimitPerInterval = limit; | ||
| } | ||
| private long blockDeletingMaxLockHoldingTime = Duration.ofSeconds(1).toMillis(); | ||
|
|
||
| @Config(key = "hdds.datanode.volume.min.free.space", | ||
| defaultValue = "-1", | ||
|
|
@@ -484,14 +450,6 @@ public void setBlockDeletionLimit(int limit) { | |
|
|
||
| private boolean waitOnAllFollowers = WAIT_ON_ALL_FOLLOWERS_DEFAULT; | ||
|
|
||
| public boolean waitOnAllFollowers() { | ||
| return waitOnAllFollowers; | ||
| } | ||
|
|
||
| public void setWaitOnAllFollowers(boolean val) { | ||
| this.waitOnAllFollowers = val; | ||
| } | ||
|
|
||
| @Config(key = "container.schema.v3.enabled", | ||
| defaultValue = "true", | ||
| type = ConfigType.BOOLEAN, | ||
|
|
@@ -627,10 +585,50 @@ public void setWaitOnAllFollowers(boolean val) { | |
| ) | ||
| private long deleteContainerTimeoutMs = Duration.ofSeconds(60).toMillis(); | ||
|
|
||
| public Duration getBlockDeletionInterval() { | ||
| return blockDeletionInterval; | ||
| } | ||
|
|
||
| public void setRecoveringContainerScrubInterval(Duration duration) { | ||
| recoveringContainerScrubInterval = duration; | ||
| } | ||
|
|
||
| public Duration getRecoveringContainerScrubInterval() { | ||
| return recoveringContainerScrubInterval; | ||
| } | ||
|
|
||
| public void setBlockDeletionInterval(Duration duration) { | ||
| blockDeletionInterval = duration; | ||
| } | ||
|
|
||
| public int getBlockDeletionLimit() { | ||
| return blockLimitPerInterval; | ||
| } | ||
|
|
||
| public long getDeleteContainerTimeoutMs() { | ||
| return deleteContainerTimeoutMs; | ||
| } | ||
|
|
||
| public Duration getBlockDeletingMaxLockHoldingTime() { | ||
| return Duration.ofMillis(blockDeletingMaxLockHoldingTime); | ||
| } | ||
|
|
||
| public void setBlockDeletingMaxLockHoldingTime(Duration maxLockHoldingTime) { | ||
| blockDeletingMaxLockHoldingTime = maxLockHoldingTime.toMillis(); | ||
| } | ||
|
|
||
| public boolean waitOnAllFollowers() { | ||
| return waitOnAllFollowers; | ||
| } | ||
|
|
||
| public void setWaitOnAllFollowers(boolean val) { | ||
| this.waitOnAllFollowers = val; | ||
| } | ||
|
|
||
| public void setBlockDeletionLimit(int limit) { | ||
| this.blockLimitPerInterval = limit; | ||
| } | ||
|
|
||
| @PostConstruct | ||
| public void validate() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we defer improvements in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, was overoptimistic with chages. Reverted |
||
| if (containerDeleteThreads < 1) { | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are already moving these, how about putting
get/setpairs next to each other, in consistent order?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done