Connection getConnection() { return rsServices.getConnection(); }
@Override public Connection getConnection() { // Mocks may have services as null at test time. return services != null ? new SharedConnection(services.getConnection()) : null; }
@Override public Map<String, UserQuotaState> fetchEntries(final List<Get> gets) throws IOException { return QuotaUtil.fetchUserQuotas(rsServices.getConnection(), gets); } });
@Override public Map<String, QuotaState> fetchEntries(final List<Get> gets) throws IOException { return QuotaUtil.fetchRegionServerQuotas(rsServices.getConnection(), gets); } });
@Override public Map<String, QuotaState> fetchEntries(final List<Get> gets) throws IOException { return QuotaUtil.fetchNamespaceQuotas(rsServices.getConnection(), gets); } });
@Override public Map<TableName, QuotaState> fetchEntries(final List<Get> gets) throws IOException { return QuotaUtil.fetchTableQuotas(rsServices.getConnection(), gets); } });
@Override public Connection getConnection() { return new SharedConnection(this.services.getConnection()); }
+ " on " + rss.getServerName()); Connection connection = rss.getConnection(); try (final BackupSystemTable table = new BackupSystemTable(connection)) {
@Override public Map<String, QuotaState> fetchEntries(final List<Get> gets) throws IOException { return QuotaUtil.fetchNamespaceQuotas(rsServices.getConnection(), gets); } });
@Override public Map<TableName, QuotaState> fetchEntries(final List<Get> gets) throws IOException { return QuotaUtil.fetchTableQuotas(rsServices.getConnection(), gets); } });
@Override public Map<String, UserQuotaState> fetchEntries(final List<Get> gets) throws IOException { return QuotaUtil.fetchUserQuotas(rsServices.getConnection(), gets); } });
/** * Checks if the given region has merge qualifier in hbase:meta * @param services * @param regionName name of specified region * @return true if the given region has merge qualifier in META.(It will be * cleaned by CatalogJanitor) * @throws IOException */ boolean hasMergeQualifierInMeta(final RegionServerServices services, final byte[] regionName) throws IOException { if (services == null) return false; // Get merge regions if it is a merged region and already has merge // qualifier Pair<HRegionInfo, HRegionInfo> mergeRegions = MetaTableAccessor .getRegionsFromMergeQualifier(services.getConnection(), regionName); if (mergeRegions != null && (mergeRegions.getFirst() != null || mergeRegions.getSecond() != null)) { // It has merge qualifier return true; } return false; }