j1wonpark opened a new pull request, #4074:
URL: https://github.com/apache/amoro/pull/4074
## Why are the changes needed?
When starting the optimizer, Log4j throws a parsing error:
```
ERROR StatusLogger Error parsing /usr/local/amoro/conf/optimize
org.xml.sax.SAXParseException; Content is not allowed in prolog.
```
The root cause is that `OPTIMIZER_LOG_CONF_FILE` variable is used in
`optimizer.sh` but never initialized. When the variable is empty, Log4j falls
back to CLASSPATH scanning and attempts to parse the `conf/optimize` directory
as an XML file, causing the SAXParseException.
## Brief change log
- Initialize `OPTIMIZER_LOG_CONF_FILE` variable in
`dist/src/main/amoro-bin/bin/optimizer.sh` to point to
`${AMORO_CONF_DIR}/optimize/log4j2.xml`
## 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
- [x] Run test locally before making a pull request
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
--
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]