Examples of ConfigImpl


Examples of org.apache.ambari.server.state.ConfigImpl

    Map<String, Config> configs = new HashMap<String, Config>();
    Map<String, String> properties = new HashMap<String, String>();
    properties.put("a", "a1");
    properties.put("b", "b1");

    Config c1 = new ConfigImpl(cluster, "hdfs-site", properties, injector);
    properties.put("c", "c1");
    properties.put("d", "d1");
    Config c2 = new ConfigImpl(cluster, "core-site", properties, injector);
    Config c3 = new ConfigImpl(cluster, "foo-site", properties, injector);

    Map<String, String> mapRequestProps = new HashMap<String, String>();
    mapRequestProps.put("context", "Called from a test");

    c1.setVersionTag("v1");
    c2.setVersionTag("v1");
    c3.setVersionTag("v1");

    cluster.addConfig(c1);
    cluster.addConfig(c2);
    cluster.addConfig(c3);
    c1.persist();
    c2.persist();
    c3.persist();

    configs.put(c1.getType(), c1);
    configs.put(c2.getType(), c2);

    ServiceRequest r = new ServiceRequest(clusterName, serviceName, State.INSTALLED.toString());
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigImpl

    // Create Config group for core-site
    configs = new HashMap<String, String>();
    configs.put("a", "c");
    Cluster cluster = clusters.getCluster(clusterName);
    final Config config = new ConfigImpl("core-site");
    config.setProperties(configs);
    config.setVersionTag("version122");
    Long groupId = createConfigGroup(cluster, "g1", "t1",
      new ArrayList<String>() {{ add("h1"); }},
      new ArrayList<Config>() {{ add(config); }});

    Assert.assertNotNull(groupId);

    // Create Config group for mapred-site
    configs = new HashMap<String, String>();
    configs.put("a", "c");

    final Config config2 = new ConfigImpl("mapred-site");
    config2.setProperties(configs);
    config2.setVersionTag("version122");
    groupId = createConfigGroup(cluster, "g2", "t2",
      new ArrayList<String>() {{ add("h1"); }},
      new ArrayList<Config>() {{ add(config2); }});

    Assert.assertNotNull(groupId);
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigImpl

    // Create Config group for hdfs-site
    configs = new HashMap<String, String>();
    configs.put("a", "c");

    final Config config = new ConfigImpl("hdfs-site");
    config.setProperties(configs);
    config.setVersionTag("version122");
    Long groupId = createConfigGroup(clusters.getCluster(clusterName), "g1", "t1",
        new ArrayList<String>() {{
          add("h1");
          add("h2");
        }},
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigImpl

    // Create Config group for hdfs-site
    configs = new HashMap<String, String>();
    configs.put("a", "c");

    final Config config = new ConfigImpl("hdfs-site");
    config.setProperties(configs);
    config.setVersionTag("version122");
    Long groupId = createConfigGroup(clusters.getCluster(clusterName), "g1", "t1",
      new ArrayList<String>() {{ add("h1"); add("h2"); }},
      new ArrayList<Config>() {{ add(config); }});

    Assert.assertNotNull(groupId);
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigImpl

              configProperties.put(PropertyHelper.getPropertyName(entry.getKey()),
                entry.getValue().toString());
            }
          }

          Config config = new ConfigImpl(type);
          config.setVersionTag(tag);
          config.setProperties(configProperties);

          configurations.put(config.getType(), config);
        }
      } catch (Exception e) {
        LOG.warn("Config json in unparseable format. " + configObj, e);
      }
    }
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigImpl

      HostGroupEntity entity = group.getEntity();
      Map<String, Map<String, Config>> groupConfigs = new HashMap<String, Map<String, Config>>();
      for (Map.Entry<String, Map<String, String>> entry: group.getConfigurations().entrySet()) {
        String type = entry.getKey();
        String service = stack.getServiceForConfigType(type);
        Config config = new ConfigImpl(type);
        config.setVersionTag(entity.getName());
        config.setProperties(entry.getValue());
        Map<String, Config> serviceConfigs = groupConfigs.get(service);
        if (serviceConfigs == null) {
          serviceConfigs = new HashMap<String, Config>();
          groupConfigs.put(service, serviceConfigs);
        }
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigImpl

    Map<String, Config> configs = new HashMap<String, Config>();
    Map<String, String> properties = new HashMap<String, String>();
    properties.put("a", "a1");
    properties.put("b", "b1");

    Config c1 = new ConfigImpl(cluster, "hdfs-site", properties, injector);
    properties.put("c", "c1");
    properties.put("d", "d1");
    Config c2 = new ConfigImpl(cluster, "core-site", properties, injector);
    Config c3 = new ConfigImpl(cluster, "foo-site", properties, injector);

    Map<String, String> mapRequestProps = new HashMap<String, String>();
    mapRequestProps.put("context", "Called from a test");

    c1.setVersionTag("v1");
    c2.setVersionTag("v1");
    c3.setVersionTag("v1");

    cluster.addConfig(c1);
    cluster.addConfig(c2);
    cluster.addConfig(c3);
    c1.persist();
    c2.persist();
    c3.persist();

    configs.put(c1.getType(), c1);
    configs.put(c2.getType(), c2);
    s1.updateDesiredConfigs(configs);
    s1.persist();
View Full Code Here

Examples of org.mom4j.config.ConfigImpl

    {
        if (args.length != 1) {
            log.error("USAGE: Launcher <config-file>");
            return;
        }
        ConfigImpl cfg = null;
        try {
            cfg = new ConfigImpl(args[0]);
        }
        catch (Exception ex) {
            log.error("Failed to create config", ex);
            return;
        }
View Full Code Here

Examples of org.mom4j.config.ConfigImpl

  public void setUp() throws Exception {
    if (JmsTestCase.server == null) {
      synchronized (JmsTestCase.mutex) {
        if (JmsTestCase.server == null) {
          MessagingServer ms = new MessagingServer(new ConfigImpl(
              "./config/mom4j-config.xml"));
          JmsTestCase.server = ms.start(false);
          if (!JmsTestCase.server.hasTopic("testTopic")) {
            JmsTestCase.server.createTopic("testTopic");
          }
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.internal.ConfigImpl

    modules = ObjectArrays.concat(modules, new SecurityModule());
    modules = ObjectArrays.concat(modules, new Module()
    {
      @Override
      public void configure(final Binder binder) {
        binder.bind(Config.class).toInstance(new ConfigImpl(enableAutomaticRoutingFeature()));
      }
    });
    return modules;
  }
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.