firePreEvent(new PreDropDatabaseEvent(db, this)); String catPrependedName = MetaStoreUtils.prependCatalogToDbName(catName, name, conf);
private void authorizeDropDatabase(PreDropDatabaseEvent context) throws InvalidOperationException, MetaException { try { for (HiveMetastoreAuthorizationProvider authorizer : tAuthorizers.get()) { authorizer.authorize(new Database(context.getDatabase()), HiveOperation.DROPDATABASE.getInputRequiredPrivileges(), HiveOperation.DROPDATABASE.getOutputRequiredPrivileges()); } } catch (AuthorizationException e) { throw invalidOperationException(e); } catch (HiveException e) { throw metaException(e); } }
private void authorizeDropDatabase(PreDropDatabaseEvent context) throws InvalidOperationException, MetaException { try { for (HiveMetastoreAuthorizationProvider authorizer : tAuthorizers.get()) { authorizer.authorize(new Database(context.getDatabase()), HiveOperation.DROPDATABASE.getInputRequiredPrivileges(), HiveOperation.DROPDATABASE.getOutputRequiredPrivileges()); } } catch (AuthorizationException e) { throw invalidOperationException(e); } catch (HiveException e) { throw metaException(e); } }
db = ms.getDatabase(name); firePreEvent(new PreDropDatabaseEvent(db, this));
Assert.assertTrue(dropDB.getStatus()); validateDropDb(db, dropDB.getDatabase()); validateDropDb(db, preDropDB.getDatabase());
firePreEvent(new PreDropDatabaseEvent(db, this)); String catPrependedName = MetaStoreUtils.prependCatalogToDbName(catName, name, conf);
private void authorizeDropDatabase(PreDropDatabaseEvent context) throws InvalidOperationException, MetaException { try { for (HiveMetastoreAuthorizationProvider authorizer : tAuthorizers.get()) { authorizer.authorize(new Database(context.getDatabase()), HiveOperation.DROPDATABASE.getInputRequiredPrivileges(), HiveOperation.DROPDATABASE.getOutputRequiredPrivileges()); } } catch (AuthorizationException e) { throw invalidOperationException(e); } catch (HiveException e) { throw metaException(e); } }
db = ms.getDatabase(name); firePreEvent(new PreDropDatabaseEvent(db, this));
private void authorizeDropDatabase(PreDropDatabaseEvent context) throws InvalidOperationException, MetaException { authorizeMetastoreAccess(HiveOperation.DROPDATABASE, new HierarcyBuilder() .addDbToOutput(getAuthServer(), context.getDatabase().getName()).build(), new HierarcyBuilder().addDbToOutput(getAuthServer(), context.getDatabase().getName()).build()); }
db = ms.getDatabase(name); firePreEvent(new PreDropDatabaseEvent(db, this));