@Test public void testDownloadRemoteFile() throws IOException { String remoteUri = "hdfs: fileUtils.createFileInDir(stagingDir, remoteUri); String resultFilePath = fileSystemOperations.download(remoteUri, TARGET_ZIP_FILE); File resultFile = new File(resultFilePath); assertTrue(resultFile.exists()); assertEquals(TARGET_ZIP_FILE, resultFile.getName()); }
private void downloadRemoteFile(String remoteDir, String zipDirPath) throws IOException { boolean downloaded = remoteDirectoryManager.copyRemoteToLocal(remoteDir, zipDirPath); if (!downloaded) { throw new IOException("Failed to download Internal files from " + remoteDir); } LOG.info("Downloaded remote file: {} to this local path: {}", remoteDir, zipDirPath); }
FileSystemOperations { private void downloadRemoteFile(String remoteDir, String zipDirPath) throws IOException { boolean downloaded = remoteDirectoryManager.copyRemoteToLocal(remoteDir, zipDirPath); if (!downloaded) { throw new IOException("Failed to download Internal files from " + remoteDir); } LOG.info("Downloaded remote file: {} to this local path: {}", remoteDir, zipDirPath); } }
FileSystemOperations { private void downloadRemoteFile(String remoteDir, String zipDirPath) throws IOException { boolean downloaded = remoteDirectoryManager.copyRemoteToLocal(remoteDir, zipDirPath); if (!downloaded) { throw new IOException("Failed to download Internal files from " + remoteDir); } LOG.info("Downloaded remote file: {} to this local path: {}", remoteDir, zipDirPath); } FileSystemOperations(ClientContext clientContext); }
FileSystemOperations { private void downloadRemoteFile(String remoteDir, String zipDirPath) throws IOException { boolean downloaded = remoteDirectoryManager.copyRemoteToLocal(remoteDir, zipDirPath); if (!downloaded) { throw new IOException("Failed to download Internal files from " + remoteDir); } LOG.info("Downloaded remote file: {} to this local path: {}", remoteDir, zipDirPath); } FileSystemOperations(ClientContext clientContext); String downloadAndZip(String remoteDir, String destFileName); String download(String remoteDir, String zipFileName); void deleteFiles(String localUri); @VisibleForTesting void uploadToRemoteFileAndLocalizeToContainerWorkDir(Path stagingDir,
      String fileToUpload, String destFilename, Component comp); Path uploadToRemoteFile(Path stagingDir, String fileToUpload); void validFileSize(String uri); void setPermission(Path destPath, FsPermission permission); static boolean needHdfs(List<String> stringsToCheck); static boolean needHdfs(String content); Set<Path> getUploadedFiles(); }
FileSystemOperations { private void downloadRemoteFile(String remoteDir, String zipDirPath) throws IOException { boolean downloaded = remoteDirectoryManager.copyRemoteToLocal(remoteDir, zipDirPath); if (!downloaded) { throw new IOException("Failed to download Internal files from " + remoteDir); } LOG.info("Downloaded remote file: {} to this local path: {}", remoteDir, zipDirPath); } FileSystemOperations(ClientContext clientContext); String downloadAndZip(String remoteDir, String destFileName); String download(String remoteDir, String zipFileName); void deleteFiles(String localUri); @VisibleForTesting void uploadToRemoteFileAndLocalizeToContainerWorkDir(Path stagingDir,
      String fileToUpload, String destFilename, Component comp); Path uploadToRemoteFile(Path stagingDir, String fileToUpload); void validFileSize(String uri); void setPermission(Path destPath, FsPermission permission); static boolean needHdfs(List<String> stringsToCheck); static boolean needHdfs(String content); Set<Path> getUploadedFiles();  }