cxxiii commented on code in PR #3615: URL: https://github.com/apache/amoro/pull/3615#discussion_r2149926382
########## docs/admin-guides/deployment-on-IDE.md: ########## @@ -0,0 +1,147 @@ +# Deploying Amoro in IntelliJ IDEA + +This guide describes how to import the Amoro project into IntelliJ IDEA and deploy it. + +## Requirements ++ Java Version: Java 8 or Java 11 is required. + +### Required Plugins +1. Go to `Settings` → `Plugins` in IntelliJ IDEA. +2. Select the “Marketplace” tab. +3. Search for and install the following plugins: + - Scala +4. Restart IntelliJ IDEA if prompted. + +## Building Amoro in IntelliJ IDEA +This guide is based on IntelliJ IDEA 2024. Some details might differ in other versions. + +1. Clone the Repository and Create the Configuration File: + +```shell +git clone https://github.com/apache/amoro.git +cd amoro +# base_dir=$(pwd) +mkdir -p conf +cp dist/src/main/amoro-bin/conf/config.yaml conf/config.yaml +``` + +2. Import the Project: + 1. Open IntelliJ IDEA and select `File`->`Open`. + 2. Choose the root folder of the cloned Amoro repository. +3. Configure Java Version: + 1. Open the `Maven` tab on the right side of the IDE. + 2. Expand `Profiles` and ensure the selected Java version matches your IDE's Java version. + 3. To check or change the project SDK, go to `File`->`Project Structure...`->`Project`->`SDK`. +4. Modify the Configuration File: + + The AMS server requires configuration for database connections. Edit {base_dir}/conf/config.yaml as follows: + +```yaml +ams: + database: + type: derby + jdbc-driver-class: org.apache.derby.jdbc.EmbeddedDriver + url: jdbc:derby:{base_dir}/conf/derby;create=true + connection-pool-max-total: 20 + connection-pool-max-idle: 16 + connection-pool-max-wait-millis: 30000 +``` + + Note: Replace {base_dir} with the actual path to your project root. + +5. Load Dependencies + + In the `Maven` tab, click the `Reload All Maven Projects` botton, or right-click the imported Amoro project in the Project view and select `Maven`->`Reload project`. + +## Starting AMS +1. Open the following file: + +` +{base_dir}/amoro-ams/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java +` + +2. In the top right corner of IntelliJ IDEA, click the `Run AmoroServiceContainer` button to start the AMS service. +3. Once the service has started, open your web browser and navigate to: [http://localhost:1630](http://localhost:1630/) +4. If you see the login page, the startup was successful. The default username and password for login are both `admin`. + +# Starting the Optimizer in IntelliJ IDEA +### Add an Optimizer Group +1. Open http://localhost:1630 in your browser and log in with admin/admin. +2. Click on `Optimizing` in the sidebar, select `Optimizer Groups`, and click the `Add Group` button to create a new group. +3. Configure the newly added Optimizer group: +  + + The following configuration needs to be filled in: + + - Name: the name of the optimizer group, which can be seen in the list of optimizer groups on the front-end page. + - Container: the name of a container configured in containers. + - Properties: the default configuration under this group, is used as a configuration parameter for tasks when the optimize page is scaled out. + +### Modify Configuration +1. Add log4j Dependencies: Review Comment: In the implementation of the Optimizer class (which is impocrted by the StandaloneOptimizer), org.slf4j.Logger was used for logging. Therefore, the project need to add the logging implementation dependency to eliminate the warning messages. But now I have placed this function in a separate branch as shown in PR[AMORO-3612]. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
