本文整理了Java中org.apache.hadoop.hbase.quotas.QuotaRetriever.close
方法的一些代码示例,展示了QuotaRetriever.close
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuotaRetriever.close
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.quotas.QuotaRetriever
类名称:QuotaRetriever
方法名:close
暂无
代码示例来源:origin: apache/hbase
void init(final Connection conn, final Scan scan) throws IOException {
this.connection = Objects.requireNonNull(conn);
this.table = this.connection.getTable(QuotaTableUtil.QUOTA_TABLE_NAME);
try {
scanner = table.getScanner(scan);
} catch (IOException e) {
try {
close();
} catch (IOException ioe) {
LOG.warn("Failed getting scanner and then failed close on cleanup", e);
}
throw e;
}
}
代码示例来源:origin: apache/hbase
private int countResults(final QuotaFilter filter) throws Exception {
QuotaRetriever scanner = QuotaRetriever.open(TEST_UTIL.getConfiguration(), filter);
try {
int count = 0;
for (QuotaSettings settings: scanner) {
LOG.debug(Objects.toString(settings));
count++;
}
return count;
} finally {
scanner.close();
}
}
}
代码示例来源:origin: apache/hbase
/**
* Returns the number of quotas defined in the HBase quota table.
*/
long listNumDefinedQuotas(Connection conn) throws IOException {
QuotaRetriever scanner = QuotaRetriever.open(conn.getConfiguration());
try {
return Iterables.size(scanner);
} finally {
if (scanner != null) {
scanner.close();
}
}
}
代码示例来源:origin: apache/hbase
scanner.close();
代码示例来源:origin: apache/hbase
assertSpaceQuota(sizeLimit, violationPolicy, Iterables.getOnlyElement(scanner));
} finally {
scanner.close();
assertNull("Did not expect to find a quota entry", scanner.next());
} finally {
scanner.close();
代码示例来源:origin: org.apache.hbase/hbase-client
void init(final Connection conn, final Scan scan) throws IOException {
this.connection = Objects.requireNonNull(conn);
this.table = this.connection.getTable(QuotaTableUtil.QUOTA_TABLE_NAME);
try {
scanner = table.getScanner(scan);
} catch (IOException e) {
try {
close();
} catch (IOException ioe) {
LOG.warn("Failed getting scanner and then failed close on cleanup", e);
}
throw e;
}
}
代码示例来源:origin: apache/hbase
assertSpaceQuota(originalSizeLimit, violationPolicy, Iterables.getOnlyElement(quotaScanner));
} finally {
quotaScanner.close();
assertSpaceQuota(newSizeLimit, newViolationPolicy, Iterables.getOnlyElement(quotaScanner));
} finally {
quotaScanner.close();
assertNull("Did not expect to find a quota entry", quotaScanner.next());
} finally {
quotaScanner.close();
代码示例来源:origin: apache/hbase
scanner.close();
代码示例来源:origin: com.aliyun.hbase/alihbase-client
void init(final Connection conn, final Scan scan) throws IOException {
this.connection = Objects.requireNonNull(conn);
this.table = this.connection.getTable(QuotaTableUtil.QUOTA_TABLE_NAME);
try {
scanner = table.getScanner(scan);
} catch (IOException e) {
try {
close();
} catch (IOException ioe) {
LOG.warn("Failed getting scanner and then failed close on cleanup", e);
}
throw e;
}
}
代码示例来源:origin: org.apache.hbase/hbase-server
private int countResults(final QuotaFilter filter) throws Exception {
QuotaRetriever scanner = QuotaRetriever.open(TEST_UTIL.getConfiguration(), filter);
try {
int count = 0;
for (QuotaSettings settings: scanner) {
LOG.debug(Objects.toString(settings));
count++;
}
return count;
} finally {
scanner.close();
}
}
}
代码示例来源:origin: harbby/presto-connectors
void init(final Configuration conf, final Scan scan) throws IOException {
this.connection = ConnectionFactory.createConnection(conf);
this.table = this.connection.getTable(QuotaTableUtil.QUOTA_TABLE_NAME);
try {
scanner = table.getScanner(scan);
} catch (IOException e) {
try {
close();
} catch (IOException ioe) {
LOG.warn("Failed getting scanner and then failed close on cleanup", e);
}
throw e;
}
}
代码示例来源:origin: org.apache.hbase/hbase-server
/**
* Returns the number of quotas defined in the HBase quota table.
*/
long listNumDefinedQuotas(Connection conn) throws IOException {
QuotaRetriever scanner = QuotaRetriever.open(conn.getConfiguration());
try {
return Iterables.size(scanner);
} finally {
if (scanner != null) {
scanner.close();
}
}
}
代码示例来源:origin: org.apache.hbase/hbase-server
scanner.close();
代码示例来源:origin: org.apache.hbase/hbase-server
assertSpaceQuota(sizeLimit, violationPolicy, Iterables.getOnlyElement(scanner));
} finally {
scanner.close();
assertNull("Did not expect to find a quota entry", scanner.next());
} finally {
scanner.close();
代码示例来源:origin: org.apache.hbase/hbase-server
assertSpaceQuota(originalSizeLimit, violationPolicy, Iterables.getOnlyElement(quotaScanner));
} finally {
quotaScanner.close();
assertSpaceQuota(newSizeLimit, newViolationPolicy, Iterables.getOnlyElement(quotaScanner));
} finally {
quotaScanner.close();
assertNull("Did not expect to find a quota entry", quotaScanner.next());
} finally {
quotaScanner.close();
内容来源于网络,如有侵权,请联系作者删除!