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.ChoreService;
037import org.apache.hadoop.hbase.CoordinatedStateManager;
038import org.apache.hadoop.hbase.ExtendedCellScannable;
039import org.apache.hadoop.hbase.PrivateCellUtil;
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.AsyncClusterConnection;
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.RegionServerAccounting;
065import org.apache.hadoop.hbase.regionserver.RegionServerServices;
066import org.apache.hadoop.hbase.regionserver.ReplicationSourceService;
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.regionreplication.RegionReplicationBufferManager;
071import org.apache.hadoop.hbase.regionserver.throttle.ThroughputController;
072import org.apache.hadoop.hbase.security.access.AccessChecker;
073import org.apache.hadoop.hbase.security.access.ZKPermissionWatcher;
074import org.apache.hadoop.hbase.util.Bytes;
075import org.apache.hadoop.hbase.wal.WAL;
076import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
077
078import org.apache.hbase.thirdparty.com.google.protobuf.RpcController;
079import org.apache.hbase.thirdparty.com.google.protobuf.Service;
080import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
081
082import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
083import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos;
084import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearCompactionQueuesRequest;
085import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearCompactionQueuesResponse;
086import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearRegionBlockCacheRequest;
087import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearRegionBlockCacheResponse;
088import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearSlowLogResponseRequest;
089import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearSlowLogResponses;
090import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CloseRegionRequest;
091import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CloseRegionResponse;
092import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CompactRegionRequest;
093import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CompactRegionResponse;
094import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CompactionSwitchRequest;
095import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.CompactionSwitchResponse;
096import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ExecuteProceduresRequest;
097import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ExecuteProceduresResponse;
098import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.FlushRegionRequest;
099import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.FlushRegionResponse;
100import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetCachedFilesListRequest;
101import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetCachedFilesListResponse;
102import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionRequest;
103import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetOnlineRegionResponse;
104import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoRequest;
105import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse;
106import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionLoadRequest;
107import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionLoadResponse;
108import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetServerInfoRequest;
109import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetServerInfoResponse;
110import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetStoreFileRequest;
111import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetStoreFileResponse;
112import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.OpenRegionRequest;
113import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.OpenRegionResponse;
114import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ReplicateWALEntryRequest;
115import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ReplicateWALEntryResponse;
116import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.RollWALWriterRequest;
117import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.RollWALWriterResponse;
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 Connection 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<ExtendedCellScannable> results = new ArrayList<>(1);
392          results.add(result);
393          ((HBaseRpcController) controller)
394            .setCellScanner(PrivateCellUtil.createExtendedCellScanner(results));
395          builder.setMoreResults(true);
396        } else {
397          builder.setMoreResults(false);
398          close(scannerId);
399        }
400      }
401    } catch (IOException ie) {
402      throw new ServiceException(ie);
403    }
404    return builder.build();
405  }
406
407  @Override
408  public BulkLoadHFileResponse bulkLoadHFile(RpcController controller, BulkLoadHFileRequest request)
409    throws ServiceException {
410    return null;
411  }
412
413  @Override
414  public ClientProtos.CoprocessorServiceResponse execService(RpcController controller,
415    ClientProtos.CoprocessorServiceRequest request) throws ServiceException {
416    return null;
417  }
418
419  @Override
420  public ClientProtos.MultiResponse multi(RpcController controller, MultiRequest request)
421    throws ServiceException {
422    return null;
423  }
424
425  @Override
426  public GetRegionInfoResponse getRegionInfo(RpcController controller, GetRegionInfoRequest request)
427    throws ServiceException {
428    GetRegionInfoResponse.Builder builder = GetRegionInfoResponse.newBuilder();
429    builder.setRegionInfo(ProtobufUtil.toRegionInfo(RegionInfoBuilder.FIRST_META_REGIONINFO));
430    return builder.build();
431  }
432
433  @Override
434  public GetRegionLoadResponse getRegionLoad(RpcController controller, GetRegionLoadRequest request)
435    throws ServiceException {
436    GetRegionLoadResponse.Builder builder = GetRegionLoadResponse.newBuilder();
437    return builder.build();
438  }
439
440  @Override
441  public ClearCompactionQueuesResponse clearCompactionQueues(RpcController controller,
442    ClearCompactionQueuesRequest request) throws ServiceException {
443    return null;
444  }
445
446  @Override
447  public GetStoreFileResponse getStoreFile(RpcController controller, GetStoreFileRequest request)
448    throws ServiceException {
449    return null;
450  }
451
452  @Override
453  public GetOnlineRegionResponse getOnlineRegion(RpcController controller,
454    GetOnlineRegionRequest request) throws ServiceException {
455    return null;
456  }
457
458  @Override
459  public GetCachedFilesListResponse getCachedFilesList(RpcController controller,
460    GetCachedFilesListRequest request) throws ServiceException {
461    return null;
462  }
463
464  @Override
465  public List<HRegion> getRegions() {
466    return null;
467  }
468
469  @Override
470  public OpenRegionResponse openRegion(RpcController controller, OpenRegionRequest request)
471    throws ServiceException {
472    return null;
473  }
474
475  @Override
476  public WarmupRegionResponse warmupRegion(RpcController controller, WarmupRegionRequest request)
477    throws ServiceException {
478    return null;
479  }
480
481  @Override
482  public CloseRegionResponse closeRegion(RpcController controller, CloseRegionRequest request)
483    throws ServiceException {
484    return null;
485  }
486
487  @Override
488  public FlushRegionResponse flushRegion(RpcController controller, FlushRegionRequest request)
489    throws ServiceException {
490    return null;
491  }
492
493  @Override
494  public CompactionSwitchResponse compactionSwitch(RpcController controller,
495    CompactionSwitchRequest request) throws ServiceException {
496    return null;
497  }
498
499  @Override
500  public CompactRegionResponse compactRegion(RpcController controller, CompactRegionRequest request)
501    throws ServiceException {
502    return null;
503  }
504
505  @Override
506  public ReplicateWALEntryResponse replicateWALEntry(RpcController controller,
507    ReplicateWALEntryRequest request) throws ServiceException {
508    return null;
509  }
510
511  @Override
512  public RollWALWriterResponse rollWALWriter(RpcController controller, RollWALWriterRequest request)
513    throws ServiceException {
514    return null;
515  }
516
517  @Override
518  public GetServerInfoResponse getServerInfo(RpcController controller, GetServerInfoRequest request)
519    throws ServiceException {
520    return null;
521  }
522
523  @Override
524  public StopServerResponse stopServer(RpcController controller, StopServerRequest request)
525    throws ServiceException {
526    return null;
527  }
528
529  @Override
530  public List<HRegion> getRegions(TableName tableName) throws IOException {
531    return null;
532  }
533
534  @Override
535  public LeaseManager getLeaseManager() {
536    return null;
537  }
538
539  @Override
540  public List<WAL> getWALs() throws IOException {
541    return Collections.emptyList();
542  }
543
544  @Override
545  public WAL getWAL(RegionInfo regionInfo) throws IOException {
546    return null;
547  }
548
549  @Override
550  public ExecutorService getExecutorService() {
551    return null;
552  }
553
554  @Override
555  public ChoreService getChoreService() {
556    return null;
557  }
558
559  @Override
560  public void updateRegionFavoredNodesMapping(String encodedRegionName,
561    List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName> favoredNodes) {
562  }
563
564  @Override
565  public InetSocketAddress[] getFavoredNodesForRegion(String encodedRegionName) {
566    return null;
567  }
568
569  @Override
570  public ReplicateWALEntryResponse replay(RpcController controller,
571    ReplicateWALEntryRequest request) throws ServiceException {
572    return null;
573  }
574
575  @Override
576  public UpdateFavoredNodesResponse updateFavoredNodes(RpcController controller,
577    UpdateFavoredNodesRequest request) throws ServiceException {
578    return null;
579  }
580
581  @Override
582  public ServerNonceManager getNonceManager() {
583    return null;
584  }
585
586  @Override
587  public boolean reportRegionStateTransition(RegionStateTransitionContext context) {
588    return false;
589  }
590
591  @Override
592  public boolean registerService(Service service) {
593    return false;
594  }
595
596  @Override
597  public CoprocessorServiceResponse execRegionServerService(RpcController controller,
598    CoprocessorServiceRequest request) throws ServiceException {
599    return null;
600  }
601
602  @Override
603  public UpdateConfigurationResponse updateConfiguration(RpcController controller,
604    UpdateConfigurationRequest request) throws ServiceException {
605    return null;
606  }
607
608  @Override
609  public ClearRegionBlockCacheResponse clearRegionBlockCache(RpcController controller,
610    ClearRegionBlockCacheRequest request) throws ServiceException {
611    return null;
612  }
613
614  @Override
615  public HeapMemoryManager getHeapMemoryManager() {
616    return null;
617  }
618
619  @Override
620  public double getCompactionPressure() {
621    return 0;
622  }
623
624  @Override
625  public ThroughputController getFlushThroughputController() {
626    return null;
627  }
628
629  @Override
630  public double getFlushPressure() {
631    return 0;
632  }
633
634  @Override
635  public MetricsRegionServer getMetrics() {
636    return null;
637  }
638
639  @Override
640  public EntityLock regionLock(List<RegionInfo> regionInfos, String description, Abortable abort)
641    throws IOException {
642    return null;
643  }
644
645  @Override
646  public PrepareBulkLoadResponse prepareBulkLoad(RpcController controller,
647    PrepareBulkLoadRequest request) throws ServiceException {
648    return null;
649  }
650
651  @Override
652  public CleanupBulkLoadResponse cleanupBulkLoad(RpcController controller,
653    CleanupBulkLoadRequest request) throws ServiceException {
654    return null;
655  }
656
657  @Override
658  public SecureBulkLoadManager getSecureBulkLoadManager() {
659    return null;
660  }
661
662  @Override
663  public void unassign(byte[] regionName) throws IOException {
664  }
665
666  @Override
667  public RegionServerSpaceQuotaManager getRegionServerSpaceQuotaManager() {
668    return null;
669  }
670
671  @Override
672  public ExecuteProceduresResponse executeProcedures(RpcController controller,
673    ExecuteProceduresRequest request) throws ServiceException {
674    return null;
675  }
676
677  @Override
678  public ClearSlowLogResponses clearSlowLogsResponses(RpcController controller,
679    ClearSlowLogResponseRequest request) throws ServiceException {
680    return null;
681  }
682
683  @Override
684  public HBaseProtos.LogEntry getLogEntries(RpcController controller,
685    HBaseProtos.LogRequest request) throws ServiceException {
686    return null;
687  }
688
689  @Override
690  public GetSpaceQuotaSnapshotsResponse getSpaceQuotaSnapshots(RpcController controller,
691    GetSpaceQuotaSnapshotsRequest request) throws ServiceException {
692    return null;
693  }
694
695  @Override
696  public Connection createConnection(Configuration conf) throws IOException {
697    return null;
698  }
699
700  @Override
701  public boolean reportRegionSizesForQuotas(RegionSizeStore sizeStore) {
702    return true;
703  }
704
705  @Override
706  public boolean reportFileArchivalForQuotas(TableName tableName,
707    Collection<Entry<String, Long>> archivedFiles) {
708    return false;
709  }
710
711  public boolean isClusterUp() {
712    return true;
713  }
714
715  @Override
716  public ReplicationSourceService getReplicationSourceService() {
717    return null;
718  }
719
720  @Override
721  public TableDescriptors getTableDescriptors() {
722    return null;
723  }
724
725  @Override
726  public Optional<BlockCache> getBlockCache() {
727    return Optional.empty();
728  }
729
730  @Override
731  public Optional<MobFileCache> getMobFileCache() {
732    return Optional.empty();
733  }
734
735  @Override
736  public AccessChecker getAccessChecker() {
737    return null;
738  }
739
740  @Override
741  public ZKPermissionWatcher getZKPermissionWatcher() {
742    return null;
743  }
744
745  @Override
746  public AsyncClusterConnection getAsyncClusterConnection() {
747    return null;
748  }
749
750  @Override
751  public RegionReplicationBufferManager getRegionReplicationBufferManager() {
752    return null;
753  }
754
755  @Override
756  public ReplicateWALEntryResponse replicateToReplica(RpcController controller,
757    ReplicateWALEntryRequest request) throws ServiceException {
758    return null;
759  }
760}