HBASE-10510 Addendum removes HTable and uses tableName directly.
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1567847 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c14dd4f515
commit
39fb8c4666
|
@ -473,20 +473,17 @@ public class LoadTestTool extends AbstractHBaseTool {
|
||||||
conf.set("hadoop.security.authorization", "false");
|
conf.set("hadoop.security.authorization", "false");
|
||||||
conf.set("hadoop.security.authentication", "simple");
|
conf.set("hadoop.security.authentication", "simple");
|
||||||
LOG.info("Granting permission for the user " + userOwner.getShortName());
|
LOG.info("Granting permission for the user " + userOwner.getShortName());
|
||||||
HTable table = new HTable(conf, tableName);
|
|
||||||
AccessControlProtos.Permission.Action[] actions = {
|
AccessControlProtos.Permission.Action[] actions = {
|
||||||
AccessControlProtos.Permission.Action.ADMIN,
|
AccessControlProtos.Permission.Action.ADMIN,
|
||||||
AccessControlProtos.Permission.Action.CREATE, AccessControlProtos.Permission.Action.READ,
|
AccessControlProtos.Permission.Action.CREATE, AccessControlProtos.Permission.Action.READ,
|
||||||
AccessControlProtos.Permission.Action.WRITE };
|
AccessControlProtos.Permission.Action.WRITE };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
AccessControlClient.grant(conf, table.getName(), userOwner.getShortName(), COLUMN_FAMILY,
|
AccessControlClient.grant(conf, tableName, userOwner.getShortName(), COLUMN_FAMILY,
|
||||||
null, actions);
|
null, actions);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
LOG.fatal("Error in granting permission for the user " + userOwner.getShortName(), e);
|
LOG.fatal("Error in granting permission for the user " + userOwner.getShortName(), e);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
} finally {
|
|
||||||
table.close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue