Skip to content

Commit

Permalink
[AMORO-3159] Pull optimizer and metrics module out of amoro-ams (apac…
Browse files Browse the repository at this point in the history
…he#3160)

* Pull optimizer and metrics module out of amoro-ams

* Fix parent modification for optimizer and metrics module

---------

Co-authored-by: majin.nathan <majin.nathan@bytedance.com>
  • Loading branch information
majin1102 and majin.nathan authored Sep 2, 2024
1 parent 8207efc commit aa17fbd
Show file tree
Hide file tree
Showing 36 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
- "amoro-web/**/*"

"module:ams-optimizer":
- "amoro-ams/amoro-ams-optimizer/**/*"
- "amoro-optimizer/**/*"

"module:mixed-spark":
- "amoro-mixed-format/amoro-mixed-format-spark/**/*"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
&& echo "AMORO_VERSION=${AMORO_VERSION}" >> $GITHUB_OUTPUT
- name: Build optimizer module with Maven
run: mvn clean package -pl 'amoro-ams/amoro-ams-optimizer/amoro-optimizer-flink' -am -e ${OPTIMIZER_FLINK} -DskipTests -B -ntp
run: mvn clean package -pl 'amoro-optimizer/amoro-optimizer-flink' -am -e ${OPTIMIZER_FLINK} -DskipTests -B -ntp

- name: Build and Push Flink Optimizer Docker Image
uses: docker/build-push-action@v4
Expand All @@ -176,7 +176,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
build-args: |
FLINK_VERSION=${{ matrix.flink }}
OPTIMIZER_JOB=amoro-ams/amoro-ams-optimizer/amoro-optimizer-flink/target/amoro-optimizer-flink-${{ env.AMORO_VERSION }}-jar-with-dependencies.jar
OPTIMIZER_JOB=amoro-optimizer/amoro-optimizer-flink/target/amoro-optimizer-flink-${{ env.AMORO_VERSION }}-jar-with-dependencies.jar
docker-optimizer-spark:
name: Push Amoro Optimizer-Spark Docker Image to Docker Hub
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
&& echo "AMORO_VERSION=${AMORO_VERSION}" >> $GITHUB_OUTPUT
- name: Build optimizer module with Maven
run: mvn clean package -pl 'amoro-ams/amoro-ams-optimizer/amoro-optimizer-spark' -am -e ${OPTIMIZER_SPARK} -DskipTests -B -ntp
run: mvn clean package -pl 'amoro-optimizer/amoro-optimizer-spark' -am -e ${OPTIMIZER_SPARK} -DskipTests -B -ntp

- name: Build and Push Spark Optimizer Docker Image
uses: docker/build-push-action@v4
Expand All @@ -251,6 +251,6 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
build-args: |
SPARK_VERSION=${{ matrix.spark }}
OPTIMIZER_JOB=amoro-ams/amoro-ams-optimizer/amoro-optimizer-spark/target/amoro-optimizer-spark-${{ env.AMORO_VERSION }}-jar-with-dependencies.jar
OPTIMIZER_JOB=amoro-optimizer/amoro-optimizer-spark/target/amoro-optimizer-spark-${{ env.AMORO_VERSION }}-jar-with-dependencies.jar
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Amoro contains modules as below:
- `amoro-ams-api` contains ams thrift api and common interfaces
- `amoro-ams-dashboard` is the dashboard frontend for ams
- `amoro-ams-server` is the backend server for ams
- `amoro-ams-optimizer` provides default optimizer implementation
- `amoro-optimizer` provides default optimizer implementation
- `amoro-mixed-format` provides Mixed format implementation
- `amoro-mixed-format-hive` integrates with Apache Hive and implements Mixed Hive format
- `amoro-mixed-format-flink` provides Flink connectors for Mixed format tables (use amoro-flink-runtime for a shaded version)
Expand Down
6 changes: 3 additions & 3 deletions amoro-ams/dist/src/main/assemblies/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@
<files>
<file>
<source>
../amoro-ams-optimizer/amoro-optimizer-flink/target/amoro-optimizer-flink-${project.version}-jar-with-dependencies.jar
../../amoro-optimizer/amoro-optimizer-flink/target/amoro-optimizer-flink-${project.version}-jar-with-dependencies.jar
</source>
<outputDirectory>plugin/optimizer/flink</outputDirectory>
<destName>optimizer-job.jar</destName>
<fileMode>0644</fileMode>
</file>
<file>
<source>
../amoro-ams-optimizer/amoro-optimizer-spark/target/amoro-optimizer-spark-${project.version}-jar-with-dependencies.jar
../../amoro-optimizer/amoro-optimizer-spark/target/amoro-optimizer-spark-${project.version}-jar-with-dependencies.jar
</source>
<outputDirectory>plugin/optimizer/spark</outputDirectory>
<destName>optimizer-job.jar</destName>
<fileMode>0644</fileMode>
</file>
<file>
<source>
../amoro-ams-metrics/amoro-metrics-prometheus/target/amoro-metrics-prometheus-${project.version}-jar-with-dependencies.jar
../../amoro-metrics/amoro-metrics-prometheus/target/amoro-metrics-prometheus-${project.version}-jar-with-dependencies.jar
</source>
<outputDirectory>plugin/metric-reporters</outputDirectory>
<destName>prometheus-reporter.jar</destName>
Expand Down
2 changes: 0 additions & 2 deletions amoro-ams/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@

<modules>
<module>amoro-ams-server</module>
<module>amoro-ams-optimizer</module>
<module>amoro-ams-metrics</module>
<module>dist</module>
</modules>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
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">
<parent>
<artifactId>amoro-ams-metrics</artifactId>
<artifactId>amoro-metrics</artifactId>
<groupId>org.apache.amoro</groupId>
<version>0.8-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
Expand Down
4 changes: 2 additions & 2 deletions amoro-ams/amoro-ams-metrics/pom.xml → amoro-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

<parent>
<groupId>org.apache.amoro</groupId>
<artifactId>amoro-ams</artifactId>
<artifactId>amoro-parent</artifactId>
<version>0.8-SNAPSHOT</version>
</parent>

<artifactId>amoro-ams-metrics</artifactId>
<artifactId>amoro-metrics</artifactId>
<packaging>pom</packaging>
<name>Amoro Project AMS Metric Reporter Parent</name>
<url>https://amoro.apache.org</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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">
<parent>
<artifactId>amoro-ams-optimizer</artifactId>
<artifactId>amoro-optimizer</artifactId>
<groupId>org.apache.amoro</groupId>
<version>0.8-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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">
<parent>
<artifactId>amoro-ams-optimizer</artifactId>
<artifactId>amoro-optimizer</artifactId>
<groupId>org.apache.amoro</groupId>
<version>0.8-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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">
<parent>
<artifactId>amoro-ams-optimizer</artifactId>
<artifactId>amoro-optimizer</artifactId>
<groupId>org.apache.amoro</groupId>
<version>0.8-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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">
<parent>
<artifactId>amoro-ams-optimizer</artifactId>
<artifactId>amoro-optimizer</artifactId>
<groupId>org.apache.amoro</groupId>
<version>0.8-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

<parent>
<groupId>org.apache.amoro</groupId>
<artifactId>amoro-ams</artifactId>
<artifactId>amoro-parent</artifactId>
<version>0.8-SNAPSHOT</version>
</parent>

<artifactId>amoro-ams-optimizer</artifactId>
<artifactId>amoro-optimizer</artifactId>
<packaging>pom</packaging>
<name>Amoro Project AMS Optimizer Parent</name>
<url>https://amoro.apache.org</url>
Expand Down
8 changes: 4 additions & 4 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ FLINK_VERSION=1.20.0
SPARK_VERSION=3.3.3
DEBIAN_MIRROR=http://deb.debian.org
APACHE_ARCHIVE=https://archive.apache.org/dist
FLINK_OPTIMIZER_JOB_PATH=amoro-ams/amoro-ams-optimizer/amoro-optimizer-flink/target/amoro-optimizer-flink-${AMORO_VERSION}-jar-with-dependencies.jar
FLINK_OPTIMIZER_JOB_PATH=amoro-optimizer/amoro-optimizer-flink/target/amoro-optimizer-flink-${AMORO_VERSION}-jar-with-dependencies.jar
FLINK_OPTIMIZER_JOB=${PROJECT_HOME}/${FLINK_OPTIMIZER_JOB_PATH}
SPARK_OPTIMIZER_JOB_PATH=amoro-ams/amoro-ams-optimizer/amoro-optimizer-spark/target/amoro-optimizer-spark-${AMORO_VERSION}-jar-with-dependencies.jar
SPARK_OPTIMIZER_JOB_PATH=amoro-optimizer/amoro-optimizer-spark/target/amoro-optimizer-spark-${AMORO_VERSION}-jar-with-dependencies.jar
SPARK_OPTIMIZER_JOB=${PROJECT_HOME}/${SPARK_OPTIMIZER_JOB_PATH}
AMORO_TAG=$AMORO_VERSION
MAVEN_MIRROR=https://repo.maven.apache.org/maven2
Expand Down Expand Up @@ -160,7 +160,7 @@ function build_optimizer_flink() {
OPTIMIZER_JOB=${FLINK_OPTIMIZER_JOB}

if [ ! -f "${OPTIMIZER_JOB}" ]; then
BUILD_CMD="mvn clean package -pl amoro-ams/amoro-ams-optimizer/amoro-optimizer-flink -am -e -DskipTests"
BUILD_CMD="mvn clean package -pl amoro-optimizer/amoro-optimizer-flink -am -e -DskipTests"
echo "flink optimizer job not exists in ${OPTIMIZER_JOB}"
echo "please check the file or run '${BUILD_CMD}' first. "
exit 1
Expand All @@ -183,7 +183,7 @@ function build_optimizer_spark() {
OPTIMIZER_JOB=${SPARK_OPTIMIZER_JOB}

if [ ! -f "${OPTIMIZER_JOB}" ]; then
BUILD_CMD="mvn clean package -pl amoro-ams/amoro-ams-optimizer/amoro-optimizer-spark -am -e -DskipTests"
BUILD_CMD="mvn clean package -pl amoro-optimizer/amoro-optimizer-spark -am -e -DskipTests"
echo "spark optimizer job not exists in ${OPTIMIZER_JOB}"
echo "please check the file or run '${BUILD_CMD}' first. "
exit 1
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
<module>amoro-common</module>
<module>amoro-web</module>
<module>amoro-ams</module>
<module>amoro-optimizer</module>
<module>amoro-metrics</module>
<module>amoro-iceberg-format</module>
<module>amoro-mixed-format</module>
<module>amoro-hudi-format</module>
Expand Down

0 comments on commit aa17fbd

Please sign in to comment.