HBASE-24033 Add ut for loading the corrupt recovered hfiles (#1322)
[hbase.git] / hbase-server / src / test / java / org / apache / hadoop / hbase / client / DummyAsyncClusterConnection.java
blob87557499f7ea0ef3c160bfb5b27628deb0f6593a
1 /**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 package org.apache.hadoop.hbase.client;
20 import java.io.IOException;
21 import java.util.List;
22 import java.util.concurrent.CompletableFuture;
23 import java.util.concurrent.ExecutorService;
24 import org.apache.hadoop.conf.Configuration;
25 import org.apache.hadoop.hbase.RegionLocations;
26 import org.apache.hadoop.hbase.ServerName;
27 import org.apache.hadoop.hbase.TableName;
28 import org.apache.hadoop.hbase.ipc.RpcClient;
29 import org.apache.hadoop.hbase.util.Pair;
30 import org.apache.hadoop.hbase.wal.WAL.Entry;
31 import org.apache.hadoop.security.token.Token;
33 import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.FlushRegionResponse;
35 /**
36 * Can be overridden in UT if you only want to implement part of the methods in
37 * {@link AsyncClusterConnection}.
39 public class DummyAsyncClusterConnection implements AsyncClusterConnection {
41 @Override
42 public Configuration getConfiguration() {
43 return null;
46 @Override
47 public AsyncTableRegionLocator getRegionLocator(TableName tableName) {
48 return null;
51 @Override
52 public void clearRegionLocationCache() {
55 @Override
56 public AsyncTableBuilder<AdvancedScanResultConsumer> getTableBuilder(TableName tableName) {
57 return null;
60 @Override
61 public AsyncTableBuilder<ScanResultConsumer> getTableBuilder(TableName tableName,
62 ExecutorService pool) {
63 return null;
66 @Override
67 public AsyncAdminBuilder getAdminBuilder() {
68 return null;
71 @Override
72 public AsyncAdminBuilder getAdminBuilder(ExecutorService pool) {
73 return null;
76 @Override
77 public AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(TableName tableName) {
78 return null;
81 @Override
82 public AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(TableName tableName,
83 ExecutorService pool) {
84 return null;
87 @Override
88 public CompletableFuture<Hbck> getHbck() {
89 return null;
92 @Override
93 public Hbck getHbck(ServerName masterServer) throws IOException {
94 return null;
97 @Override
98 public boolean isClosed() {
99 return false;
102 @Override
103 public void close() throws IOException {
106 @Override
107 public AsyncRegionServerAdmin getRegionServerAdmin(ServerName serverName) {
108 return null;
111 @Override
112 public NonceGenerator getNonceGenerator() {
113 return null;
116 @Override
117 public RpcClient getRpcClient() {
118 return null;
121 @Override
122 public CompletableFuture<FlushRegionResponse> flush(byte[] regionName,
123 boolean writeFlushWALMarker) {
124 return null;
127 @Override
128 public CompletableFuture<Long> replay(TableName tableName, byte[] encodedRegionName, byte[] row,
129 List<Entry> entries, int replicaId, int numRetries, long operationTimeoutNs) {
130 return null;
133 @Override
134 public CompletableFuture<RegionLocations> getRegionLocations(TableName tableName, byte[] row,
135 boolean reload) {
136 return null;
139 @Override
140 public CompletableFuture<String> prepareBulkLoad(TableName tableName) {
141 return null;
144 @Override
145 public CompletableFuture<Boolean> bulkLoad(TableName tableName,
146 List<Pair<byte[], String>> familyPaths, byte[] row, boolean assignSeqNum, Token<?> userToken,
147 String bulkToken, boolean copyFiles, List<String> clusterIds, boolean replicate) {
148 return null;
151 @Override
152 public CompletableFuture<Void> cleanupBulkLoad(TableName tableName, String bulkToken) {
153 return null;
156 @Override
157 public Connection toConnection() {
158 return null;