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


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/cache/CacheEngine.java:
##########
@@ -0,0 +1,319 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.io.hfile.cache;
+
+import java.util.Optional;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.io.hfile.BlockCacheKey;
+import org.apache.hadoop.hbase.io.hfile.BlockType;
+import org.apache.hadoop.hbase.io.hfile.CacheStats;
+import org.apache.hadoop.hbase.io.hfile.Cacheable;
+import org.apache.hadoop.hbase.io.hfile.HFileBlock;
+import org.apache.yetus.audience.InterfaceAudience;
+
+/**
+ * Storage abstraction for a concrete HBase block cache backend.
+ *
+ * <p>A {@code CacheEngine} represents the storage layer only. It is 
responsible for storing,
+ * retrieving, invalidating, and reporting statistics for cached blocks. It 
does not perform
+ * tier orchestration, admission control, placement decisions, or 
promotion/demotion across
+ * cache levels.</p>
+ *
+ * <p>This interface is intentionally aligned with the storage-oriented subset 
of the current
+ * {@code BlockCache} contract so that existing implementations such as 
LruBlockCache and
+ * BucketCache can be migrated incrementally with minimal behavioral risk.</p>
+ *
+ * <p>Responsibilities of a {@code CacheEngine} include:</p>
+ * <ul>
+ *   <li>block lookup</li>
+ *   <li>block insertion</li>
+ *   <li>targeted invalidation / eviction</li>
+ *   <li>capacity and occupancy reporting</li>
+ *   <li>engine-local statistics</li>
+ *   <li>optional implementation-specific fit/capability checks</li>
+ * </ul>
+ *
+ * <p>Non-responsibilities include:</p>
+ * <ul>
+ *   <li>L1/L2 topology orchestration</li>
+ *   <li>admission policy</li>
+ *   <li>tier placement decisions</li>
+ *   <li>promotion or demotion across tiers</li>
+ * </ul>
+ */
[email protected]
+public interface CacheEngine {

Review Comment:
   API will evolve for sure. We will see later if anything is missing. 



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