本文整理匯總了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);
}