From 0e51a9b55e6f289a3b551cb057725c80802802f0 Mon Sep 17 00:00:00 2001 From: Daniel Carl Jones Date: Mon, 31 Oct 2022 21:19:34 +0000 Subject: [PATCH] HADOOP-18482. ITestS3APrefetchingInputStream to skip if CSV test file unavailable (#4983) Contributed by Danny Jones --- .../apache/hadoop/fs/s3a/ITestS3APrefetchingInputStream.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3APrefetchingInputStream.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3APrefetchingInputStream.java index 4fd50a3eb8..b1ab4afce4 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3APrefetchingInputStream.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3APrefetchingInputStream.java @@ -92,11 +92,12 @@ public void teardown() throws Exception { private void openFS() throws Exception { Configuration conf = getConfiguration(); + String largeFileUri = S3ATestUtils.getCSVTestFile(conf); - largeFile = new Path(DEFAULT_CSVTEST_FILE); + largeFile = new Path(largeFileUri); blockSize = conf.getInt(PREFETCH_BLOCK_SIZE_KEY, PREFETCH_BLOCK_DEFAULT_SIZE); largeFileFS = new S3AFileSystem(); - largeFileFS.initialize(new URI(DEFAULT_CSVTEST_FILE), getConfiguration()); + largeFileFS.initialize(new URI(largeFileUri), getConfiguration()); FileStatus fileStatus = largeFileFS.getFileStatus(largeFile); largeFileSize = fileStatus.getLen(); numBlocks = calculateNumBlocks(largeFileSize, blockSize);