Skip to content

Commit

Permalink
fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
JiamingMai committed Dec 29, 2024
1 parent d236a56 commit b048a98
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
}

0 comments on commit b048a98

Please sign in to comment.