/** * Authorization privileges against a path. * * @param path * a filesystem path * @param readRequiredPriv * a list of privileges needed for inputs. * @param writeRequiredPriv * a list of privileges needed for outputs. */ public void authorize(Path path, Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv) throws HiveException, AuthorizationException { try { EnumSet<FsAction> actions = getFsActions(readRequiredPriv); actions.addAll(getFsActions(writeRequiredPriv)); if (actions.isEmpty()) { return; } checkPermissions(getConf(), path, actions); } catch (AccessControlException ex) { throw authorizationException(ex); } catch (LoginException ex) { throw authorizationException(ex); } catch (IOException ex) { throw hiveException(ex); } }
/** * Authorization privileges against a path. * * @param path * a filesystem path * @param readRequiredPriv * a list of privileges needed for inputs. * @param writeRequiredPriv * a list of privileges needed for outputs. */ public void authorize(Path path, Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv) throws HiveException, AuthorizationException { try { EnumSet<FsAction> actions = getFsActions(readRequiredPriv); actions.addAll(getFsActions(writeRequiredPriv)); if (actions.isEmpty()) { return; } checkPermissions(getConf(), path, actions); } catch (AccessControlException ex) { throw authorizationException(ex); } catch (LoginException ex) { throw authorizationException(ex); } catch (IOException ex) { throw hiveException(ex); } }
protected Path getDbLocation(Database db) throws HiveException { try { initWh(); String location = db.getLocationUri(); if (location == null) { return wh.getDefaultDatabasePath(db.getName()); } else { return wh.getDnsPath(wh.getDatabasePath(db)); } } catch (MetaException ex) { throw hiveException(ex); } }
protected Path getDbLocation(Database db) throws HiveException { try { initWh(); String location = db.getLocationUri(); if (location == null) { return wh.getDefaultDatabasePath(db.getName()); } else { return wh.getDnsPath(wh.getDatabasePath(db)); } } catch (MetaException ex) { throw hiveException(ex); } }
authorize(root, readRequiredPriv, writeRequiredPriv); } catch (MetaException ex) { throw hiveException(ex);
authorize(root, readRequiredPriv, writeRequiredPriv); } catch (MetaException ex) { throw hiveException(ex);
initWh(); } catch (MetaException ex) { throw hiveException(ex);
initWh(); } catch (MetaException ex) { throw hiveException(ex);
/** * Authorization privileges against a path. * * @param path * a filesystem path * @param readRequiredPriv * a list of privileges needed for inputs. * @param writeRequiredPriv * a list of privileges needed for outputs. */ public void authorize(Path path, Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv) throws HiveException, AuthorizationException { try { EnumSet<FsAction> actions = getFsActions(readRequiredPriv); actions.addAll(getFsActions(writeRequiredPriv)); if (actions.isEmpty()) { return; } checkPermissions(getConf(), path, actions); } catch (AccessControlException ex) { throw authorizationException(ex); } catch (LoginException ex) { throw authorizationException(ex); } catch (IOException ex) { throw hiveException(ex); } }
protected Path getDbLocation(Database db) throws HiveException { try { initWh(); String location = db.getLocationUri(); if (location == null) { return wh.getDefaultDatabasePath(db.getName()); } else { return wh.getDnsPath(wh.getDatabasePath(db)); } } catch (MetaException ex) { throw hiveException(ex); } }
authorize(root, readRequiredPriv, writeRequiredPriv); } catch (MetaException ex) { throw hiveException(ex);
initWh(); } catch (MetaException ex) { throw hiveException(ex);