void authorize()

in emr-user-role-mapper-s3storagebasedauthorizationmanager/src/main/java/com/amazonaws/emr/urm/hive/urmstoragebasedauthorizer/S3StorageBasedAuthorizationProvider.java [174:195]


    void authorize(String path, Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv)
            throws HiveException, AuthorizationException {
        //if path is a hdfs one, skip and return
        if(path.startsWith(HDFS_SCHEME)) {
            LOG.info("A hdfs path has encountered, do nothing");
            return;
        }

        try {
            EnumSet<S3Action> actions = getS3Actions(readRequiredPriv);
            actions.addAll(getS3Actions(writeRequiredPriv));
            if (actions.isEmpty()) {
                return;
            }
            checkPermissions(path, actions);
        } catch (AccessControlException ex) {
            throw authorizationException(ex);
        } catch (Exception e) {
            e.printStackTrace();
            throw new HiveAccessControlException("Failed to authorize request. ", e);
        }
    }