001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.apache.hadoop.hbase.master; 019 020import java.io.IOException; 021import java.net.InetSocketAddress; 022import java.util.ArrayList; 023import java.util.Collection; 024import java.util.Collections; 025import java.util.HashMap; 026import java.util.List; 027import java.util.Map; 028import java.util.Map.Entry; 029import java.util.Optional; 030import java.util.TreeMap; 031import java.util.concurrent.ConcurrentSkipListMap; 032import java.util.concurrent.ThreadLocalRandom; 033import org.apache.hadoop.conf.Configuration; 034import org.apache.hadoop.fs.FileSystem; 035import org.apache.hadoop.hbase.Abortable; 036import org.apache.hadoop.hbase.CellScannable; 037import org.apache.hadoop.hbase.CellUtil; 038import org.apache.hadoop.hbase.ChoreService; 039import org.apache.hadoop.hbase.CoordinatedStateManager; 040import org.apache.hadoop.hbase.ServerName; 041import org.apache.hadoop.hbase.TableDescriptors; 042import org.apache.hadoop.hbase.TableName; 043import org.apache.hadoop.hbase.ZooKeeperConnectionException; 044import org.apache.hadoop.hbase.client.ClusterConnection; 045import org.apache.hadoop.hbase.client.Connection; 046import org.apache.hadoop.hbase.client.RegionInfo; 047import org.apache.hadoop.hbase.client.RegionInfoBuilder; 048import org.apache.hadoop.hbase.client.Result; 049import org.apache.hadoop.hbase.client.Scan; 050import org.apache.hadoop.hbase.client.locking.EntityLock; 051import org.apache.hadoop.hbase.executor.ExecutorService; 052import org.apache.hadoop.hbase.io.hfile.BlockCache; 053import org.apache.hadoop.hbase.ipc.HBaseRpcController; 054import org.apache.hadoop.hbase.ipc.RpcServerInterface; 055import org.apache.hadoop.hbase.mob.MobFileCache; 056import org.apache.hadoop.hbase.quotas.RegionServerRpcQuotaManager; 057import org.apache.hadoop.hbase.quotas.RegionServerSpaceQuotaManager; 058import org.apache.hadoop.hbase.quotas.RegionSizeStore; 059import org.apache.hadoop.hbase.regionserver.FlushRequester; 060import org.apache.hadoop.hbase.regionserver.HRegion; 061import org.apache.hadoop.hbase.regionserver.HeapMemoryManager; 062import org.apache.hadoop.hbase.regionserver.LeaseManager; 063import org.apache.hadoop.hbase.regionserver.MetricsRegionServer; 064import org.apache.hadoop.hbase.regionserver.Region; 065import org.apache.hadoop.hbase.regionserver.RegionServerAccounting; 066import org.apache.hadoop.hbase.regionserver.RegionServerServices; 067import org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager; 068import org.apache.hadoop.hbase.regionserver.ServerNonceManager; 069import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequester; 070import org.apache.hadoop.hbase.regionserver.throttle.ThroughputController; 071import org.apache.hadoop.hbase.security.access.AccessChecker; 072import org.apache.hadoop.hbase.security.access.ZKPermissionWatcher; 073import org.apache.hadoop.hbase.util.Bytes; 074import org.apache.hadoop.hbase.wal.WAL; 075import org.apache.hadoop.hbase.zookeeper.ZKWatcher; 076 077import org.apache.hbase.thirdparty.com.google.protobuf.RpcController; 078import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException; 079 080import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; 081import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos; 082import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearCompactionQueuesRequest; 083import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearCompactionQueuesResponse; 084import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearRegionBlockCacheRequest; 085import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearRegionBlockCacheResponse; 086import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearSlowLogResponseRequest; 087import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearSlowLogResponses; 088import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CloseRegionRequest; 089import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CloseRegionResponse; 090import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CompactRegionRequest; 091import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CompactRegionResponse; 092import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CompactionSwitchRequest; 093import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CompactionSwitchResponse; 094import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ExecuteProceduresRequest; 095import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ExecuteProceduresResponse; 096import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.FlushRegionRequest; 097import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.FlushRegionResponse; 098import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetCachedFilesListRequest; 099import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetCachedFilesListResponse; 100import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionRequest; 101import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionResponse; 102import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoRequest; 103import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse; 104import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionLoadRequest; 105import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionLoadResponse; 106import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetServerInfoRequest; 107import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetServerInfoResponse; 108import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetStoreFileRequest; 109import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetStoreFileResponse; 110import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.OpenRegionRequest; 111import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.OpenRegionResponse; 112import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ReplicateWALEntryRequest; 113import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ReplicateWALEntryResponse; 114import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.RollWALWriterRequest; 115import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.RollWALWriterResponse; 116import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest; 117import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponses; 118import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.StopServerRequest; 119import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.StopServerResponse; 120import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateConfigurationRequest; 121import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateConfigurationResponse; 122import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateFavoredNodesRequest; 123import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateFavoredNodesResponse; 124import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WarmupRegionRequest; 125import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WarmupRegionResponse; 126import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos; 127import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.BulkLoadHFileRequest; 128import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.BulkLoadHFileResponse; 129import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CleanupBulkLoadRequest; 130import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CleanupBulkLoadResponse; 131import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest; 132import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponse; 133import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetRequest; 134import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetResponse; 135import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest; 136import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateRequest; 137import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateResponse; 138import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.PrepareBulkLoadRequest; 139import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.PrepareBulkLoadResponse; 140import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest; 141import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse; 142import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos; 143import org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.GetSpaceQuotaSnapshotsRequest; 144import org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.GetSpaceQuotaSnapshotsResponse; 145 146/** 147 * A mock RegionServer implementation. Use this when you can't bend Mockito to your liking (e.g. 148 * return null result when 'scanning' until master timesout and then return a coherent meta row 149 * result thereafter. Have some facility for faking gets and scans. See setGetResult(byte[], byte[], 150 * Result) for how to fill the backing data store that the get pulls from. 151 */ 152class MockRegionServer implements AdminProtos.AdminService.BlockingInterface, 153 ClientProtos.ClientService.BlockingInterface, RegionServerServices { 154 private final ServerName sn; 155 private final ZKWatcher zkw; 156 private final Configuration conf; 157 158 /** 159 * Map of regions to map of rows and {@link Result}. Used as data source when 160 * {@link #get(RpcController, ClientProtos.GetRequest)} is called. Because we have a byte key, 161 * need to use TreeMap and provide a Comparator. Use {@link #setGetResult(byte[], byte[], Result)} 162 * filling this map. 163 */ 164 private final Map<byte[], Map<byte[], Result>> gets = new TreeMap<>(Bytes.BYTES_COMPARATOR); 165 166 /** 167 * Map of regions to results to return when scanning. 168 */ 169 private final Map<byte[], Result[]> nexts = new TreeMap<>(Bytes.BYTES_COMPARATOR); 170 171 /** 172 * Data structure that holds regionname and index used scanning. 173 */ 174 class RegionNameAndIndex { 175 private final byte[] regionName; 176 private int index = 0; 177 178 RegionNameAndIndex(final byte[] regionName) { 179 this.regionName = regionName; 180 } 181 182 byte[] getRegionName() { 183 return this.regionName; 184 } 185 186 int getThenIncrement() { 187 int currentIndex = this.index; 188 this.index++; 189 return currentIndex; 190 } 191 } 192 193 /** 194 * Outstanding scanners and their offset into <code>nexts</code> 195 */ 196 private final Map<Long, RegionNameAndIndex> scannersAndOffsets = new HashMap<>(); 197 198 /** 199 * @param sn Name of this mock regionserver 200 */ 201 MockRegionServer(final Configuration conf, final ServerName sn) 202 throws ZooKeeperConnectionException, IOException { 203 this.sn = sn; 204 this.conf = conf; 205 this.zkw = new ZKWatcher(conf, sn.toString(), this, true); 206 } 207 208 /** 209 * Use this method filling the backing data source used by 210 * {@link #get(RpcController, ClientProtos.GetRequest)} 211 * @param regionName the region name to assign 212 * @param row the row key 213 * @param r the single row result 214 */ 215 void setGetResult(final byte[] regionName, final byte[] row, final Result r) { 216 Map<byte[], Result> value = this.gets.get(regionName); 217 if (value == null) { 218 // If no value already, create one. Needs to be treemap because we are 219 // using byte array as key. Not thread safe. 220 value = new TreeMap<>(Bytes.BYTES_COMPARATOR); 221 this.gets.put(regionName, value); 222 } 223 value.put(row, r); 224 } 225 226 /** 227 * Use this method to set what a scanner will reply as we next through 228 */ 229 void setNextResults(final byte[] regionName, final Result[] rs) { 230 this.nexts.put(regionName, rs); 231 } 232 233 @Override 234 public boolean isStopped() { 235 return false; 236 } 237 238 @Override 239 public void abort(String why, Throwable e) { 240 throw new RuntimeException(this.sn + ": " + why, e); 241 } 242 243 @Override 244 public boolean isAborted() { 245 return false; 246 } 247 248 public long openScanner(byte[] regionName, Scan scan) throws IOException { 249 long scannerId = ThreadLocalRandom.current().nextLong(); 250 this.scannersAndOffsets.put(scannerId, new RegionNameAndIndex(regionName)); 251 return scannerId; 252 } 253 254 public Result next(long scannerId) throws IOException { 255 RegionNameAndIndex rnai = this.scannersAndOffsets.get(scannerId); 256 int index = rnai.getThenIncrement(); 257 Result[] results = this.nexts.get(rnai.getRegionName()); 258 if (results == null) return null; 259 return index < results.length ? results[index] : null; 260 } 261 262 public Result[] next(long scannerId, int numberOfRows) throws IOException { 263 // Just return one result whatever they ask for. 264 Result r = next(scannerId); 265 return r == null ? null : new Result[] { r }; 266 } 267 268 public void close(final long scannerId) throws IOException { 269 this.scannersAndOffsets.remove(scannerId); 270 } 271 272 @Override 273 public void stop(String why) { 274 this.zkw.close(); 275 } 276 277 @Override 278 public void addRegion(HRegion r) { 279 } 280 281 @Override 282 public boolean removeRegion(HRegion r, ServerName destination) { 283 return false; 284 } 285 286 @Override 287 public HRegion getRegion(String encodedRegionName) { 288 return null; 289 } 290 291 @Override 292 public Configuration getConfiguration() { 293 return this.conf; 294 } 295 296 @Override 297 public ZKWatcher getZooKeeper() { 298 return this.zkw; 299 } 300 301 @Override 302 public CoordinatedStateManager getCoordinatedStateManager() { 303 return null; 304 } 305 306 @Override 307 public ClusterConnection getConnection() { 308 return null; 309 } 310 311 @Override 312 public ServerName getServerName() { 313 return this.sn; 314 } 315 316 @Override 317 public boolean isStopping() { 318 return false; 319 } 320 321 @Override 322 public FlushRequester getFlushRequester() { 323 return null; 324 } 325 326 @Override 327 public CompactionRequester getCompactionRequestor() { 328 return null; 329 } 330 331 @Override 332 public RegionServerAccounting getRegionServerAccounting() { 333 return null; 334 } 335 336 @Override 337 public RegionServerRpcQuotaManager getRegionServerRpcQuotaManager() { 338 return null; 339 } 340 341 @Override 342 public void postOpenDeployTasks(PostOpenDeployContext context) throws IOException { 343 } 344 345 @Override 346 public RpcServerInterface getRpcServer() { 347 return null; 348 } 349 350 @Override 351 public ConcurrentSkipListMap<byte[], Boolean> getRegionsInTransitionInRS() { 352 return null; 353 } 354 355 @Override 356 public FileSystem getFileSystem() { 357 return null; 358 } 359 360 @Override 361 public GetResponse get(RpcController controller, GetRequest request) throws ServiceException { 362 byte[] regionName = request.getRegion().getValue().toByteArray(); 363 Map<byte[], Result> m = this.gets.get(regionName); 364 GetResponse.Builder builder = GetResponse.newBuilder(); 365 if (m != null) { 366 byte[] row = request.getGet().getRow().toByteArray(); 367 builder.setResult(ProtobufUtil.toResult(m.get(row))); 368 } 369 return builder.build(); 370 } 371 372 @Override 373 public MutateResponse mutate(RpcController controller, MutateRequest request) 374 throws ServiceException { 375 return null; 376 } 377 378 @Override 379 public ScanResponse scan(RpcController controller, ScanRequest request) throws ServiceException { 380 ScanResponse.Builder builder = ScanResponse.newBuilder(); 381 try { 382 if (request.hasScan()) { 383 byte[] regionName = request.getRegion().getValue().toByteArray(); 384 builder.setScannerId(openScanner(regionName, null)); 385 builder.setMoreResults(true); 386 } else { 387 long scannerId = request.getScannerId(); 388 Result result = next(scannerId); 389 if (result != null) { 390 builder.addCellsPerResult(result.size()); 391 List<CellScannable> results = new ArrayList<>(1); 392 results.add(result); 393 ((HBaseRpcController) controller).setCellScanner(CellUtil.createCellScanner(results)); 394 builder.setMoreResults(true); 395 } else { 396 builder.setMoreResults(false); 397 close(scannerId); 398 } 399 } 400 } catch (IOException ie) { 401 throw new ServiceException(ie); 402 } 403 return builder.build(); 404 } 405 406 @Override 407 public BulkLoadHFileResponse bulkLoadHFile(RpcController controller, BulkLoadHFileRequest request) 408 throws ServiceException { 409 return null; 410 } 411 412 @Override 413 public ClientProtos.CoprocessorServiceResponse execService(RpcController controller, 414 ClientProtos.CoprocessorServiceRequest request) throws ServiceException { 415 return null; 416 } 417 418 @Override 419 public ClientProtos.MultiResponse multi(RpcController controller, MultiRequest request) 420 throws ServiceException { 421 return null; 422 } 423 424 @Override 425 public GetRegionInfoResponse getRegionInfo(RpcController controller, GetRegionInfoRequest request) 426 throws ServiceException { 427 GetRegionInfoResponse.Builder builder = GetRegionInfoResponse.newBuilder(); 428 builder.setRegionInfo(ProtobufUtil.toRegionInfo(RegionInfoBuilder.FIRST_META_REGIONINFO)); 429 return builder.build(); 430 } 431 432 @Override 433 public GetRegionLoadResponse getRegionLoad(RpcController controller, GetRegionLoadRequest request) 434 throws ServiceException { 435 GetRegionLoadResponse.Builder builder = GetRegionLoadResponse.newBuilder(); 436 return builder.build(); 437 } 438 439 @Override 440 public ClearCompactionQueuesResponse clearCompactionQueues(RpcController controller, 441 ClearCompactionQueuesRequest request) throws ServiceException { 442 return null; 443 } 444 445 @Override 446 public GetStoreFileResponse getStoreFile(RpcController controller, GetStoreFileRequest request) 447 throws ServiceException { 448 return null; 449 } 450 451 @Override 452 public GetOnlineRegionResponse getOnlineRegion(RpcController controller, 453 GetOnlineRegionRequest request) throws ServiceException { 454 return null; 455 } 456 457 @Override 458 public List<Region> getRegions() { 459 return null; 460 } 461 462 @Override 463 public OpenRegionResponse openRegion(RpcController controller, OpenRegionRequest request) 464 throws ServiceException { 465 return null; 466 } 467 468 @Override 469 public WarmupRegionResponse warmupRegion(RpcController controller, WarmupRegionRequest request) 470 throws ServiceException { 471 return null; 472 } 473 474 @Override 475 public CloseRegionResponse closeRegion(RpcController controller, CloseRegionRequest request) 476 throws ServiceException { 477 return null; 478 } 479 480 @Override 481 public FlushRegionResponse flushRegion(RpcController controller, FlushRegionRequest request) 482 throws ServiceException { 483 return null; 484 } 485 486 @Override 487 public CompactionSwitchResponse compactionSwitch(RpcController controller, 488 CompactionSwitchRequest request) throws ServiceException { 489 return null; 490 } 491 492 @Override 493 public CompactRegionResponse compactRegion(RpcController controller, CompactRegionRequest request) 494 throws ServiceException { 495 return null; 496 } 497 498 @Override 499 public ReplicateWALEntryResponse replicateWALEntry(RpcController controller, 500 ReplicateWALEntryRequest request) throws ServiceException { 501 return null; 502 } 503 504 @Override 505 public RollWALWriterResponse rollWALWriter(RpcController controller, RollWALWriterRequest request) 506 throws ServiceException { 507 return null; 508 } 509 510 @Override 511 public GetServerInfoResponse getServerInfo(RpcController controller, GetServerInfoRequest request) 512 throws ServiceException { 513 return null; 514 } 515 516 @Override 517 public StopServerResponse stopServer(RpcController controller, StopServerRequest request) 518 throws ServiceException { 519 return null; 520 } 521 522 @Override 523 public List<Region> getRegions(TableName tableName) throws IOException { 524 return null; 525 } 526 527 @Override 528 public LeaseManager getLeaseManager() { 529 return null; 530 } 531 532 @Override 533 public List<WAL> getWALs() throws IOException { 534 return Collections.emptyList(); 535 } 536 537 @Override 538 public WAL getWAL(RegionInfo regionInfo) throws IOException { 539 return null; 540 } 541 542 @Override 543 public ExecutorService getExecutorService() { 544 return null; 545 } 546 547 @Override 548 public ChoreService getChoreService() { 549 return null; 550 } 551 552 @Override 553 public void updateRegionFavoredNodesMapping(String encodedRegionName, 554 List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName> favoredNodes) { 555 } 556 557 @Override 558 public InetSocketAddress[] getFavoredNodesForRegion(String encodedRegionName) { 559 return null; 560 } 561 562 @Override 563 public ReplicateWALEntryResponse replay(RpcController controller, 564 ReplicateWALEntryRequest request) throws ServiceException { 565 return null; 566 } 567 568 @Override 569 public UpdateFavoredNodesResponse updateFavoredNodes(RpcController controller, 570 UpdateFavoredNodesRequest request) throws ServiceException { 571 return null; 572 } 573 574 @Override 575 public ServerNonceManager getNonceManager() { 576 return null; 577 } 578 579 @Override 580 public boolean reportRegionStateTransition(RegionStateTransitionContext context) { 581 return false; 582 } 583 584 @Override 585 public boolean registerService(com.google.protobuf.Service service) { 586 return false; 587 } 588 589 @Override 590 public CoprocessorServiceResponse execRegionServerService(RpcController controller, 591 CoprocessorServiceRequest request) throws ServiceException { 592 return null; 593 } 594 595 @Override 596 public UpdateConfigurationResponse updateConfiguration(RpcController controller, 597 UpdateConfigurationRequest request) throws ServiceException { 598 return null; 599 } 600 601 @Override 602 public ClearRegionBlockCacheResponse clearRegionBlockCache(RpcController controller, 603 ClearRegionBlockCacheRequest request) throws ServiceException { 604 return null; 605 } 606 607 @Override 608 public HeapMemoryManager getHeapMemoryManager() { 609 return null; 610 } 611 612 @Override 613 public double getCompactionPressure() { 614 return 0; 615 } 616 617 @Override 618 public ClusterConnection getClusterConnection() { 619 return null; 620 } 621 622 @Override 623 public ThroughputController getFlushThroughputController() { 624 return null; 625 } 626 627 @Override 628 public double getFlushPressure() { 629 return 0; 630 } 631 632 @Override 633 public MetricsRegionServer getMetrics() { 634 return null; 635 } 636 637 @Override 638 public EntityLock regionLock(List<RegionInfo> regionInfos, String description, Abortable abort) 639 throws IOException { 640 return null; 641 } 642 643 @Override 644 public PrepareBulkLoadResponse prepareBulkLoad(RpcController controller, 645 PrepareBulkLoadRequest request) throws ServiceException { 646 return null; 647 } 648 649 @Override 650 public CleanupBulkLoadResponse cleanupBulkLoad(RpcController controller, 651 CleanupBulkLoadRequest request) throws ServiceException { 652 return null; 653 } 654 655 @Override 656 public SecureBulkLoadManager getSecureBulkLoadManager() { 657 return null; 658 } 659 660 @Override 661 public void unassign(byte[] regionName) throws IOException { 662 } 663 664 @Override 665 public RegionServerSpaceQuotaManager getRegionServerSpaceQuotaManager() { 666 return null; 667 } 668 669 @Override 670 public ExecuteProceduresResponse executeProcedures(RpcController controller, 671 ExecuteProceduresRequest request) throws ServiceException { 672 return null; 673 } 674 675 @Override 676 public SlowLogResponses getSlowLogResponses(RpcController controller, 677 SlowLogResponseRequest request) throws ServiceException { 678 return null; 679 } 680 681 @Override 682 public SlowLogResponses getLargeLogResponses(RpcController controller, 683 SlowLogResponseRequest request) throws ServiceException { 684 return null; 685 } 686 687 @Override 688 public ClearSlowLogResponses clearSlowLogsResponses(RpcController controller, 689 ClearSlowLogResponseRequest request) throws ServiceException { 690 return null; 691 } 692 693 @Override 694 public HBaseProtos.LogEntry getLogEntries(RpcController controller, 695 HBaseProtos.LogRequest request) throws ServiceException { 696 return null; 697 } 698 699 @Override 700 public GetCachedFilesListResponse getCachedFilesList(RpcController controller, 701 GetCachedFilesListRequest request) throws ServiceException { 702 return null; 703 } 704 705 @Override 706 public GetSpaceQuotaSnapshotsResponse getSpaceQuotaSnapshots(RpcController controller, 707 GetSpaceQuotaSnapshotsRequest request) throws ServiceException { 708 return null; 709 } 710 711 @Override 712 public Connection createConnection(Configuration conf) throws IOException { 713 return null; 714 } 715 716 @Override 717 public boolean isClusterUp() { 718 return true; 719 } 720 721 @Override 722 public TableDescriptors getTableDescriptors() { 723 return null; 724 } 725 726 @Override 727 public Optional<BlockCache> getBlockCache() { 728 return Optional.empty(); 729 } 730 731 @Override 732 public Optional<MobFileCache> getMobFileCache() { 733 return Optional.empty(); 734 } 735 736 @Override 737 public AccessChecker getAccessChecker() { 738 return null; 739 } 740 741 @Override 742 public ZKPermissionWatcher getZKPermissionWatcher() { 743 return null; 744 } 745 746 @Override 747 public boolean reportRegionSizesForQuotas(RegionSizeStore sizeStore) { 748 return true; 749 } 750 751 @Override 752 public boolean reportFileArchivalForQuotas(TableName tableName, 753 Collection<Entry<String, Long>> archivedFiles) { 754 return false; 755 } 756}