public static boolean isOnline(Connector conn) { return DeprecationUtil.isMockInstance(conn.getInstance()) || TableState.ONLINE == Tables.getTableState(conn.getInstance(), ID); }
/** * Get the credentials to use for this instance so it can be passed to the superclass during * construction. */ private static Credentials getCredentials(Instance instance) { if (DeprecationUtil.isMockInstance(instance)) { return new Credentials("mockSystemUser", new PasswordToken("mockSystemPassword")); } return SystemCredentials.get(instance); }
String tableId; if (DeprecationUtil.isMockInstance(instance)) { tableId = ""; } else { getClientConfiguration(job)); while (!tl.binRanges(context, ranges, binnedRanges).isEmpty()) { if (!DeprecationUtil.isMockInstance(instance)) { if (!Tables.exists(instance, tableId)) throw new TableDeletedException(tableId);
String tableId; if (DeprecationUtil.isMockInstance(instance)) { tableId = ""; } else { getClientConfiguration(context)); while (!tl.binRanges(clientContext, ranges, binnedRanges).isEmpty()) { if (!DeprecationUtil.isMockInstance(instance)) { if (!Tables.exists(instance, tableId)) throw new TableDeletedException(tableId);
/** * Central place to set common split configuration not handled by split constructors. The * intention is to make it harder to miss optional setters in future refactor. */ public static void updateSplit(RangeInputSplit split, Instance instance, InputTableConfig tableConfig, String principal, AuthenticationToken token, Authorizations auths, Level logLevel) { split.setInstanceName(instance.getInstanceName()); split.setZooKeepers(instance.getZooKeepers()); DeprecationUtil.setMockInstance(split, DeprecationUtil.isMockInstance(instance)); split.setPrincipal(principal); split.setToken(token); split.setAuths(auths); split.setFetchedColumns(tableConfig.getFetchedColumns()); split.setIterators(tableConfig.getIterators()); split.setLogLevel(logLevel); split.setSamplerConfiguration(tableConfig.getSamplerConfiguration()); }
scanner = new OfflineScanner(instance, new Credentials(principal, token), baseSplit.getTableId(), authorizations); } else if (DeprecationUtil.isMockInstance(instance)) { scanner = instance.getConnector(principal, token) .createScanner(baseSplit.getTableName(), authorizations);
scanner = new OfflineScanner(instance, new Credentials(principal, token), split.getTableId(), authorizations); } else if (DeprecationUtil.isMockInstance(instance)) { scanner = instance.getConnector(principal, token).createScanner(split.getTableName(), authorizations);