for (Entry<Key,Value> entry : scanner)
i += 1 + entry.getKey().getRowData().length();
if (i != 0)
throw new IllegalStateException("Should NOT be able to read from the table");
} catch (RuntimeException e) {
AccumuloSecurityException se = (AccumuloSecurityException) e.getCause();
if (se.getSecurityErrorCode() != SecurityErrorCode.PERMISSION_DENIED)
throw se;
}
break;
case WRITE:
try {
writer = test_user_conn.createBatchWriter(TEST_TABLE, new BatchWriterConfig());
m = new Mutation(new Text("row"));
m.put(new Text("a"), new Text("b"), new Value("c".getBytes(Constants.UTF8)));
writer.addMutation(m);
try {
writer.close();
} catch (MutationsRejectedException e1) {
if (e1.getAuthorizationFailuresMap().size() > 0)
throw new AccumuloSecurityException(test_user_conn.whoami(), org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode.PERMISSION_DENIED,
e1);
}
throw new IllegalStateException("Should NOT be able to write to a table");
} catch (AccumuloSecurityException e) {
if (e.getSecurityErrorCode() != SecurityErrorCode.PERMISSION_DENIED)