protected void authorize(Database db, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(db, null, new Privilege[]{priv}); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Table table, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(table, new Privilege[]{priv}, null); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Privilege[] inputPrivs, Privilege[] outputPrivs) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(inputPrivs, outputPrivs); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Partition part, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(part, new Privilege[]{priv}, null); } catch (HiveException ex) { throw new SemanticException(ex); } } }
authorizer.authorize( op.getInputRequiredPrivileges(), op.getOutputRequiredPrivileges()); } else if (op.equals(HiveOperation.CREATETABLE_AS_SELECT) || op.equals(HiveOperation.CREATETABLE)) { authorizer.authorize( db.getDatabase(SessionState.get().getCurrentDatabase()), null, HiveOperation.CREATETABLE_AS_SELECT.getOutputRequiredPrivileges()); ImportSemanticAnalyzer isa = (ImportSemanticAnalyzer) sem; if (!isa.existsTable()) { authorizer.authorize( db.getDatabase(SessionState.get().getCurrentDatabase()), null, HiveOperation.CREATETABLE_AS_SELECT.getOutputRequiredPrivileges()); authorizer.authorize(write.getDatabase(), null, op.getOutputRequiredPrivileges()); .getPartition().getSpec(), false); if (part != null) { authorizer.authorize(write.getPartition(), null, op.getOutputRequiredPrivileges()); continue; authorizer.authorize(write.getTable(), null, op.getOutputRequiredPrivileges()); authorizer.authorize(read.getDatabase(), op.getInputRequiredPrivileges(), null); continue;
authorizer.authorize( op.getInputRequiredPrivileges(), op.getOutputRequiredPrivileges()); } else if (op.equals(HiveOperation.CREATETABLE_AS_SELECT) || op.equals(HiveOperation.CREATETABLE)) { authorizer.authorize( db.getDatabase(SessionState.get().getCurrentDatabase()), null, HiveOperation.CREATETABLE_AS_SELECT.getOutputRequiredPrivileges()); ImportSemanticAnalyzer isa = (ImportSemanticAnalyzer) sem; if (!isa.existsTable()) { authorizer.authorize( db.getDatabase(SessionState.get().getCurrentDatabase()), null, HiveOperation.CREATETABLE_AS_SELECT.getOutputRequiredPrivileges()); authorizer.authorize(write.getDatabase(), null, op.getOutputRequiredPrivileges()); .getPartition().getSpec(), false); if (part != null) { authorizer.authorize(write.getPartition(), null, op.getOutputRequiredPrivileges()); continue; authorizer.authorize(write.getTable(), null, op.getOutputRequiredPrivileges()); authorizer.authorize(read.getDatabase(), op.getInputRequiredPrivileges(), null); continue;
protected void authorize(Database db, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(db, null, new Privilege[]{priv}); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Partition part, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(part, new Privilege[]{priv}, null); } catch (HiveException ex) { throw new SemanticException(ex); } } }
protected void authorize(Database db, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(db, null, new Privilege[]{priv}); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Privilege[] inputPrivs, Privilege[] outputPrivs) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(inputPrivs, outputPrivs); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Database db, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(db, null, new Privilege[]{priv}); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Partition part, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(part, new Privilege[]{priv}, null); } catch (HiveException ex) { throw new SemanticException(ex); } } }
protected void authorize(Partition part, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(part, new Privilege[]{priv}, null); } catch (HiveException ex) { throw new SemanticException(ex); } } }
protected void authorize(Privilege[] inputPrivs, Privilege[] outputPrivs) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(inputPrivs, outputPrivs); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Table table, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(table, new Privilege[]{priv}, null); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Database db, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(db, null, new Privilege[]{priv}); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Partition part, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(part, new Privilege[]{priv}, null); } catch (HiveException ex) { throw new SemanticException(ex); } } }
protected void authorize(Privilege[] inputPrivs, Privilege[] outputPrivs) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(inputPrivs, outputPrivs); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Table table, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(table, new Privilege[]{priv}, null); } catch (HiveException ex) { throw new SemanticException(ex); } }
protected void authorize(Table table, Privilege priv) throws AuthorizationException, SemanticException { try { getAuthProvider().authorize(table, new Privilege[]{priv}, null); } catch (HiveException ex) { throw new SemanticException(ex); } }