ramkrish86 commented on a change in pull request #868: HBASE-23296 Add 
CompositeBucketCache to support tiered BC
URL: https://github.com/apache/hbase/pull/868#discussion_r351415304
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheFactory.java
 ##########
 @@ -200,15 +209,39 @@ private static BlockCache 
createExternalBlockcache(Configuration c) {
 
   }
 
-  private static BucketCache createBucketCache(Configuration c) {
-    // Check for L2.  ioengine name must be non-null.
-    String bucketCacheIOEngineName = c.get(BUCKET_CACHE_IOENGINE_KEY, null);
+  private static BucketCache createBucketCache(Configuration c, CacheLevel 
level) {
+    // Check for ioengine name must be non-null.
+    String bucketCacheIOEngineName;
+    int writerThreads;
+    int writerQueueLen;
+    String persistentPath;
+    switch(level) {
+      case L1:
+        bucketCacheIOEngineName = c.get(CompositeBucketCache.IOENGINE_L1, 
null);
+        writerThreads = c.getInt(CompositeBucketCache.WRITER_THREADS_L1,
+            DEFAULT_BUCKET_CACHE_WRITER_THREADS);
+        writerQueueLen = c.getInt(CompositeBucketCache.WRITER_QUEUE_LENGTH_L1,
+            DEFAULT_BUCKET_CACHE_WRITER_QUEUE);
+        persistentPath = c.get(CompositeBucketCache.PERSISTENT_PATH_L1);
+        break;
+      case L2:
+      default:
 
 Review comment:
   We need to LOG that we are creating both L1 and L2 caches as bucket cache.

----------------------------------------------------------------
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

Reply via email to