try {
log.debug("Creating connector with user: " + principal);
log.debug("Creating scanner for table: " + table);
log.debug("Authorizations are: " + authorizations);
if (isOffline) {
scanner = new OfflineScanner(instance, new Credentials(principal, token), split.getTableId(), authorizations);
} else if (instance instanceof MockInstance) {
scanner = instance.getConnector(principal, token).createScanner(split.getTableName(), authorizations);
} else {
scanner = new ScannerImpl(instance, new Credentials(principal, token), split.getTableId(), authorizations);
}
if (isIsolated) {
log.info("Creating isolated scanner");
scanner = new IsolatedScanner(scanner);
}