|
@@ -89,6 +89,7 @@ import org.apache.ambari.server.state.svccomphost.ServiceComponentHostInstallEve
|
|
|
import org.apache.ambari.server.state.svccomphost.ServiceComponentHostOpFailedEvent;
|
|
|
import org.apache.ambari.server.state.svccomphost.ServiceComponentHostServerActionEvent;
|
|
|
import org.apache.ambari.server.state.svccomphost.ServiceComponentHostUpgradeEvent;
|
|
|
+import org.apache.ambari.server.utils.CommandUtils;
|
|
|
import org.apache.ambari.server.utils.StageUtils;
|
|
|
import org.easymock.Capture;
|
|
|
import org.easymock.EasyMock;
|
|
@@ -1410,7 +1411,7 @@ public class TestActionScheduler {
|
|
|
|
|
|
List<CommandReport> reports = new ArrayList<CommandReport>();
|
|
|
reports.add(getCommandReport(HostRoleStatus.FAILED, Role.NAMENODE, Service.Type.HDFS, "1-1", 1));
|
|
|
- am.processTaskResponse(hostname, reports, stages.get(0).getOrderedHostRoleCommands());
|
|
|
+ am.processTaskResponse(hostname, reports, CommandUtils.convertToTaskIdCommandMap(stages.get(0).getOrderedHostRoleCommands()));
|
|
|
|
|
|
scheduler.doWork();
|
|
|
Assert.assertEquals(HostRoleStatus.FAILED, stages.get(0).getHostRoleStatus(hostname, "NAMENODE"));
|
|
@@ -1763,15 +1764,15 @@ public class TestActionScheduler {
|
|
|
|
|
|
List<CommandReport> reports = new ArrayList<CommandReport>();
|
|
|
reports.add(getCommandReport(HostRoleStatus.FAILED, Role.DATANODE, Service.Type.HDFS, "1-1", 1));
|
|
|
- am.processTaskResponse("host1", reports, stage.getOrderedHostRoleCommands());
|
|
|
+ am.processTaskResponse("host1", reports, CommandUtils.convertToTaskIdCommandMap(stage.getOrderedHostRoleCommands()));
|
|
|
|
|
|
reports.clear();
|
|
|
reports.add(getCommandReport(HostRoleStatus.FAILED, Role.DATANODE, Service.Type.HDFS, "1-1", 2));
|
|
|
- am.processTaskResponse("host2", reports, stage.getOrderedHostRoleCommands());
|
|
|
+ am.processTaskResponse("host2", reports, CommandUtils.convertToTaskIdCommandMap(stage.getOrderedHostRoleCommands()));
|
|
|
|
|
|
reports.clear();
|
|
|
reports.add(getCommandReport(HostRoleStatus.COMPLETED, Role.DATANODE, Service.Type.HDFS, "1-1", 3));
|
|
|
- am.processTaskResponse("host3", reports, stage.getOrderedHostRoleCommands());
|
|
|
+ am.processTaskResponse("host3", reports, CommandUtils.convertToTaskIdCommandMap(stage.getOrderedHostRoleCommands()));
|
|
|
|
|
|
scheduler.doWork();
|
|
|
Assert.assertEquals(HostRoleStatus.ABORTED, stages.get(1).getHostRoleStatus("host1", "HDFS_CLIENT"));
|