@GET @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public HDFSResourceWebResponse getHDFSResource(@QueryParam("site") String site , @QueryParam("path") String filePath ) { LOG.info("Starting MAPRFS Resource Browsing. Query Parameters ==> Site :"+site+" Path : "+filePath ); HDFSResourceWebResponse response = new HDFSResourceWebResponse(); HDFSResourceWebRequestValidator validator = new HDFSResourceWebRequestValidator(); List<FileStatusEntity> result = new ArrayList<>(); List<FileStatus> fileStatuses = null; try { validator.validate(site, filePath); // First Step would be validating Request Map<String, Object> config = getAppConfig(site, MAPRFS_APPLICATION); Configuration conf = convert(config); HDFSFileSystem fileSystem = new HDFSFileSystem(conf); fileStatuses = fileSystem.browse(filePath); // Join with File Sensitivity Info HDFSResourceSensitivityDataJoiner joiner = new HDFSResourceSensitivityDataJoiner(dao); result = joiner.joinFileSensitivity(site, fileStatuses); LOG.info("Successfully browsed files in MAPRFS ."); } catch( Exception ex ) { response.setException(EagleExceptionWrapper.wrap(ex)); LOG.error(" Exception When browsing Files for the MAPRFS Path :"+filePath+" " , ex); } response.setObj(result); return response; }