Examples of updateActualConfigs()


Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

            } else if (report.getRoleCommand().equals(RoleCommand.START.toString())
                && null != report.getConfigurationTags()
                && !report.getConfigurationTags().isEmpty()) {
              LOG.info("Updating applied config on service " + scHost.getServiceName() +
                  ", component " + scHost.getServiceComponentName() + ", host " + scHost.getHostName());
              scHost.updateActualConfigs(report.getConfigurationTags());
            }

            if (RoleCommand.START.toString().equals(report.getRoleCommand())) {
              scHost.handleEvent(new ServiceComponentHostStartedEvent(schName,
                  hostname, now));
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

              if (null != status.getStackVersion() && !status.getStackVersion().isEmpty()) {
                scHost.setStackVersion(gson.fromJson(status.getStackVersion(), StackId.class));
              }

              if (null != status.getConfigTags()) {
                scHost.updateActualConfigs(status.getConfigTags());
              }

            } else {
              // TODO: What should be done otherwise?
            }
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

    sch1.setDesiredStackVersion(new StackId("HDP-1.1.0"));
    sch1.setStackVersion(new StackId("HDP-0.1"));

    sch1.persist();

    sch1.updateActualConfigs(new HashMap<String, Map<String,String>>() {{
      put("global", new HashMap<String,String>() {{ put("tag", "version1"); }});
    }});


    ServiceComponentHostRequest r =
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

          put("global", new HashMap<String,String>() {{ put("tag", "version1"); }});
          put("core-site", new HashMap<String,String>() {{ put("tag", "version1");
            put(configGroup.getId().toString(), "version2"); }});
        }};
       
    sch.updateActualConfigs(actual);
   
    Map<String, HostConfig> confirm = sch.getActualConfigs();
   
    Assert.assertEquals(2, confirm.size());
    Assert.assertTrue(confirm.containsKey("global"));
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

      put("global", new HashMap<String,String>() {{ put("tag", "version1"); }});
    }};
   
    sch1.updateActualConfigs(actual);
    sch2.updateActualConfigs(actual);
    sch3.updateActualConfigs(actual);

    makeConfig(cluster, "foo", "version1",
        new HashMap<String,String>() {{ put("a", "c"); }});

    // HDP-x/HDFS does not define type 'foo', so changes do not count to stale
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

    Long id = configGroup.getId();
    HashMap<String, String> tags = new HashMap<String, String>();
    tags.put("tag", "version1");
    tags.put(id.toString(), "version2");
    actual.put("core-site", tags);
    sch3.updateActualConfigs(actual);

    Assert.assertFalse(sch3.convertToResponse().isStaleConfig());

    cluster.deleteConfigGroup(id);
    Assert.assertNull(cluster.getConfigGroups().get(id));
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

    Assert.assertFalse(sch3.convertToResponse().isStaleConfig());

    cluster.deleteConfigGroup(id);
    Assert.assertNull(cluster.getConfigGroups().get(id));

    sch3.updateActualConfigs(actual);
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());

    tags.remove(id.toString());
    sch3.updateActualConfigs(actual);
    Assert.assertFalse(sch3.convertToResponse().isStaleConfig());
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

    sch3.updateActualConfigs(actual);
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());

    tags.remove(id.toString());
    sch3.updateActualConfigs(actual);
    Assert.assertFalse(sch3.convertToResponse().isStaleConfig());
  }

  /**
   * Helper method to create a configuration
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

    sch1.setDesiredStackVersion(new StackId("HDP-1.1.0"));
    sch1.setStackVersion(new StackId("HDP-0.1"));

    sch1.persist();
   
    sch1.updateActualConfigs(new HashMap<String, Map<String,String>>() {{
      put("global", new HashMap<String,String>() {{ put("tag", "version1"); }});
    }});
   

    ServiceComponentHostRequest r =
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceComponentHost.updateActualConfigs()

            } else if (report.getRoleCommand().equals(RoleCommand.START.toString())
                && null != report.getConfigurationTags()
                && !report.getConfigurationTags().isEmpty()) {
              LOG.info("Updating applied config on service " + scHost.getServiceName() +
                  ", component " + scHost.getServiceComponentName() + ", host " + scHost.getHostName());
              scHost.updateActualConfigs(report.getConfigurationTags());
            }

            if (RoleCommand.START.toString().equals(report.getRoleCommand())) {
              scHost.handleEvent(new ServiceComponentHostStartedEvent(schName,
                  hostname, now));
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.