VladRodionov commented on code in PR #8801:
URL: https://github.com/apache/hbase/pull/8801#discussion_r4405316962
##########
hbase-server/src/main/resources/hbase-webapps/regionserver/blockCacheView.jsp:
##########
@@ -19,44 +19,68 @@
--%>
<%@ page contentType="text/html;charset=UTF-8"
import="java.util.*"
- import="org.apache.hadoop.hbase.io.hfile.BlockCache"
import="org.apache.hadoop.conf.Configuration"
import="org.apache.hadoop.hbase.io.hfile.BlockCacheUtil"
import="org.apache.hadoop.hbase.io.hfile.CachedBlock"
+ import="org.apache.hadoop.hbase.io.hfile.cache.CacheAccessService"
+ import="org.apache.hadoop.hbase.io.hfile.cache.CacheEngine"
+ import="org.apache.hadoop.hbase.io.hfile.cache.CacheTier"
+ import="org.apache.hadoop.hbase.io.hfile.cache.CacheTopology"
+ import="org.apache.hadoop.hbase.io.hfile.cache.CacheTopologyType"
+
import="org.apache.hadoop.hbase.io.hfile.cache.TopologyBackedCacheAccessService"
import="org.apache.hadoop.hbase.regionserver.http.RSStatusConstants"
%><%
- // This template is used to give views on an individual block cache as JSON.
+ // This template is used to give views on an individual cache tier as JSON.
Configuration conf = (Configuration) request.getAttribute("conf");
String bcn = (String)
request.getAttribute(RSStatusConstants.BLOCK_CACHE_NAME);
String bcv = (String) request.getAttribute(RSStatusConstants.BLOCK_CACHE_V);
- BlockCache bc = (BlockCache) request.getAttribute("blockCache");
+ CacheAccessService cacheAccessService =
+ (CacheAccessService) request.getAttribute("blockCache");
- BlockCache [] bcs = bc == null ? null : bc.getBlockCaches();
+ if (!(cacheAccessService instanceof TopologyBackedCacheAccessService)) {
+ System.out.println("There is no topology-backed block cache");
+ return;
+ }
Review Comment:
Fixed.
--
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]