HADOOP-18482. ITestS3APrefetchingInputStream to skip if CSV test file unavailable (#4983)

Contributed by Danny Jones
This commit is contained in:
Daniel Carl Jones 2022-10-31 21:19:34 +00:00 committed by Steve Loughran
parent caf58937a0
commit 5a90d98972
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
1 changed files with 3 additions and 2 deletions

View File

@ -92,11 +92,12 @@ public class ITestS3APrefetchingInputStream extends AbstractS3ACostTest {
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);