本文整理了Java中org.apache.hadoop.hbase.client.Table.setRpcTimeout()
方法的一些代码示例,展示了Table.setRpcTimeout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setRpcTimeout()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Table
类名称: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
@Override
public void setRpcTimeout(int rpcTimeout) {
delegate.setRpcTimeout(rpcTimeout);
}
代码示例来源:origin: apache/hbase
try {
try( Table table = TEST_UTIL.getConnection().getTable(tableName)) {
table.setRpcTimeout(1000);
Delete delete = new Delete(ROW1);
table.delete(delete);
table.setRpcTimeout(1000);
table.get(new Get(ROW2)); // Will throw exception if the timeout checking is failed
} finally {
代码示例来源:origin: apache/hbase
@Test
public void testgetColumnHint() throws IOException {
try (Table t = createTable()) {
t.setOperationTimeout(10000);
t.setRpcTimeout(10000);
t.put(new Put(ROW).addColumn(FAMILY, col1, 100, value));
t.put(new Put(ROW).addColumn(FAMILY, col1, 101, value));
t.put(new Put(ROW).addColumn(FAMILY, col1, 102, value));
t.put(new Put(ROW).addColumn(FAMILY, col1, 103, value));
t.put(new Put(ROW).addColumn(FAMILY, col1, 104, value));
t.put(new Put(ROW2).addColumn(FAMILY, col1, 104, value));
TEST_UTIL.getAdmin().flush(t.getName());
t.delete(new Delete(ROW).addColumn(FAMILY, col1));
}
}
代码示例来源:origin: org.apache.phoenix/phoenix-core
@Override
public void setRpcTimeout(int rpcTimeout) {
delegate.setRpcTimeout(rpcTimeout);
}
代码示例来源:origin: com.aliyun.phoenix/ali-phoenix-core
@Override
public void setRpcTimeout(int rpcTimeout) {
delegate.setRpcTimeout(rpcTimeout);
}
代码示例来源:origin: org.apache.hbase/hbase-server
try {
try( Table table = TEST_UTIL.getConnection().getTable(tableName)) {
table.setRpcTimeout(1000);
Delete delete = new Delete(ROW1);
table.delete(delete);
table.setRpcTimeout(1000);
table.get(new Get(ROW2)); // Will throw exception if the timeout checking is failed
} finally {
代码示例来源:origin: org.apache.hbase/hbase-server
@Test
public void testgetColumnHint() throws IOException {
try (Table t = createTable()) {
t.setOperationTimeout(10000);
t.setRpcTimeout(10000);
t.put(new Put(ROW).addColumn(FAMILY, col1, 100, value));
t.put(new Put(ROW).addColumn(FAMILY, col1, 101, value));
t.put(new Put(ROW).addColumn(FAMILY, col1, 102, value));
t.put(new Put(ROW).addColumn(FAMILY, col1, 103, value));
t.put(new Put(ROW).addColumn(FAMILY, col1, 104, value));
t.put(new Put(ROW2).addColumn(FAMILY, col1, 104, value));
TEST_UTIL.getAdmin().flush(t.getName());
t.delete(new Delete(ROW).addColumn(FAMILY, col1));
}
}
内容来源于网络,如有侵权,请联系作者删除!