Scanner scanner;
split = (RangeInputSplit) inSplit;
log.debug("Initializing input split: " + split.getRange());
Configuration conf = InputFormatBase.getConfiguration(attempt);
Instance instance = split.getInstance();
if (null == instance) {
instance = getInstance(conf);
}
String user = split.getUsername();
if (null == user) {
user = getUsername(conf);
}
byte[] password = split.getPassword();
if (null == password) {
password = getPassword(conf);
}
Authorizations authorizations = split.getAuths();
if (null == authorizations) {
authorizations = getAuthorizations(conf);
}
String table = split.getTable();
if (null == table) {
table = getTablename(conf);
}
Boolean isOffline = split.isOffline();
if (null == isOffline) {
isOffline = isOfflineScan(conf);
}
Boolean isIsolated = split.isIsolatedScan();
if (null == isIsolated) {
isIsolated = isIsolated(conf);
}
Boolean usesLocalIterators = split.usesLocalIterators();
if (null == usesLocalIterators) {
usesLocalIterators = usesLocalIterators(conf);
}
String rowRegex = split.getRowRegex();
if (null == rowRegex) {
rowRegex = conf.get(ROW_REGEX);
}
String colfRegex = split.getColfamRegex();
if (null == colfRegex) {
colfRegex = conf.get(COLUMN_FAMILY_REGEX);
}
String colqRegex = split.getColqualRegex();
if (null == colqRegex) {
colqRegex = conf.get(COLUMN_QUALIFIER_REGEX);
}
String valueRegex = split.getValueRegex();
if (null == valueRegex) {
valueRegex = conf.get(VALUE_REGEX);
}
Integer maxVersions = split.getMaxVersions();
if (null == maxVersions) {
maxVersions = getMaxVersions(conf);
}
List<AccumuloIterator> iterators = split.getIterators();
if (null == iterators) {
iterators = getIterators(conf);
}
List<AccumuloIteratorOption> options = split.getOptions();
if (null == options) {
options = getIteratorOptions(conf);
}
Set<Pair<Text,Text>> columns = split.getFetchedColumns();
if (null == columns) {
columns = getFetchedColumns(conf);
}
try {
log.debug("Creating connector with user: " + user);
Connector conn = instance.getConnector(user, password);
log.debug("Creating scanner for table: " + table);
log.debug("Authorizations are: " + authorizations);
if (isOffline) {
scanner = new OfflineScanner(instance, new AuthInfo(user, ByteBuffer.wrap(password), instance.getInstanceID()), Tables.getTableId(instance, table),
authorizations);
} else {
scanner = conn.createScanner(table, authorizations);
}
if (isIsolated) {