private void authorizeAlterTable(PreAlterTableEvent context) throws InvalidOperationException, MetaException { try { org.apache.hadoop.hive.ql.metadata.Table wrappedTable = new TableWrapper(context.getOldTable()); for (HiveMetastoreAuthorizationProvider authorizer : tAuthorizers.get()) { authorizer.authorize(wrappedTable, null, new Privilege[]{Privilege.ALTER_METADATA}); } } catch (AuthorizationException e) { throw invalidOperationException(e); } catch (HiveException e) { throw metaException(e); } }
private void authorizeAlterTable(PreAlterTableEvent context) throws InvalidOperationException, MetaException { try { org.apache.hadoop.hive.ql.metadata.Table wrappedTable = new TableWrapper(context.getOldTable()); for (HiveMetastoreAuthorizationProvider authorizer : tAuthorizers.get()) { authorizer.authorize(wrappedTable, null, new Privilege[]{Privilege.ALTER_METADATA}); } } catch (AuthorizationException e) { throw invalidOperationException(e); } catch (HiveException e) { throw metaException(e); } }
Table oldTable = context.getOldTable(); String oldTransactionalValue = null; String oldTransactionalPropertiesValue = null;
Assert.assertTrue(alterTableE.getStatus()); validateAlterTable(tbl, renamedTable, alterTableE.getOldTable(), alterTableE.getNewTable()); validateAlterTable(tbl, renamedTable, preAlterTableE.getOldTable(), preAlterTableE.getNewTable()); Assert.assertTrue(alterTableE.getStatus()); validateAlterTableColumns(tbl, altTable, alterTableE.getOldTable(), alterTableE.getNewTable()); validateAlterTableColumns(tbl, altTable, preAlterTableE.getOldTable(), preAlterTableE.getNewTable());
private void authorizeAlterTable(PreAlterTableEvent context) throws InvalidOperationException, MetaException { try { org.apache.hadoop.hive.ql.metadata.Table wrappedTable = new TableWrapper(context.getOldTable()); for (HiveMetastoreAuthorizationProvider authorizer : tAuthorizers.get()) { authorizer.authorize(wrappedTable, null, new Privilege[]{Privilege.ALTER_METADATA}); } } catch (AuthorizationException e) { throw invalidOperationException(e); } catch (HiveException e) { throw metaException(e); } }
inputBuilder.addTableToOutput(getAuthServer(), context.getOldTable() .getDbName(), context.getOldTable().getTableName()); HierarcyBuilder outputBuilder = new HierarcyBuilder(); outputBuilder.addTableToOutput(getAuthServer(), context.getOldTable() .getDbName(), context.getOldTable().getTableName()); try { oldLocationUri = PathUtils.parseDFSURI(warehouseDir, getSdLocation(context.getOldTable().getSd())); newLocationUri = PathUtils.parseDFSURI(warehouseDir, getSdLocation(context.getNewTable().getSd()));