Examples of mapHostToCluster()


Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

      try {
        //todo: the below method throws an exception when trying to create a duplicate mapping.
        //todo: this is done to detect duplicates during host create.  Unless it is allowable to
        //todo: add a host to a cluster by modifying the cluster_name prop, we should not do this mapping here.
        //todo: Determine if it is allowable to associate a host to a cluster via this mechanism.
        clusters.mapHostToCluster(request.getHostname(), request.getClusterName());
      } catch (DuplicateResourceException e) {
        // do nothing
      }

      if (null != request.getHostAttributes())
View Full Code Here

Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

      try {
        //todo: the below method throws an exception when trying to create a duplicate mapping.
        //todo: this is done to detect duplicates during host create.  Unless it is allowable to
        //todo: add a host to a cluster by modifying the cluster_name prop, we should not do this mapping here.
        //todo: Determine if it is allowable to associate a host to a cluster via this mechanism.
        clusters.mapHostToCluster(request.getHostname(), request.getClusterName());
      } catch (DuplicateResourceException e) {
        // do nothing
      }

      if (null != request.getHostAttributes())
View Full Code Here

Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

      try {
        //todo: the below method throws an exception when trying to create a duplicate mapping.
        //todo: this is done to detect duplicates during host create.  Unless it is allowable to
        //todo: add a host to a cluster by modifying the cluster_name prop, we should not do this mapping here.
        //todo: Determine if it is allowable to associate a host to a cluster via this mechanism.
        clusters.mapHostToCluster(request.getHostname(), request.getClusterName());
      } catch (DuplicateResourceException e) {
        // do nothing
      }

      if (null != request.getHostAttributes())
View Full Code Here

Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

      hostAttributes.put("os_release_version", "5.9");
      fsm.getHost(host).setHostAttributes(hostAttributes);
     
      fsm.getHost(host).setCurrentPingPort(pingPorts.get(index));
      fsm.getHost(host).persist();
      fsm.mapHostToCluster(host, "c1");
      index++;
    }

    //Add HDFS service
    Map<String, List<Integer>> hdfsTopology = new HashMap<String, List<Integer>>();
View Full Code Here

Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

      hostAttributes.put("os_release_version", "5.9");
      fsm.getHost(host).setHostAttributes(hostAttributes);
     
      fsm.getHost(host).setCurrentPingPort(pingPorts.get(index));
      fsm.getHost(host).persist();
      fsm.mapHostToCluster(host, "c1");
      index++;
    }

    //Add HDFS service
    Map<String, List<Integer>> hdfsTopology = new HashMap<String, List<Integer>>();
View Full Code Here

Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

    fsm.getHost("h4").setCurrentPingPort(1024);
    fsm.getHost("h1").persist();
    fsm.getHost("h2").persist();
    fsm.getHost("h3").persist();
    fsm.getHost("h4").persist();
    fsm.mapHostToCluster("h1", "c1");
    fsm.mapHostToCluster("h2", "c1");
    fsm.mapHostToCluster("h3", "c1");
    fsm.mapHostToCluster("h4", "c1");
    String [] hostList = {"h1", "h2", "h3" };
    addHdfsService(fsm.getCluster("c1"), hostList, injector);
View Full Code Here

Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

    fsm.getHost("h1").persist();
    fsm.getHost("h2").persist();
    fsm.getHost("h3").persist();
    fsm.getHost("h4").persist();
    fsm.mapHostToCluster("h1", "c1");
    fsm.mapHostToCluster("h2", "c1");
    fsm.mapHostToCluster("h3", "c1");
    fsm.mapHostToCluster("h4", "c1");
    String [] hostList = {"h1", "h2", "h3" };
    addHdfsService(fsm.getCluster("c1"), hostList, injector);
    addHbaseService(fsm.getCluster("c1"), hostList, injector);
View Full Code Here

Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

    fsm.getHost("h2").persist();
    fsm.getHost("h3").persist();
    fsm.getHost("h4").persist();
    fsm.mapHostToCluster("h1", "c1");
    fsm.mapHostToCluster("h2", "c1");
    fsm.mapHostToCluster("h3", "c1");
    fsm.mapHostToCluster("h4", "c1");
    String [] hostList = {"h1", "h2", "h3" };
    addHdfsService(fsm.getCluster("c1"), hostList, injector);
    addHbaseService(fsm.getCluster("c1"), hostList, injector);
    addMapreduceService(fsm.getCluster("c1"), hostList, injector);
View Full Code Here

Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

    fsm.getHost("h3").persist();
    fsm.getHost("h4").persist();
    fsm.mapHostToCluster("h1", "c1");
    fsm.mapHostToCluster("h2", "c1");
    fsm.mapHostToCluster("h3", "c1");
    fsm.mapHostToCluster("h4", "c1");
    String [] hostList = {"h1", "h2", "h3" };
    addHdfsService(fsm.getCluster("c1"), hostList, injector);
    addHbaseService(fsm.getCluster("c1"), hostList, injector);
    addMapreduceService(fsm.getCluster("c1"), hostList, injector);
    Map<String, List<String>> info = StageUtils.getClusterHostInfo(fsm.getHostsForCluster("c1"),
View Full Code Here

Examples of org.apache.ambari.server.state.Clusters.mapHostToCluster()

    for (String host: hostList) {
      fsm.addHost(host);
      fsm.getHost(host).setOsType("centos5");
      fsm.getHost(host).setCurrentPingPort(pingPorts.get(index));
      fsm.getHost(host).persist();
      fsm.mapHostToCluster(host, "c1");
      index++;
    }

    //Add HDFS service
    Map<String, List<Integer>> hdfsTopology = new HashMap<String, List<Integer>>();
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.