Skip to content

Commit

Permalink
Update to Hadoop 3.3.5-2
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed May 1, 2024
1 parent d285be2 commit 572b46a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import static io.trino.hive.formats.FormatTestUtils.configureCompressionCodecs;
import static io.trino.hive.formats.ReadWriteUtils.findFirstSyncPosition;
import static io.trino.hive.formats.compression.CompressionKind.LZOP;
import static io.trino.hive.formats.compression.CompressionKind.ZSTD;
import static io.trino.hive.formats.line.sequence.SequenceFileWriter.TRINO_SEQUENCE_FILE_WRITER_VERSION;
import static io.trino.hive.formats.line.sequence.SequenceFileWriter.TRINO_SEQUENCE_FILE_WRITER_VERSION_METADATA_KEY;
import static java.lang.Math.toIntExact;
Expand Down Expand Up @@ -88,7 +89,7 @@ protected void testRoundTrip(List<String> values)
throws Exception
{
for (Optional<CompressionKind> compressionKind : COMPRESSION) {
if (compressionKind.equals(Optional.of(LZOP))) {
if (compressionKind.equals(Optional.of(LZOP)) || compressionKind.equals(Optional.of(ZSTD))) {
continue;
}
for (boolean blockCompressed : ImmutableList.of(true)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE;
import static io.trino.hive.formats.FormatTestUtils.COMPRESSION;
import static io.trino.hive.formats.FormatTestUtils.configureCompressionCodecs;
import static io.trino.hive.formats.compression.CompressionKind.ZSTD;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.nio.file.Files.createTempDirectory;
import static org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.COMPRESS_CODEC;
Expand All @@ -57,6 +58,10 @@ protected void testRoundTrip(List<String> values)
throws Exception
{
for (Optional<CompressionKind> compressionKind : COMPRESSION) {
if (compressionKind.equals(Optional.of(ZSTD))) {
continue;
}

// write old, read new and ol
try (TempFileWithExtension tempFile = new TempFileWithExtension(compressionKind.map(CompressionKind::getFileExtension).orElse(""))) {
writeOld(tempFile.file(), compressionKind, values);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
import static io.trino.hive.formats.FormatTestUtils.writeTrinoValue;
import static io.trino.hive.formats.ReadWriteUtils.findFirstSyncPosition;
import static io.trino.hive.formats.compression.CompressionKind.LZOP;
import static io.trino.hive.formats.compression.CompressionKind.ZSTD;
import static io.trino.hive.formats.rcfile.RcFileWriter.TRINO_RCFILE_WRITER_VERSION;
import static io.trino.hive.formats.rcfile.RcFileWriter.TRINO_RCFILE_WRITER_VERSION_METADATA_KEY;
import static io.trino.spi.type.StandardTypes.MAP;
Expand Down Expand Up @@ -181,7 +182,7 @@ public static RcFileTester quickTestRcFileReader()
rcFileTester.listTestsEnabled = true;
rcFileTester.complexStructuralTestsEnabled = false;
rcFileTester.readLastBatchOnlyEnabled = false;
rcFileTester.compressions = ImmutableList.of(Optional.empty(), Optional.of(CompressionKind.ZSTD));
rcFileTester.compressions = ImmutableList.of(Optional.empty(), Optional.of(ZSTD));
return rcFileTester;
}

Expand Down Expand Up @@ -322,9 +323,10 @@ private void assertRoundTrip(Type type, Iterable<?> writeValues, Set<Format> ski

for (Format format : formats) {
for (Optional<CompressionKind> compression : compressions) {
if (compression.equals(Optional.of(LZOP))) {
if (compression.equals(Optional.of(LZOP)) || compression.equals(Optional.of(ZSTD))) {
continue;
}

// write old, read new
try (TempFile tempFile = new TempFile()) {
writeRcFileColumnOld(tempFile.file(), format, compression, type, finalValues.iterator());
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@
<dependency>
<groupId>io.trino.hadoop</groupId>
<artifactId>hadoop-apache</artifactId>
<version>3.3.5-1</version>
<version>3.3.5-2</version>
</dependency>

<dependency>
Expand Down

0 comments on commit 572b46a

Please sign in to comment.