Skip to content

Commit

Permalink
Bump compiler to 3.12.1
Browse files Browse the repository at this point in the history
Upgrade Spark to 3.4.2
Update GHAs to use JDK11
Update Dockerfile image version to 11-jammy
Temporary Docker image to support JDK11
  • Loading branch information
msmygit committed Jan 21, 2024
1 parent 07ef7eb commit 1ae9f18
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cdm-integrationtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
CDM-Integration-Test:
strategy:
matrix:
jdk: [ 8 ]
jdk: [ 11, 17, 21 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
build:
strategy:
matrix:
jdk: [ 8 ]
jdk: [ 11, 17, 21 ]
os: [ ubuntu-latest ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:8-jammy
FROM eclipse-temurin:11-jammy

# Download all migration dependencies
RUN mkdir -p /assets/ && cd /assets && \
Expand All @@ -9,9 +9,9 @@ RUN mkdir -p /assets/ && cd /assets && \
curl -OL https://downloads.datastax.com/enterprise/cqlsh-astra.tar.gz && \
tar -xzf ./cqlsh-astra.tar.gz && \
rm ./cqlsh-astra.tar.gz && \
curl -OL https://archive.apache.org/dist/spark/spark-3.4.1/spark-3.4.1-bin-hadoop3-scala2.13.tgz && \
tar -xzf ./spark-3.4.1-bin-hadoop3-scala2.13.tgz && \
rm ./spark-3.4.1-bin-hadoop3-scala2.13.tgz
curl -OL https://archive.apache.org/dist/spark/spark-3.4.2/spark-3.4.2-bin-hadoop3-scala2.13.tgz && \
tar -xzf ./spark-3.4.2-bin-hadoop3-scala2.13.tgz && \
rm ./spark-3.4.2-bin-hadoop3-scala2.13.tgz

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

# Add all migration tools to path
ENV PATH="${PATH}:/assets/dsbulk/bin/:/assets/cqlsh-astra/bin/:/assets/spark-3.4.1-bin-hadoop3-scala2.13/bin/"
ENV PATH="${PATH}:/assets/dsbulk/bin/:/assets/cqlsh-astra/bin/:/assets/spark-3.4.2-bin-hadoop3-scala2.13/bin/"

EXPOSE 22

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Migrate and Validate Tables between Origin and Target Cassandra Clusters.

> :warning: Please note this job has been tested with spark version [3.4.1](https://archive.apache.org/dist/spark/spark-3.4.1/)
> :warning: Please note this job has been tested with spark version [3.4.2](https://archive.apache.org/dist/spark/spark-3.4.2/)
## Install as a Container
- Get the latest image that includes all dependencies from [DockerHub](https://hub.docker.com/r/datastax/cassandra-data-migrator)
Expand All @@ -17,11 +17,11 @@ Migrate and Validate Tables between Origin and Target Cassandra Clusters.
- Download the latest jar file from the GitHub [packages area here](https://github.com/datastax/cassandra-data-migrator/packages/1832128)

### Prerequisite
- Install Java8 as spark binaries are compiled with it.
- Install Spark version [3.4.1](https://archive.apache.org/dist/spark/spark-3.4.1/spark-3.4.1-bin-hadoop3-scala2.13.tgz) on a single VM (no cluster necessary) where you want to run this job. Spark can be installed by running the following: -
- Install **Java11** (minimum) as Spark binaries are compiled with it.
- Install Spark version [`3.4.2`](https://archive.apache.org/dist/spark/spark-3.4.2/spark-3.4.2-bin-hadoop3-scala2.13.tgz) on a single VM (no cluster necessary) where you want to run this job. Spark can be installed by running the following: -
```
wget https://archive.apache.org/dist/spark/spark-3.4.1/spark-3.4.1-bin-hadoop3-scala2.13.tgz
tar -xvzf spark-3.4.1-bin-hadoop3-scala2.13.tgz
wget https://archive.apache.org/dist/spark/spark-3.4.2/spark-3.4.2-bin-hadoop3-scala2.13.tgz
tar -xvzf spark-3.4.2-bin-hadoop3-scala2.13.tgz
```

> :warning: If the above Spark and Scala version is not properly installed, you'll then see a similar exception like below when running the CDM jobs,
Expand Down
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Release Notes
## [4.1.12] - 2024-01-22
- Upgraded to use Spark `3.4.2`.
- Added Java `11` as the minimally required pre-requisite to run CDM jobs.

## [4.1.9 to 4.1.11] - 2023-12-11
- Code test & coverage changes

Expand Down
3 changes: 2 additions & 1 deletion SIT/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ fi
# These variables are hard-coded for now
SUBNET=$(echo ${CIDR} | cut -d. -f1-3)
CASS_VERSION=4
CDM_VERSION=latest
#CDM_VERSION=latest
CDM_VERSION=ms-jdk17
#==============================================================================================================================
# Helper Functions
#==============================================================================================================================
Expand Down
12 changes: 8 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<mockito.version>4.11.0</mockito.version>
<java-driver.version>4.17.0</java-driver.version>
<log4j.version>2.21.0</log4j.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
</properties>

<distributionManagement>
Expand Down Expand Up @@ -182,7 +185,7 @@
<connection>scm:git:[email protected]:datastax/cassandra-data-migrator.git</connection>
<developerConnection>scm:git:[email protected]:datastax/cassandra-data-migrator.git</developerConnection>
<url>https://github.com/datastax/cassandra-data-migrator</url>
<tag>4.1.8</tag>
<tag>4.1.11</tag>
</scm>

<build>
Expand Down Expand Up @@ -246,10 +249,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.12.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>

Expand Down
2 changes: 1 addition & 1 deletion src/resources/migrate_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
###########################################################################################################################

# Path to spark-submit
SPARK_SUBMIT=/home/ubuntu/spark-3.4.1-bin-hadoop3-scala2.13/bin/spark-submit
SPARK_SUBMIT=/home/ubuntu/spark-3.4.2-bin-hadoop3-scala2.13/bin/spark-submit

# Path to spark configuration for the table
PROPS_FILE=/home/ubuntu/sparkConf.properties
Expand Down

0 comments on commit 1ae9f18

Please sign in to comment.