Search in sources :

Example 1 with MGlobalPrivilege

use of org.apache.hadoop.hive.metastore.model.MGlobalPrivilege in project hive by apache.

the class ObjectStore method listPrincipalGlobalGrants.

@Override
public List<HiveObjectPrivilege> listPrincipalGlobalGrants(String principalName, PrincipalType principalType) {
    List<MGlobalPrivilege> mUsers = listPrincipalMGlobalGrants(principalName, principalType);
    if (mUsers.isEmpty()) {
        return Collections.<HiveObjectPrivilege>emptyList();
    }
    List<HiveObjectPrivilege> result = new ArrayList<HiveObjectPrivilege>();
    for (int i = 0; i < mUsers.size(); i++) {
        MGlobalPrivilege sUsr = mUsers.get(i);
        HiveObjectRef objectRef = new HiveObjectRef(HiveObjectType.GLOBAL, null, null, null, null);
        HiveObjectPrivilege secUser = new HiveObjectPrivilege(objectRef, sUsr.getPrincipalName(), principalType, new PrivilegeGrantInfo(sUsr.getPrivilege(), sUsr.getCreateTime(), sUsr.getGrantor(), PrincipalType.valueOf(sUsr.getGrantorType()), sUsr.getGrantOption()));
        result.add(secUser);
    }
    return result;
}
Also used : HiveObjectPrivilege(org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege) PrivilegeGrantInfo(org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo) HiveObjectRef(org.apache.hadoop.hive.metastore.api.HiveObjectRef) ArrayList(java.util.ArrayList) MGlobalPrivilege(org.apache.hadoop.hive.metastore.model.MGlobalPrivilege) MConstraint(org.apache.hadoop.hive.metastore.model.MConstraint)

Example 2 with MGlobalPrivilege

use of org.apache.hadoop.hive.metastore.model.MGlobalPrivilege in project hive by apache.

the class ObjectStore method convertGlobal.

private List<HiveObjectPrivilege> convertGlobal(List<MGlobalPrivilege> privs) {
    List<HiveObjectPrivilege> result = new ArrayList<HiveObjectPrivilege>();
    for (MGlobalPrivilege priv : privs) {
        String pname = priv.getPrincipalName();
        PrincipalType ptype = PrincipalType.valueOf(priv.getPrincipalType());
        HiveObjectRef objectRef = new HiveObjectRef(HiveObjectType.GLOBAL, null, null, null, null);
        PrivilegeGrantInfo grantor = new PrivilegeGrantInfo(priv.getPrivilege(), priv.getCreateTime(), priv.getGrantor(), PrincipalType.valueOf(priv.getGrantorType()), priv.getGrantOption());
        result.add(new HiveObjectPrivilege(objectRef, pname, ptype, grantor));
    }
    return result;
}
Also used : HiveObjectPrivilege(org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege) PrivilegeGrantInfo(org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo) HiveObjectRef(org.apache.hadoop.hive.metastore.api.HiveObjectRef) ArrayList(java.util.ArrayList) MGlobalPrivilege(org.apache.hadoop.hive.metastore.model.MGlobalPrivilege) PrincipalType(org.apache.hadoop.hive.metastore.api.PrincipalType)

Example 3 with MGlobalPrivilege

use of org.apache.hadoop.hive.metastore.model.MGlobalPrivilege in project hive by apache.

the class ObjectStore method revokePrivileges.

@Override
public boolean revokePrivileges(PrivilegeBag privileges, boolean grantOption) throws InvalidObjectException, MetaException, NoSuchObjectException {
    boolean committed = false;
    try {
        openTransaction();
        List<Object> persistentObjs = new ArrayList<Object>();
        List<HiveObjectPrivilege> privilegeList = privileges.getPrivileges();
        if (privilegeList != null && privilegeList.size() > 0) {
            Iterator<HiveObjectPrivilege> privIter = privilegeList.iterator();
            while (privIter.hasNext()) {
                HiveObjectPrivilege privDef = privIter.next();
                HiveObjectRef hiveObject = privDef.getHiveObject();
                String privilegeStr = privDef.getGrantInfo().getPrivilege();
                if (privilegeStr == null || privilegeStr.trim().equals("")) {
                    continue;
                }
                String[] privs = privilegeStr.split(",");
                String userName = privDef.getPrincipalName();
                PrincipalType principalType = privDef.getPrincipalType();
                if (hiveObject.getObjectType() == HiveObjectType.GLOBAL) {
                    List<MGlobalPrivilege> mSecUser = this.listPrincipalMGlobalGrants(userName, principalType);
                    boolean found = false;
                    if (mSecUser != null) {
                        for (String privilege : privs) {
                            for (MGlobalPrivilege userGrant : mSecUser) {
                                String userGrantPrivs = userGrant.getPrivilege();
                                if (privilege.equals(userGrantPrivs)) {
                                    found = true;
                                    if (grantOption) {
                                        if (userGrant.getGrantOption()) {
                                            userGrant.setGrantOption(false);
                                        } else {
                                            throw new MetaException("User " + userName + " does not have grant option with privilege " + privilege);
                                        }
                                    }
                                    persistentObjs.add(userGrant);
                                    break;
                                }
                            }
                            if (!found) {
                                throw new InvalidObjectException("No user grant found for privileges " + privilege);
                            }
                        }
                    }
                } else if (hiveObject.getObjectType() == HiveObjectType.DATABASE) {
                    MDatabase dbObj = getMDatabase(hiveObject.getDbName());
                    if (dbObj != null) {
                        String db = hiveObject.getDbName();
                        boolean found = false;
                        List<MDBPrivilege> dbGrants = this.listPrincipalMDBGrants(userName, principalType, db);
                        for (String privilege : privs) {
                            for (MDBPrivilege dbGrant : dbGrants) {
                                String dbGrantPriv = dbGrant.getPrivilege();
                                if (privilege.equals(dbGrantPriv)) {
                                    found = true;
                                    if (grantOption) {
                                        if (dbGrant.getGrantOption()) {
                                            dbGrant.setGrantOption(false);
                                        } else {
                                            throw new MetaException("User " + userName + " does not have grant option with privilege " + privilege);
                                        }
                                    }
                                    persistentObjs.add(dbGrant);
                                    break;
                                }
                            }
                            if (!found) {
                                throw new InvalidObjectException("No database grant found for privileges " + privilege + " on database " + db);
                            }
                        }
                    }
                } else if (hiveObject.getObjectType() == HiveObjectType.TABLE) {
                    boolean found = false;
                    List<MTablePrivilege> tableGrants = this.listAllMTableGrants(userName, principalType, hiveObject.getDbName(), hiveObject.getObjectName());
                    for (String privilege : privs) {
                        for (MTablePrivilege tabGrant : tableGrants) {
                            String tableGrantPriv = tabGrant.getPrivilege();
                            if (privilege.equalsIgnoreCase(tableGrantPriv)) {
                                found = true;
                                if (grantOption) {
                                    if (tabGrant.getGrantOption()) {
                                        tabGrant.setGrantOption(false);
                                    } else {
                                        throw new MetaException("User " + userName + " does not have grant option with privilege " + privilege);
                                    }
                                }
                                persistentObjs.add(tabGrant);
                                break;
                            }
                        }
                        if (!found) {
                            throw new InvalidObjectException("No grant (" + privilege + ") found " + " on table " + hiveObject.getObjectName() + ", database is " + hiveObject.getDbName());
                        }
                    }
                } else if (hiveObject.getObjectType() == HiveObjectType.PARTITION) {
                    boolean found = false;
                    Table tabObj = this.getTable(hiveObject.getDbName(), hiveObject.getObjectName());
                    String partName = null;
                    if (hiveObject.getPartValues() != null) {
                        partName = Warehouse.makePartName(tabObj.getPartitionKeys(), hiveObject.getPartValues());
                    }
                    List<MPartitionPrivilege> partitionGrants = this.listPrincipalMPartitionGrants(userName, principalType, hiveObject.getDbName(), hiveObject.getObjectName(), partName);
                    for (String privilege : privs) {
                        for (MPartitionPrivilege partGrant : partitionGrants) {
                            String partPriv = partGrant.getPrivilege();
                            if (partPriv.equalsIgnoreCase(privilege)) {
                                found = true;
                                if (grantOption) {
                                    if (partGrant.getGrantOption()) {
                                        partGrant.setGrantOption(false);
                                    } else {
                                        throw new MetaException("User " + userName + " does not have grant option with privilege " + privilege);
                                    }
                                }
                                persistentObjs.add(partGrant);
                                break;
                            }
                        }
                        if (!found) {
                            throw new InvalidObjectException("No grant (" + privilege + ") found " + " on table " + tabObj.getTableName() + ", partition is " + partName + ", database is " + tabObj.getDbName());
                        }
                    }
                } else if (hiveObject.getObjectType() == HiveObjectType.COLUMN) {
                    Table tabObj = this.getTable(hiveObject.getDbName(), hiveObject.getObjectName());
                    String partName = null;
                    if (hiveObject.getPartValues() != null) {
                        partName = Warehouse.makePartName(tabObj.getPartitionKeys(), hiveObject.getPartValues());
                    }
                    if (partName != null) {
                        List<MPartitionColumnPrivilege> mSecCol = listPrincipalMPartitionColumnGrants(userName, principalType, hiveObject.getDbName(), hiveObject.getObjectName(), partName, hiveObject.getColumnName());
                        boolean found = false;
                        if (mSecCol != null) {
                            for (String privilege : privs) {
                                for (MPartitionColumnPrivilege col : mSecCol) {
                                    String colPriv = col.getPrivilege();
                                    if (colPriv.equalsIgnoreCase(privilege)) {
                                        found = true;
                                        if (grantOption) {
                                            if (col.getGrantOption()) {
                                                col.setGrantOption(false);
                                            } else {
                                                throw new MetaException("User " + userName + " does not have grant option with privilege " + privilege);
                                            }
                                        }
                                        persistentObjs.add(col);
                                        break;
                                    }
                                }
                                if (!found) {
                                    throw new InvalidObjectException("No grant (" + privilege + ") found " + " on table " + tabObj.getTableName() + ", partition is " + partName + ", column name = " + hiveObject.getColumnName() + ", database is " + tabObj.getDbName());
                                }
                            }
                        }
                    } else {
                        List<MTableColumnPrivilege> mSecCol = listPrincipalMTableColumnGrants(userName, principalType, hiveObject.getDbName(), hiveObject.getObjectName(), hiveObject.getColumnName());
                        boolean found = false;
                        if (mSecCol != null) {
                            for (String privilege : privs) {
                                for (MTableColumnPrivilege col : mSecCol) {
                                    String colPriv = col.getPrivilege();
                                    if (colPriv.equalsIgnoreCase(privilege)) {
                                        found = true;
                                        if (grantOption) {
                                            if (col.getGrantOption()) {
                                                col.setGrantOption(false);
                                            } else {
                                                throw new MetaException("User " + userName + " does not have grant option with privilege " + privilege);
                                            }
                                        }
                                        persistentObjs.add(col);
                                        break;
                                    }
                                }
                                if (!found) {
                                    throw new InvalidObjectException("No grant (" + privilege + ") found " + " on table " + tabObj.getTableName() + ", column name = " + hiveObject.getColumnName() + ", database is " + tabObj.getDbName());
                                }
                            }
                        }
                    }
                }
            }
        }
        if (persistentObjs.size() > 0) {
            if (grantOption) {
            // If grant option specified, only update the privilege, don't remove it.
            // Grant option has already been removed from the privileges in the section above
            } else {
                pm.deletePersistentAll(persistentObjs);
            }
        }
        committed = commitTransaction();
    } finally {
        if (!committed) {
            rollbackTransaction();
        }
    }
    return committed;
}
Also used : ArrayList(java.util.ArrayList) MPartitionColumnPrivilege(org.apache.hadoop.hive.metastore.model.MPartitionColumnPrivilege) InvalidObjectException(org.apache.hadoop.hive.metastore.api.InvalidObjectException) MStringList(org.apache.hadoop.hive.metastore.model.MStringList) ArrayList(java.util.ArrayList) List(java.util.List) LinkedList(java.util.LinkedList) MTableColumnPrivilege(org.apache.hadoop.hive.metastore.model.MTableColumnPrivilege) MetaException(org.apache.hadoop.hive.metastore.api.MetaException) Table(org.apache.hadoop.hive.metastore.api.Table) MVersionTable(org.apache.hadoop.hive.metastore.model.MVersionTable) MTable(org.apache.hadoop.hive.metastore.model.MTable) HiveObjectRef(org.apache.hadoop.hive.metastore.api.HiveObjectRef) MDBPrivilege(org.apache.hadoop.hive.metastore.model.MDBPrivilege) MGlobalPrivilege(org.apache.hadoop.hive.metastore.model.MGlobalPrivilege) MDatabase(org.apache.hadoop.hive.metastore.model.MDatabase) HiveObjectPrivilege(org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege) MPartitionPrivilege(org.apache.hadoop.hive.metastore.model.MPartitionPrivilege) PrincipalType(org.apache.hadoop.hive.metastore.api.PrincipalType) MTablePrivilege(org.apache.hadoop.hive.metastore.model.MTablePrivilege)

Example 4 with MGlobalPrivilege

use of org.apache.hadoop.hive.metastore.model.MGlobalPrivilege in project hive by apache.

the class ObjectStore method listGlobalGrantsAll.

@Override
public List<HiveObjectPrivilege> listGlobalGrantsAll() {
    boolean commited = false;
    Query query = null;
    try {
        openTransaction();
        query = pm.newQuery(MGlobalPrivilege.class);
        List<MGlobalPrivilege> userNameDbPriv = (List<MGlobalPrivilege>) query.execute();
        pm.retrieveAll(userNameDbPriv);
        commited = commitTransaction();
        return convertGlobal(userNameDbPriv);
    } finally {
        if (!commited) {
            rollbackTransaction();
        }
        if (query != null) {
            query.closeAll();
        }
    }
}
Also used : Query(javax.jdo.Query) MStringList(org.apache.hadoop.hive.metastore.model.MStringList) ArrayList(java.util.ArrayList) List(java.util.List) LinkedList(java.util.LinkedList) MGlobalPrivilege(org.apache.hadoop.hive.metastore.model.MGlobalPrivilege)

Example 5 with MGlobalPrivilege

use of org.apache.hadoop.hive.metastore.model.MGlobalPrivilege in project hive by apache.

the class ObjectStore method grantPrivileges.

@Override
public boolean grantPrivileges(PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException {
    boolean committed = false;
    int now = (int) (System.currentTimeMillis() / 1000);
    try {
        openTransaction();
        List<Object> persistentObjs = new ArrayList<Object>();
        List<HiveObjectPrivilege> privilegeList = privileges.getPrivileges();
        if (privilegeList != null && privilegeList.size() > 0) {
            Iterator<HiveObjectPrivilege> privIter = privilegeList.iterator();
            Set<String> privSet = new HashSet<String>();
            while (privIter.hasNext()) {
                HiveObjectPrivilege privDef = privIter.next();
                HiveObjectRef hiveObject = privDef.getHiveObject();
                String privilegeStr = privDef.getGrantInfo().getPrivilege();
                String[] privs = privilegeStr.split(",");
                String userName = privDef.getPrincipalName();
                PrincipalType principalType = privDef.getPrincipalType();
                String grantor = privDef.getGrantInfo().getGrantor();
                String grantorType = privDef.getGrantInfo().getGrantorType().toString();
                boolean grantOption = privDef.getGrantInfo().isGrantOption();
                privSet.clear();
                if (principalType == PrincipalType.ROLE) {
                    validateRole(userName);
                }
                if (hiveObject.getObjectType() == HiveObjectType.GLOBAL) {
                    List<MGlobalPrivilege> globalPrivs = this.listPrincipalMGlobalGrants(userName, principalType);
                    if (globalPrivs != null) {
                        for (MGlobalPrivilege priv : globalPrivs) {
                            if (priv.getGrantor().equalsIgnoreCase(grantor)) {
                                privSet.add(priv.getPrivilege());
                            }
                        }
                    }
                    for (String privilege : privs) {
                        if (privSet.contains(privilege)) {
                            throw new InvalidObjectException(privilege + " is already granted by " + grantor);
                        }
                        MGlobalPrivilege mGlobalPrivs = new MGlobalPrivilege(userName, principalType.toString(), privilege, now, grantor, grantorType, grantOption);
                        persistentObjs.add(mGlobalPrivs);
                    }
                } else if (hiveObject.getObjectType() == HiveObjectType.DATABASE) {
                    MDatabase dbObj = getMDatabase(hiveObject.getDbName());
                    if (dbObj != null) {
                        List<MDBPrivilege> dbPrivs = this.listPrincipalMDBGrants(userName, principalType, hiveObject.getDbName());
                        if (dbPrivs != null) {
                            for (MDBPrivilege priv : dbPrivs) {
                                if (priv.getGrantor().equalsIgnoreCase(grantor)) {
                                    privSet.add(priv.getPrivilege());
                                }
                            }
                        }
                        for (String privilege : privs) {
                            if (privSet.contains(privilege)) {
                                throw new InvalidObjectException(privilege + " is already granted on database " + hiveObject.getDbName() + " by " + grantor);
                            }
                            MDBPrivilege mDb = new MDBPrivilege(userName, principalType.toString(), dbObj, privilege, now, grantor, grantorType, grantOption);
                            persistentObjs.add(mDb);
                        }
                    }
                } else if (hiveObject.getObjectType() == HiveObjectType.TABLE) {
                    MTable tblObj = getMTable(hiveObject.getDbName(), hiveObject.getObjectName());
                    if (tblObj != null) {
                        List<MTablePrivilege> tablePrivs = this.listAllMTableGrants(userName, principalType, hiveObject.getDbName(), hiveObject.getObjectName());
                        if (tablePrivs != null) {
                            for (MTablePrivilege priv : tablePrivs) {
                                if (priv.getGrantor() != null && priv.getGrantor().equalsIgnoreCase(grantor)) {
                                    privSet.add(priv.getPrivilege());
                                }
                            }
                        }
                        for (String privilege : privs) {
                            if (privSet.contains(privilege)) {
                                throw new InvalidObjectException(privilege + " is already granted on table [" + hiveObject.getDbName() + "," + hiveObject.getObjectName() + "] by " + grantor);
                            }
                            MTablePrivilege mTab = new MTablePrivilege(userName, principalType.toString(), tblObj, privilege, now, grantor, grantorType, grantOption);
                            persistentObjs.add(mTab);
                        }
                    }
                } else if (hiveObject.getObjectType() == HiveObjectType.PARTITION) {
                    MPartition partObj = this.getMPartition(hiveObject.getDbName(), hiveObject.getObjectName(), hiveObject.getPartValues());
                    String partName = null;
                    if (partObj != null) {
                        partName = partObj.getPartitionName();
                        List<MPartitionPrivilege> partPrivs = this.listPrincipalMPartitionGrants(userName, principalType, hiveObject.getDbName(), hiveObject.getObjectName(), partObj.getPartitionName());
                        if (partPrivs != null) {
                            for (MPartitionPrivilege priv : partPrivs) {
                                if (priv.getGrantor().equalsIgnoreCase(grantor)) {
                                    privSet.add(priv.getPrivilege());
                                }
                            }
                        }
                        for (String privilege : privs) {
                            if (privSet.contains(privilege)) {
                                throw new InvalidObjectException(privilege + " is already granted on partition [" + hiveObject.getDbName() + "," + hiveObject.getObjectName() + "," + partName + "] by " + grantor);
                            }
                            MPartitionPrivilege mTab = new MPartitionPrivilege(userName, principalType.toString(), partObj, privilege, now, grantor, grantorType, grantOption);
                            persistentObjs.add(mTab);
                        }
                    }
                } else if (hiveObject.getObjectType() == HiveObjectType.COLUMN) {
                    MTable tblObj = getMTable(hiveObject.getDbName(), hiveObject.getObjectName());
                    if (tblObj != null) {
                        if (hiveObject.getPartValues() != null) {
                            MPartition partObj = null;
                            List<MPartitionColumnPrivilege> colPrivs = null;
                            partObj = this.getMPartition(hiveObject.getDbName(), hiveObject.getObjectName(), hiveObject.getPartValues());
                            if (partObj == null) {
                                continue;
                            }
                            colPrivs = this.listPrincipalMPartitionColumnGrants(userName, principalType, hiveObject.getDbName(), hiveObject.getObjectName(), partObj.getPartitionName(), hiveObject.getColumnName());
                            if (colPrivs != null) {
                                for (MPartitionColumnPrivilege priv : colPrivs) {
                                    if (priv.getGrantor().equalsIgnoreCase(grantor)) {
                                        privSet.add(priv.getPrivilege());
                                    }
                                }
                            }
                            for (String privilege : privs) {
                                if (privSet.contains(privilege)) {
                                    throw new InvalidObjectException(privilege + " is already granted on column " + hiveObject.getColumnName() + " [" + hiveObject.getDbName() + "," + hiveObject.getObjectName() + "," + partObj.getPartitionName() + "] by " + grantor);
                                }
                                MPartitionColumnPrivilege mCol = new MPartitionColumnPrivilege(userName, principalType.toString(), partObj, hiveObject.getColumnName(), privilege, now, grantor, grantorType, grantOption);
                                persistentObjs.add(mCol);
                            }
                        } else {
                            List<MTableColumnPrivilege> colPrivs = null;
                            colPrivs = this.listPrincipalMTableColumnGrants(userName, principalType, hiveObject.getDbName(), hiveObject.getObjectName(), hiveObject.getColumnName());
                            if (colPrivs != null) {
                                for (MTableColumnPrivilege priv : colPrivs) {
                                    if (priv.getGrantor().equalsIgnoreCase(grantor)) {
                                        privSet.add(priv.getPrivilege());
                                    }
                                }
                            }
                            for (String privilege : privs) {
                                if (privSet.contains(privilege)) {
                                    throw new InvalidObjectException(privilege + " is already granted on column " + hiveObject.getColumnName() + " [" + hiveObject.getDbName() + "," + hiveObject.getObjectName() + "] by " + grantor);
                                }
                                MTableColumnPrivilege mCol = new MTableColumnPrivilege(userName, principalType.toString(), tblObj, hiveObject.getColumnName(), privilege, now, grantor, grantorType, grantOption);
                                persistentObjs.add(mCol);
                            }
                        }
                    }
                }
            }
        }
        if (persistentObjs.size() > 0) {
            pm.makePersistentAll(persistentObjs);
        }
        committed = commitTransaction();
    } finally {
        if (!committed) {
            rollbackTransaction();
        }
    }
    return committed;
}
Also used : ArrayList(java.util.ArrayList) MPartitionColumnPrivilege(org.apache.hadoop.hive.metastore.model.MPartitionColumnPrivilege) InvalidObjectException(org.apache.hadoop.hive.metastore.api.InvalidObjectException) MStringList(org.apache.hadoop.hive.metastore.model.MStringList) ArrayList(java.util.ArrayList) List(java.util.List) LinkedList(java.util.LinkedList) MTableColumnPrivilege(org.apache.hadoop.hive.metastore.model.MTableColumnPrivilege) HashSet(java.util.HashSet) MPartition(org.apache.hadoop.hive.metastore.model.MPartition) HiveObjectRef(org.apache.hadoop.hive.metastore.api.HiveObjectRef) MDBPrivilege(org.apache.hadoop.hive.metastore.model.MDBPrivilege) MGlobalPrivilege(org.apache.hadoop.hive.metastore.model.MGlobalPrivilege) MConstraint(org.apache.hadoop.hive.metastore.model.MConstraint) MDatabase(org.apache.hadoop.hive.metastore.model.MDatabase) HiveObjectPrivilege(org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege) MTable(org.apache.hadoop.hive.metastore.model.MTable) MPartitionPrivilege(org.apache.hadoop.hive.metastore.model.MPartitionPrivilege) PrincipalType(org.apache.hadoop.hive.metastore.api.PrincipalType) MTablePrivilege(org.apache.hadoop.hive.metastore.model.MTablePrivilege)

Aggregations

MGlobalPrivilege (org.apache.hadoop.hive.metastore.model.MGlobalPrivilege)8 ArrayList (java.util.ArrayList)7 LinkedList (java.util.LinkedList)4 List (java.util.List)4 HiveObjectPrivilege (org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege)4 HiveObjectRef (org.apache.hadoop.hive.metastore.api.HiveObjectRef)4 MStringList (org.apache.hadoop.hive.metastore.model.MStringList)4 PrincipalType (org.apache.hadoop.hive.metastore.api.PrincipalType)3 PrivilegeGrantInfo (org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo)3 MConstraint (org.apache.hadoop.hive.metastore.model.MConstraint)3 MDBPrivilege (org.apache.hadoop.hive.metastore.model.MDBPrivilege)3 MPartitionColumnPrivilege (org.apache.hadoop.hive.metastore.model.MPartitionColumnPrivilege)3 MPartitionPrivilege (org.apache.hadoop.hive.metastore.model.MPartitionPrivilege)3 MTableColumnPrivilege (org.apache.hadoop.hive.metastore.model.MTableColumnPrivilege)3 MTablePrivilege (org.apache.hadoop.hive.metastore.model.MTablePrivilege)3 Query (javax.jdo.Query)2 InvalidObjectException (org.apache.hadoop.hive.metastore.api.InvalidObjectException)2 MDatabase (org.apache.hadoop.hive.metastore.model.MDatabase)2 MTable (org.apache.hadoop.hive.metastore.model.MTable)2 HashMap (java.util.HashMap)1