-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-28742 Fixes NPE for CompactionTool when mslab enabled #6109
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
Conversation
💔 -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. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
516f124
to
3a3c203
Compare
🎊 +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. |
@@ -65,6 +79,7 @@ public void setUp() throws Exception { | |||
public void tearDown() throws Exception { | |||
this.testUtil.shutdownMiniCluster(); | |||
testUtil.cleanupTestDir(); | |||
ChunkCreator.instance = null; |
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.
Will this cause memory leak? And since we will always reset USEMSLAB_KEY to false, do we really need to do this?
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.
Setting it to null after shutdown of hbase cluster in test, so that it is not available for next test case in the file. Memory blocks of ChunkCreator should be collected by GC as cluster is shutdown.
testUtil.startMiniMapReduceCluster(); | ||
try { | ||
Configuration config = HBaseConfiguration.create(testUtil.getConfiguration()); | ||
config.setBoolean(MemStoreLAB.USEMSLAB_KEY, true); |
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 need to do this after parameterized?
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.
Parameterization is for Server Config. This config is for CompactionTool(Always passing true). Issue happens when mslab is true for Compactiontool. Need to do mslab as false for server, so that ChunkCreator is not created, Otherwise CompactionTool flow was using the Server ChunkCreator instance as test is running in same jvm instance.
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 do not get the point here...
We will run the test method twice with USEMSLAB_KEY as true and false, so we can cover the scenario where we pass USEMSLAB_KEY as true? If we only want it to be true, we should give this test method a separated test 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.
Base test is about functional verification of the feature. For this issue, we can add test cases to a new file. I can revert to test code which I have initially pushed. What is your opinion?
Initial push: New Test was deriving from TestCompactionTool and was verifying MapReduce and Non-MapReduce flow
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 you want to add a new testcase, then just introduce a new test class so we do not need to run the test method in parent class twice? This is my very first question...
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.
Test code update done. Please review...
3a3c203
to
e198e59
Compare
🎊 +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. |
Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Pankaj Kumar <pankajkumar@apache.org> (cherry picked from commit 17a68ae)
Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Pankaj Kumar <pankajkumar@apache.org> (cherry picked from commit 17a68ae)
No description provided.