当前位置: 首页>>代码示例>>Java>>正文


Java PrivilegeBag类代码示例

本文整理汇总了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;
}
 
开发者ID:HotelsDotCom,项目名称:waggle-dance,代码行数:10,代码来源:DatabaseMappingImpl.java

示例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);
}
 
开发者ID:HotelsDotCom,项目名称:waggle-dance,代码行数:9,代码来源:DatabaseMappingImplTest.java

示例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());
}
 
开发者ID:HotelsDotCom,项目名称:waggle-dance,代码行数:8,代码来源:DatabaseMappingImplTest.java

示例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);
}
 
开发者ID:HotelsDotCom,项目名称:waggle-dance,代码行数:14,代码来源:DatabaseMappingImplTest.java

示例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);
        }
    });
}
 
开发者ID:facebookarchive,项目名称:swift-hive-metastore,代码行数:12,代码来源:RetryingHiveMetastore.java

示例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);
        }
    });
}
 
开发者ID:facebookarchive,项目名称:swift-hive-metastore,代码行数:12,代码来源:RetryingHiveMetastore.java

示例7: transformInboundPrivilegeBag

import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public PrivilegeBag transformInboundPrivilegeBag(PrivilegeBag privilegeBag) {
  return privilegeBag;
}
 
开发者ID:HotelsDotCom,项目名称:waggle-dance,代码行数:5,代码来源:IdentityMapping.java

示例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)));
}
 
开发者ID:HotelsDotCom,项目名称:waggle-dance,代码行数:7,代码来源:IdentityMappingTest.java

示例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});
}
 
开发者ID:Netflix,项目名称:metacat,代码行数:8,代码来源:CatalogThriftHiveMetastore.java

示例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});
}
 
开发者ID:Netflix,项目名称:metacat,代码行数:8,代码来源:CatalogThriftHiveMetastore.java

示例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);
}
 
开发者ID:facebookarchive,项目名称:swift-hive-metastore,代码行数:6,代码来源:HiveMetaStoreClient.java

示例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);
}
 
开发者ID:facebookarchive,项目名称:swift-hive-metastore,代码行数:6,代码来源:HiveMetaStoreClient.java

示例13: grantPrivileges

import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public boolean grantPrivileges(final PrivilegeBag privileges) throws MetaException, TException
{
    throw new UnsupportedOperationException();
}
 
开发者ID:facebookarchive,项目名称:swift-hive-metastore,代码行数:6,代码来源:AbstractMetastore.java

示例14: revokePrivileges

import org.apache.hadoop.hive.metastore.api.PrivilegeBag; //导入依赖的package包/类
@Override
public boolean revokePrivileges(final PrivilegeBag privileges) throws MetaException, TException
{
    throw new UnsupportedOperationException();
}
 
开发者ID:facebookarchive,项目名称:swift-hive-metastore,代码行数:6,代码来源:AbstractMetastore.java

示例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);
}
 
开发者ID:facebookarchive,项目名称:swift-hive-metastore,代码行数:6,代码来源:ThriftHiveMetastore.java


注:本文中的org.apache.hadoop.hive.metastore.api.PrivilegeBag类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。