-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[HBASE-22606] : BucketCache additional tests #333
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
@wchevreuil Please review. Due to build issue, had to close #324 and create a new PR. Apologies for the same as I could not get why the build was giving -1 for patch even though the branch was already rebased with master. |
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.
A few comments. Thank you for adding some nice new tests.
@@ -136,7 +135,7 @@ public void cacheBlock(BlockCacheKey cacheKey, Cacheable buf) { | |||
@Before | |||
public void setup() throws IOException { | |||
cache = new MockedBucketCache(ioEngineName, capacitySize, constructedBlockSize, | |||
constructedBlockSizes, writeThreads, writerQLen, persistencePath); |
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 make persistencePath 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.
Since persistencePath was defined as null and was not getting updated in the file ever after, I thought of removing the declaration and directly putting null
|
||
@Test | ||
public void testRetrieveFromMMap() throws Exception { | ||
HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); |
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 get a new HBaseTestingUtility per test? If so, why not in the test setup rather than at head of each test?
Also CAPITALIZATION of variables is for statics, not locals as here.
Make a data member named testUtil and create the HTU instance in the @before ?
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
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
Outdated
Show resolved
Hide resolved
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
Outdated
Show resolved
Hide resolved
@saintstack Thanks for the review. Updated the PR. Please review |
🎊 +1 overall
This message was automatically generated. |
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
Outdated
Show resolved
Hide resolved
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.
Apart from what stack mentioned, I have left few minor nits. Also what do you think of :
- Testing unsupported IOEngines as well (i.e. other then file/files, offheap, mmap, pmem)?
- Testing more than one backing file? (using files:name1,name2 )?
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
Show resolved
Hide resolved
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
Outdated
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
@jatsakthi Thanks for your review. Updated the PR addressing all comments. Please take a look. Also, additional test for above mentioned scenarios are added: |
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
Show resolved
Hide resolved
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.
One more suggestion.
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@jatsakthi @busbey build is failing every time with some InterruptedIOException. Every time different test cases fail with IOE. How should we usually deal with it? |
@virajjasani usually the best way is to check if the tests are present in the upstream flakey list. If yes, then we can usually bypass this. Else, you can run the failing tests locally to check if they ought to pass. Thirdly, if it's almost guaranteed that the test failure is unrelated to the changes proposed, in that case, we can ignore the tests failures. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Thanks @jatsakthi |
@wchevreuil @saintstack Please let me know if this looks good to you |
Please review @saintstack @wchevreuil |
lgtm +1 on the latest commits. @jatsakthi @saintstack let me know if you guys have any other remarks, if not, I can squash the commits and merge the PR into master with your "signedoffs". |
Please review @saintstack |
The changes look good to me @wchevreuil |
Could you please take a look on this once @saintstack |
No description provided.