Package org.apache.ambari.server.state

Examples of org.apache.ambari.server.state.Cluster.addConfig()


   
    final Config c = configFactory.createNew(cluster, "hdfs-site",
        new HashMap<String, String>() {{ put("dfs.journalnode.http-address", "http://goo"); }});
    c.setVersionTag("version3");
    c.persist();
    cluster.addConfig(c);
    //host.addDesiredConfig(cluster.getClusterId(), true, "user", c);
    ConfigGroup configGroup = configGroupFactory.createNew(cluster, "g1",
      "t1", "", new HashMap<String, Config>() {{ put("hdfs-site", c); }},
      new HashMap<String, Host>() {{ put("h3", host); }});
    configGroup.persist();
View Full Code Here


    final Config c1 = configFactory.createNew(cluster, "core-site",
      new HashMap<String, String>() {{ put("fs.trash.interval", "400"); }});
    c1.setVersionTag("version2");
    c1.persist();
    cluster.addConfig(c1);
    configGroup = configGroupFactory.createNew(cluster, "g2",
      "t2", "", new HashMap<String, Config>() {{ put("core-site", c1); }},
      new HashMap<String, Host>() {{ put("h3", host); }});
    configGroup.persist();
    cluster.addConfigGroup(configGroup);
View Full Code Here

        request.getProperties());
    config.setVersionTag(request.getVersionTag());

    config.persist();

    cluster.addConfig(config);
  }

  @Override
  public void createUsers(Set<UserRequest> requests) throws AmbariException {
View Full Code Here

    Config config2 = cf.createNew(cluster, "core-site",
        new HashMap<String, String>(){{ put("key1", "value1"); }});
    config2.setVersionTag("version1");

    cluster.addConfig(config1);
    cluster.addConfig(config2);
    cluster.addDesiredConfig("_test", config1);
    cluster.addDesiredConfig("_test", config2);

    Service hdfs = cluster.addService("HDFS");
View Full Code Here

    Config config2 = cf.createNew(cluster, "core-site",
        new HashMap<String, String>(){{ put("key1", "value1"); }});
    config2.setVersionTag("version1");

    cluster.addConfig(config1);
    cluster.addConfig(config2);
    cluster.addDesiredConfig("_test", config1);
    cluster.addDesiredConfig("_test", config2);

    Service hdfs = cluster.addService("HDFS");
    Service mapReduce = cluster.addService("MAPREDUCE");
View Full Code Here

      new HashMap<String, String>() {{
        put("key1", "value1");
      }});
    config2.setVersionTag("version1");

    cluster.addConfig(config1);
    cluster.addConfig(config2);

    Service hdfs = cluster.addService("HDFS");
    hdfs.persist();
View Full Code Here

        put("key1", "value1");
      }});
    config2.setVersionTag("version1");

    cluster.addConfig(config1);
    cluster.addConfig(config2);

    Service hdfs = cluster.addService("HDFS");
    hdfs.persist();

    Service mapred = cluster.addService("YARN");
View Full Code Here

      new HashMap<String, String>() {{
        put("key1", "value1");
      }});
    config2.setVersionTag("version1");

    cluster.addConfig(config1);
    cluster.addConfig(config2);

    Service hdfs = cluster.addService("HDFS");
    hdfs.persist();
View Full Code Here

        put("key1", "value1");
      }});
    config2.setVersionTag("version1");

    cluster.addConfig(config1);
    cluster.addConfig(config2);

    Service hdfs = cluster.addService("HDFS");
    hdfs.persist();

    Service mapred = cluster.addService("YARN");
View Full Code Here

    GLOBAL_CLUSTER.put(GLOBAL_NAME2, GLOBAL_CLUSTER_VAL2);
   
    //Cluster level global config
    Config globalConfig = configFactory.createNew(cluster1, GLOBAL_CONFIG, GLOBAL_CLUSTER);
    globalConfig.setVersionTag(CLUSTER_VERSION_TAG);
    cluster1.addConfig(globalConfig);

    //Cluster level service config
    Config serviceSiteConfigCluster = configFactory.createNew(cluster1, SERVICE_SITE_CONFIG, SERVICE_SITE_CLUSTER);
    serviceSiteConfigCluster.setVersionTag(CLUSTER_VERSION_TAG);
    cluster1.addConfig(serviceSiteConfigCluster);
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.