本文整理汇总了Java中org.apache.hadoop.hive.metastore.api.PrivilegeBag类的典型用法代码示例。如果您正苦于以下问题:Java PrivilegeBag类的具体用法?Java PrivilegeBag怎么用?Java PrivilegeBag使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PrivilegeBag类属于org.apache.hadoop.hive.metastore.api包,在下文中一共展示了PrivilegeBag类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: transformInboundPrivilegeBag
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public PrivilegeBag transformInboundPrivilegeBag(PrivilegeBag privilegeBag) {
if (privilegeBag.isSetPrivileges()) {
for (HiveObjectPrivilege privilege : privilegeBag.getPrivileges()) {
privilege.setHiveObject(transformInboundHiveObjectRef(privilege.getHiveObject()));
}
}
return privilegeBag;
}
示例2: transformInboundPrivilegeBag
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Test
public void transformInboundPrivilegeBag() throws Exception {
PrivilegeBag privilegeBag = new PrivilegeBag();
privilegeBag.setPrivileges(hiveObjectPrivileges);
PrivilegeBag result = databaseMapping.transformInboundPrivilegeBag(privilegeBag);
assertThat(result, is(sameInstance(privilegeBag)));
assertHiveObjectPrivileges(result.getPrivileges(), IN_DB_NAME);
}
示例3: transformInboundPrivilegeBagPriviligesNotSet
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Test
public void transformInboundPrivilegeBagPriviligesNotSet() throws Exception {
PrivilegeBag privilegeBag = new PrivilegeBag();
PrivilegeBag result = databaseMapping.transformInboundPrivilegeBag(privilegeBag);
assertThat(result, is(sameInstance(privilegeBag)));
assertFalse(result.isSetPrivileges());
}
示例4: transformInboundGrantRevokePrivilegesRequest
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Test
public void transformInboundGrantRevokePrivilegesRequest() throws Exception {
GrantRevokePrivilegeRequest grantRevokePrivilegeRequest = new GrantRevokePrivilegeRequest();
PrivilegeBag privilegeBag = new PrivilegeBag();
privilegeBag.setPrivileges(hiveObjectPrivileges);
grantRevokePrivilegeRequest.setPrivileges(privilegeBag);
GrantRevokePrivilegeRequest result = databaseMapping
.transformInboundGrantRevokePrivilegesRequest(grantRevokePrivilegeRequest);
assertThat(result, is(sameInstance(grantRevokePrivilegeRequest)));
PrivilegeBag resultPriviligeBag = result.getPrivileges();
assertThat(resultPriviligeBag, is(sameInstance(privilegeBag)));
assertHiveObjectPrivileges(resultPriviligeBag.getPrivileges(), IN_DB_NAME);
}
示例5: grantPrivileges
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public boolean grantPrivileges(final PrivilegeBag privileges) throws MetaException, TException
{
return withRetries("grantPrivileges", new CallableWithMetastore<Boolean>() {
@Override
public Boolean call(final HiveMetastore client) throws TException
{
return client.grantPrivileges(privileges);
}
});
}
示例6: revokePrivileges
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public boolean revokePrivileges(final PrivilegeBag privileges) throws MetaException, TException
{
return withRetries("revokePrivileges", new CallableWithMetastore<Boolean>() {
@Override
public Boolean call(final HiveMetastore client) throws TException
{
return client.revokePrivileges(privileges);
}
});
}
示例7: transformInboundPrivilegeBag
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public PrivilegeBag transformInboundPrivilegeBag(PrivilegeBag privilegeBag) {
return privilegeBag;
}
示例8: transformInboundPrivilegeBag
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Test
public void transformInboundPrivilegeBag() throws Exception {
PrivilegeBag privilegeBag = new PrivilegeBag();
PrivilegeBag result = databaseMapping.transformInboundPrivilegeBag(privilegeBag);
assertThat(result, is(sameInstance(privilegeBag)));
}
示例9: grant_privileges
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean grant_privileges(final PrivilegeBag privileges) throws TException {
throw unimplemented("grant_privileges", new Object[]{privileges});
}
示例10: revoke_privileges
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean revoke_privileges(final PrivilegeBag privileges) throws TException {
throw unimplemented("revoke_privileges", new Object[]{privileges});
}
示例11: grant_privileges
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public boolean grant_privileges(PrivilegeBag privileges)
throws MetaException, TException {
return client.grant_privileges(privileges);
}
示例12: revoke_privileges
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException,
TException {
return client.revoke_privileges(privileges);
}
示例13: grantPrivileges
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public boolean grantPrivileges(final PrivilegeBag privileges) throws MetaException, TException
{
throw new UnsupportedOperationException();
}
示例14: revokePrivileges
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public boolean revokePrivileges(final PrivilegeBag privileges) throws MetaException, TException
{
throw new UnsupportedOperationException();
}
示例15: grant_privileges
import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, TException
{
return delegate.grantPrivileges(privileges);
}