@@ -141,7 +141,8 @@ private void doTestEvictOnClose(String table, boolean evictOnClose,
141
141
}
142
142
}
143
143
144
- private void createTable (TableName tableName , boolean shouldFlushTable ) throws IOException , InterruptedException {
144
+ private void createTable (TableName tableName , boolean shouldFlushTable )
145
+ throws IOException , InterruptedException {
145
146
byte [] family = Bytes .toBytes ("CF" );
146
147
TableDescriptor td = TableDescriptorBuilder .newBuilder (tableName )
147
148
.setColumnFamily (ColumnFamilyDescriptorBuilder .of (family )).build ();
@@ -199,17 +200,17 @@ public void testCacheWithFlush() throws Exception {
199
200
200
201
private void checkRegionCached (TableName tableName , boolean isCached ) throws IOException {
201
202
UTIL .getMiniHBaseCluster ().getRegions (tableName ).forEach (r -> {
202
- try {
203
- UTIL .getMiniHBaseCluster ().getClusterMetrics ().getLiveServerMetrics ().forEach ((sn , sm ) -> {
204
- for (Map .Entry <byte [], RegionMetrics > rm : sm .getRegionMetrics ().entrySet ()) {
205
- if (rm .getValue ().getNameAsString ().equals (r .getRegionInfo ().getRegionNameAsString ())) {
206
- assertTrue (isCached == (rm .getValue ().getCurrentRegionCachedRatio () > 0.0f ));
207
- }
203
+ try {
204
+ UTIL .getMiniHBaseCluster ().getClusterMetrics ().getLiveServerMetrics ().forEach ((sn , sm ) -> {
205
+ for (Map .Entry <byte [], RegionMetrics > rm : sm .getRegionMetrics ().entrySet ()) {
206
+ if (rm .getValue ().getNameAsString ().equals (r .getRegionInfo ().getRegionNameAsString ())) {
207
+ assertTrue (isCached == (rm .getValue ().getCurrentRegionCachedRatio () > 0.0f ));
208
208
}
209
- });
210
- } catch (IOException e ) {
211
- throw new RuntimeException (e );
212
- }
209
+ }
210
+ });
211
+ } catch (IOException e ) {
212
+ throw new RuntimeException (e );
213
+ }
213
214
});
214
215
}
215
216
}
0 commit comments