Skip to content

Commit e37f27d

Browse files
authored
Upgrade Spark and SCC versions to fix CVEs (#205)
* Upgrade all cylinders - Spark & SCC upgrade to 3.4.1, C* used in testing to 4 latest, and log4j versions
1 parent c7d7dc5 commit e37f27d

File tree

8 files changed

+27
-19
lines changed

8 files changed

+27
-19
lines changed

.github/workflows/maven-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
with:
2424
java-version: '8'
2525
distribution: 'temurin'
26+
cache: maven
2627
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
2728
settings-path: ${{ github.workspace }} # location for the settings.xml file
2829

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ SIT/local
1010
.classpath
1111
.project
1212
.settings/*
13+
src/main/main.iml
14+
src/test/test.iml

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ RUN mkdir -p /assets/ && cd /assets && \
99
curl -OL https://downloads.datastax.com/enterprise/cqlsh-astra.tar.gz && \
1010
tar -xzf ./cqlsh-astra.tar.gz && \
1111
rm ./cqlsh-astra.tar.gz && \
12-
curl -OL https://archive.apache.org/dist/spark/spark-3.3.1/spark-3.3.1-bin-hadoop3.tgz && \
13-
tar -xzf ./spark-3.3.1-bin-hadoop3.tgz && \
14-
rm ./spark-3.3.1-bin-hadoop3.tgz
12+
curl -OL https://archive.apache.org/dist/spark/spark-3.4.1/spark-3.4.1-bin-hadoop3.tgz && \
13+
tar -xzf ./spark-3.4.1-bin-hadoop3.tgz && \
14+
rm ./spark-3.4.1-bin-hadoop3.tgz
1515

1616
RUN apt-get update && apt-get install -y openssh-server vim python3 --no-install-recommends && \
1717
rm -rf /var/lib/apt/lists/* && \
@@ -46,7 +46,7 @@ RUN chmod +x ./get-latest-maven-version.sh && \
4646
rm -rf "$USER_HOME_DIR/.m2"
4747

4848
# Add all migration tools to path
49-
ENV PATH="${PATH}:/assets/dsbulk/bin/:/assets/cqlsh-astra/bin/:/assets/spark-3.3.1-bin-hadoop3/bin/"
49+
ENV PATH="${PATH}:/assets/dsbulk/bin/:/assets/cqlsh-astra/bin/:/assets/spark-3.4.1-bin-hadoop3/bin/"
5050

5151
EXPOSE 22
5252

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Migrate and Validate Tables between Origin and Target Cassandra Clusters.
99

10-
> :warning: Please note this job has been tested with spark version [3.3.1](https://archive.apache.org/dist/spark/spark-3.3.1/)
10+
> :warning: Please note this job has been tested with spark version [3.4.1](https://archive.apache.org/dist/spark/spark-3.4.1/)
1111
1212
## Install as a Container
1313
- Get the latest image that includes all dependencies from [DockerHub](https://hub.docker.com/r/datastax/cassandra-data-migrator)
@@ -18,10 +18,10 @@ Migrate and Validate Tables between Origin and Target Cassandra Clusters.
1818

1919
### Prerequisite
2020
- Install Java8 as spark binaries are compiled with it.
21-
- Install Spark version [3.3.1](https://archive.apache.org/dist/spark/spark-3.3.1/) on a single VM (no cluster necessary) where you want to run this job. Spark can be installed by running the following: -
21+
- Install Spark version [3.4.1](https://archive.apache.org/dist/spark/spark-3.4.1/) on a single VM (no cluster necessary) where you want to run this job. Spark can be installed by running the following: -
2222
```
23-
wget https://archive.apache.org/dist/spark/spark-3.3.1/spark-3.3.1-bin-hadoop3.tgz
24-
tar -xvzf spark-3.3.1-bin-hadoop3.tgz
23+
wget https://archive.apache.org/dist/spark/spark-3.4.1/spark-3.4.1-bin-hadoop3.tgz
24+
tar -xvzf spark-3.4.1-bin-hadoop3.tgz
2525
```
2626

2727
# Steps for Data-Migration:

SIT/environment.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ fi
6868
###
6969
# These variables are hard-coded for now
7070
SUBNET=$(echo ${CIDR} | cut -d. -f1-3)
71-
CASS_VERSION=3
71+
CASS_VERSION=4
7272
CDM_VERSION=latest
7373

7474
#==============================================================================================================================
7575
# Helper Functions
7676
#==============================================================================================================================
77-
# Common enviornment and functions
77+
# Common environment and functions
7878
. common.sh
7979

8080
_testDockerNetwork() {

SIT/smoke/03_ttl_writetime/expected.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ record5|A---|B---|CCCC|DDDD|1087384200000000|6
66
record2|AAAA|BBBB|CCCC|DDDD|1087383720000000|5
77
record6|AAAA|BBBB|C---|DDDD|1087384200000000|5
88
record1|AAAA|BBBB|CCCC|DDDD|1087383720000000|5
9-
record8|AAAA|BBBB|CCCC|DDDD|1087383720000000|6
9+
record8|A---|BBBB|CCCC|DDDD|1087383720000000|6
1010
record7|AAAA|B---|CCCC|DDDD|1087384200000000|6
1111
record4|AAAA|BBBB|CCCC|DDDD|1087384200000000|3
1212

SIT/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if [[ ! -d ${PHASE} || $(ls -d ${PHASE}/* | wc -l) -eq 0 ]]; then
3131
_fatal "Phase directory ${PHASE} does not exist, or is empty"
3232
fi
3333

34-
# Common enviornment and functions
34+
# Common environment and functions
3535
. common.sh
3636

3737
_captureOutput() {

pom.xml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1111
<scala.version>2.12.17</scala.version>
1212
<scala.main.version>2.12</scala.main.version>
13-
<spark.version>3.3.1</spark.version>
13+
<spark.version>3.4.1</spark.version>
1414
<scalatest.version>3.2.12</scalatest.version>
15-
<connector.version>3.2.0</connector.version>
15+
<connector.version>3.4.1</connector.version>
1616
<cassandra.version>5.0-alpha1</cassandra.version>
1717
<junit.version>5.9.1</junit.version>
1818
<mockito.version>4.11.0</mockito.version>
1919
<java-driver.version>4.17.0</java-driver.version>
20+
<log4j.version>2.20.0</log4j.version>
2021
</properties>
2122

2223
<distributionManagement>
@@ -46,6 +47,10 @@
4647
<groupId>org.apache.logging.log4j</groupId>
4748
<artifactId>log4j-slf4j-impl</artifactId>
4849
</exclusion>
50+
<exclusion>
51+
<groupId>org.apache.logging.log4j</groupId>
52+
<artifactId>log4j-slf4j2-impl</artifactId>
53+
</exclusion>
4954
</exclusions>
5055
<scope>provided</scope>
5156
</dependency>
@@ -120,23 +125,23 @@
120125
<dependency>
121126
<groupId>com.github.jnr</groupId>
122127
<artifactId>jnr-posix</artifactId>
123-
<version>3.1.15</version>
128+
<version>3.1.18</version>
124129
</dependency>
125130

126131
<dependency>
127132
<groupId>org.apache.logging.log4j</groupId>
128133
<artifactId>log4j-api</artifactId>
129-
<version>2.19.0</version>
134+
<version>${log4j.version}</version>
130135
</dependency>
131136
<dependency>
132137
<groupId>org.apache.logging.log4j</groupId>
133138
<artifactId>log4j-core</artifactId>
134-
<version>2.19.0</version>
139+
<version>${log4j.version}</version>
135140
</dependency>
136141
<dependency>
137142
<groupId>org.apache.logging.log4j</groupId>
138143
<artifactId>log4j-to-slf4j</artifactId>
139-
<version>2.19.0</version>
144+
<version>${log4j.version}</version>
140145
</dependency>
141146

142147
<!-- Test Dependencies -->
@@ -206,7 +211,7 @@
206211
<plugin>
207212
<groupId>org.apache.maven.plugins</groupId>
208213
<artifactId>maven-shade-plugin</artifactId>
209-
<version>3.4.1</version>
214+
<version>3.5.1</version>
210215
<executions>
211216
<execution>
212217

0 commit comments

Comments
 (0)