Interface Table

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
HTable, ThriftTable

@Public public interface Table extends Closeable
Used to communicate with a single HBase table. Obtain an instance from a Connection and call close() afterwards.

Table can be used to get, put, delete or scan data from a table.

Since:
0.99.0
See Also:
  • Method Details

    • getName

      Gets the fully qualified table name instance of this table.
    • getConfiguration

      org.apache.hadoop.conf.Configuration getConfiguration()
      Returns the Configuration object used by this instance.

      The reference returned is not a copy, so any change made to it will affect this instance.

    • getTableDescriptor

      Deprecated.
      since 2.0 version and will be removed in 3.0 version. use getDescriptor()
      Gets the table descriptor for this table.
      Throws:
      IOException - if a remote or network exception occurs.
    • getDescriptor

      Gets the table descriptor for this table.
      Throws:
      IOException - if a remote or network exception occurs.
    • getRegionLocator

      Gets the RegionLocator for this table.
      Throws:
      IOException
    • exists

      default boolean exists(Get get) throws IOException
      Test for the existence of columns in the table, as specified by the Get.

      This will return true if the Get matches one or more keys, false if not.

      This is a server-side call so it prevents any data from being transfered to the client.

      Parameters:
      get - the Get
      Returns:
      true if the specified Get matches one or more keys, false if not
      Throws:
      IOException - e
    • exists

      default boolean[] exists(List<Get> gets) throws IOException
      Test for the existence of columns in the table, as specified by the Gets.

      This will return an array of booleans. Each value will be true if the related Get matches one or more keys, false if not.

      This is a server-side call so it prevents any data from being transferred to the client.

      Parameters:
      gets - the Gets
      Returns:
      Array of boolean. True if the specified Get matches one or more keys, false if not.
      Throws:
      IOException - e
    • existsAll

      @Deprecated default boolean[] existsAll(List<Get> gets) throws IOException
      Deprecated.
      since 2.0 version and will be removed in 3.0 version. use exists(List)
      Test for the existence of columns in the table, as specified by the Gets. This will return an array of booleans. Each value will be true if the related Get matches one or more keys, false if not. This is a server-side call so it prevents any data from being transferred to the client.
      Parameters:
      gets - the Gets
      Returns:
      Array of boolean. True if the specified Get matches one or more keys, false if not.
      Throws:
      IOException - e
    • batch

      default void batch(List<? extends Row> actions, Object[] results) throws IOException, InterruptedException
      Method that does a batch call on Deletes, Gets, Puts, Increments, Appends, RowMutations. The ordering of execution of the actions is not defined. Meaning if you do a Put and a Get in the same batch(java.util.List<? extends org.apache.hadoop.hbase.client.Row>, java.lang.Object[]) call, you will not necessarily be guaranteed that the Get returns what the Put had put.
      Parameters:
      actions - list of Get, Put, Delete, Increment, Append, RowMutations.
      results - Empty Object[], same size as actions. Provides access to partial results, in case an exception is thrown. A null in the result array means that the call for that action failed, even after retries. The order of the objects in the results array corresponds to the order of actions in the request list.
      Throws:
      IOException
      InterruptedException
      Since:
      0.90.0
    • batchCallback

      default <R> void batchCallback(List<? extends Row> actions, Object[] results, Batch.Callback<R> callback) throws IOException, InterruptedException
      Same as batch(List, Object[]), but with a callback.
      Throws:
      IOException
      InterruptedException
      Since:
      0.96.0
    • get

      default Result get(Get get) throws IOException
      Extracts certain cells from a given row.
      Parameters:
      get - The object that specifies what data to fetch and from which row.
      Returns:
      The data coming from the specified row, if it exists. If the row specified doesn't exist, the Result instance returned won't contain any KeyValue, as indicated by Result.isEmpty().
      Throws:
      IOException - if a remote or network exception occurs.
      Since:
      0.20.0
    • get

      default Result[] get(List<Get> gets) throws IOException
      Extracts specified cells from the given rows, as a batch.
      Parameters:
      gets - The objects that specify what data to fetch and from which rows.
      Returns:
      The data coming from the specified rows, if it exists. If the row specified doesn't exist, the Result instance returned won't contain any Cells, as indicated by Result.isEmpty(). If there are any failures even after retries, there will be a null in the results' array for those Gets, AND an exception will be thrown. The ordering of the Result array corresponds to the order of the list of passed in Gets.
      Throws:
      IOException - if a remote or network exception occurs.
      Since:
      0.90.0
      API Note:
      put(List) runs pre-flight validations on the input list on client. Currently get(List) doesn't run any validations on the client-side, currently there is no need, but this may change in the future. An IllegalArgumentException will be thrown in this case.
    • getScanner

      default ResultScanner getScanner(Scan scan) throws IOException
      Returns a scanner on the current table as specified by the Scan object. Note that the passed Scan's start row and caching properties maybe changed.
      Parameters:
      scan - A configured Scan object.
      Returns:
      A scanner.
      Throws:
      IOException - if a remote or network exception occurs.
      Since:
      0.20.0
    • getScanner

      default ResultScanner getScanner(byte[] family) throws IOException
      Gets a scanner on the current table for the given family.
      Parameters:
      family - The column family to scan.
      Returns:
      A scanner.
      Throws:
      IOException - if a remote or network exception occurs.
      Since:
      0.20.0
    • getScanner

      default ResultScanner getScanner(byte[] family, byte[] qualifier) throws IOException
      Gets a scanner on the current table for the given family and qualifier.
      Parameters:
      family - The column family to scan.
      qualifier - The column qualifier to scan.
      Returns:
      A scanner.
      Throws:
      IOException - if a remote or network exception occurs.
      Since:
      0.20.0
    • put

      default void put(Put put) throws IOException
      Puts some data in the table.
      Parameters:
      put - The data to put.
      Throws:
      IOException - if a remote or network exception occurs.
      Since:
      0.20.0
    • put

      default void put(List<Put> puts) throws IOException
      Batch puts the specified data into the table.

      This can be used for group commit, or for submitting user defined batches. Before sending a batch of mutations to the server, the client runs a few validations on the input list. If an error is found, for example, a mutation was supplied but was missing it's column an IllegalArgumentException will be thrown and no mutations will be applied. If there are any failures even after retries, a RetriesExhaustedWithDetailsException will be thrown. RetriesExhaustedWithDetailsException contains lists of failed mutations and corresponding remote exceptions. The ordering of mutations and exceptions in the encapsulating exception corresponds to the order of the input list of Put requests.

      Parameters:
      puts - The list of mutations to apply.
      Throws:
      IOException - if a remote or network exception occurs.
      Since:
      0.20.0
    • checkAndPut

      @Deprecated default boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put) throws IOException
      Deprecated.
      Since 2.0.0. Will be removed in 3.0.0. Use checkAndMutate(byte[], byte[])
      Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the put. If the passed value is null, the check is for the lack of column (ie: non-existance)
      Parameters:
      row - to check
      family - column family to check
      qualifier - column qualifier to check
      value - the expected value
      put - data to put if check succeeds
      Returns:
      true if the new put was executed, false otherwise
      Throws:
      IOException - e
    • checkAndPut

      @Deprecated default boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, Put put) throws IOException
      Deprecated.
      Since 2.0.0. Will be removed in 3.0.0. Use checkAndMutate(byte[], byte[])
      Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the put. If the passed value is null, the check is for the lack of column (ie: non-existence) The expected value argument of this call is on the left and the current value of the cell is on the right side of the comparison operator. Ie. eg. GREATER operator means expected value > existing <=> add the put.
      Parameters:
      row - to check
      family - column family to check
      qualifier - column qualifier to check
      compareOp - comparison operator to use
      value - the expected value
      put - data to put if check succeeds
      Returns:
      true if the new put was executed, false otherwise
      Throws:
      IOException - e
    • checkAndPut

      @Deprecated default boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareOperator op, byte[] value, Put put) throws IOException
      Deprecated.
      Since 2.0.0. Will be removed in 3.0.0. Use checkAndMutate(byte[], byte[])
      Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the put. If the passed value is null, the check is for the lack of column (ie: non-existence) The expected value argument of this call is on the left and the current value of the cell is on the right side of the comparison operator. Ie. eg. GREATER operator means expected value > existing <=> add the put.
      Parameters:
      row - to check
      family - column family to check
      qualifier - column qualifier to check
      op - comparison operator to use
      value - the expected value
      put - data to put if check succeeds
      Returns:
      true if the new put was executed, false otherwise
      Throws:
      IOException - e
    • delete

      default void delete(Delete delete) throws IOException
      Deletes the specified cells/row.
      Parameters:
      delete - The object that specifies what to delete.
      Throws:
      IOException - if a remote or network exception occurs.
      Since:
      0.20.0
    • delete

      default void delete(List<Delete> deletes) throws IOException
      Batch Deletes the specified cells/rows from the table.

      If a specified row does not exist, Delete will report as though sucessful delete; no exception will be thrown. If there are any failures even after retries, a RetriesExhaustedWithDetailsException will be thrown. RetriesExhaustedWithDetailsException contains lists of failed Deletes and corresponding remote exceptions.

      Parameters:
      deletes - List of things to delete. The input list gets modified by this method. All successfully applied Deletes in the list are removed (in particular it gets re-ordered, so the order in which the elements are inserted in the list gives no guarantee as to the order in which the Deletes are executed).
      Throws:
      IOException - if a remote or network exception occurs. In that case the deletes argument will contain the Delete instances that have not be successfully applied.
      Since:
      0.20.1
      API Note:
      In 3.0.0 version, the input list deletes will no longer be modified. Also, put(List) runs pre-flight validations on the input list on client. Currently delete(List) doesn't run validations on the client, there is no need currently, but this may change in the future. An IllegalArgumentException will be thrown in this case.
    • checkAndDelete

      @Deprecated default boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value, Delete delete) throws IOException
      Deprecated.
      Since 2.0.0. Will be removed in 3.0.0. Use checkAndMutate(byte[], byte[])
      Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the delete. If the passed value is null, the check is for the lack of column (ie: non-existance)
      Parameters:
      row - to check
      family - column family to check
      qualifier - column qualifier to check
      value - the expected value
      delete - data to delete if check succeeds
      Returns:
      true if the new delete was executed, false otherwise
      Throws:
      IOException - e
    • checkAndDelete

      @Deprecated default boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, Delete delete) throws IOException
      Deprecated.
      Since 2.0.0. Will be removed in 3.0.0. Use checkAndMutate(byte[], byte[])
      Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the delete. If the passed value is null, the check is for the lack of column (ie: non-existence) The expected value argument of this call is on the left and the current value of the cell is on the right side of the comparison operator. Ie. eg. GREATER operator means expected value > existing <=> add the delete.
      Parameters:
      row - to check
      family - column family to check
      qualifier - column qualifier to check
      compareOp - comparison operator to use
      value - the expected value
      delete - data to delete if check succeeds
      Returns:
      true if the new delete was executed, false otherwise
      Throws:
      IOException - e
    • checkAndDelete

      @Deprecated default boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareOperator op, byte[] value, Delete delete) throws IOException
      Deprecated.
      Since 2.0.0. Will be removed in 3.0.0. Use checkAndMutate(byte[], byte[])
      Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the delete. If the passed value is null, the check is for the lack of column (ie: non-existence) The expected value argument of this call is on the left and the current value of the cell is on the right side of the comparison operator. Ie. eg. GREATER operator means expected value > existing <=> add the delete.
      Parameters:
      row - to check
      family - column family to check
      qualifier - column qualifier to check
      op - comparison operator to use
      value - the expected value
      delete - data to delete if check succeeds
      Returns:
      true if the new delete was executed, false otherwise
      Throws:
      IOException - e
    • checkAndMutate

      @Deprecated default Table.CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family)
      Deprecated.
      Since 2.4.0, will be removed in 4.0.0. For internal test use only, do not use it any more.
      Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the Put/Delete/RowMutations.

      Use the returned Table.CheckAndMutateBuilder to construct your request and then execute it. This is a fluent style API, the code is like:

       
       table.checkAndMutate(row, family).qualifier(qualifier).ifNotExists().thenPut(put);
       
       
    • checkAndMutate

      Deprecated.
      Since 2.4.0, will be removed in 4.0.0. For internal test use only, do not use it any more.
      Atomically checks if a row matches the specified filter. If it does, it adds the Put/Delete/RowMutations.

      Use the returned Table.CheckAndMutateWithFilterBuilder to construct your request and then execute it. This is a fluent style API, the code is like:

       
       table.checkAndMutate(row, filter).thenPut(put);
       
       
    • checkAndMutate

      checkAndMutate that atomically checks if a row matches the specified condition. If it does, it performs the specified action.
      Parameters:
      checkAndMutate - The CheckAndMutate object.
      Returns:
      A CheckAndMutateResult object that represents the result for the CheckAndMutate.
      Throws:
      IOException - if a remote or network exception occurs.
    • checkAndMutate

      Batch version of checkAndMutate. The specified CheckAndMutates are batched only in the sense that they are sent to a RS in one RPC, but each CheckAndMutate operation is still executed atomically (and thus, each may fail independently of others).
      Parameters:
      checkAndMutates - The list of CheckAndMutate.
      Returns:
      A list of CheckAndMutateResult objects that represents the result for each CheckAndMutate.
      Throws:
      IOException - if a remote or network exception occurs.
    • mutateRow

      Performs multiple mutations atomically on a single row. Currently Put and Delete are supported.
      Parameters:
      rm - object that specifies the set of mutations to perform atomically
      Returns:
      results of Increment/Append operations
      Throws:
      IOException - if a remote or network exception occurs.
    • append

      default Result append(Append append) throws IOException
      Appends values to one or more columns within a single row.

      This operation guaranteed atomicity to readers. Appends are done under a single row lock, so write operations to a row are synchronized, and readers are guaranteed to see this operation fully completed.

      Parameters:
      append - object that specifies the columns and values to be appended
      Returns:
      values of columns after the append operation (maybe null)
      Throws:
      IOException - e
    • increment

      default Result increment(Increment increment) throws IOException
      Increments one or more columns within a single row.

      This operation ensures atomicity to readers. Increments are done under a single row lock, so write operations to a row are synchronized, and readers are guaranteed to see this operation fully completed.

      Parameters:
      increment - object that specifies the columns and amounts to be used for the increment operations
      Returns:
      values of columns after the increment
      Throws:
      IOException - e
    • incrementColumnValue

      default long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount) throws IOException
      Parameters:
      row - The row that contains the cell to increment.
      family - The column family of the cell to increment.
      qualifier - The column qualifier of the cell to increment.
      amount - The amount to increment the cell with (or decrement, if the amount is negative).
      Returns:
      The new value, post increment.
      Throws:
      IOException - if a remote or network exception occurs.
    • incrementColumnValue

      default long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, Durability durability) throws IOException
      Atomically increments a column value. If the column value already exists and is not a big-endian long, this could throw an exception. If the column value does not yet exist it is initialized to amount and written to the specified column.

      Setting durability to Durability.SKIP_WAL means that in a fail scenario you will lose any increments that have not been flushed.

      Parameters:
      row - The row that contains the cell to increment.
      family - The column family of the cell to increment.
      qualifier - The column qualifier of the cell to increment.
      amount - The amount to increment the cell with (or decrement, if the amount is negative).
      durability - The persistence guarantee for this increment.
      Returns:
      The new value, post increment.
      Throws:
      IOException - if a remote or network exception occurs.
    • close

      default void close() throws IOException
      Releases any resources held or pending changes in internal buffers.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - if a remote or network exception occurs.
    • coprocessorService

      Creates and returns a RpcChannel instance connected to the table region containing the specified row. The row given does not actually have to exist. Whichever region would contain the row based on start and end keys will be used. Note that the row parameter is also not passed to the coprocessor handler registered for this protocol, unless the row is separately passed as an argument in the service request. The parameter here is only used to locate the region used to handle the call.

      The obtained RpcChannel instance can be used to access a published coprocessor Service using standard protobuf service invocations:

       CoprocessorRpcChannel channel = myTable.coprocessorService(rowkey);
       MyService.BlockingInterface service = MyService.newBlockingStub(channel);
       MyCallRequest request = MyCallRequest.newBuilder()
           ...
           .build();
       MyCallResponse response = service.myCall(null, request);
       
      Parameters:
      row - The row key used to identify the remote region location
      Returns:
      A CoprocessorRpcChannel instance
    • coprocessorService

      default <T extends com.google.protobuf.Service, R> Map<byte[],R> coprocessorService(Class<T> service, byte[] startKey, byte[] endKey, Batch.Call<T,R> callable) throws com.google.protobuf.ServiceException, Throwable
      Creates an instance of the given Service subclass for each table region spanning the range from the startKey row to endKey row (inclusive), and invokes the passed Batch.Call.call(T) method with each Service instance.
      Type Parameters:
      T - the Service subclass to connect to
      R - Return type for the callable parameter's Batch.Call.call(T) method
      Parameters:
      service - the protocol buffer Service implementation to call
      startKey - start region selection with region containing this row. If null, the selection will start with the first table region.
      endKey - select regions up to and including the region containing this row. If null, selection will continue through the last table region.
      callable - this instance's Batch.Call.call(T) method will be invoked once per table region, using the Service instance connected to that region.
      Returns:
      a map of result values keyed by region name
      Throws:
      com.google.protobuf.ServiceException
      Throwable
    • coprocessorService

      default <T extends com.google.protobuf.Service, R> void coprocessorService(Class<T> service, byte[] startKey, byte[] endKey, Batch.Call<T,R> callable, Batch.Callback<R> callback) throws com.google.protobuf.ServiceException, Throwable
      Creates an instance of the given Service subclass for each table region spanning the range from the startKey row to endKey row (inclusive), and invokes the passed Batch.Call.call(T) method with each Service instance.

      The given Batch.Callback.update(byte[],byte[],Object) method will be called with the return value from each region's Batch.Call.call(T) invocation.

      Type Parameters:
      T - the Service subclass to connect to
      R - Return type for the callable parameter's Batch.Call.call(T) method
      Parameters:
      service - the protocol buffer Service implementation to call
      startKey - start region selection with region containing this row. If null, the selection will start with the first table region.
      endKey - select regions up to and including the region containing this row. If null, selection will continue through the last table region.
      callable - this instance's Batch.Call.call(T) method will be invoked once per table region, using the Service instance connected to that region.
      Throws:
      com.google.protobuf.ServiceException
      Throwable
    • batchCoprocessorService

      default <R extends com.google.protobuf.Message> Map<byte[],R> batchCoprocessorService(com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype) throws com.google.protobuf.ServiceException, Throwable
      Creates an instance of the given Service subclass for each table region spanning the range from the startKey row to endKey row (inclusive), all the invocations to the same region server will be batched into one call. The coprocessor service is invoked according to the service instance, method name and parameters. the descriptor for the protobuf service method to call. the method call parameters start region selection with region containing this row. If null, the selection will start with the first table region. select regions up to and including the region containing this row. If null, selection will continue through the last table region. the proto type of the response of the method in Service.
      Type Parameters:
      R - the response type for the coprocessor Service method
      Returns:
      a map of result values keyed by region name
      Throws:
      com.google.protobuf.ServiceException
      Throwable
    • batchCoprocessorService

      default <R extends com.google.protobuf.Message> void batchCoprocessorService(com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype, Batch.Callback<R> callback) throws com.google.protobuf.ServiceException, Throwable
      Creates an instance of the given Service subclass for each table region spanning the range from the startKey row to endKey row (inclusive), all the invocations to the same region server will be batched into one call. The coprocessor service is invoked according to the service instance, method name and parameters.

      The given Batch.Callback.update(byte[],byte[],Object) method will be called with the return value from each region's invocation.

      Type Parameters:
      R - the response type for the coprocessor Service method
      Parameters:
      methodDescriptor - the descriptor for the protobuf service method to call.
      request - the method call parameters
      startKey - start region selection with region containing this row. If null, the selection will start with the first table region.
      endKey - select regions up to and including the region containing this row. If null, selection will continue through the last table region.
      responsePrototype - the proto type of the response of the method in Service.
      callback - callback to invoke with the response for each region
      Throws:
      com.google.protobuf.ServiceException
      Throwable
    • checkAndMutate

      @Deprecated default boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, RowMutations mutation) throws IOException
      Deprecated.
      Since 2.0.0. Will be removed in 3.0.0. Use checkAndMutate(byte[], byte[])
      Atomically checks if a row/family/qualifier value matches the expected value. If it does, it performs the row mutations. If the passed value is null, the check is for the lack of column (ie: non-existence) The expected value argument of this call is on the left and the current value of the cell is on the right side of the comparison operator. Ie. eg. GREATER operator means expected value > existing <=> perform row mutations.
      Parameters:
      row - to check
      family - column family to check
      qualifier - column qualifier to check
      compareOp - the comparison operator
      value - the expected value
      mutation - mutations to perform if check succeeds
      Returns:
      true if the new put was executed, false otherwise
      Throws:
      IOException - e
    • checkAndMutate

      @Deprecated default boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareOperator op, byte[] value, RowMutations mutation) throws IOException
      Deprecated.
      Since 2.0.0. Will be removed in 3.0.0. Use checkAndMutate(byte[], byte[])
      Atomically checks if a row/family/qualifier value matches the expected value. If it does, it performs the row mutations. If the passed value is null, the check is for the lack of column (ie: non-existence) The expected value argument of this call is on the left and the current value of the cell is on the right side of the comparison operator. Ie. eg. GREATER operator means expected value > existing <=> perform row mutations.
      Parameters:
      row - to check
      family - column family to check
      qualifier - column qualifier to check
      op - the comparison operator
      value - the expected value
      mutation - mutations to perform if check succeeds
      Returns:
      true if the new put was executed, false otherwise
      Throws:
      IOException - e
    • getRpcTimeout

      default long getRpcTimeout(TimeUnit unit)
      Get timeout of each rpc request in this Table instance. It will be overridden by a more specific rpc timeout config such as readRpcTimeout or writeRpcTimeout.
      Parameters:
      unit - the unit of time the timeout to be represented in
      Returns:
      rpc timeout in the specified time unit
      See Also:
    • getRpcTimeout

      @Deprecated default int getRpcTimeout()
      Get timeout (millisecond) of each rpc request in this Table instance.
      Returns:
      Currently configured read timeout
    • setRpcTimeout

      @Deprecated default void setRpcTimeout(int rpcTimeout)
      Deprecated.
      Use setReadRpcTimeout or setWriteRpcTimeout instead
      Set timeout (millisecond) of each rpc request in operations of this Table instance, will override the value of hbase.rpc.timeout in configuration. If a rpc request waiting too long, it will stop waiting and send a new request to retry until retries exhausted or operation timeout reached.

      NOTE: This will set both the read and write timeout settings to the provided value.

      Parameters:
      rpcTimeout - the timeout of each rpc request in millisecond.
    • getReadRpcTimeout

      default long getReadRpcTimeout(TimeUnit unit)
      Get timeout of each rpc read request in this Table instance.
      Parameters:
      unit - the unit of time the timeout to be represented in
      Returns:
      read rpc timeout in the specified time unit
    • getReadRpcTimeout

      Deprecated.
      since 2.0 and will be removed in 3.0 version use getReadRpcTimeout(TimeUnit) instead
      Get timeout (millisecond) of each rpc read request in this Table instance.
    • setReadRpcTimeout

      @Deprecated default void setReadRpcTimeout(int readRpcTimeout)
      Deprecated.
      since 2.0.0, use TableBuilder.setReadRpcTimeout(int) instead
      Set timeout (millisecond) of each rpc read request in operations of this Table instance, will override the value of hbase.rpc.read.timeout in configuration. If a rpc read request waiting too long, it will stop waiting and send a new request to retry until retries exhausted or operation timeout reached.
      Parameters:
      readRpcTimeout - the timeout for read rpc request in milliseconds
    • getWriteRpcTimeout

      default long getWriteRpcTimeout(TimeUnit unit)
      Get timeout of each rpc write request in this Table instance.
      Parameters:
      unit - the unit of time the timeout to be represented in
      Returns:
      write rpc timeout in the specified time unit
    • getWriteRpcTimeout

      Deprecated.
      since 2.0 and will be removed in 3.0 version use getWriteRpcTimeout(TimeUnit) instead
      Get timeout (millisecond) of each rpc write request in this Table instance.
    • setWriteRpcTimeout

      @Deprecated default void setWriteRpcTimeout(int writeRpcTimeout)
      Deprecated.
      since 2.0.0, use TableBuilder.setWriteRpcTimeout(int) instead
      Set timeout (millisecond) of each rpc write request in operations of this Table instance, will override the value of hbase.rpc.write.timeout in configuration. If a rpc write request waiting too long, it will stop waiting and send a new request to retry until retries exhausted or operation timeout reached.
      Parameters:
      writeRpcTimeout - the timeout for write rpc request in milliseconds
    • getOperationTimeout

      default long getOperationTimeout(TimeUnit unit)
      Get timeout of each operation in Table instance.
      Parameters:
      unit - the unit of time the timeout to be represented in
      Returns:
      operation rpc timeout in the specified time unit
    • getOperationTimeout

      Deprecated.
      since 2.0 and will be removed in 3.0 version use getOperationTimeout(TimeUnit) instead
      Get timeout (millisecond) of each operation for in Table instance.
    • setOperationTimeout

      @Deprecated default void setOperationTimeout(int operationTimeout)
      Deprecated.
      since 2.0.0, use TableBuilder.setOperationTimeout(int) instead
      Set timeout (millisecond) of each operation in this Table instance, will override the value of hbase.client.operation.timeout in configuration. Operation timeout is a top-level restriction that makes sure a blocking method will not be blocked more than this. In each operation, if rpc request fails because of timeout or other reason, it will retry until success or throw a RetriesExhaustedException. But if the total time being blocking reach the operation timeout before retries exhausted, it will break early and throw SocketTimeoutException.
      Parameters:
      operationTimeout - the total timeout of each operation in millisecond.
    • getRequestAttributes

      default Map<String,byte[]> getRequestAttributes()
      Get the attributes to be submitted with requests
      Returns:
      map of request attributes