Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,20 @@ public int execute(final String fullCommand, final CommandLine cl, final Shell s
final org.apache.accumulo.core.util.interpret.ScanInterpreter interpreter =
getInterpreter(cl, tableName, shellState);

String classLoaderContext = null;
if (cl.hasOption(contextOpt.getOpt())) {
classLoaderContext = cl.getOptionValue(contextOpt.getOpt());
}

// handle first argument, if present, the authorizations list to
// scan with
final Authorizations auths = getAuths(cl, shellState);
final Scanner scanner = shellState.getAccumuloClient().createScanner(tableName, auths);

if (classLoaderContext != null) {
scanner.setClassLoaderContext(classLoaderContext);
}

scanner.addScanIterator(
new IteratorSetting(Integer.MAX_VALUE, "NOVALUE", SortedKeyIterator.class));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ public int execute(final String fullCommand, final CommandLine cl, final Shell s
negate = true;
}

String classLoaderContext = null;
if (cl.hasOption(contextOpt.getOpt())) {
classLoaderContext = cl.getOptionValue(contextOpt.getOpt());
}

final Authorizations auths = getAuths(cl, shellState);
final BatchScanner scanner =
shellState.getAccumuloClient().createBatchScanner(tableName, auths, numThreads);
Expand All @@ -89,6 +94,10 @@ public int execute(final String fullCommand, final CommandLine cl, final Shell s

scanner.setConsistencyLevel(getConsistency(cl));

if (classLoaderContext != null) {
scanner.setClassLoaderContext(classLoaderContext);
}

setupSampling(tableName, cl, shellState, scanner);
addScanIterators(shellState, cl, scanner, "");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class ScanCommand extends Command {
private Option optEndRowExclusive;
private Option timeoutOption;
private Option sampleOpt;
private Option contextOpt;
protected Option contextOpt;
private Option executionHintsOpt;
private Option scanServerOpt;

Expand Down