zhangshenghang opened a new pull request, #10255:
URL: https://github.com/apache/seatunnel/pull/10255

   ## Purpose of this pull request
   
   Currently, when users configure the `-Xloggc` option for GC logging, the JVM 
will fail to start if the specified directory doesn't exist. This PR adds logic 
to automatically create the GC log directory before JVM startup, similar to the 
existing HeapDumpPath directory auto-creation logic introduced in PR #10228.
   
   ## Changes
   
   - Added GC logging configuration options to `config/jvm_options` (commented 
by default)
   - Modified `seatunnel.sh` to auto-create GC log directory
   - Modified `seatunnel-cluster.sh` to auto-create GC log directory  
   - Modified `seatunnel.cmd` to auto-create GC log directory
   - Modified `seatunnel-cluster.cmd` to auto-create GC log directory
   
   ## GC Logging Configuration
   
   Users can now enable GC logging by uncommenting the following options in 
`config/jvm_options`:
   
   ```bash
   # -XX:+PrintGCDetails
   # -XX:+PrintGCDateStamps
   # -XX:+PrintGCTimeStamps
   # -Xloggc:/tmp/seatunnel/gc/gc.log
   # -XX:+UseGCLogFileRotation
   # -XX:NumberOfGCLogFiles=10
   # -XX:GCLogFileSize=200M
   # -XX:+PrintGCApplicationStoppedTime
   ```
   
   The GC log directory will be automatically created on startup if it doesn't 
exist.
   
   ## Does this PR introduce any user-facing change?
   
   Yes. Users can now enable GC logging without manually creating the log 
directory first. The directory will be created automatically during startup.
   
   ## How was this patch tested
   
   - Created comprehensive test script to verify GC directory creation logic
   - Tested various scenarios: with/without -Xloggc option, nested directories, 
coexistence with HeapDumpPath
   - Syntax validation for both shell scripts and Windows batch files


-- 
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]

Reply via email to