001/**
002 *
003 * Licensed to the Apache Software Foundation (ASF) under one
004 * or more contributor license agreements.  See the NOTICE file
005 * distributed with this work for additional information
006 * regarding copyright ownership.  The ASF licenses this file
007 * to you under the Apache License, Version 2.0 (the
008 * "License"); you may not use this file except in compliance
009 * with the License.  You may obtain a copy of the License at
010 *
011 *     http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 */
019package org.apache.hadoop.hbase.client;
020
021import java.io.Closeable;
022import java.io.IOException;
023import java.util.List;
024import java.util.Map;
025
026import org.apache.hadoop.conf.Configuration;
027import org.apache.hadoop.hbase.HTableDescriptor;
028import org.apache.hadoop.hbase.TableName;
029import org.apache.hadoop.hbase.classification.InterfaceAudience;
030import org.apache.hadoop.hbase.client.coprocessor.Batch;
031import org.apache.hadoop.hbase.filter.CompareFilter;
032import org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel;
033
034import com.google.protobuf.Descriptors;
035import com.google.protobuf.Message;
036import com.google.protobuf.Service;
037import com.google.protobuf.ServiceException;
038
039/**
040 * Used to communicate with a single HBase table.
041 * Obtain an instance from a {@link Connection} and call {@link #close()} afterwards.
042 *
043 * <p>Table can be used to get, put, delete or scan data from a table.
044 * @see ConnectionFactory
045 * @see Connection
046 * @see Admin
047 * @see RegionLocator
048 * @since 0.99.0
049 */
050@InterfaceAudience.Public
051public interface Table extends Closeable {
052  /**
053   * Gets the fully qualified table name instance of this table.
054   */
055  TableName getName();
056
057  /**
058   * Returns the {@link org.apache.hadoop.conf.Configuration} object used by this instance.
059   * <p>
060   * The reference returned is not a copy, so any change made to it will
061   * affect this instance.
062   */
063  Configuration getConfiguration();
064
065  /**
066   * Gets the {@link org.apache.hadoop.hbase.HTableDescriptor table descriptor} for this table.
067   * @throws java.io.IOException if a remote or network exception occurs.
068   */
069  HTableDescriptor getTableDescriptor() throws IOException;
070
071  /**
072   * Test for the existence of columns in the table, as specified by the Get.
073   * <p>
074   *
075   * This will return true if the Get matches one or more keys, false if not.
076   * <p>
077   *
078   * This is a server-side call so it prevents any data from being transfered to
079   * the client.
080   *
081   * @param get the Get
082   * @return true if the specified Get matches one or more keys, false if not
083   * @throws IOException e
084   */
085  boolean exists(Get get) throws IOException;
086
087  /**
088   * Test for the existence of columns in the table, as specified by the Gets.
089   * <p>
090   *
091   * This will return an array of booleans. Each value will be true if the related Get matches
092   * one or more keys, false if not.
093   * <p>
094   *
095   * This is a server-side call so it prevents any data from being transferred to
096   * the client.
097   *
098   * @param gets the Gets
099   * @return Array of boolean.  True if the specified Get matches one or more keys, false if not.
100   * @throws IOException e
101   */
102  boolean[] existsAll(List<Get> gets) throws IOException;
103
104  /**
105   * Method that does a batch call on Deletes, Gets, Puts, Increments and Appends.
106   * The ordering of execution of the actions is not defined. Meaning if you do a Put and a
107   * Get in the same {@link #batch} call, you will not necessarily be
108   * guaranteed that the Get returns what the Put had put.
109   *
110   * @param actions list of Get, Put, Delete, Increment, Append objects
111   * @param results Empty Object[], same size as actions. Provides access to partial
112   *                results, in case an exception is thrown. A null in the result array means that
113   *                the call for that action failed, even after retries. The order of the objects
114   *                in the results array corresponds to the order of actions in the request list.
115   * @throws IOException
116   * @since 0.90.0
117   */
118  void batch(final List<? extends Row> actions, final Object[] results) throws IOException,
119    InterruptedException;
120
121  /**
122   * Same as {@link #batch(List, Object[])}, but with a callback.
123   * @since 0.96.0
124   */
125  <R> void batchCallback(
126    final List<? extends Row> actions, final Object[] results, final Batch.Callback<R> callback
127  )
128    throws IOException, InterruptedException;
129
130  /**
131   * Extracts certain cells from a given row.
132   * @param get The object that specifies what data to fetch and from which row.
133   * @return The data coming from the specified row, if it exists.  If the row
134   * specified doesn't exist, the {@link Result} instance returned won't
135   * contain any {@link org.apache.hadoop.hbase.KeyValue}, as indicated by {@link Result#isEmpty()}.
136   * @throws IOException if a remote or network exception occurs.
137   * @since 0.20.0
138   */
139  Result get(Get get) throws IOException;
140
141  /**
142   * Extracts certain cells from the given rows, in batch.
143   *
144   * @param gets The objects that specify what data to fetch and from which rows.
145   * @return The data coming from the specified rows, if it exists.  If the row specified doesn't
146   * exist, the {@link Result} instance returned won't contain any {@link
147   * org.apache.hadoop.hbase.KeyValue}, as indicated by {@link Result#isEmpty()}. If there are any
148   * failures even after retries, there will be a null in the results array for those Gets, AND an
149   * exception will be thrown. The ordering of the Result array corresponds to the order of the
150   * list of Get requests.
151   * @throws IOException if a remote or network exception occurs.
152   * @since 0.90.0
153   */
154  Result[] get(List<Get> gets) throws IOException;
155
156  /**
157   * Returns a scanner on the current table as specified by the {@link Scan}
158   * object.
159   * Note that the passed {@link Scan}'s start row and caching properties
160   * maybe changed.
161   *
162   * @param scan A configured {@link Scan} object.
163   * @return A scanner.
164   * @throws IOException if a remote or network exception occurs.
165   * @since 0.20.0
166   */
167  ResultScanner getScanner(Scan scan) throws IOException;
168
169  /**
170   * Gets a scanner on the current table for the given family.
171   *
172   * @param family The column family to scan.
173   * @return A scanner.
174   * @throws IOException if a remote or network exception occurs.
175   * @since 0.20.0
176   */
177  ResultScanner getScanner(byte[] family) throws IOException;
178
179  /**
180   * Gets a scanner on the current table for the given family and qualifier.
181   *
182   * @param family The column family to scan.
183   * @param qualifier The column qualifier to scan.
184   * @return A scanner.
185   * @throws IOException if a remote or network exception occurs.
186   * @since 0.20.0
187   */
188  ResultScanner getScanner(byte[] family, byte[] qualifier) throws IOException;
189
190
191  /**
192   * Puts some data in the table.
193   *
194   * @param put The data to put.
195   * @throws IOException if a remote or network exception occurs.
196   * @since 0.20.0
197   */
198  void put(Put put) throws IOException;
199
200  /**
201   * Puts some data in the table, in batch.
202   * <p>
203   * This can be used for group commit, or for submitting user defined
204   * batches.  The writeBuffer will be periodically inspected while the List
205   * is processed, so depending on the List size the writeBuffer may flush
206   * not at all, or more than once.
207   * @param puts The list of mutations to apply. The batch put is done by
208   * aggregating the iteration of the Puts over the write buffer
209   * at the client-side for a single RPC call.
210   * @throws IOException if a remote or network exception occurs.
211   * @since 0.20.0
212   */
213  void put(List<Put> puts) throws IOException;
214
215  /**
216   * Atomically checks if a row/family/qualifier value matches the expected
217   * value. If it does, it adds the put.  If the passed value is null, the check
218   * is for the lack of column (ie: non-existance)
219   *
220   * @param row to check
221   * @param family column family to check
222   * @param qualifier column qualifier to check
223   * @param value the expected value
224   * @param put data to put if check succeeds
225   * @throws IOException e
226   * @return true if the new put was executed, false otherwise
227   */
228  boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
229    byte[] value, Put put) throws IOException;
230
231  /**
232   * Atomically checks if a row/family/qualifier value matches the expected
233   * value. If it does, it adds the put.  If the passed value is null, the check
234   * is for the lack of column (ie: non-existence)
235   *
236   * The expected value argument of this call is on the left and the current
237   * value of the cell is on the right side of the comparison operator.
238   *
239   * Ie. eg. GREATER operator means expected value > existing <=> add the put.
240   *
241   * @param row to check
242   * @param family column family to check
243   * @param qualifier column qualifier to check
244   * @param compareOp comparison operator to use
245   * @param value the expected value
246   * @param put data to put if check succeeds
247   * @throws IOException e
248   * @return true if the new put was executed, false otherwise
249   */
250  boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
251    CompareFilter.CompareOp compareOp, byte[] value, Put put) throws IOException;
252
253  /**
254   * Deletes the specified cells/row.
255   *
256   * @param delete The object that specifies what to delete.
257   * @throws IOException if a remote or network exception occurs.
258   * @since 0.20.0
259   */
260  void delete(Delete delete) throws IOException;
261
262  /**
263   * Deletes the specified cells/rows in bulk.
264   * @param deletes List of things to delete.  List gets modified by this
265   * method (in particular it gets re-ordered, so the order in which the elements
266   * are inserted in the list gives no guarantee as to the order in which the
267   * {@link Delete}s are executed).
268   * @throws IOException if a remote or network exception occurs. In that case
269   * the {@code deletes} argument will contain the {@link Delete} instances
270   * that have not be successfully applied.
271   * @since 0.20.1
272   */
273  void delete(List<Delete> deletes) throws IOException;
274
275  /**
276   * Atomically checks if a row/family/qualifier value matches the expected
277   * value. If it does, it adds the delete.  If the passed value is null, the
278   * check is for the lack of column (ie: non-existance)
279   *
280   * @param row to check
281   * @param family column family to check
282   * @param qualifier column qualifier to check
283   * @param value the expected value
284   * @param delete data to delete if check succeeds
285   * @throws IOException e
286   * @return true if the new delete was executed, false otherwise
287   */
288  boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
289    byte[] value, Delete delete) throws IOException;
290
291  /**
292   * Atomically checks if a row/family/qualifier value matches the expected
293   * value. If it does, it adds the delete.  If the passed value is null, the
294   * check is for the lack of column (ie: non-existence)
295   *
296   * The expected value argument of this call is on the left and the current
297   * value of the cell is on the right side of the comparison operator.
298   *
299   * Ie. eg. GREATER operator means expected value > existing <=> add the delete.
300   *
301   * @param row to check
302   * @param family column family to check
303   * @param qualifier column qualifier to check
304   * @param compareOp comparison operator to use
305   * @param value the expected value
306   * @param delete data to delete if check succeeds
307   * @throws IOException e
308   * @return true if the new delete was executed, false otherwise
309   */
310  boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
311    CompareFilter.CompareOp compareOp, byte[] value, Delete delete) throws IOException;
312
313  /**
314   * Performs multiple mutations atomically on a single row. Currently
315   * {@link Put} and {@link Delete} are supported.
316   *
317   * @param rm object that specifies the set of mutations to perform atomically
318   * @throws IOException
319   */
320  void mutateRow(final RowMutations rm) throws IOException;
321
322  /**
323   * Appends values to one or more columns within a single row.
324   * <p>
325   * This operation does not appear atomic to readers.  Appends are done
326   * under a single row lock, so write operations to a row are synchronized, but
327   * readers do not take row locks so get and scan operations can see this
328   * operation partially completed.
329   *
330   * @param append object that specifies the columns and amounts to be used
331   *                  for the increment operations
332   * @throws IOException e
333   * @return values of columns after the append operation (maybe null)
334   */
335  Result append(final Append append) throws IOException;
336
337  /**
338   * Increments one or more columns within a single row.
339   * <p>
340   * This operation does not appear atomic to readers.  Increments are done
341   * under a single row lock, so write operations to a row are synchronized, but
342   * readers do not take row locks so get and scan operations can see this
343   * operation partially completed.
344   *
345   * @param increment object that specifies the columns and amounts to be used
346   *                  for the increment operations
347   * @throws IOException e
348   * @return values of columns after the increment
349   */
350  Result increment(final Increment increment) throws IOException;
351
352  /**
353   * See {@link #incrementColumnValue(byte[], byte[], byte[], long, Durability)}
354   * <p>
355   * The {@link Durability} is defaulted to {@link Durability#SYNC_WAL}.
356   * @param row The row that contains the cell to increment.
357   * @param family The column family of the cell to increment.
358   * @param qualifier The column qualifier of the cell to increment.
359   * @param amount The amount to increment the cell with (or decrement, if the
360   * amount is negative).
361   * @return The new value, post increment.
362   * @throws IOException if a remote or network exception occurs.
363   */
364  long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier,
365    long amount) throws IOException;
366
367  /**
368   * Atomically increments a column value. If the column value already exists
369   * and is not a big-endian long, this could throw an exception. If the column
370   * value does not yet exist it is initialized to <code>amount</code> and
371   * written to the specified column.
372   *
373   * <p>Setting durability to {@link Durability#SKIP_WAL} means that in a fail
374   * scenario you will lose any increments that have not been flushed.
375   * @param row The row that contains the cell to increment.
376   * @param family The column family of the cell to increment.
377   * @param qualifier The column qualifier of the cell to increment.
378   * @param amount The amount to increment the cell with (or decrement, if the
379   * amount is negative).
380   * @param durability The persistence guarantee for this increment.
381   * @return The new value, post increment.
382   * @throws IOException if a remote or network exception occurs.
383   */
384  long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier,
385    long amount, Durability durability) throws IOException;
386
387  /**
388   * Releases any resources held or pending changes in internal buffers.
389   *
390   * @throws IOException if a remote or network exception occurs.
391   */
392  @Override
393  void close() throws IOException;
394
395  /**
396   * Creates and returns a {@link com.google.protobuf.RpcChannel} instance connected to the
397   * table region containing the specified row.  The row given does not actually have
398   * to exist.  Whichever region would contain the row based on start and end keys will
399   * be used.  Note that the {@code row} parameter is also not passed to the
400   * coprocessor handler registered for this protocol, unless the {@code row}
401   * is separately passed as an argument in the service request.  The parameter
402   * here is only used to locate the region used to handle the call.
403   *
404   * <p>
405   * The obtained {@link com.google.protobuf.RpcChannel} instance can be used to access a published
406   * coprocessor {@link com.google.protobuf.Service} using standard protobuf service invocations:
407   * </p>
408   *
409   * <div style="background-color: #cccccc; padding: 2px">
410   * <blockquote><pre>
411   * CoprocessorRpcChannel channel = myTable.coprocessorService(rowkey);
412   * MyService.BlockingInterface service = MyService.newBlockingStub(channel);
413   * MyCallRequest request = MyCallRequest.newBuilder()
414   *     ...
415   *     .build();
416   * MyCallResponse response = service.myCall(null, request);
417   * </pre></blockquote></div>
418   *
419   * @param row The row key used to identify the remote region location
420   * @return A CoprocessorRpcChannel instance
421   */
422  CoprocessorRpcChannel coprocessorService(byte[] row);
423
424  /**
425   * Creates an instance of the given {@link com.google.protobuf.Service} subclass for each table
426   * region spanning the range from the {@code startKey} row to {@code endKey} row (inclusive), and
427   * invokes the passed {@link org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} method
428   * with each {@link com.google.protobuf.Service} instance.
429   *
430   * @param service the protocol buffer {@code Service} implementation to call
431   * @param startKey start region selection with region containing this row.  If {@code null}, the
432   * selection will start with the first table region.
433   * @param endKey select regions up to and including the region containing this row. If {@code
434   * null}, selection will continue through the last table region.
435   * @param callable this instance's {@link org.apache.hadoop.hbase.client.coprocessor.Batch
436   * .Call#call}
437   * method will be invoked once per table region, using the {@link com.google.protobuf.Service}
438   * instance connected to that region.
439   * @param <T> the {@link com.google.protobuf.Service} subclass to connect to
440   * @param <R> Return type for the {@code callable} parameter's {@link
441   * org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} method
442   * @return a map of result values keyed by region name
443   */
444  <T extends Service, R> Map<byte[],R> coprocessorService(final Class<T> service,
445    byte[] startKey, byte[] endKey, final Batch.Call<T,R> callable)
446    throws ServiceException, Throwable;
447
448  /**
449   * Creates an instance of the given {@link com.google.protobuf.Service} subclass for each table
450   * region spanning the range from the {@code startKey} row to {@code endKey} row (inclusive), and
451   * invokes the passed {@link org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} method
452   * with each {@link Service} instance.
453   *
454   * <p> The given {@link org.apache.hadoop.hbase.client.coprocessor.Batch.Callback#update(byte[],
455   * byte[], Object)} method will be called with the return value from each region's {@link
456   * org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} invocation. </p>
457   *
458   * @param service the protocol buffer {@code Service} implementation to call
459   * @param startKey start region selection with region containing this row.  If {@code null}, the
460   * selection will start with the first table region.
461   * @param endKey select regions up to and including the region containing this row. If {@code
462   * null}, selection will continue through the last table region.
463   * @param callable this instance's {@link org.apache.hadoop.hbase.client.coprocessor.Batch
464   * .Call#call}
465   * method will be invoked once per table region, using the {@link Service} instance connected to
466   * that region.
467   * @param callback
468   * @param <T> the {@link Service} subclass to connect to
469   * @param <R> Return type for the {@code callable} parameter's {@link
470   * org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} method
471   */
472  <T extends Service, R> void coprocessorService(final Class<T> service,
473    byte[] startKey, byte[] endKey, final Batch.Call<T,R> callable,
474    final Batch.Callback<R> callback) throws ServiceException, Throwable;
475
476  /**
477   * Returns the maximum size in bytes of the write buffer for this HTable.
478   * <p>
479   * The default value comes from the configuration parameter
480   * {@code hbase.client.write.buffer}.
481   * @return The size of the write buffer in bytes.
482    * @deprecated as of 1.0.1 (should not have been in 1.0.0). Replaced by {@link BufferedMutator#getWriteBufferSize()}
483   */
484  @Deprecated
485  long getWriteBufferSize();
486
487  /**
488   * Sets the size of the buffer in bytes.
489   * <p>
490   * If the new size is less than the current amount of data in the
491   * write buffer, the buffer gets flushed.
492   * @param writeBufferSize The new write buffer size, in bytes.
493   * @throws IOException if a remote or network exception occurs.
494   * @deprecated as of 1.0.1 (should not have been in 1.0.0). Replaced by {@link BufferedMutator} and
495   * {@link BufferedMutatorParams#writeBufferSize(long)}
496   */
497  @Deprecated
498  void setWriteBufferSize(long writeBufferSize) throws IOException;
499
500  /**
501   * Creates an instance of the given {@link com.google.protobuf.Service} subclass for each table
502   * region spanning the range from the {@code startKey} row to {@code endKey} row (inclusive), all
503   * the invocations to the same region server will be batched into one call. The coprocessor
504   * service is invoked according to the service instance, method name and parameters.
505   *
506   * @param methodDescriptor
507   *          the descriptor for the protobuf service method to call.
508   * @param request
509   *          the method call parameters
510   * @param startKey
511   *          start region selection with region containing this row. If {@code null}, the
512   *          selection will start with the first table region.
513   * @param endKey
514   *          select regions up to and including the region containing this row. If {@code null},
515   *          selection will continue through the last table region.
516   * @param responsePrototype
517   *          the proto type of the response of the method in Service.
518   * @param <R>
519   *          the response type for the coprocessor Service method
520   * @throws ServiceException
521   * @throws Throwable
522   * @return a map of result values keyed by region name
523   */
524  <R extends Message> Map<byte[], R> batchCoprocessorService(
525    Descriptors.MethodDescriptor methodDescriptor, Message request,
526    byte[] startKey, byte[] endKey, R responsePrototype) throws ServiceException, Throwable;
527
528  /**
529   * Creates an instance of the given {@link com.google.protobuf.Service} subclass for each table
530   * region spanning the range from the {@code startKey} row to {@code endKey} row (inclusive), all
531   * the invocations to the same region server will be batched into one call. The coprocessor
532   * service is invoked according to the service instance, method name and parameters.
533   *
534   * <p>
535   * The given
536   * {@link org.apache.hadoop.hbase.client.coprocessor.Batch.Callback#update(byte[],byte[],Object)}
537   * method will be called with the return value from each region's invocation.
538   * </p>
539   *
540   * @param methodDescriptor
541   *          the descriptor for the protobuf service method to call.
542   * @param request
543   *          the method call parameters
544   * @param startKey
545   *          start region selection with region containing this row. If {@code null}, the
546   *          selection will start with the first table region.
547   * @param endKey
548   *          select regions up to and including the region containing this row. If {@code null},
549   *          selection will continue through the last table region.
550   * @param responsePrototype
551   *          the proto type of the response of the method in Service.
552   * @param callback
553   *          callback to invoke with the response for each region
554   * @param <R>
555   *          the response type for the coprocessor Service method
556   * @throws ServiceException
557   * @throws Throwable
558   */
559  <R extends Message> void batchCoprocessorService(Descriptors.MethodDescriptor methodDescriptor,
560    Message request, byte[] startKey, byte[] endKey, R responsePrototype,
561    Batch.Callback<R> callback) throws ServiceException, Throwable;
562
563  /**
564   * Atomically checks if a row/family/qualifier value matches the expected value.
565   * If it does, it performs the row mutations.  If the passed value is null, the check
566   * is for the lack of column (ie: non-existence)
567   *
568   * The expected value argument of this call is on the left and the current
569   * value of the cell is on the right side of the comparison operator.
570   *
571   * Ie. eg. GREATER operator means expected value > existing <=> perform row mutations.
572   *
573   * @param row to check
574   * @param family column family to check
575   * @param qualifier column qualifier to check
576   * @param compareOp the comparison operator
577   * @param value the expected value
578   * @param mutation  mutations to perform if check succeeds
579   * @throws IOException e
580   * @return true if the new put was executed, false otherwise
581   */
582  boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
583      CompareFilter.CompareOp compareOp, byte[] value, RowMutations mutation) throws IOException;
584
585  /**
586   * Set timeout (millisecond) of each operation in this Table instance, will override the value
587   * of hbase.client.operation.timeout in configuration.
588   * Operation timeout is a top-level restriction that makes sure a blocking method will not be
589   * blocked more than this. In each operation, if rpc request fails because of timeout or
590   * other reason, it will retry until success or throw a RetriesExhaustedException. But if the
591   * total time being blocking reach the operation timeout before retries exhausted, it will break
592   * early and throw SocketTimeoutException.
593   * @param operationTimeout the total timeout of each operation in millisecond.
594   * @deprecated since 2.0.0, use {@link TableBuilder#setOperationTimeout} instead
595   */
596  @Deprecated
597  void setOperationTimeout(int operationTimeout);
598
599  /**
600   * Get timeout (millisecond) of each operation for in Table instance.
601   */
602  int getOperationTimeout();
603
604  /**
605   * Get timeout (millisecond) of each rpc request in this Table instance.
606   *
607   * @returns Currently configured read timeout
608   * @deprecated Use getReadRpcTimeout or getWriteRpcTimeout instead
609   */
610  @Deprecated
611  int getRpcTimeout();
612
613  /**
614   * Set timeout (millisecond) of each rpc request in operations of this Table instance, will
615   * override the value of hbase.rpc.timeout in configuration.
616   * If a rpc request waiting too long, it will stop waiting and send a new request to retry until
617   * retries exhausted or operation timeout reached.
618   * <p>
619   * NOTE: This will set both the read and write timeout settings to the provided value.
620   *
621   * @param rpcTimeout the timeout of each rpc request in millisecond.
622   *
623   * @deprecated Use setReadRpcTimeout or setWriteRpcTimeout instead
624   */
625  @Deprecated
626  void setRpcTimeout(int rpcTimeout);
627
628  /**
629   * Get timeout (millisecond) of each rpc read request in this Table instance.
630   */
631  int getReadRpcTimeout();
632
633  /**
634   * Set timeout (millisecond) of each rpc read request in operations of this Table instance, will
635   * override the value of hbase.rpc.read.timeout in configuration.
636   * If a rpc read request waiting too long, it will stop waiting and send a new request to retry
637   * until retries exhausted or operation timeout reached.
638   *
639   * @param readRpcTimeout
640   * @deprecated since 2.0.0, use {@link TableBuilder#setReadRpcTimeout} instead
641   */
642  @Deprecated
643  void setReadRpcTimeout(int readRpcTimeout);
644
645  /**
646   * Get timeout (millisecond) of each rpc write request in this Table instance.
647   */
648  int getWriteRpcTimeout();
649
650  /**
651   * Set timeout (millisecond) of each rpc write request in operations of this Table instance, will
652   * override the value of hbase.rpc.write.timeout in configuration.
653   * If a rpc write request waiting too long, it will stop waiting and send a new request to retry
654   * until retries exhausted or operation timeout reached.
655   *
656   * @param writeRpcTimeout
657   * @deprecated since 2.0.0, use {@link TableBuilder#setWriteRpcTimeout} instead
658   */
659  @Deprecated
660  void setWriteRpcTimeout(int writeRpcTimeout);
661}