-
Notifications
You must be signed in to change notification settings - Fork 505
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
HDDS-11367. Improve ozone balancing status command output #7139
base: master
Are you sure you want to change the base?
Conversation
f6f34c0
to
9f928d1
Compare
9f928d1
to
00ad471
Compare
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.
@juncevich can you please elaborate on what these points mean?
job task time consumption
iteration time consumption
It will help reviewers understand what you're proposing.
Hi, @siddhantsangwan. Sure, i can explain. Balancing job constists from some iterations. Job task time - the whole balancing time, iteration time - particular iteration time. Job time = iteration time + iteration time ... |
...ds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerBalancerStatusSubcommand.java
Outdated
Show resolved
Hide resolved
Hi siddhantsangwan. Can you review my PR? |
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.
@juncevich thanks for working on this. Other than my comments below, we definitely need more testing here. I'd like to at least see:
- Unit tests for balancer that verify the iteration duration and other properties are correct.
- Tests for the balancer status command that verify the code is correctly picking up the mocked values (mocked response from SCM).
We can also add verifications to the robot tests.
...hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java
Outdated
Show resolved
Hide resolved
...cm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerMetrics.java
Outdated
Show resolved
Hide resolved
...ds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerBalancerStatusSubcommand.java
Outdated
Show resolved
Hide resolved
"Scheduled to move containers", containerMovesScheduled, | ||
"Already moved containers", containerMovesCompleted, | ||
"Failed to move containers", containerMovesFailed, | ||
"Failed to move containers by timeout", containerMovesTimeout, | ||
"Entered data to nodes", enteringDataNodeList, | ||
"Exited data from nodes", leavingDataNodeList); | ||
} | ||
|
||
private String getPrettyIterationStatusInfo(long duration) { |
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.
There are probably existing utility methods to do this as well. See if you can find any? It's better to use them since they will be well tested.
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.
I didn't find utility methods. I will extract this method to separate util class and write test for it.
...r-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java
Show resolved
Hide resolved
...src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerStatusInfo.java
Outdated
Show resolved
Hide resolved
...cm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerMetrics.java
Outdated
Show resolved
Hide resolved
...cm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerMetrics.java
Outdated
Show resolved
Hide resolved
...cm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerMetrics.java
Outdated
Show resolved
Hide resolved
...cm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerMetrics.java
Outdated
Show resolved
Hide resolved
...cm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerMetrics.java
Show resolved
Hide resolved
.../org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTaskIterationStatusInfo.java
Show resolved
Hide resolved
...ds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerBalancerStatusSubcommand.java
Outdated
Show resolved
Hide resolved
...ds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerBalancerStatusSubcommand.java
Show resolved
Hide resolved
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/util/DurationUtil.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/util/DurationUtil.java
Outdated
Show resolved
Hide resolved
...cm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerMetrics.java
Outdated
Show resolved
Hide resolved
...cm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerMetrics.java
Outdated
Show resolved
Hide resolved
...cm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerMetrics.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerStatusInfo.java
Outdated
Show resolved
Hide resolved
...r-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java
Outdated
Show resolved
Hide resolved
.../org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTaskIterationStatusInfo.java
Outdated
Show resolved
Hide resolved
.../org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTaskIterationStatusInfo.java
Outdated
Show resolved
Hide resolved
.../org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTaskIterationStatusInfo.java
Outdated
Show resolved
Hide resolved
.../org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTaskIterationStatusInfo.java
Outdated
Show resolved
Hide resolved
.../org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTaskIterationStatusInfo.java
Outdated
Show resolved
Hide resolved
# Conflicts: # hadoop-ozone/dist/src/main/smoketest/balancer/testBalancer.robot
@juncevich please let me know when you've addressed comments and this is ready for another review. |
@siddhantsangwan I've not understood about comments, can you explain about? PR is ready for another review. |
@siddhantsangwan, can you take another look at this PR? |
...test/java/org/apache/hadoop/hdds/scm/container/balancer/TestContainerBalancerStatusInfo.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/tools/src/test/java/org/apache/hadoop/hdds/util/TestDurationUtil.java
Outdated
Show resolved
Hide resolved
@@ -40,6 +40,9 @@ public final class ContainerBalancerMetrics { | |||
" in the latest iteration.") | |||
private MutableCounterLong dataSizeMovedGBInLatestIteration; |
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.
Do we need this metric now? Or is it for backward compatibility?
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.
For backward compatibility.
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.
few minor comments
...s/src/test/java/org/apache/hadoop/hdds/scm/cli/datanode/TestContainerBalancerSubCommand.java
Outdated
Show resolved
Hide resolved
...s/src/test/java/org/apache/hadoop/hdds/scm/cli/datanode/TestContainerBalancerSubCommand.java
Outdated
Show resolved
Hide resolved
...s/src/test/java/org/apache/hadoop/hdds/scm/cli/datanode/TestContainerBalancerSubCommand.java
Outdated
Show resolved
Hide resolved
...r-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java
Show resolved
Hide resolved
it seems issues @siddhantsangwan mentioned have been addressed. @siddhantsangwan could you take look again, please? |
…tatisticsRequestInPeriodBetweenIterations
@juncevich if you've addressed all comments and fixed tests, I can start the CI workflow. |
Great, thanks! Just fixed the flaky test. Everything should be OK. |
...r-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java
Outdated
Show resolved
Hide resolved
...r-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java
Show resolved
Hide resolved
# Conflicts: # hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java
5d1932f
to
567b94f
Compare
@siddhantsangwan I've fixed your review notices. Could you look through the changed code? I have to fix the robot test and PR will be ready. |
dec8e06
to
4a40429
Compare
4a40429
to
2e60bf3
Compare
@siddhantsangwan robot test fixed. PR is ready for another review round. |
What changes were proposed in this pull request?
Minor improvements to command output:
What is the link to the Apache JIRA
HDDS-11367
How was this patch tested?
Tested by robot test