void init(final Configuration conf, final Scan scan) throws IOException { // Set this before creating the connection and passing it down to make sure // it's cleaned up if we fail to construct the Scanner. this.isManagedConnection = true; init(ConnectionFactory.createConnection(conf), scan); }
/** * Open a QuotaRetriever with the specified filter. * @param conf Configuration object to use. * @param filter the QuotaFilter * @return the QuotaRetriever * @throws IOException if a remote or network exception occurs */ public static QuotaRetriever open(final Configuration conf, final QuotaFilter filter) throws IOException { Scan scan = QuotaTableUtil.makeScan(filter); QuotaRetriever scanner = new QuotaRetriever(); scanner.init(conf, scan); return scanner; } }
final TablesWithQuotas tablesWithQuotas = new TablesWithQuotas(conn, conf); try (final QuotaRetriever scanner = new QuotaRetriever()) { scanner.init(conn, scan); for (QuotaSettings quotaSettings : scanner) {
void init(final Configuration conf, final Scan scan) throws IOException { // Set this before creating the connection and passing it down to make sure // it's cleaned up if we fail to construct the Scanner. this.isManagedConnection = true; init(ConnectionFactory.createConnection(conf), scan); }
/** * Open a QuotaRetriever with the specified filter. * @param conf Configuration object to use. * @param filter the QuotaFilter * @return the QuotaRetriever * @throws IOException if a remote or network exception occurs */ public static QuotaRetriever open(final Configuration conf, final QuotaFilter filter) throws IOException { Scan scan = QuotaTableUtil.makeScan(filter); QuotaRetriever scanner = new QuotaRetriever(); scanner.init(conf, scan); return scanner; } }
void init(final Configuration conf, final Scan scan) throws IOException { // Set this before creating the connection and passing it down to make sure // it's cleaned up if we fail to construct the Scanner. this.isManagedConnection = true; init(ConnectionFactory.createConnection(conf), scan); }
/** * Open a QuotaRetriever with the specified filter. * @param conf Configuration object to use. * @param filter the QuotaFilter * @return the QuotaRetriever * @throws IOException if a remote or network exception occurs */ public static QuotaRetriever open(final Configuration conf, final QuotaFilter filter) throws IOException { Scan scan = QuotaTableUtil.makeScan(filter); QuotaRetriever scanner = new QuotaRetriever(); scanner.init(conf, scan); return scanner; } }
/** * Open a QuotaRetriever with the specified filter. * @param conf Configuration object to use. * @param filter the QuotaFilter * @return the QuotaRetriever * @throws IOException if a remote or network exception occurs */ public static QuotaRetriever open(final Configuration conf, final QuotaFilter filter) throws IOException { Scan scan = QuotaTableUtil.makeScan(filter); QuotaRetriever scanner = new QuotaRetriever(); scanner.init(conf, scan); return scanner; } }