Class DummyAsyncClusterConnection

java.lang.Object
org.apache.hadoop.hbase.client.DummyAsyncClusterConnection
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.hbase.client.AsyncClusterConnection, org.apache.hadoop.hbase.client.AsyncConnection
Direct Known Subclasses:
TestWALEntrySinkFilter.DevNullAsyncClusterConnection

public class DummyAsyncClusterConnection extends Object implements org.apache.hadoop.hbase.client.AsyncClusterConnection
Can be overridden in UT if you only want to implement part of the methods in AsyncClusterConnection.
  • Constructor Details

  • Method Details

    • getConfiguration

      public org.apache.hadoop.conf.Configuration getConfiguration()
      Specified by:
      getConfiguration in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getRegionLocator

      public org.apache.hadoop.hbase.client.AsyncTableRegionLocator getRegionLocator(org.apache.hadoop.hbase.TableName tableName)
      Specified by:
      getRegionLocator in interface org.apache.hadoop.hbase.client.AsyncConnection
    • clearRegionLocationCache

      public void clearRegionLocationCache()
      Specified by:
      clearRegionLocationCache in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getTableBuilder

      public org.apache.hadoop.hbase.client.AsyncTableBuilder<org.apache.hadoop.hbase.client.AdvancedScanResultConsumer> getTableBuilder(org.apache.hadoop.hbase.TableName tableName)
      Specified by:
      getTableBuilder in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getTableBuilder

      public org.apache.hadoop.hbase.client.AsyncTableBuilder<org.apache.hadoop.hbase.client.ScanResultConsumer> getTableBuilder(org.apache.hadoop.hbase.TableName tableName, ExecutorService pool)
      Specified by:
      getTableBuilder in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getAdminBuilder

      public org.apache.hadoop.hbase.client.AsyncAdminBuilder getAdminBuilder()
      Specified by:
      getAdminBuilder in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getAdminBuilder

      public org.apache.hadoop.hbase.client.AsyncAdminBuilder getAdminBuilder(ExecutorService pool)
      Specified by:
      getAdminBuilder in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getBufferedMutatorBuilder

      public org.apache.hadoop.hbase.client.AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(org.apache.hadoop.hbase.TableName tableName)
      Specified by:
      getBufferedMutatorBuilder in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getBufferedMutatorBuilder

      public org.apache.hadoop.hbase.client.AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(org.apache.hadoop.hbase.TableName tableName, ExecutorService pool)
      Specified by:
      getBufferedMutatorBuilder in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getHbck

      public CompletableFuture<org.apache.hadoop.hbase.client.Hbck> getHbck()
      Specified by:
      getHbck in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getHbck

      public org.apache.hadoop.hbase.client.Hbck getHbck(org.apache.hadoop.hbase.ServerName masterServer) throws IOException
      Specified by:
      getHbck in interface org.apache.hadoop.hbase.client.AsyncConnection
      Throws:
      IOException
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface org.apache.hadoop.hbase.client.AsyncConnection
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • getRegionServerAdmin

      public org.apache.hadoop.hbase.client.AsyncRegionServerAdmin getRegionServerAdmin(org.apache.hadoop.hbase.ServerName serverName)
      Specified by:
      getRegionServerAdmin in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • getNonceGenerator

      public org.apache.hadoop.hbase.client.NonceGenerator getNonceGenerator()
      Specified by:
      getNonceGenerator in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • getRpcClient

      public org.apache.hadoop.hbase.ipc.RpcClient getRpcClient()
      Specified by:
      getRpcClient in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • flush

      public CompletableFuture<org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.FlushRegionResponse> flush(byte[] regionName, boolean writeFlushWALMarker)
      Specified by:
      flush in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • getRegionLocations

      public CompletableFuture<org.apache.hadoop.hbase.RegionLocations> getRegionLocations(org.apache.hadoop.hbase.TableName tableName, byte[] row, boolean reload)
      Specified by:
      getRegionLocations in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • prepareBulkLoad

      public CompletableFuture<String> prepareBulkLoad(org.apache.hadoop.hbase.TableName tableName)
      Specified by:
      prepareBulkLoad in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • bulkLoad

      public CompletableFuture<Boolean> bulkLoad(org.apache.hadoop.hbase.TableName tableName, List<org.apache.hadoop.hbase.util.Pair<byte[],String>> familyPaths, byte[] row, boolean assignSeqNum, org.apache.hadoop.security.token.Token<?> userToken, String bulkToken, boolean copyFiles, List<String> clusterIds, boolean replicate)
      Specified by:
      bulkLoad in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • cleanupBulkLoad

      public CompletableFuture<Void> cleanupBulkLoad(org.apache.hadoop.hbase.TableName tableName, String bulkToken)
      Specified by:
      cleanupBulkLoad in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • toConnection

      public org.apache.hadoop.hbase.client.Connection toConnection()
      Specified by:
      toConnection in interface org.apache.hadoop.hbase.client.AsyncConnection
    • getLiveRegionServers

      public CompletableFuture<List<org.apache.hadoop.hbase.ServerName>> getLiveRegionServers(org.apache.hadoop.hbase.zookeeper.MasterAddressTracker masterAddrTracker, int count)
      Specified by:
      getLiveRegionServers in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • getAllBootstrapNodes

      public CompletableFuture<List<org.apache.hadoop.hbase.ServerName>> getAllBootstrapNodes(org.apache.hadoop.hbase.ServerName regionServer)
      Specified by:
      getAllBootstrapNodes in interface org.apache.hadoop.hbase.client.AsyncClusterConnection
    • replicate

      public CompletableFuture<Void> replicate(org.apache.hadoop.hbase.client.RegionInfo replica, List<org.apache.hadoop.hbase.wal.WAL.Entry> entries, int numRetries, long rpcTimeoutNs, long operationTimeoutNs)
      Specified by:
      replicate in interface org.apache.hadoop.hbase.client.AsyncClusterConnection