}
protected Scanner getScanner(StringBuilder sb) throws AccumuloException, AccumuloSecurityException {
AccumuloConfiguration conf = Monitor.getSystemConfiguration();
String principal = conf.get(Property.TRACE_USER);
AuthenticationToken at;
Map<String,String> loginMap = conf.getAllPropertiesWithPrefix(Property.TRACE_TOKEN_PROPERTY_PREFIX);
if (loginMap.isEmpty()) {
Property p = Property.TRACE_PASSWORD;
at = new PasswordToken(conf.get(p).getBytes(Constants.UTF8));
} else {
Properties props = new Properties();
int prefixLength = Property.TRACE_TOKEN_PROPERTY_PREFIX.getKey().length();
for (Entry<String,String> entry : loginMap.entrySet()) {
props.put(entry.getKey().substring(prefixLength), entry.getValue());
}
AuthenticationToken token = Property.createInstanceFromPropertyName(conf, Property.TRACE_TOKEN_TYPE, AuthenticationToken.class, new PasswordToken());
token.init(props);
at = token;
}
String table = conf.get(Property.TRACE_TABLE);
try {