Examples of HostDAO


Examples of org.apache.ambari.server.orm.dao.HostDAO

      amc.deleteCluster(cr);
     
      assertNotNull(clusters.getHost(HOST1));
      assertNotNull(clusters.getHost(HOST2));
     
      HostDAO dao = injector.getInstance(HostDAO.class);
     
      assertNotNull(dao.findByName(HOST1));
      assertNotNull(dao.findByName(HOST2));
     
    } finally {
      injector.getInstance(PersistService.class).stop();
    }    
   
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.HostDAO

  }

  @AssistedInject
  public Stage(@Assisted StageEntity stageEntity, Injector injector) {
    HostRoleCommandDAO hostRoleCommandDAO = injector.getInstance(HostRoleCommandDAO.class);
    HostDAO hostDAO = injector.getInstance(HostDAO.class);
    HostRoleCommandFactory hostRoleCommandFactory = injector.getInstance(HostRoleCommandFactory.class);

    requestId = stageEntity.getRequestId();
    stageId = stageEntity.getStageId();
    logDir = stageEntity.getLogInfo();
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.HostDAO

      amc.deleteCluster(cr);

      assertNotNull(clusters.getHost(HOST1));
      assertNotNull(clusters.getHost(HOST2));

      HostDAO dao = injector.getInstance(HostDAO.class);

      assertNotNull(dao.findByName(HOST1));
      assertNotNull(dao.findByName(HOST2));

    } finally {
      injector.getInstance(PersistService.class).stop();
    }
  }
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.HostDAO

   
  private void persistComponentEntities(HostComponentStateEntity stateEntity, HostComponentDesiredStateEntity desiredStateEntity, ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity) {
    ServiceComponentDesiredStateDAO serviceComponentDesiredStateDAO = injector.getInstance(ServiceComponentDesiredStateDAO.class);
    HostComponentStateDAO hostComponentStateDAO = injector.getInstance(HostComponentStateDAO.class);
    HostComponentDesiredStateDAO hostComponentDesiredStateDAO = injector.getInstance(HostComponentDesiredStateDAO.class);
    HostDAO hostDAO = injector.getInstance(HostDAO.class);
   
    HostEntity hostEntity = hostDAO.findByName(stateEntity.getHostName());
    hostEntity.getHostComponentStateEntities().add(stateEntity);
    hostEntity.getHostComponentDesiredStateEntities().add(desiredStateEntity);

    serviceComponentDesiredStateEntity.getHostComponentDesiredStateEntities().add(desiredStateEntity);

    desiredStateEntity.setServiceComponentDesiredStateEntity(serviceComponentDesiredStateEntity);
    desiredStateEntity.setHostEntity(hostEntity);
    stateEntity.setServiceComponentDesiredStateEntity(serviceComponentDesiredStateEntity);
    stateEntity.setHostEntity(hostEntity);

    hostComponentStateDAO.create(stateEntity);
    hostComponentDesiredStateDAO.create(desiredStateEntity);

    serviceComponentDesiredStateDAO.create(serviceComponentDesiredStateEntity);
    hostDAO.merge(hostEntity);
  }
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.HostDAO

      amc.deleteCluster(cr);

      assertNotNull(clusters.getHost(HOST1));
      assertNotNull(clusters.getHost(HOST2));

      HostDAO dao = injector.getInstance(HostDAO.class);

      assertNotNull(dao.findByName(HOST1));
      assertNotNull(dao.findByName(HOST2));

    } finally {
      injector.getInstance(PersistService.class).stop();
    }
  }
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.