File tree Expand file tree Collapse file tree 3 files changed +34
-10
lines changed Expand file tree Collapse file tree 3 files changed +34
-10
lines changed Original file line number Diff line number Diff line change
1
+ FROM eclipse-temurin:8-jammy
2
+
3
+ RUN apt update && apt install -y openssh-server vim
4
+ RUN service ssh start
5
+
6
+ RUN mkdir -p /assets/
7
+
8
+ # Build the jar locally before building docker image
9
+ COPY ./target/cassandra-data-migrator-2.9.jar /assets/
10
+
11
+ COPY ./src/resources/sparkConf.properties /assets/
12
+ COPY ./src/resources/partitions.csv /assets/
13
+ COPY ./src/resources/primary_key_rows.csv /assets/
14
+ COPY ./src/resources/runCommands.txt /assets/
15
+
16
+ RUN cd /assets && curl -OL https://downloads.datastax.com/dsbulk/dsbulk.tar.gz && tar -xzf ./dsbulk.tar.gz && rm ./dsbulk.tar.gz
17
+ RUN cd /assets && curl -OL https://downloads.datastax.com/enterprise/cqlsh-astra.tar.gz && tar -xzf ./cqlsh-astra.tar.gz && rm ./cqlsh-astra.tar.gz
18
+ RUN cd /assets && curl -OL https://archive.apache.org/dist/spark/spark-2.4.8/spark-2.4.8-bin-hadoop2.7.tgz && tar -xzf ./spark-2.4.8-bin-hadoop2.7.tgz && rm ./spark-2.4.8-bin-hadoop2.7.tgz
19
+
20
+ ENV PATH="${PATH}:/assets/dsbulk-1.10.0/bin/:/assets/cqlsh-astra/bin/:/assets/spark-2.4.8-bin-hadoop2.7/bin/"
21
+
22
+ EXPOSE 22
23
+
24
+ CMD ["/usr/sbin/sshd" ,"-D" ]
Original file line number Diff line number Diff line change 3
3
4
4
<groupId >datastax.astra.migrate</groupId >
5
5
<artifactId >cassandra-data-migrator</artifactId >
6
- <version >2.9 </version >
6
+ <version >2.10 </version >
7
7
<packaging >jar</packaging >
8
8
9
9
<properties >
Original file line number Diff line number Diff line change 1
- // Download spark
2
- wget https://archive.apache.org/dist/spark/spark-2.4.8/spark-2.4.8-bin-hadoop2.6.tgz
3
-
4
- // Increase driver memory
5
- --driver-memory 8G
1
+ // Download dependencies
2
+ curl -OL https://downloads.datastax.com/dsbulk/dsbulk.tar.gz
3
+ curl -OL https://downloads.datastax.com/enterprise/cqlsh-astra.tar.gz
4
+ wget https://archive.apache.org/dist/spark/spark-2.4.8/spark-2.4.8-bin-hadoop2.7.tgz
6
5
7
6
// Migrate
8
- spark-submit --properties-file /<path>/sparkConf.properties --verbose --master "local[8]" --class datastax.astra.migrate.Migrate /<path>/cassandra-data-migrator-1.x.jar
7
+ spark-submit --properties-file /<path>/sparkConf.properties --verbose --master "local[8]" --class datastax.astra.migrate.Migrate /<path>/cassandra-data-migrator-2.x.jar
8
+ spark-submit --properties-file /<path>/sparkConf.properties --master "local[8]" --driver-memory 25G --executor-memory 25G --class datastax.astra.migrate.Migrate /<path>/cassandra-data-migrator-2.x.jar &> table_out.log
9
9
10
10
// Random Partitioner Run Command
11
- spark-submit --properties-file /<path>/sparkConf.properties --verbose --master "local[8]" --conf spark.source .minPartition=-1 --conf spark.source .maxPartition=170141183460469231731687303715884105728 --class datastax.astra.migrate.Migrate /<path>/cassandra-data-migrator-1.x.jar
11
+ spark-submit --properties-file /<path>/sparkConf.properties --verbose --master "local[8]" --conf spark.origin .minPartition=-1 --conf spark.origin .maxPartition=170141183460469231731687303715884105728 --class datastax.astra.migrate.Migrate /<path>/cassandra-data-migrator-1.x.jar
12
12
13
- // Diff Data
14
- spark-submit --properties-file /<path>/sparkConf.properties --verbose -- master "local[8]" --class datastax.astra.migrate.DiffData /<path>/cassandra-data-migrator-1 .x.jar
13
+ // Validate
14
+ spark-submit --properties-file /<path>/sparkConf.properties --master "local[8]" --driver-memory 25G --executor-memory 25G -- class datastax.astra.migrate.DiffData /<path>/cassandra-data-migrator-2 .x.jar &> table_out.log
You can’t perform that action at this time.
0 commit comments