-
Couldn't load subscription status.
- Fork 3.4k
HBASE-24687: Use existing HMaster Connection in MobFileCleanerChore #5509
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
HBASE-24687: Use existing HMaster Connection in MobFileCleanerChore #5509
Conversation
17a741d to
059fcc4
Compare
|
💔 -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.
Nice, that was easier than the original PR let on. I think you're going to need to update TestMobFileCleanerChore though. I expect pre-commit hooks will fail with an NPE since master is null when no-arg constructor is used (as in that test and a couple others). We probably should delete the no-arg constructor.
|
Also please fix checkstyle and spotless |
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCleanerChore.java
Show resolved
Hide resolved
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
Looking for a solution to cleanly support the various uses of MobFileCleanerChore in test code, I gave it a constructor that takes an Admin directly. |
|
🎊 +1 overall
This message was automatically generated. |
| } | ||
|
|
||
| public MobFileCleanerChore() { | ||
| public MobFileCleanerChore(Admin admin) { |
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.
Where do we use this method? I think a chore should only be executed at master side?
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.
Typically yes, but this class is also used by MobStressToolRunner and IntegrationTestMobCompaction, which are both effectively HBase clients.
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 guess these classes just want to run the cleanup method, instead of running a background task? Let me check the code...
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.
OK, checked the code, they both only call the cleanupObsoleteMobFiles method. I think we could introduce something like MobCleanupUtil, and put the cleanupObsoleteMobFiles and archiveMobFiles in it, where we need to change them to static methods, and then call them from the two classes, and also here, in MobFileCleanerChore. In this way we do not need to maintain this constructor then.
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
I'm not seeing any evidence that my changes have caused these build failures |
|
Yea, the last failure is unrelated. The other 2 look weird. I restarted the build. |
|
🎊 +1 overall
This message was automatically generated. |
|
@charlesconnell please fix the checkstyle warnings |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
| HTU.startMiniCluster(); | ||
| admin = HTU.getAdmin(); | ||
| chore = new MobFileCleanerChore(); | ||
| chore = new MobFileCleanerChore(HTU.getHBaseCluster().getMaster()); |
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 still use this chore anywhere in this test?
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.
Good point, we don't. I've removed this field and renamed the class TestMobFileCleanupUtil.
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +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.
LGTM. The test failure is unrelated.
Anything else on your end @Apache9?
…5509) Signed-off-by: Bryan Beaudreault <[email protected]> Signed-off-by: Duo Zhang <[email protected]>
…5509) Signed-off-by: Bryan Beaudreault <[email protected]> Signed-off-by: Duo Zhang <[email protected]>
…5509) Signed-off-by: Bryan Beaudreault <[email protected]> Signed-off-by: Duo Zhang <[email protected]>
…FileCleanerChore (apache#5509) Signed-off-by: Bryan Beaudreault <[email protected]> Signed-off-by: Duo Zhang <[email protected]>
This connection does not traverse netty and networking stuff, so is lighter weight and avoids confusing Netty with connections whose client side and server side are in the same EventLoopGroup. While the Netty thing is a larger issue, this small fix should be enough to prevent HMaster lockups.