virajjasani commented on a change in pull request #333: [HBASE-22606] :
BucketCache additional tests
URL: https://github.com/apache/hbase/pull/333#discussion_r300155029
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
##########
@@ -258,17 +257,52 @@ public void testRetrieveFromFile() throws Exception {
HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
Path testDir = TEST_UTIL.getDataTestDir();
TEST_UTIL.getTestFileSystem().mkdirs(testDir);
-
String ioEngineName = "file:" + testDir + "/bucket.cache";
+ testRetrievalUtils(testDir, ioEngineName);
+ int[] smallBucketSizes = new int[]{3 * 1024, 5 * 1024};
String persistencePath = testDir + "/bucket.persistence";
+ BucketCache bucketCache = new BucketCache(ioEngineName, capacitySize,
constructedBlockSize,
+ smallBucketSizes, writeThreads, writerQLen, persistencePath);
+ assertFalse(new File(persistencePath).exists());
+ assertEquals(0, bucketCache.getAllocator().getUsedSize());
+ assertEquals(0, bucketCache.backingMap.size());
+ TEST_UTIL.cleanupTestDir();
+ }
+ @Test
+ public void testRetrieveFromMMap() throws Exception {
+ HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services