if (FileNotPresentForThisDirectoryPath)
continue;
Path pathMapredLocalDirUserName =
fileStatusMapredLocalDirUserName.getPath();
FsPermission fsPermMapredLocalDirUserName =
fileStatusMapredLocalDirUserName.getPermission();
Assert.assertTrue("Directory Permission is not 700",
fsPermMapredLocalDirUserName.equals(new FsPermission("700")));
//Get file status of all the directories
//and files under that path.
FileStatus[] fileStatuses = tClient.listStatus(localDir,
true, true);
for (FileStatus fileStatus : fileStatuses) {
Path path = fileStatus.getPath();
LOG.info("path is :" + path.toString());
//Checking if the received path ends with
//the distributed filename
distCacheFileIsFound = (path.toString()).
endsWith(distributedFileName);
//If file is found, check for its permission.
//Since the file is found break out of loop
if (distCacheFileIsFound){
LOG.info("PATH found is :" + path.toString());
distributedFileCount++;
String filename = path.getName();
FsPermission fsPerm = fileStatus.getPermission();
Assert.assertTrue("File Permission is not 777",
fsPerm.equals(new FsPermission("777")));
}
}
}
LOG.info("Distributed File count is :" + distributedFileCount);