Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMORO-2008]: Refactor the optimizer module to separate distributing pacakges for different engines. #2051

Merged
merged 25 commits into from
Oct 9, 2023

Conversation

baiyangtx
Copy link
Contributor

@baiyangtx baiyangtx commented Sep 28, 2023

Why are the changes needed?

Close #2008 .

Brief change log

  • The optimizer module has been reorganized and split into ams/optimizer-container, ams/optimizer-job/job-common, ams/optimizer-job/flink-job, and ams/optimizer-job/standalone-job.
  • Changes have been made to the configuration files such as config.yaml, helm configmap, etc., to update the package name of localOptimizerContainer.
  • The dist directory has been modified, and the plugin/optimize/OptimizeJob.jar has been removed and replaced with plugin/optimize/flink/optimize-job.jar, which is only used for the Flink optimizer.

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? (no)

@github-actions github-actions bot added the module:ams-server Ams server module label Sep 28, 2023
@github-actions github-actions bot removed the module:ams-server Ams server module label Sep 28, 2023
@baiyangtx baiyangtx marked this pull request as ready for review September 28, 2023 09:03
<properties>
<fastjson.version>1.2.58</fastjson.version>
<avro.version>1.10.1</avro.version>
<snakeyaml.version>1.30</snakeyaml.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the current specification, all dependencies must be added to the dependencyManagement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, #2030 has move these properties to parent pom.

@zhoujinsong
Copy link
Contributor

zhoujinsong commented Oct 7, 2023

@baiyangtx Thanks a lot for your work!

Optimizer job seems to be a new concept for Amoro developers and users. Here, I think using Optimizer directly seems good enough. So I suggested to name the module to :

  • ams/optimizer-container
  • ams/optimizer/common
  • ams/optimizer/standalone-optimizer
  • ams/optimizer/flink-optimizer

How do you think?

@baiyangtx
Copy link
Contributor Author

@baiyangtx Thanks a lot for your work!

Optimizer job seems to be a new concept for Amoro developers and users. Here, I think using Optimizer directly seems good enough. So I suggested to name the module to :

* ams/optimizer-container

* ams/optimizer/common

* ams/optimizer/standalone-optimizer

* ams/optimizer/flink-optimizer

How do you think?

I agree with it. I will fix it.

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@baiyangtx I left some comments.
BTW, you may need to modify the managing-optimizer.md docs too.

<properties>
<fastjson.version>1.2.58</fastjson.version>
<avro.version>1.10.1</avro.version>
<snakeyaml.version>1.30</snakeyaml.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, #2030 has move these properties to parent pom.

@@ -1,4 +1,4 @@
package com.netease.arctic.optimizer;
package com.netease.arctic.optimizer.job.common;
Copy link
Contributor

@zhoujinsong zhoujinsong Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package com.netease.arctic.optimizer.job.common seems to be too long for me, com.netease.arctic.optimizer is good enough for me.

<artifactId>amoro-ams-optimizer</artifactId>
<name>Amoro Project Optimizer</name>
<artifactId>flink-optimizer</artifactId>
<name>Amoro Project Flink Optimizer Job</name>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<name>Amoro Project Flink Optimizer Job</name>
<name>Amoro Project Flink Optimizer</name>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

<modelVersion>4.0.0</modelVersion>

<artifactId>standalone-optimizer</artifactId>
<name>Amoro Project Standalone Optimizer Job</name>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<name>Amoro Project Standalone Optimizer Job</name>
<name>Amoro Project Standalone Optimizer</name>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@github-actions github-actions bot added the type:docs Improvements or additions to documentation label Oct 9, 2023
<modelVersion>4.0.0</modelVersion>

<artifactId>optimizer-common</artifactId>
<name>Amoro Project Optimize Job Common</name>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<name>Amoro Project Optimize Job Common</name>
<name>Amoro Project Optimizer Common</name>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scope can be ommited.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope can be omited.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

</dependency>
</dependencies>

<build>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to declare this plugin here and all other modules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@baiyangtx baiyangtx merged commit 835ff61 into apache:master Oct 9, 2023
@baiyangtx baiyangtx deleted the optimizer-module-refactor branch October 9, 2023 12:18
ShawHee pushed a commit to ShawHee/arctic that referenced this pull request Dec 29, 2023
…pacakges for different engines. (apache#2051)

* refactor modules

* module name refactor

* adjust pom.xml

* add checkstyle configs

* Revert "add checkstyle configs"

This reverts commit bbaa7f9.

* checkstyle problems

* fix package

* local -> standalone optimizer

* local-optimizer-container name

* refactor code struct as of review comment.

* fix unit tests

* fix package script

* fix review comments

* fix ut error

* fix ut

* fix rename

* remove useless import

* fix review comments

* fix review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:ams-dashboard Ams dashboard module type:build type:docs Improvements or additions to documentation
Projects
None yet
3 participants