Package org.apache.ambari.server.actionmanager

Examples of org.apache.ambari.server.actionmanager.ActionManager


    statusCmd1.setServiceName(HDFS);
    dummyCmds.add(statusCmd1);
    HeartbeatMonitor hm = mock(HeartbeatMonitor.class);
    when(hm.generateStatusCommands(anyString())).thenReturn(dummyCmds);

    ActionManager am = getMockActionManager();
    Clusters fsm = clusters;
    ActionQueue actionQueue = new ActionQueue();
    HeartBeatHandler handler = new HeartBeatHandler(fsm, actionQueue, am,
        injector);
    handler.setHeartbeatMonitor(hm);
View Full Code Here


    assertTrue(registrationResponse.getStatusCommands().get(0).equals(statusCmd1));
  }

  @Test
  public void testTaskInProgressHandling() throws AmbariException, InvalidStateTransitionException {
    ActionManager am = getMockActionManager();
    Cluster cluster = getDummyCluster();

    @SuppressWarnings("serial")
    Set<String> hostNames = new HashSet<String>(){{
      add(DummyHostname1);
View Full Code Here

   * @throws InvalidStateTransitionException
   */
  @Test
  public void testCommandReportOnHeartbeatUpdatedState()
      throws AmbariException, InvalidStateTransitionException {
    ActionManager am = getMockActionManager();
    Cluster cluster = getDummyCluster();

    @SuppressWarnings("serial")
    Set<String> hostNames = new HashSet<String>() {{
      add(DummyHostname1);
View Full Code Here

        State.INSTALLED, serviceComponentHost1.getState());
  }

  @Test
  public void testUpgradeSpecificHandling() throws AmbariException, InvalidStateTransitionException {
    ActionManager am = getMockActionManager();
    Cluster cluster = getDummyCluster();

    @SuppressWarnings("serial")
    Set<String> hostNames = new HashSet<String>() {{
      add(DummyHostname1);
View Full Code Here

        State.UPGRADING, serviceComponentHost1.getState());
  }

  @Test
  public void testStatusHeartbeatWithVersion() throws Exception {
    ActionManager am = getMockActionManager();
    Cluster cluster = getDummyCluster();

    @SuppressWarnings("serial")
    Set<String> hostNames = new HashSet<String>(){{
      add(DummyHostname1);
View Full Code Here

    assertTrue(hb.getAgentEnv().getHostHealth().getServerTimeStampAtReporting() >= hb.getTimestamp());
  }

  @Test
  public void testComponentUpgradeCompleteReport() throws AmbariException, InvalidStateTransitionException {
    ActionManager am = getMockActionManager();
    Cluster cluster = getDummyCluster();

    @SuppressWarnings("serial")
    Set<String> hostNames = new HashSet<String>(){{
      add(DummyHostname1);
View Full Code Here

            stack122, serviceComponentHost2.getStackVersion());
  }

  @Test
  public void testComponentUpgradeInProgressReport() throws AmbariException, InvalidStateTransitionException {
    ActionManager am = getMockActionManager();
    Cluster cluster = getDummyCluster();

    @SuppressWarnings("serial")
    Set<String> hostNames = new HashSet<String>(){{
      add(DummyHostname1);
View Full Code Here

  }


  @Test
  public void testComponentUpgradeFailReport() throws AmbariException, InvalidStateTransitionException {
    ActionManager am = getMockActionManager();
    Cluster cluster = getDummyCluster();

    @SuppressWarnings("serial")
    Set<String> hostNames = new HashSet<String>(){{
      add(DummyHostname1);
View Full Code Here

    assertEquals("Stack version of SCH should not change after fail report",
            State.INSTALL_FAILED, serviceComponentHost2.getState());
  }

  private ActionManager getMockActionManager() {
    return new ActionManager(0, 0, null, null,
              new ActionDBInMemoryImpl(), new HostsMap((String) null), null, unitOfWork, null);
  }
View Full Code Here

    injector.getInstance(PersistService.class).stop();
  }

  @Test
  public void testHeartbeat() throws Exception {
    ActionManager am = getMockActionManager();
    Clusters fsm = clusters;
    fsm.addHost(DummyHostname1);
    Host hostObject = clusters.getHost(DummyHostname1);
    hostObject.setIPv4("ipv4");
    hostObject.setIPv6("ipv6");
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.actionmanager.ActionManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.