@Override public boolean isAuthorized(FsAction action, Path... absolutePaths) throws AbfsAuthorizationException, IOException { Set<Path> paths = new HashSet<Path>(); for (Path path : absolutePaths) { paths.add(new Path(path.getName())); } if (action.equals(FsAction.READ) && Stream.concat(readOnlyPaths.stream(), readWritePaths.stream()).collect(Collectors.toSet()).containsAll(paths)) { return true; } else if (action.equals(FsAction.READ) && paths.contains(new Path(TEST_WRITE_THEN_READ_ONLY)) && writeThenReadOnly == 1) { return true; } else if (action.equals(FsAction.WRITE) && Stream.concat(writeOnlyPaths.stream(), readWritePaths.stream()).collect(Collectors.toSet()).containsAll(paths)) { return true; } else if (action.equals(FsAction.WRITE) && paths.contains(new Path(TEST_WRITE_THEN_READ_ONLY)) && writeThenReadOnly == 0) { writeThenReadOnly = 1; return true; } else { return action.equals(FsAction.READ_WRITE) && readWritePaths.containsAll(paths); } } }
if (cur.toString().length() > 0) { FsPermission perm = fs.getFileStatus(cur).getPermission(); if (!perm.getOtherAction().and(FsAction.EXECUTE).equals( FsAction.EXECUTE)) { LOG.warn("Gridmix will not emulate Distributed Cache load "