Examples of HostsMap


Examples of org.apache.ambari.server.controller.HostsMap

    clusters.getHost(hostName).persist();
    clusters.addCluster(clusterName);
    db = injector.getInstance(ActionDBAccessorImpl.class);

    am = new ActionManager(5000, 1200000, new ActionQueue(), clusters, db,
        new HostsMap((String) null), null, injector.getInstance(UnitOfWork.class),
    injector.getInstance(RequestFactory.class), null);
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.HostsMap

  @Test
  public void testActionResponse() {
    ActionDBAccessor db = injector.getInstance(ActionDBAccessorImpl.class);
    ActionManager am = new ActionManager(5000, 1200000, new ActionQueue(),
        clusters, db, new HostsMap((String) null), null, unitOfWork,
        injector.getInstance(RequestFactory.class), null);
    populateActionDB(db, hostname);
    Stage stage = db.getAllStages(requestId).get(0);
    Assert.assertEquals(stageId, stage.getStageId());
    stage.setHostRoleStatus(hostname, "HBASE_MASTER", HostRoleStatus.QUEUED);
View Full Code Here

Examples of org.apache.ambari.server.controller.HostsMap

 
  @Test
  public void testLargeLogs() {
    ActionDBAccessor db = injector.getInstance(ActionDBAccessorImpl.class);
    ActionManager am = new ActionManager(5000, 1200000, new ActionQueue(),
        clusters, db, new HostsMap((String) null), null, unitOfWork,
        injector.getInstance(RequestFactory.class), null);
    populateActionDB(db, hostname);
    Stage stage = db.getAllStages(requestId).get(0);
    Assert.assertEquals(stageId, stage.getStageId());
    stage.setHostRoleStatus(hostname, "HBASE_MASTER", HostRoleStatus.QUEUED);
View Full Code Here

Examples of org.apache.ambari.server.controller.HostsMap

    clusters.addHost(DummyHostname1);
    clusters.getHost(DummyHostname1).persist();
    clusters.addCluster(DummyCluster);
    ActionDBAccessor db = injector.getInstance(ActionDBAccessorImpl.class);
    ActionManager am = new ActionManager(5000, 1200000, new ActionQueue(), clusters, db,
        new HostsMap((String) null), null, unitOfWork, injector.getInstance(RequestFactory.class), null);
    populateActionDB(db, DummyHostname1);
    Stage stage = db.getAllStages(requestId).get(0);
    Assert.assertEquals(stageId, stage.getStageId());
    stage.setHostRoleStatus(DummyHostname1, HBASE_MASTER, HostRoleStatus.QUEUED);
    db.hostRoleScheduled(stage, DummyHostname1, HBASE_MASTER);
View Full Code Here

Examples of org.apache.ambari.server.controller.HostsMap

  }

  private ActionManager getMockActionManager() {
    return new ActionManager(0, 0, null, null,
        actionDBAccessor, new HostsMap((String) null), null, unitOfWork,
        injector.getInstance(RequestFactory.class), null);
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.HostsMap

    fsm.mapHostToCluster("h3", "c1");
    String [] hostList = {"h1", "h2", "h3" };
    addHdfsService(fsm.getCluster("c1"), hostList, injector);
    addHbaseService(fsm.getCluster("c1"), hostList, injector);
    Map<String, List<String>> info = StageUtils.getClusterHostInfo(fsm
        .getCluster("c1"), new HostsMap(injector.getInstance(Configuration.class)));
    assertEquals(2, info.get("slave_hosts").size());
    assertEquals(1, info.get("hbase_master_host").size());
    assertEquals("h1", info.get("hbase_master_host").get(0));
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.HostsMap

    when(db.getStagesInProgress()).thenReturn(stages);

    //Keep large number of attempts so that the task is not expired finally
    //Small action timeout to test rescheduling
    ActionScheduler scheduler = new ActionScheduler(100, 100, db, aq, fsm,
        10000, new HostsMap((String) null));
    scheduler.setTaskTimeoutAdjustment(false);
    // Start the thread
    scheduler.start();

    List<AgentCommand> ac = waitForQueueSize(hostname, aq, 1);
View Full Code Here

Examples of org.apache.ambari.server.controller.HostsMap

    stages.add(s);
    db.persistActions(stages);

    //Small action timeout to test rescheduling
    ActionScheduler scheduler = new ActionScheduler(100, 50, db, aq, fsm, 3,
        new HostsMap((String) null));
    scheduler.setTaskTimeoutAdjustment(false);
    // Start the thread
    scheduler.start();

    while (!stages.get(0).getHostRoleStatus(hostname, "NAMENODE")
View Full Code Here

Examples of org.apache.ambari.server.controller.HostsMap

  }

  @Test
  public void testHeartbeat() throws Exception {
    ActionManager am = new ActionManager(0, 0, null, null,
        new ActionDBInMemoryImpl(), new HostsMap((String) null));
    Clusters fsm = clusters;
    String hostname = "host1";
    fsm.addHost(hostname);
    Host hostObject = clusters.getHost(hostname);
    hostObject.setIPv4("ipv4");
View Full Code Here

Examples of org.apache.ambari.server.controller.HostsMap

  }

  @Test
  public void testStatusHeartbeat() throws Exception {
    ActionManager am = new ActionManager(0, 0, null, null,
            new ActionDBInMemoryImpl(), new HostsMap((String) null));
    final String hostname = "host1";
    String clusterName = "cluster1";
    String serviceName = "HDFS";
    String componentName1 = "DATANODE";
    String componentName2 = "NAMENODE";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.