Skip to content

Commit

Permalink
solve apache#8019
Browse files Browse the repository at this point in the history
  • Loading branch information
zhdech committed Nov 14, 2024
1 parent 0550b6c commit 98a69f0
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
Expand Down Expand Up @@ -174,7 +173,8 @@ public class LocalFileIT extends TestSuiteBase {

Path jsonGz =
convertToGzFile(
Lists.newArrayList(ContainerUtil.getResourcesFile("/text/e2e.json")),
Lists.newArrayList(
ContainerUtil.getResourcesFile("/text/e2e.json")),
"e2e-json");
ContainerUtil.copyFileIntoContainers(
jsonGz, "/seatunnel/read/gz/json/single/e2e-json.gz", container);
Expand Down Expand Up @@ -211,7 +211,6 @@ public class LocalFileIT extends TestSuiteBase {
ContainerUtil.copyFileIntoContainers(
xmlGz, "/seatunnel/read/gz/xml/single/e2e-xml.gz", container);


Path txtLzo = convertToLzoFile(ContainerUtil.getResourcesFile("/text/e2e.txt"));
ContainerUtil.copyFileIntoContainers(
txtLzo, "/seatunnel/read/lzo_text/e2e.txt", container);
Expand Down Expand Up @@ -245,7 +244,8 @@ public class LocalFileIT extends TestSuiteBase {

Path xlsxGz =
convertToGzFile(
Lists.newArrayList(ContainerUtil.getResourcesFile("/text/e2e.xlsx")),
Lists.newArrayList(
ContainerUtil.getResourcesFile("/text/e2e.xlsx")),
"e2e-xlsx");
ContainerUtil.copyFileIntoContainers(
xlsxGz, "/seatunnel/read/gz/xlsx/single/e2e-xlsx.gz", container);
Expand Down Expand Up @@ -591,8 +591,8 @@ public Path convertToGzFile(List<File> files, String name) throws IOException {
Path gzFilePath = Paths.get(firstFile.getParent(), String.format("%s.gz", name));

try (FileInputStream fis = new FileInputStream(firstFile);
FileOutputStream fos = new FileOutputStream(gzFilePath.toFile());
GZIPOutputStream gzos = new GZIPOutputStream(fos)) {
FileOutputStream fos = new FileOutputStream(gzFilePath.toFile());
GZIPOutputStream gzos = new GZIPOutputStream(fos)) {

byte[] buffer = new byte[2048];
int length;
Expand Down

0 comments on commit 98a69f0

Please sign in to comment.