This is an automated email from the ASF dual-hosted git repository.
nwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new 9c7cd21 Separate gc log files for metrics manage and checkpoint
manager by id (#3354)
9c7cd21 is described below
commit 9c7cd219770d648513cc11c776ef02e55a0b2b8c
Author: Ning Wang <[email protected]>
AuthorDate: Thu Oct 3 12:23:14 2019 -0700
Separate gc log files for metrics manage and checkpoint manager by id
(#3354)
* Separate gc log files for metrics manage and checkpoint manager by id
* Fix unit tests
---
heron/executor/src/python/heron_executor.py | 7 ++++---
heron/executor/tests/python/heron_executor_unittest.py | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/heron/executor/src/python/heron_executor.py
b/heron/executor/src/python/heron_executor.py
index 25bec6f..01f59a9 100755
--- a/heron/executor/src/python/heron_executor.py
+++ b/heron/executor/src/python/heron_executor.py
@@ -446,7 +446,7 @@ class HeronExecutor(object):
'-XX:+HeapDumpOnOutOfMemoryError',
'-XX:+UseConcMarkSweepGC',
'-XX:+PrintCommandLineFlags',
- '-Xloggc:log-files/gc.metricsmgr.log',
+ '-Xloggc:log-files/gc.' + metricsManagerId + '.log',
'-Djava.net.preferIPv4Stack=true',
'-cp',
self.metrics_manager_classpath,
@@ -845,6 +845,7 @@ class HeronExecutor(object):
ckptmgr_main_class = 'org.apache.heron.ckptmgr.CheckpointManager'
ckptmgr_ram_mb = self.checkpoint_manager_ram / (1024 * 1024)
+ ckptmgr_id = self.ckptmgr_ids[self.shard]
ckptmgr_cmd = [os.path.join(self.heron_java_home, "bin/java"),
'-Xms%dM' % ckptmgr_ram_mb,
'-Xmx%dM' % ckptmgr_ram_mb,
@@ -863,14 +864,14 @@ class HeronExecutor(object):
'-XX:+HeapDumpOnOutOfMemoryError',
'-XX:+UseConcMarkSweepGC',
'-XX:+UseConcMarkSweepGC',
- '-Xloggc:log-files/gc.ckptmgr.log',
+ '-Xloggc:log-files/gc.' + ckptmgr_id + '.log',
'-Djava.net.preferIPv4Stack=true',
'-cp',
self.checkpoint_manager_classpath,
ckptmgr_main_class,
'-t' + self.topology_name,
'-i' + self.topology_id,
- '-c' + self.ckptmgr_ids[self.shard],
+ '-c' + ckptmgr_id,
'-p' + self.checkpoint_manager_port,
'-f' + self.stateful_config_file,
'-o' + self.override_config_file,
diff --git a/heron/executor/tests/python/heron_executor_unittest.py
b/heron/executor/tests/python/heron_executor_unittest.py
index d1debb0..7fbd800 100644
--- a/heron/executor/tests/python/heron_executor_unittest.py
+++ b/heron/executor/tests/python/heron_executor_unittest.py
@@ -109,12 +109,12 @@ class HeronExecutorTest(unittest.TestCase):
"-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5
-XX:GCLogFileSize=100M " \
"-XX:+PrintPromotionFailure -XX:+PrintTenuringDistribution
-XX:+PrintHeapAtGC " \
"-XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC
-XX:+PrintCommandLineFlags " \
- "-Xloggc:log-files/gc.metricsmgr.log
-Djava.net.preferIPv4Stack=true " \
+ "-Xloggc:log-files/gc.metricsmgr-%d.log
-Djava.net.preferIPv4Stack=true " \
"-cp metricsmgr_classpath
org.apache.heron.metricsmgr.MetricsManager " \
"--id=metricsmgr-%d --port=metricsmgr_port " \
"--topology=topname --cluster=cluster --role=role
--environment=environ --topology-id=topid " \
"--system-config-file=%s --override-config-file=%s
--sink-config-file=metrics_sinks_config_file" %\
- (container_id, INTERNAL_CONF_PATH, OVERRIDE_PATH)
+ (container_id, container_id, INTERNAL_CONF_PATH, OVERRIDE_PATH)
def get_expected_metricscachemgr_command():
return "heron_java_home/bin/java -Xmx1024M -XX:+PrintCommandLineFlags
-verbosegc " \