當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。