作者:mEmorIes-谨年一_950 | 来源:互联网 | 2023-08-20 17:12
本文整理了Java中co.cask.cdap.spi.hbase.HBaseDDLExecutor.grantPermissions()方法的一些代码示例,展示了
本文整理了Java中co.cask.cdap.spi.hbase.HBaseDDLExecutor.grantPermissions()
方法的一些代码示例,展示了HBaseDDLExecutor.grantPermissions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HBaseDDLExecutor.grantPermissions()
方法的具体详情如下:
包路径:co.cask.cdap.spi.hbase.HBaseDDLExecutor
类名称:HBaseDDLExecutor
方法名:grantPermissions
HBaseDDLExecutor.grantPermissions介绍
[英]Grant permissions on a table or namespace to users or groups.
[中]将表或命名空间的权限授予用户或组。
代码示例
代码示例来源:origin: cdapio/cdap
/**
* Grants permissions on a table.
* @param ddlExecutor the {@link HBaseDDLExecutor} to use to communicate with HBase
* @param tableId {@link TableId} for the specified table
* @param permissions A map from user or group name to the permissions for that user or group, given as a string
* containing only characters 'a'(Admin), 'c'(Create), 'r'(Read), 'w'(Write), and 'x'(Execute).
* Group names must be prefixed with the character '@'.
* @throws IOException
*/
public void grantPermissions(HBaseDDLExecutor ddlExecutor, TableId tableId,
Map permissions) throws IOException {
TableName tableName = HTableNameConverter.toTableName(getTablePrefix(cConf), tableId);
ddlExecutor.grantPermissions(tableName.getNamespaceAsString(), tableName.getQualifierAsString(), permissions);
}
代码示例来源:origin: co.cask.cdap/cdap-hbase-compat-base
/**
* Grants permissions on a table.
* @param ddlExecutor the {@link HBaseDDLExecutor} to use to communicate with HBase
* @param tableId {@link TableId} for the specified table
* @param permissions A map from user or group name to the permissions for that user or group, given as a string
* containing only characters 'a'(Admin), 'c'(Create), 'r'(Read), 'w'(Write), and 'x'(Execute).
* Group names must be prefixed with the character '@'.
* @throws IOException
*/
public void grantPermissions(HBaseDDLExecutor ddlExecutor, TableId tableId,
Map permissions) throws IOException {
TableName tableName = HTableNameConverter.toTableName(getTablePrefix(cConf), tableId);
ddlExecutor.grantPermissions(tableName.getNamespaceAsString(), tableName.getQualifierAsString(), permissions);
}
代码示例来源:origin: cdapio/cdap
if (namespaceMeta.getConfig().getGroupName() != null) {
try {
executor.grantPermissions(hbaseNamespace, null,
ImmutableMap.of("@" + namespaceMeta.getConfig().getGroupName(), "C"));
} catch (IOException | RuntimeException e) {
代码示例来源:origin: co.cask.cdap/cdap-app-fabric
if (namespaceMeta.getConfig().getGroupName() != null) {
try {
executor.grantPermissions(hbaseNamespace, null,
ImmutableMap.of("@" + namespaceMeta.getConfig().getGroupName(), "C"));
} catch (IOException | RuntimeException e) {
代码示例来源:origin: caskdata/cdap
ddlExecutor.grantPermissions(tableId.getNamespace(), null, ImmutableMap.of("joe", "iii"));
Assert.fail("Grant should have failed with invalid permissions");
} catch (IOException e) {
ddlExecutor.grantPermissions(tableId.getNamespace(), null, ImmutableMap.of("joe", "RX", "@readers", "CA"));