From b048a984bdaf7368c8fe6bee534c8f6d3a2e79f8 Mon Sep 17 00:00:00 2001 From: JiamingMai Date: Sun, 29 Dec 2024 23:58:37 +0800 Subject: [PATCH] fix codestyle --- .../alluxio/TestAlluxioFileIterator.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/trino-filesystem-alluxio/src/test/java/io/trino/filesystem/alluxio/TestAlluxioFileIterator.java b/lib/trino-filesystem-alluxio/src/test/java/io/trino/filesystem/alluxio/TestAlluxioFileIterator.java index 2c673c4ecb4..3a13eb3aae3 100644 --- a/lib/trino-filesystem-alluxio/src/test/java/io/trino/filesystem/alluxio/TestAlluxioFileIterator.java +++ b/lib/trino-filesystem-alluxio/src/test/java/io/trino/filesystem/alluxio/TestAlluxioFileIterator.java @@ -16,8 +16,6 @@ import alluxio.client.file.URIStatus; import alluxio.wire.FileInfo; import io.trino.filesystem.FileEntry; -import io.trino.filesystem.Location; -import org.junit.Rule; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -27,36 +25,38 @@ final class TestAlluxioFileIterator { - private final String FILE_NAME = "000000_0"; - private final String FILE_PATH = "/s3a/tables/sales/000000_0"; - private final String UFS_FILE_PATH = "s3a://test-bucket/tables/sales/000000_0"; + private final String fileName = "000000_0"; + private final String filePath = "/s3a/tables/sales/000000_0"; + private final String ufsFilePath = "s3a://test-bucket/tables/sales/000000_0"; @Test - void testNext() throws IOException { + void testNext() + throws IOException + { String alluxioDirPath = "alluxio://master:19998"; FileInfo fileInfo = new FileInfo(); - fileInfo.setName(FILE_NAME); - fileInfo.setPath(FILE_PATH); - fileInfo.setUfsPath(UFS_FILE_PATH); + fileInfo.setName(fileName); + fileInfo.setPath(filePath); + fileInfo.setUfsPath(ufsFilePath); URIStatus fileStatus = new URIStatus(fileInfo); AlluxioFileIterator iterator = new AlluxioFileIterator( List.of(fileStatus), alluxioDirPath); FileEntry fileEntry = iterator.next(); assertThat(fileEntry.location().toString()) - .isEqualTo(alluxioDirPath + FILE_PATH); + .isEqualTo(alluxioDirPath + filePath); alluxioDirPath = "alluxio:/"; fileInfo = new FileInfo(); - fileInfo.setName(FILE_NAME); - fileInfo.setPath(FILE_PATH); - fileInfo.setUfsPath(UFS_FILE_PATH); + fileInfo.setName(fileName); + fileInfo.setPath(filePath); + fileInfo.setUfsPath(ufsFilePath); fileStatus = new URIStatus(fileInfo); iterator = new AlluxioFileIterator( List.of(fileStatus), alluxioDirPath); fileEntry = iterator.next(); assertThat(fileEntry.location().toString()) - .isEqualTo(alluxioDirPath + FILE_PATH); + .isEqualTo(alluxioDirPath + filePath); } }