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

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


        }
        List<String> configTypes = serviceInfo.getConfigDependencies();
        if (configTypes != null) {
          for (String configType : configTypes) {
            if (configType.contains(log4jConfigTypeContains)) {
              ClusterConfigEntityPK configEntityPK = new ClusterConfigEntityPK();
              configEntityPK.setClusterId(clusterId);
              configEntityPK.setType(configType);
              configEntityPK.setTag(defaultVersionTag);
              ClusterConfigEntity configEntity = clusterDAO.findConfig(configEntityPK);

              if (configEntity == null) {
                String filename = configType + ".xml";
                Map<String, String> properties = new HashMap<String, String>();
View Full Code Here


      value = keyValueEntity.getValue();
      if (value != null && !value.isEmpty()) {
        List<ClusterEntity> clusterEntities = clusterDAO.findAll();
        for (ClusterEntity clusterEntity : clusterEntities) {
          Long clusterId = clusterEntity.getClusterId();
          ClusterConfigEntityPK configEntityPK = new ClusterConfigEntityPK();
          configEntityPK.setClusterId(clusterId);
          configEntityPK.setType("hdfs-exclude-file");
          configEntityPK.setTag(value.trim());
          ClusterConfigEntity configEntity = clusterDAO.findConfig(configEntityPK);
          if (configEntity != null) {
            String configData = configEntity.getData();
            if (configData != null) {
              Map<String, String> properties = gson.<Map<String, String>>fromJson(configData, Map.class);
View Full Code Here

      configGroupEntity.getConfigGroupConfigMappingEntities().clear();
    }

    if (configurations != null && !configurations.isEmpty()) {
      for (Config config : configurations.values()) {
        ClusterConfigEntityPK clusterConfigEntityPK = new ClusterConfigEntityPK();
        clusterConfigEntityPK.setClusterId(cluster.getClusterId());
        clusterConfigEntityPK.setTag(config.getVersionTag());
        clusterConfigEntityPK.setType(config.getType());
        ClusterConfigEntity clusterConfigEntity = clusterDAO.findConfig
          (clusterConfigEntityPK);

        if (clusterConfigEntity == null) {
          // Create configuration
View Full Code Here

      configGroupEntity.getConfigGroupConfigMappingEntities().clear();
    }

    if (configurations != null && !configurations.isEmpty()) {
      for (Config config : configurations.values()) {
        ClusterConfigEntityPK clusterConfigEntityPK = new ClusterConfigEntityPK();
        clusterConfigEntityPK.setClusterId(cluster.getClusterId());
        clusterConfigEntityPK.setTag(config.getVersionTag());
        clusterConfigEntityPK.setType(config.getType());
        ClusterConfigEntity clusterConfigEntity = clusterDAO.findConfig
          (clusterConfigEntityPK);

        if (clusterConfigEntity == null) {
          // Create configuration
View Full Code Here

    ClusterEntity clusterEntity = createCluster();
    ClusterServiceEntity clusterServiceEntityMR = addService(clusterEntity, "HDFS");

    Long clusterId = clusterEntity.getClusterId();

    ClusterConfigEntityPK configEntityPK = new ClusterConfigEntityPK();
    configEntityPK.setClusterId(clusterId);
    configEntityPK.setType("hdfs-log4j");
    configEntityPK.setTag("version1");
    ClusterConfigEntity configEntity = clusterDAO.findConfig(configEntityPK);
    Assert.assertNull(configEntity);

    for (ClusterConfigMappingEntity ccme : clusterEntity.getConfigMappingEntities()) {
      if ("hdfs-log4j".equals(ccme.getType())) {
View Full Code Here

        }
        List<String> configTypes = serviceInfo.getConfigDependencies();
        if (configTypes != null) {
          for (String configType : configTypes) {
            if (configType.contains(log4jConfigTypeContains)) {
              ClusterConfigEntityPK configEntityPK = new ClusterConfigEntityPK();
              configEntityPK.setClusterId(clusterId);
              configEntityPK.setType(configType);
              configEntityPK.setTag(defaultVersionTag);
              ClusterConfigEntity configEntity = clusterDAO.findConfig(configEntityPK);

              if (configEntity == null) {
                String filename = configType + ".xml";
                Map<String, String> properties = new HashMap<String, String>();
View Full Code Here

      value = keyValueEntity.getValue();
      if (value != null && !value.isEmpty()) {
        List<ClusterEntity> clusterEntities = clusterDAO.findAll();
        for (ClusterEntity clusterEntity : clusterEntities) {
          Long clusterId = clusterEntity.getClusterId();
          ClusterConfigEntityPK configEntityPK = new ClusterConfigEntityPK();
          configEntityPK.setClusterId(clusterId);
          configEntityPK.setType("hdfs-exclude-file");
          configEntityPK.setTag(value.trim());
          ClusterConfigEntity configEntity = clusterDAO.findConfig(configEntityPK);
          if (configEntity != null) {
            String configData = configEntity.getData();
            if (configData != null) {
              Map<String, String> properties = gson.<Map<String, String>>fromJson(configData, Map.class);
View Full Code Here

    ClusterEntity clusterEntity = createCluster();
    ClusterServiceEntity clusterServiceEntityMR = addService(clusterEntity, "HDFS");

    Long clusterId = clusterEntity.getClusterId();

    ClusterConfigEntityPK configEntityPK = new ClusterConfigEntityPK();
    configEntityPK.setClusterId(clusterId);
    configEntityPK.setType("hdfs-log4j");
    configEntityPK.setTag("version1");
    ClusterConfigEntity configEntity = clusterDAO.findConfig(configEntityPK);
    Assert.assertNull(configEntity);

    for (ClusterConfigMappingEntity ccme : clusterEntity.getConfigMappingEntities()) {
      if ("hdfs-log4j".equals(ccme.getType())) {
View Full Code Here

      configGroupEntity.getConfigGroupConfigMappingEntities().clear();
    }

    if (configurations != null && !configurations.isEmpty()) {
      for (Config config : configurations.values()) {
        ClusterConfigEntityPK clusterConfigEntityPK = new ClusterConfigEntityPK();
        clusterConfigEntityPK.setClusterId(cluster.getClusterId());
        clusterConfigEntityPK.setTag(config.getVersionTag());
        clusterConfigEntityPK.setType(config.getType());
        ClusterConfigEntity clusterConfigEntity = clusterDAO.findConfig
          (clusterConfigEntityPK);

        if (clusterConfigEntity == null) {
          // Create configuration
View Full Code Here

      configGroupEntity.getConfigGroupConfigMappingEntities().clear();
    }

    if (configurations != null && !configurations.isEmpty()) {
      for (Config config : configurations.values()) {
        ClusterConfigEntityPK clusterConfigEntityPK = new ClusterConfigEntityPK();
        clusterConfigEntityPK.setClusterId(cluster.getClusterId());
        clusterConfigEntityPK.setTag(config.getVersionTag());
        clusterConfigEntityPK.setType(config.getType());
        ClusterConfigEntity clusterConfigEntity = clusterDAO.findConfig
          (clusterConfigEntityPK);

        if (clusterConfigEntity == null) {
          // Create configuration
View Full Code Here

TOP

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

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.