org.apache.hadoop.hbase.client.Table.setRpcTimeout()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中org.apache.hadoop.hbase.client.Table.setRpcTimeout()方法的一些代码示例,展示了Table.setRpcTimeout()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setRpcTimeout()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Table
类名称:Table
方法名:setRpcTimeout

Table.setRpcTimeout介绍

[英]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.
[中]在此表实例的操作中设置每个rpc请求的超时(毫秒),将覆盖hbase的值。rpc。配置超时。如果rpc请求等待时间过长,它将停止等待,并发送一个新请求以重试,直到重试次数用尽或达到操作超时。
注意:这会将读取和写入超时设置设置设置为提供的值。

代码示例

代码示例来源:origin: apache/phoenix

  1. @Override
  2. public void setRpcTimeout(int rpcTimeout) {
  3. delegate.setRpcTimeout(rpcTimeout);
  4. }

代码示例来源:origin: apache/hbase

  1. try {
  2. try( Table table = TEST_UTIL.getConnection().getTable(tableName)) {
  3. table.setRpcTimeout(1000);
  4. Delete delete = new Delete(ROW1);
  5. table.delete(delete);
  6. table.setRpcTimeout(1000);
  7. table.get(new Get(ROW2)); // Will throw exception if the timeout checking is failed
  8. } finally {

代码示例来源:origin: apache/hbase

  1. @Test
  2. public void testgetColumnHint() throws IOException {
  3. try (Table t = createTable()) {
  4. t.setOperationTimeout(10000);
  5. t.setRpcTimeout(10000);
  6. t.put(new Put(ROW).addColumn(FAMILY, col1, 100, value));
  7. t.put(new Put(ROW).addColumn(FAMILY, col1, 101, value));
  8. t.put(new Put(ROW).addColumn(FAMILY, col1, 102, value));
  9. t.put(new Put(ROW).addColumn(FAMILY, col1, 103, value));
  10. t.put(new Put(ROW).addColumn(FAMILY, col1, 104, value));
  11. t.put(new Put(ROW2).addColumn(FAMILY, col1, 104, value));
  12. TEST_UTIL.getAdmin().flush(t.getName());
  13. t.delete(new Delete(ROW).addColumn(FAMILY, col1));
  14. }
  15. }

代码示例来源:origin: org.apache.phoenix/phoenix-core

  1. @Override
  2. public void setRpcTimeout(int rpcTimeout) {
  3. delegate.setRpcTimeout(rpcTimeout);
  4. }

代码示例来源:origin: com.aliyun.phoenix/ali-phoenix-core

  1. @Override
  2. public void setRpcTimeout(int rpcTimeout) {
  3. delegate.setRpcTimeout(rpcTimeout);
  4. }

代码示例来源:origin: org.apache.hbase/hbase-server

  1. try {
  2. try( Table table = TEST_UTIL.getConnection().getTable(tableName)) {
  3. table.setRpcTimeout(1000);
  4. Delete delete = new Delete(ROW1);
  5. table.delete(delete);
  6. table.setRpcTimeout(1000);
  7. table.get(new Get(ROW2)); // Will throw exception if the timeout checking is failed
  8. } finally {

代码示例来源:origin: org.apache.hbase/hbase-server

  1. @Test
  2. public void testgetColumnHint() throws IOException {
  3. try (Table t = createTable()) {
  4. t.setOperationTimeout(10000);
  5. t.setRpcTimeout(10000);
  6. t.put(new Put(ROW).addColumn(FAMILY, col1, 100, value));
  7. t.put(new Put(ROW).addColumn(FAMILY, col1, 101, value));
  8. t.put(new Put(ROW).addColumn(FAMILY, col1, 102, value));
  9. t.put(new Put(ROW).addColumn(FAMILY, col1, 103, value));
  10. t.put(new Put(ROW).addColumn(FAMILY, col1, 104, value));
  11. t.put(new Put(ROW2).addColumn(FAMILY, col1, 104, value));
  12. TEST_UTIL.getAdmin().flush(t.getName());
  13. t.delete(new Delete(ROW).addColumn(FAMILY, col1));
  14. }
  15. }

相关文章