Examples of updateActualConfigs()


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

    Long id = configGroup.getId();
    HashMap<String, String> tags = new HashMap<String, String>(2);
    tags.put("tag", "version1");
    tags.put(id.toString(), "version2");
    actual.put("core-site", tags);
    sch3.updateActualConfigs(actual);
    // previous value from cache
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());
    //reset restartRequired flag + invalidating isStale cache
    // after start/restart command execution completed
    sch3.setRestartRequired(false);
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);
    // previous value from cache
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);
    // previous value from cache
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());
    //reset restartRequired flag + invalidating isStale cache
    // after start/restart command execution completed
    sch3.setRestartRequired(false);
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()

    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()

    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
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.