File tree Expand file tree Collapse file tree 14 files changed +120
-59
lines changed
src/main/resources/archetype-resources
src/main/scala/za/co/absa/hyperdrive/ingestor/implementation/writer/mongodb Expand file tree Collapse file tree 14 files changed +120
-59
lines changed Original file line number Diff line number Diff line change 1- name : build
1+ name : Build
22
33on :
44 pull_request :
77jobs :
88 build :
99 runs-on : ubuntu-latest
10-
10+ strategy :
11+ fail-fast : false
12+ matrix :
13+ scala : [ 2.11, 2.12 ]
14+ name : Scala ${{ matrix.scala }}, Spark 2.4
1115 steps :
1216 - uses : actions/checkout@v2
1317 - name : Set up JDK 1.8
1418 uses : actions/setup-java@v1
1519 with :
1620 java-version : 1.8
17- - name : Run tests
18- run : mvn clean test -Pall-tests
21+ - uses : actions/cache@v2
22+ with :
23+ path : ~/.m2/repository
24+ key : ${{ runner.os }}-${{ matrix.scala }}-${{ hashFiles('**/pom.xml') }}
25+ restore-keys : |
26+ ${{ runner.os }}-${{ matrix.scala }}-
27+ - name : Switch scala version
28+ run : mvn scala-cross-build:change-version -Pscala-${{ matrix.scala }}
29+ - name : Build and run tests
30+ run : mvn clean test -Pscala-${{ matrix.scala }},all-tests
Original file line number Diff line number Diff line change @@ -356,3 +356,22 @@ writer.kafka.schema.registry.url=${transformer.[avro.decoder].schema.registry.ur
356356Hyperdrive ingestions may be triggered using the Workflow Manager, which is developed in a separate repository: https://github.com/AbsaOSS/hyperdrive-trigger
357357
358358A key feature of the Workflow Manager are triggers, which define when an ingestion should be executed and how it should be requested. The workflow manager supports cron-based triggers as well as triggers that listen to a notification topic.
359+
360+
361+ ## How to build
362+ - Scala 2.12 (default)
363+ ```
364+ mvn clean install
365+ ```
366+ - Scala 2.11
367+ ```
368+ mvn scala-cross-build:change-version -Pscala-2.11
369+ mvn clean install -Pscala-2.11
370+ ```
371+
372+ ### E2E tests with Docker
373+ E2E tests require a running Docker instance on the executing machine and are not executed by default.
374+ To execute them, build using the profile ` all-tests `
375+ ```
376+ mvn clean test -Pall-tests
377+ ```
Original file line number Diff line number Diff line change 1717
1818<project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
1919 <parent >
20- <artifactId >parent-conf </artifactId >
20+ <artifactId >parent-conf_2.12 </artifactId >
2121 <groupId >za.co.absa.hyperdrive</groupId >
2222 <version >4.1.1-SNAPSHOT</version >
2323 <relativePath >../parent-conf/pom.xml</relativePath >
2424 </parent >
2525 <modelVersion >4.0.0</modelVersion >
26- <artifactId >api </artifactId >
26+ <artifactId >api_2.12 </artifactId >
2727 <packaging >jar</packaging >
2828</project >
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ This is a Maven archetype for creating custom Hyperdrive components.
2525
2626Download the artifact to your local maven repository
2727```
28- mvn dependency:get -Dartifact=za.co.absa.hyperdrive:component-archetype:4.0 .0
28+ mvn dependency:get -Dartifact=za.co.absa.hyperdrive:component-archetype:4.2 .0
2929```
3030
3131Update the local archetype catalog
@@ -37,8 +37,8 @@ Generate a skeleton project by executing the following command
3737```
3838mvn archetype:generate \
3939 -DarchetypeGroupId=za.co.absa.hyperdrive \
40- -DarchetypeArtifactId=component-archetype \
41- -DarchetypeVersion=4.0 .0 \
40+ -DarchetypeArtifactId=component-archetype_2.12 \
41+ -DarchetypeVersion=4.2 .0 \
4242 -DgroupId=<groupId> \
4343 -DartifactId=<artifactId> \
4444 -Dversion=<artifact-version>
@@ -47,6 +47,8 @@ mvn archetype:generate \
4747- ` <artifactId> ` is the name for your artifact, e.g. mytransformer,
4848- ` <artifact-version> ` is the version number of the artifact, e.g. 0.1.0-SNAPSHOT
4949
50+ Hint: For Scala 2.11, use ` -DarchetypeArtifactId=component-archetype_2.11 ` .
51+
5052## Implementing a Hyperdrive component
5153
5254There are three types of Hyperdrive components: Reader, Transformer and Writer.
Original file line number Diff line number Diff line change 1616
1717<project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
1818 <parent >
19- <artifactId >parent-conf </artifactId >
19+ <artifactId >parent-conf_2.12 </artifactId >
2020 <groupId >za.co.absa.hyperdrive</groupId >
2121 <version >4.1.1-SNAPSHOT</version >
2222 <relativePath >../parent-conf/pom.xml</relativePath >
2323 </parent >
2424 <modelVersion >4.0.0</modelVersion >
2525
26- <artifactId >component-archetype </artifactId >
26+ <artifactId >component-archetype_2.12 </artifactId >
2727 <packaging >maven-archetype</packaging >
2828
2929 <properties >
Original file line number Diff line number Diff line change 4949 <!-- Hyperdrive -->
5050 <dependency >
5151 <groupId >za.co.absa.hyperdrive</groupId >
52- <artifactId >api </artifactId >
52+ <artifactId >api_\${scala.compat.version} </artifactId >
5353 <version >\${hyperdrive.version} </version >
5454 <scope >provided</scope >
5555 </dependency >
Original file line number Diff line number Diff line change 1616
1717<project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
1818 <parent >
19- <artifactId >parent-conf </artifactId >
19+ <artifactId >parent-conf_2.12 </artifactId >
2020 <groupId >za.co.absa.hyperdrive</groupId >
2121 <version >4.1.1-SNAPSHOT</version >
2222 <relativePath >../parent-conf/pom.xml</relativePath >
2323 </parent >
2424 <modelVersion >4.0.0</modelVersion >
25- <artifactId >component-scanner </artifactId >
25+ <artifactId >component-scanner_2.12 </artifactId >
2626 <packaging >jar</packaging >
2727
2828
2929 <dependencies >
3030 <dependency >
3131 <groupId >za.co.absa.hyperdrive</groupId >
32- <artifactId >api </artifactId >
32+ <artifactId >api_${scala.compat.version} </artifactId >
3333 <version >4.1.1-SNAPSHOT</version >
3434 </dependency >
3535
Original file line number Diff line number Diff line change 1616
1717<project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
1818 <parent >
19- <artifactId >parent-conf </artifactId >
19+ <artifactId >parent-conf_2.12 </artifactId >
2020 <groupId >za.co.absa.hyperdrive</groupId >
2121 <version >4.1.1-SNAPSHOT</version >
2222 <relativePath >../parent-conf/pom.xml</relativePath >
2323 </parent >
2424 <modelVersion >4.0.0</modelVersion >
2525
26- <artifactId >driver </artifactId >
26+ <artifactId >driver_2.12 </artifactId >
2727
2828 <dependencies >
2929 <!-- Components from the project-->
3030 <dependency >
3131 <groupId >za.co.absa.hyperdrive</groupId >
32- <artifactId >api </artifactId >
32+ <artifactId >api_${scala.compat.version} </artifactId >
3333 <version >${project.version} </version >
3434 </dependency >
3535 <dependency >
3636 <groupId >za.co.absa.hyperdrive</groupId >
37- <artifactId >ingestor-default </artifactId >
37+ <artifactId >ingestor-default_${scala.compat.version} </artifactId >
3838 <version >${project.version} </version >
3939 </dependency >
4040 <dependency >
4141 <groupId >za.co.absa.hyperdrive</groupId >
42- <artifactId >shared </artifactId >
42+ <artifactId >shared_${scala.compat.version} </artifactId >
4343 <version >${project.version} </version >
4444 </dependency >
4545
Original file line number Diff line number Diff line change 1616
1717<project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
1818 <parent >
19- <artifactId >parent-conf </artifactId >
19+ <artifactId >parent-conf_2.12 </artifactId >
2020 <groupId >za.co.absa.hyperdrive</groupId >
2121 <version >4.1.1-SNAPSHOT</version >
2222 <relativePath >../parent-conf/pom.xml</relativePath >
2323 </parent >
2424 <modelVersion >4.0.0</modelVersion >
2525
26- <artifactId >hyperdrive-release </artifactId >
26+ <artifactId >hyperdrive-release_2.12 </artifactId >
2727
2828 <dependencies >
2929 <dependency >
3030 <groupId >za.co.absa.hyperdrive</groupId >
31- <artifactId >driver </artifactId >
31+ <artifactId >driver_${scala.compat.version} </artifactId >
3232 <version >${project.version} </version >
3333 </dependency >
3434 </dependencies >
Original file line number Diff line number Diff line change 1616
1717<project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
1818 <parent >
19- <artifactId >parent-conf </artifactId >
19+ <artifactId >parent-conf_2.12 </artifactId >
2020 <groupId >za.co.absa.hyperdrive</groupId >
2121 <version >4.1.1-SNAPSHOT</version >
2222 <relativePath >../parent-conf/pom.xml</relativePath >
2323 </parent >
2424 <modelVersion >4.0.0</modelVersion >
2525
26- <artifactId >ingestor-default </artifactId >
26+ <artifactId >ingestor-default_2.12 </artifactId >
2727
2828 <dependencies >
2929 <!-- Hyperdrive-->
3030 <dependency >
3131 <groupId >za.co.absa.hyperdrive</groupId >
32- <artifactId >api </artifactId >
32+ <artifactId >api_${scala.compat.version} </artifactId >
3333 <version >${project.version} </version >
3434 </dependency >
3535 <dependency >
3636 <groupId >za.co.absa.hyperdrive</groupId >
37- <artifactId >shared </artifactId >
37+ <artifactId >shared_${scala.compat.version} </artifactId >
3838 <version >${project.version} </version >
3939 </dependency >
4040
You can’t perform that action at this time.
0 commit comments