VladRodionov commented on code in PR #8903:
URL: https://github.com/apache/hbase/pull/8903#discussion_r4745570685


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/cache/AdaptiveLruCachePlacementAdmissionPolicy.java:
##########
@@ -121,29 +119,32 @@ public 
AdaptiveLruCachePlacementAdmissionPolicy(Configuration conf) {
    * @param block        block to cache
    * @param context      cache write context
    * @param priority     admission priority
+   * @param tier         cache tier being evaluated for admission
    * @param topologyView read-only topology view
    * @return admission decision
    */
   @Override
   public AdmissionDecision shouldAdmit(BlockCacheKey cacheKey, Cacheable block,
-    CacheWriteContext context, AdmissionPriority priority, CacheTopologyView 
topologyView) {
+    CacheWriteContext context, AdmissionPriority priority, CacheTier tier,
+    CacheTopologyView topologyView) {
     Objects.requireNonNull(cacheKey, "cacheKey must not be null");
     Objects.requireNonNull(block, "block must not be null");
     Objects.requireNonNull(context, "context must not be null");
     Objects.requireNonNull(priority, "priority must not be null");
+    Objects.requireNonNull(tier, "tier must not be null");
     Objects.requireNonNull(topologyView, "topologyView must not be null");
 
     AdmissionDecision decision =
-      DELEGATE.shouldAdmit(cacheKey, block, context, priority, topologyView);
+      DELEGATE.shouldAdmit(cacheKey, block, context, priority, tier, 
topologyView);
     if (!decision.isAdmitted()) {
       return decision;
     }
 
     if (
-      topologyView.getType() == CacheTopologyType.SINGLE_TIER
+      (tier == CacheTier.SINGLE || tier == CacheTier.L1)

Review Comment:
   L1 means a first tier in a multi-level tier cache (currently we support only 
L1/L2)



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to