ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-17527. Setup logging to find memory leak rootcause (aonishuk)
Date Fri, 01 Jul 2016 18:44:33 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 78898ebe5 -> 148950a22


AMBARI-17527. Setup logging to find memory leak rootcause (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/148950a2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/148950a2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/148950a2

Branch: refs/heads/trunk
Commit: 148950a2216a84890c9c79d7f44b2436cc78ffc3
Parents: 78898eb
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Jul 1 21:44:23 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Jul 1 21:44:23 2016 +0300

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/main.py                 | 3 ++-
 ambari-agent/src/test/python/ambari_agent/TestCertGeneration.py   | 2 ++
 ambari-agent/src/test/python/ambari_agent/TestHardware.py         | 3 ++-
 ambari-agent/src/test/python/ambari_agent/TestHostname.py         | 2 ++
 ambari-agent/src/test/python/ambari_agent/TestShell.py            | 2 ++
 .../src/test/python/resource_management/TestDatanodeHelper.py     | 2 ++
 .../src/test/python/resource_management/TestDirectoryResource.py  | 3 ++-
 .../src/test/python/resource_management/TestExecuteResource.py    | 3 ++-
 .../src/test/python/resource_management/TestLinkResource.py       | 3 ++-
 9 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/148950a2/ambari-agent/src/main/python/ambari_agent/main.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/main.py b/ambari-agent/src/main/python/ambari_agent/main.py
index f93722f..4db89f8 100644
--- a/ambari-agent/src/main/python/ambari_agent/main.py
+++ b/ambari-agent/src/main/python/ambari_agent/main.py
@@ -23,12 +23,13 @@ import traceback
 import threading
 import time
 
+MEMORY_LEAK_DEBUG_FILEPATH = "/var/log/ambari-agent/memory_leak_debug.out"
+
 def setup_memory_leak_debugger():
   gc.disable_old = gc.disable
   gc.enable_old = gc.enable
   gc.isenabled_old = gc.isenabled
 
-  MEMORY_LEAK_DEBUG_FILEPATH = "/var/log/ambari-agent/memory_leak_debug.out"
   def print_debug_info(result):
     time_prefix =  time.strftime('%X %x')
     thread_repr = repr(threading.currentThread())

http://git-wip-us.apache.org/repos/asf/ambari/blob/148950a2/ambari-agent/src/test/python/ambari_agent/TestCertGeneration.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestCertGeneration.py b/ambari-agent/src/test/python/ambari_agent/TestCertGeneration.py
index beafbf0..cb3f8e9 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestCertGeneration.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestCertGeneration.py
@@ -17,6 +17,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 '''
+from ambari_agent import main
+main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out"
 import os
 import tempfile
 import shutil

http://git-wip-us.apache.org/repos/asf/ambari/blob/148950a2/ambari-agent/src/test/python/ambari_agent/TestHardware.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestHardware.py b/ambari-agent/src/test/python/ambari_agent/TestHardware.py
index fb390b2..661dac6 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestHardware.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestHardware.py
@@ -17,7 +17,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 '''
-
+from ambari_agent import main
+main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out"
 from unittest import TestCase
 from mock.mock import patch, MagicMock
 import unittest

http://git-wip-us.apache.org/repos/asf/ambari/blob/148950a2/ambari-agent/src/test/python/ambari_agent/TestHostname.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestHostname.py b/ambari-agent/src/test/python/ambari_agent/TestHostname.py
index c7edf37..e1218f6 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestHostname.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestHostname.py
@@ -18,6 +18,8 @@ See the License for the specific language governing permissions and
 limitations under the License.
 '''
 
+from ambari_agent import main
+main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out"
 from unittest import TestCase
 import unittest
 import ambari_agent.hostname as hostname

http://git-wip-us.apache.org/repos/asf/ambari/blob/148950a2/ambari-agent/src/test/python/ambari_agent/TestShell.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestShell.py b/ambari-agent/src/test/python/ambari_agent/TestShell.py
index d185755..8d375e3 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestShell.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestShell.py
@@ -19,6 +19,8 @@ See the License for the specific language governing permissions and
 limitations under the License.
 '''
 
+from ambari_agent import main
+main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out"
 import os
 import unittest
 import tempfile

http://git-wip-us.apache.org/repos/asf/ambari/blob/148950a2/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py b/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py
index 9ff2f2d..c33a295 100644
--- a/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py
+++ b/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 '''
+from ambari_agent import main
+main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out"
 import os
 import logging
 from unittest import TestCase

http://git-wip-us.apache.org/repos/asf/ambari/blob/148950a2/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py
index 867fbc8..f91c1ce 100644
--- a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py
@@ -15,7 +15,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 '''
-
+from ambari_agent import main
+main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out"
 from unittest import TestCase
 from mock.mock import patch, MagicMock
 from only_for_platform import get_platform, not_for_platform, os_distro_value, PLATFORM_WINDOWS

http://git-wip-us.apache.org/repos/asf/ambari/blob/148950a2/ambari-agent/src/test/python/resource_management/TestExecuteResource.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py
index 5176f6f..92068b8 100644
--- a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py
@@ -15,7 +15,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 '''
-
+from ambari_agent import main
+main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out"
 from unittest import TestCase
 from mock.mock import patch, MagicMock, call
 from only_for_platform import get_platform, not_for_platform, os_distro_value, PLATFORM_WINDOWS

http://git-wip-us.apache.org/repos/asf/ambari/blob/148950a2/ambari-agent/src/test/python/resource_management/TestLinkResource.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/resource_management/TestLinkResource.py b/ambari-agent/src/test/python/resource_management/TestLinkResource.py
index 53ec93a..221bf6b 100644
--- a/ambari-agent/src/test/python/resource_management/TestLinkResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestLinkResource.py
@@ -15,7 +15,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 '''
-
+from ambari_agent import main
+main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out"
 from unittest import TestCase
 from mock.mock import patch, MagicMock
 from only_for_platform import get_platform, not_for_platform, os_distro_value, PLATFORM_WINDOWS


Mime
View raw message