SLIDER-1142 increase AM memory for some funtests and add checks for None in 
agent


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/2b41da2d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/2b41da2d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/2b41da2d

Branch: refs/heads/feature/SLIDER-1107_AM_config_generation
Commit: 2b41da2d56a6165eb54fa0fc9cab6900fad9d177
Parents: 454f2cf
Author: Billie Rinaldi <billie.rina...@gmail.com>
Authored: Wed Jun 15 07:21:15 2016 -0700
Committer: Billie Rinaldi <billie.rina...@gmail.com>
Committed: Wed Jun 15 08:08:37 2016 -0700

----------------------------------------------------------------------
 slider-agent/src/main/python/agent/ActionQueue.py                  | 2 +-
 slider-agent/src/main/python/agent/main.py                         | 2 +-
 slider-core/src/test/app_packages/test_command_log/resources.json  | 2 +-
 .../test/app_packages/test_command_log/resources_add_on_pkg.json   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/2b41da2d/slider-agent/src/main/python/agent/ActionQueue.py
----------------------------------------------------------------------
diff --git a/slider-agent/src/main/python/agent/ActionQueue.py 
b/slider-agent/src/main/python/agent/ActionQueue.py
index be6af53..7514337 100644
--- a/slider-agent/src/main/python/agent/ActionQueue.py
+++ b/slider-agent/src/main/python/agent/ActionQueue.py
@@ -164,7 +164,7 @@ class ActionQueue(threading.Thread):
     if ActionQueue.STORE_APPLIED_CONFIG in command['commandParams']:
       store_config = 'true' == 
command['commandParams'][ActionQueue.STORE_APPLIED_CONFIG]
     store_command = False
-    if 'roleParams' in command and ActionQueue.AUTO_RESTART in 
command['roleParams']:
+    if 'roleParams' in command and command['roleParams'] is not None and 
ActionQueue.AUTO_RESTART in command['roleParams']:
       store_command = 'true' == command['roleParams'][ActionQueue.AUTO_RESTART]
 
     if store_command:

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/2b41da2d/slider-agent/src/main/python/agent/main.py
----------------------------------------------------------------------
diff --git a/slider-agent/src/main/python/agent/main.py 
b/slider-agent/src/main/python/agent/main.py
index 39de1ae..1932a37 100644
--- a/slider-agent/src/main/python/agent/main.py
+++ b/slider-agent/src/main/python/agent/main.py
@@ -60,7 +60,7 @@ def signal_handler(signum, frame):
     if docker_mode:
       tmpdir = controller.actionQueue.dockerManager.stop_container()
 
-  if controller is not None and hasattr(controller, 'stopCommand'):
+  if controller is not None and hasattr(controller, 'stopCommand') and 
controller.stopCommand is not None:
     controller.stopCommand = _increment_task_id(controller.stopCommand)
     controller.appGracefulStopQueued = True
     controller.actionQueue.execute_command(controller.stopCommand)

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/2b41da2d/slider-core/src/test/app_packages/test_command_log/resources.json
----------------------------------------------------------------------
diff --git a/slider-core/src/test/app_packages/test_command_log/resources.json 
b/slider-core/src/test/app_packages/test_command_log/resources.json
index 18c505f..f6a401a 100644
--- a/slider-core/src/test/app_packages/test_command_log/resources.json
+++ b/slider-core/src/test/app_packages/test_command_log/resources.json
@@ -11,7 +11,7 @@
             "yarn.component.instances": "1"
         },
         "slider-appmaster": {
-          "yarn.memory": "256"
+          "yarn.memory": "512"
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/2b41da2d/slider-core/src/test/app_packages/test_command_log/resources_add_on_pkg.json
----------------------------------------------------------------------
diff --git 
a/slider-core/src/test/app_packages/test_command_log/resources_add_on_pkg.json 
b/slider-core/src/test/app_packages/test_command_log/resources_add_on_pkg.json
index 3f71eb3..25e090e 100644
--- 
a/slider-core/src/test/app_packages/test_command_log/resources_add_on_pkg.json
+++ 
b/slider-core/src/test/app_packages/test_command_log/resources_add_on_pkg.json
@@ -11,7 +11,7 @@
             "yarn.component.instances": "1"
         },
         "slider-appmaster": {
-          "yarn.memory": "256"
+          "yarn.memory": "512"
         }
     }
 }

Reply via email to