-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-17641. Add badly distributed blocks metric #7123
base: trunk
Are you sure you want to change the base?
HDFS-17641. Add badly distributed blocks metric #7123
Conversation
💔 -1 overall
This message was automatically generated. |
// insert a block with too many replicas to make badly distributed | ||
assertAdded(queues, block_badly_distributed, 2, 0, 1); |
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.
Why does a block having too many replicas make it badly distributed? Wouldn't that just make the block overreplicated which we have existing metrics for?
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.
That is true, however I think it might be the way to test it as in the BlockQueue level it is the only type which has more replicas than required.
From discussion, thoughts are that the impl is assuming nothing calls getPriority to begin with unless it needs replication, and if it has sufficient replicas then that must be because it's badly distributed.
💔 -1 overall
This message was automatically generated. |
|
||
@Metric({"BadlyDistBlocks", "Number of Badly Distributed Blocks"}) | ||
public long getBadlyDistributedBlocksCount() { | ||
// not locking | ||
return blockManager.getBadlyDistributedBlocksCount(); | ||
} |
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.
This metric looks like a duplicate of below. Is that intentional?
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 think both are needed since the BlockManager gets the count, BadlyDistBlocks exposes metric for Metrics2 and theres also BadlyDistributedBlocks metric for MBean
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.
Also getBadlyDistributedBlocksCount is not locking while getBadlyDistributedBlocks isnt
public long getBadlyDistributedBlocksCount() { | ||
// not locking | ||
return this.neededReconstruction.getBadlyDistributedBlocks(); | ||
} | ||
|
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.
Looks redundant with getBadlyDistributedBlocks()
?
* Return total number of erasure coded block groups. | ||
* @return total number of erasure coded block groups. |
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.
Nit - this is the only change in this file and all the methods above have the old syntax too. Maybe we should scope this for a different PR to keep the diff clean (and address the entire class)
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.
If I don't include this javadoc fails. However even when I do include this a different javadoc fails for essentially same issue. Should I chase down all the issues or leave it be?
...ject/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ECBlockGroupStats.java
Outdated
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
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.
@PrateekSane please see the build failures in the latest yetus run. The patch failed to apply (https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7123/4/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt) and had some checkstyle issues. Please address such that we get a clean run.
Looks like the issue for the build is:
src/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/NamenodeBeanMetrics.java:[387,3] method does not override or implement a method from a supertype
Thank you!
Description of PR
Add metric BadlyDistrbutedBlocks to the list of metrics which tracks the number of badly distributed blocks in the queue.
How was this patch tested?
Add Badly distributed blocks to TestLowRedundancy blocks to ensure properly tracked.
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?