Skip to content

Commit

Permalink
ORC-1782: Upgrade Hadoop to 3.4.1
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

This PR aims to upgrade Apache Hadoop to 3.4.1.

### Why are the changes needed?

To bring the latest bug fixes.

- http://hadoop.apache.org/docs/r3.4.1/index.html
- http://hadoop.apache.org/docs/r3.4.1/hadoop-project-dist/hadoop-common/release/3.4.1/RELEASENOTES.3.4.1.html
- http://hadoop.apache.org/docs/r3.4.1/hadoop-project-dist/hadoop-common/release/3.4.1/CHANGELOG.3.4.1.html

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #2039 from dongjoon-hyun/ORC-1782.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
  • Loading branch information
dongjoon-hyun committed Oct 18, 2024
1 parent dcda37e commit d9da9bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.util.VersionInfo;
import org.apache.orc.impl.HadoopShims;
import org.apache.orc.impl.HadoopShimsFactory;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

Expand All @@ -38,6 +41,9 @@ class ChunkReadUtilTest {
private static long fileLength;
private static final int ROW_COUNT = 524288;
private static final int COL_COUNT = 16;
private static final HadoopShims SHIMS = HadoopShimsFactory.get();
private static final boolean supportVectoredIO =
SHIMS.supportVectoredIO(VersionInfo.getVersion());

@BeforeAll
public static void setup() throws IOException {
Expand All @@ -57,7 +63,7 @@ public void testReadAll() throws IOException {
Configuration conf = new Configuration();
readStart();
assertEquals(ROW_COUNT, ChunkReadUtil.readORCFile(filePath, conf, false));
assertTrue((readEnd().getBytesRead() / (double) fileLength) > 1);
assertTrue(supportVectoredIO || (readEnd().getBytesRead() / (double) fileLength) > 1);
}

@Test
Expand All @@ -75,7 +81,7 @@ public void testReadAlternateWMinSeekSize() throws IOException {
readStart();
assertEquals(ROW_COUNT, ChunkReadUtil.readORCFile(filePath, conf, true));
double readFraction = readEnd().getBytesRead() / (double) fileLength;
assertTrue(readFraction > 1 && readFraction < 1.01);
assertTrue(supportVectoredIO || (readFraction > 1 && readFraction < 1.01));
}

@Test
Expand All @@ -85,6 +91,6 @@ public void testReadAlternateWMinSeekSizeDrop() throws IOException {
readStart();
assertEquals(ROW_COUNT, ChunkReadUtil.readORCFile(filePath, conf, true));
double readFraction = readEnd().getBytesRead() / (double) fileLength;
assertTrue(readFraction > 1 && readFraction < 1.01);
assertTrue(supportVectoredIO || (readFraction > 1 && readFraction < 1.01));
}
}
}
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<brotli4j.version>1.17.0</brotli4j.version>
<checkstyle.version>10.18.2</checkstyle.version>
<example.dir>${project.basedir}/../../examples</example.dir>
<hadoop.version>3.4.0</hadoop.version>
<hadoop.version>3.4.1</hadoop.version>
<java.version>17</java.version>
<javadoc.location>${project.basedir}/../target/javadoc</javadoc.location>
<junit.version>5.11.2</junit.version>
Expand Down

0 comments on commit d9da9bd

Please sign in to comment.