/* ---- Increments ---- */
AccessTestAction incrementQ1 = new AccessTestAction() {
@Override
public Object run() throws Exception {
Increment i = new Increment(TEST_ROW).addColumn(TEST_FAMILY, TEST_Q1, 1L);
HTable t = new HTable(conf, TEST_TABLE.getTableName());
try {
t.increment(i);
} finally {
t.close();
}
return null;
}
};
AccessTestAction incrementQ2 = new AccessTestAction() {
@Override
public Object run() throws Exception {
Increment i = new Increment(TEST_ROW).addColumn(TEST_FAMILY, TEST_Q2, 1L);
HTable t = new HTable(conf, TEST_TABLE.getTableName());
try {
t.increment(i);
} finally {
t.close();
}
return null;
}
};
AccessTestAction incrementQ2newDenyACL = new AccessTestAction() {
@Override
public Object run() throws Exception {
Increment i = new Increment(TEST_ROW).addColumn(TEST_FAMILY, TEST_Q2, 1L);
// Tag this increment with an ACL that denies write permissions to userOther
i.setACL(userOther.getShortName(), new Permission(Permission.Action.READ));
HTable t = new HTable(conf, TEST_TABLE.getTableName());
try {
t.increment(i);
} finally {
t.close();
}
return null;
}
};
AccessTestAction incrementQ3 = new AccessTestAction() {
@Override
public Object run() throws Exception {
Increment i = new Increment(TEST_ROW).addColumn(TEST_FAMILY, TEST_Q3, 1L);
HTable t = new HTable(conf, TEST_TABLE.getTableName());
try {
t.increment(i);
} finally {
t.close();