Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hadoop-common to 3.4.0 #568

Merged
merged 3 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Expand Up @@ -78,7 +78,7 @@ libraryDependencies ++= Seq(
"org.wvlet.airframe" %% "airframe-log" % "24.2.3" % "test",
"org.osgi" % "org.osgi.core" % "6.0.0" % "provided",
"com.github.sbt" % "junit-interface" % "0.13.3" % "test",
"org.apache.hadoop" % "hadoop-common" % "2.10.2" % "test" exclude ("org.xerial.snappy", "snappy-java")
"org.apache.hadoop" % "hadoop-common" % "3.4.0" % "test" exclude ("org.xerial.snappy", "snappy-java")
)

enablePlugins(SbtOsgi)
Expand Down
Expand Up @@ -2,7 +2,6 @@

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.SystemUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.compress.SnappyCodec;
import org.junit.AfterClass;
Expand All @@ -25,13 +24,13 @@ public static void loadHadoopNativeLibrary() throws Exception
{
final String libResourceFolder;
Map<String, String> libraryNames = new LinkedHashMap<>();
if (SystemUtils.IS_OS_LINUX) {
if (OSInfo.getOSName() == "Linux") {
libResourceFolder = "/lib/Linux";
libraryNames.put("libhadoop.so", "libhadoop.so");
// certain Linux systems need these shared library be copied before the JVM started, see build.sbt
libraryNames.put("libsnappy.so", "libsnappy.so");
libraryNames.put("libsnappy.so.1", "libsnappy.so");
} else if (SystemUtils.IS_OS_MAC_OSX) {
} else if (OSInfo.getOSName() == "Mac") {
libResourceFolder = "/lib/MacOSX";
libraryNames.put("libhadoop.dylib", "libhadoop.dylib");
libraryNames.put("libsnappy.dylib", "libsnappy.dylib");
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java
Expand Up @@ -179,6 +179,9 @@ public void batchingOfWritesShouldNotAffectCompressedDataSize()
// compression quality:
if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN)
assertEquals(90992, expectedCompressedData.length);
else if(OSInfo.getArchName() == "aarch64")
// Arm has a better compression ratio
assertEquals(91051, expectedCompressedData.length);
else
assertEquals(91080, expectedCompressedData.length);
// The chunk size should not affect the size of the compressed output:
Expand Down