Repository: ambari
Updated Branches:
  refs/heads/trunk 27854b4b0 -> 1910dd488


AMBARI-4911. Rolling Restart does not work. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 1910dd48891236e9263b2dde2d92f22c116c820c
Parents: 27854b4
Author: Oleg Nechiporenko <[email protected]>
Authored: Mon Mar 3 15:43:29 2014 +0200
Committer: Oleg Nechiporenko <[email protected]>
Committed: Mon Mar 3 15:43:29 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/utils/batch_scheduled_requests.js | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1910dd48/ambari-web/app/utils/batch_scheduled_requests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/batch_scheduled_requests.js 
b/ambari-web/app/utils/batch_scheduled_requests.js
index 08ec427..43345de 100644
--- a/ambari-web/app/utils/batch_scheduled_requests.js
+++ b/ambari-web/app/utils/batch_scheduled_requests.js
@@ -136,12 +136,12 @@ module.exports = {
    * @param {Number} batchSize size of each batch
    * @param {Number} intervalTimeSeconds delay between two batches
    * @param {Number} tolerateSize task failure tolerance
-   * @param {Function} successCallback
-   * @param {Function} errorCallback
+   * @param {callback} successCallback
+   * @param {callback} errorCallback
    */
   _doPostBatchRollingRestartRequest: function(restartHostComponents, 
batchSize, intervalTimeSeconds, tolerateSize, successCallback, errorCallback) {
-    successCallback = successCallback ? successCallback : 
defaultSuccessCallback;
-    errorCallback = errorCallback ? errorCallback : defaultErrorCallback;
+    successCallback = successCallback || defaultSuccessCallback;
+    errorCallback = errorCallback || defaultErrorCallback;
     if (!restartHostComponents.length) {
       console.log('No batch rolling restart if no restartHostComponents 
provided!');
       return;
@@ -189,11 +189,13 @@ module.exports = {
           "RequestBodyInfo" : {
             "RequestInfo" : {
               "context" : "_PARSE_.ROLLING-RESTART." + componentName + "." + 
(count + 1) + "." + batchCount,
-              "command" : "RESTART",
+              "command" : "RESTART"
+            },
+            "Requests/resource_filters": [{
               "service_name" : serviceName,
               "component_name" : componentName,
               "hosts" : hostNames.join(",")
-            }
+            }]
           }
         });
       }
@@ -344,7 +346,7 @@ module.exports = {
    */
   doAbortRequestSchedule: function(requestScheduleId, successCallback, 
errorCallback) {
     if (requestScheduleId != null && !isNaN(requestScheduleId) && 
requestScheduleId > -1) {
-      errorCallback = errorCallback ? errorCallback : defaultErrorCallback;
+      errorCallback = errorCallback || defaultErrorCallback;
       App.ajax.send({
         name : 'request_schedule.delete',
         sender : {

Reply via email to