Package org.apache.ambari.server.orm.entities

Examples of org.apache.ambari.server.orm.entities.ConfigGroupHostMappingEntity


        ArrayList<ConfigGroupHostMappingEntity>();

      for (HostEntity host : hosts) {
        hostDAO.create(host);

        ConfigGroupHostMappingEntity hostMappingEntity = new
          ConfigGroupHostMappingEntity();
        hostMappingEntity.setHostname(host.getHostName());
        hostMappingEntity.setHostEntity(host);
        hostMappingEntity.setConfigGroupEntity(configGroupEntity);
        hostMappingEntity.setConfigGroupId(configGroupEntity.getGroupId());
        hostMappingEntities.add(hostMappingEntity);
        configGroupHostMappingDAO.create(hostMappingEntity);
      }
      configGroupEntity.setConfigGroupHostMappingEntities(hostMappingEntities);
      configGroupDAO.merge(configGroupEntity);
View Full Code Here


    if (hosts != null && !hosts.isEmpty()) {
      for (Host host : hosts.values()) {
        HostEntity hostEntity = hostDAO.findByName(host.getHostName());
        if (hostEntity != null) {
          ConfigGroupHostMappingEntity hostMappingEntity = new
            ConfigGroupHostMappingEntity();
          hostMappingEntity.setHostname(host.getHostName());
          hostMappingEntity.setHostEntity(hostEntity);
          hostMappingEntity.setConfigGroupEntity(configGroupEntity);
          hostMappingEntity.setConfigGroupId(configGroupEntity.getGroupId());
          configGroupHostMappingDAO.create(hostMappingEntity);
          // TODO: Make sure this does not throw Nullpointer based on JPA docs
          configGroupEntity.getConfigGroupHostMappingEntities().add
            (hostMappingEntity);
          configGroupDAO.merge(configGroupEntity);
View Full Code Here

    Assert.assertEquals("hdfs-site", configMappingEntity.getConfigType());
    Assert.assertEquals("testversion", configMappingEntity.getVersionTag());
    Assert.assertNotNull(configMappingEntity.getClusterConfigEntity());
    Assert.assertTrue(configMappingEntity
      .getClusterConfigEntity().getData().contains("a"));
    ConfigGroupHostMappingEntity hostMappingEntity = configGroupEntity
      .getConfigGroupHostMappingEntities().iterator().next();
    Assert.assertNotNull(hostMappingEntity);
    Assert.assertEquals("h1", hostMappingEntity.getHostname());
  }
View Full Code Here

    Assert.assertEquals("hdfs-site", configMappingEntity.getConfigType());
    Assert.assertEquals("testversion", configMappingEntity.getVersionTag());
    Assert.assertNotNull(configMappingEntity.getClusterConfigEntity());
    Assert.assertTrue(configMappingEntity
      .getClusterConfigEntity().getData().contains("a"));
    ConfigGroupHostMappingEntity hostMappingEntity = configGroupEntity
      .getConfigGroupHostMappingEntities().iterator().next();
    Assert.assertNotNull(hostMappingEntity);
    Assert.assertEquals("h1", hostMappingEntity.getHostname());
  }
View Full Code Here

    if (hosts != null && !hosts.isEmpty()) {
      for (Host host : hosts.values()) {
        HostEntity hostEntity = hostDAO.findByName(host.getHostName());
        if (hostEntity != null) {
          ConfigGroupHostMappingEntity hostMappingEntity = new
            ConfigGroupHostMappingEntity();
          hostMappingEntity.setHostname(host.getHostName());
          hostMappingEntity.setHostEntity(hostEntity);
          hostMappingEntity.setConfigGroupEntity(configGroupEntity);
          hostMappingEntity.setConfigGroupId(configGroupEntity.getGroupId());
          configGroupHostMappingDAO.create(hostMappingEntity);
          // TODO: Make sure this does not throw Nullpointer based on JPA docs
          configGroupEntity.getConfigGroupHostMappingEntities().add
            (hostMappingEntity);
          configGroupDAO.merge(configGroupEntity);
View Full Code Here

    if (hosts != null && !hosts.isEmpty()) {
      for (Host host : hosts.values()) {
        HostEntity hostEntity = hostDAO.findByName(host.getHostName());
        if (hostEntity != null) {
          ConfigGroupHostMappingEntity hostMappingEntity = new
            ConfigGroupHostMappingEntity();
          hostMappingEntity.setHostname(host.getHostName());
          hostMappingEntity.setHostEntity(hostEntity);
          hostMappingEntity.setConfigGroupEntity(configGroupEntity);
          hostMappingEntity.setConfigGroupId(configGroupEntity.getGroupId());
          configGroupHostMappingDAO.create(hostMappingEntity);
          // TODO: Make sure this does not throw Nullpointer based on JPA docs
          configGroupEntity.getConfigGroupHostMappingEntities().add
            (hostMappingEntity);
          configGroupDAO.merge(configGroupEntity);
View Full Code Here

        ArrayList<ConfigGroupHostMappingEntity>();

      for (HostEntity host : hosts) {
        hostDAO.create(host);

        ConfigGroupHostMappingEntity hostMappingEntity = new
          ConfigGroupHostMappingEntity();
        hostMappingEntity.setHostname(host.getHostName());
        hostMappingEntity.setHostEntity(host);
        hostMappingEntity.setConfigGroupEntity(configGroupEntity);
        hostMappingEntity.setConfigGroupId(configGroupEntity.getGroupId());
        hostMappingEntities.add(hostMappingEntity);
        configGroupHostMappingDAO.create(hostMappingEntity);
      }
      configGroupEntity.setConfigGroupHostMappingEntities(hostMappingEntities);
      configGroupDAO.merge(configGroupEntity);
View Full Code Here

    if (hosts != null && !hosts.isEmpty()) {
      for (Host host : hosts.values()) {
        HostEntity hostEntity = hostDAO.findByName(host.getHostName());
        if (hostEntity != null) {
          ConfigGroupHostMappingEntity hostMappingEntity = new
            ConfigGroupHostMappingEntity();
          hostMappingEntity.setHostname(host.getHostName());
          hostMappingEntity.setHostEntity(hostEntity);
          hostMappingEntity.setConfigGroupEntity(configGroupEntity);
          hostMappingEntity.setConfigGroupId(configGroupEntity.getGroupId());
          configGroupHostMappingDAO.create(hostMappingEntity);
          // TODO: Make sure this does not throw Nullpointer based on JPA docs
          configGroupEntity.getConfigGroupHostMappingEntities().add
            (hostMappingEntity);
          configGroupDAO.merge(configGroupEntity);
View Full Code Here

    Assert.assertEquals("hdfs-site", configMappingEntity.getConfigType());
    Assert.assertEquals("testversion", configMappingEntity.getVersionTag());
    Assert.assertNotNull(configMappingEntity.getClusterConfigEntity());
    Assert.assertTrue(configMappingEntity
      .getClusterConfigEntity().getData().contains("a"));
    ConfigGroupHostMappingEntity hostMappingEntity = configGroupEntity
      .getConfigGroupHostMappingEntities().iterator().next();
    Assert.assertNotNull(hostMappingEntity);
    Assert.assertEquals("h1", hostMappingEntity.getHostname());
  }
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.orm.entities.ConfigGroupHostMappingEntity

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.