Code0x58 commented on a change in pull request #3663:
URL: https://github.com/apache/incubator-heron/pull/3663#discussion_r556088656
##########
File path: heron/executor/src/python/heron_executor.py
##########
@@ -574,36 +577,17 @@ def _get_java_major_version(self):
return int(self._get_jvm_version().split(".")[0])
def _get_java_gc_instance_cmd(self, cmd, gc_name):
- gc_cmd = ['-verbosegc']
- if self._get_java_major_version() >= 9:
- gc_cmd += [
- '-XX:+UseG1GC',
- '-XX:+ParallelRefProcEnabled',
- '-XX:+UseStringDeduplication',
- '-XX:MaxGCPauseMillis=100',
- '-XX:InitiatingHeapOccupancyPercent=30',
- '-XX:+HeapDumpOnOutOfMemoryError',
- '-XX:ParallelGCThreads=4',
- '-Xlog:gc*,safepoint=info:file=' + self.log_dir + '/gc.' + gc_name +
- '.log:tags,time,uptime,level:filecount=5,filesize=100M']
- else:
- gc_cmd += [
- '-XX:+UseConcMarkSweepGC',
- '-XX:+CMSScavengeBeforeRemark',
- '-XX:TargetSurvivorRatio=90',
- '-XX:+PrintGCDetails',
- '-XX:+PrintGCTimeStamps',
- '-XX:+PrintGCDateStamps',
- '-XX:+PrintGCCause',
- '-XX:+UseGCLogFileRotation',
- '-XX:NumberOfGCLogFiles=5',
- '-XX:GCLogFileSize=100M',
- '-XX:+PrintPromotionFailure',
- '-XX:+PrintTenuringDistribution',
- '-XX:+PrintHeapAtGC',
- '-XX:+HeapDumpOnOutOfMemoryError',
- '-XX:ParallelGCThreads=4',
- '-Xloggc:' + self.log_dir + '/gc.' + gc_name + '.log']
+ gc_cmd += [
+ '-XX:+UseG1GC',
+ '-XX:+ParallelRefProcEnabled',
+ '-XX:+UseStringDeduplication',
+ '-XX:MaxGCPauseMillis=100',
+ '-XX:InitiatingHeapOccupancyPercent=30',
+ '-XX:+HeapDumpOnOutOfMemoryError',
+ '-XX:ParallelGCThreads=4']
+ if self.enable_verbose_gc_log:
Review comment:
Following the suggested naming
```suggestion
if self.verbose_gc_log:
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]