Skip to content

Commit

Permalink
[fix][build] Upgrade alluxio version to 2.9.3 to fix CVE-2023-38889 (a…
Browse files Browse the repository at this point in the history
…pache#21715)

(cherry picked from commit 33313c0)
(cherry picked from commit 31f0ae4)
Technoboy- authored and srinath-ctds committed Apr 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent ec47aa7 commit 9c1a8f2
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pulsar-io/alluxio/pom.xml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
</parent>

<properties>
<alluxio.version>2.7.3</alluxio.version>
<alluxio.version>2.9.3</alluxio.version>
<metrics.version>4.1.11</metrics.version>
<grpc.version>1.37.0</grpc.version>
</properties>
Original file line number Diff line number Diff line change
@@ -22,12 +22,13 @@
import alluxio.client.WriteType;
import alluxio.client.file.FileOutStream;
import alluxio.client.file.FileSystem;
import alluxio.conf.Configuration;
import alluxio.conf.InstancedConfiguration;
import alluxio.conf.PropertyKey;
import alluxio.exception.AlluxioException;
import alluxio.grpc.CreateFilePOptions;
import alluxio.grpc.WritePType;
import alluxio.util.FileSystemOptions;
import alluxio.util.FileSystemOptionsUtils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -78,7 +79,7 @@ public class AlluxioSink implements Sink<GenericObject> {
private AlluxioSinkConfig alluxioSinkConfig;
private AlluxioState alluxioState;

private InstancedConfiguration configuration = InstancedConfiguration.defaults();
private InstancedConfiguration configuration = Configuration.modifiableGlobal();

private ObjectMapper objectMapper = new ObjectMapper();

@@ -205,7 +206,7 @@ private void writeToAlluxio(Record<GenericObject> record) throws AlluxioExceptio

private void createTmpFile() throws AlluxioException, IOException {
CreateFilePOptions.Builder optionsBuilder =
FileSystemOptions.createFileDefaults(configuration).toBuilder();
FileSystemOptionsUtils.createFileDefaults(configuration).toBuilder();
UUID id = UUID.randomUUID();
String fileExtension = alluxioSinkConfig.getFileExtension();
tmpFilePath = tmpFileDirPath + "/" + id.toString() + "_tmp" + fileExtension;
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@
import alluxio.client.WriteType;
import alluxio.client.file.FileSystem;
import alluxio.client.file.URIStatus;
import alluxio.conf.Configuration;
import alluxio.conf.PropertyKey;
import alluxio.conf.ServerConfiguration;
import alluxio.master.LocalAlluxioCluster;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FilenameUtils;
@@ -237,8 +237,8 @@ public Object getNativeObject() {
private LocalAlluxioCluster setupSingleMasterCluster() throws Exception {
// Setup and start the local alluxio cluster
LocalAlluxioCluster cluster = new LocalAlluxioCluster();
cluster.initConfiguration(getTestName(getClass().getSimpleName(), LocalAlluxioCluster.DEFAULT_TEST_NAME));
ServerConfiguration.set(PropertyKey.USER_FILE_WRITE_TYPE_DEFAULT, WriteType.MUST_CACHE);
cluster.initConfiguration(getTestName(getClass().getSimpleName(), "test"));
Configuration.set(PropertyKey.USER_FILE_WRITE_TYPE_DEFAULT, WriteType.MUST_CACHE);
cluster.start();
return cluster;
}

0 comments on commit 9c1a8f2

Please sign in to comment.