Examples of ClusterRequest


Examples of org.apache.ambari.server.controller.ClusterRequest

  @Override
  public RequestStatus deleteResources(Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

    for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
      final ClusterRequest clusterRequest = getRequest(propertyMap);
      modifyResources(new Command<Void>() {
        @Override
        public Void invoke() throws AmbariException {
          getManagementController().deleteCluster(clusterRequest);
          return null;
View Full Code Here

Examples of org.apache.ambari.server.controller.ClusterRequest

   * @param properties  the predicate
   *
   * @return the cluster request object
   */
  private ClusterRequest getRequest(Map<String, Object> properties) {
    ClusterRequest cr = new ClusterRequest(
        (Long) properties.get(CLUSTER_ID_PROPERTY_ID),
        (String) properties.get(CLUSTER_NAME_PROPERTY_ID),
        (String) properties.get(CLUSTER_VERSION_PROPERTY_ID),
        null);


    ConfigurationRequest configRequest = getConfigurationRequest("Clusters", properties);

    if (null != configRequest)
      cr.setDesiredConfig(configRequest);

    return cr;
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.ClusterRequest

  @Override
  public Set<Resource> getResources(Request request, Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

    final ClusterRequest clusterRequest = getRequest(PredicateHelper.getProperties(predicate));
    Set<String> requestedIds = getRequestPropertyIds(request, predicate);

    // TODO : handle multiple requests
    Set<ClusterResponse> responses = getResources(new Command<Set<ClusterResponse>>() {
      @Override
View Full Code Here

Examples of org.apache.ambari.server.controller.ClusterRequest

  @Override
  public RequestStatus deleteResources(Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

    for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
      final ClusterRequest clusterRequest = getRequest(propertyMap);
      modifyResources(new Command<Void>() {
        @Override
        public Void invoke() throws AmbariException {
          getManagementController().deleteCluster(clusterRequest);
          return null;
View Full Code Here

Examples of org.apache.ambari.server.controller.ClusterRequest

   * @param properties  the predicate
   *
   * @return the cluster request object
   */
  private ClusterRequest getRequest(Map<String, Object> properties) {
    ClusterRequest cr = new ClusterRequest(
        (Long) properties.get(CLUSTER_ID_PROPERTY_ID),
        (String) properties.get(CLUSTER_NAME_PROPERTY_ID),
        (String) properties.get(CLUSTER_VERSION_PROPERTY_ID),
        null);

   
    ConfigurationRequest configRequest = getConfigurationRequest("Clusters", properties);
   
    if (null != configRequest)
      cr.setDesiredConfig(configRequest);
   
    return cr;
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.ClusterRequest

  @Override
  public RequestStatus deleteResources(Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

    for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
      final ClusterRequest clusterRequest = getRequest(propertyMap);
      modifyResources(new Command<Void>() {
        @Override
        public Void invoke() throws AmbariException {
          getManagementController().deleteCluster(clusterRequest);
          return null;
View Full Code Here

Examples of org.apache.ambari.server.controller.ClusterRequest

   * @param properties  the predicate
   *
   * @return the cluster request object
   */
  private ClusterRequest getRequest(Map<String, Object> properties) {
    ClusterRequest cr = new ClusterRequest(
        (Long) properties.get(CLUSTER_ID_PROPERTY_ID),
        (String) properties.get(CLUSTER_NAME_PROPERTY_ID),
        (String) properties.get(CLUSTER_VERSION_PROPERTY_ID),
        null);

   
    ConfigurationRequest configRequest = getConfigurationRequest("Clusters", properties);
   
    if (null != configRequest)
      cr.setDesiredConfig(configRequest);
   
    return cr;
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.ClusterRequest

    cr.setProperties(new HashMap<String, String>() {{
      put("ipc.client.connect.max.retries", "30");
      put("fs.trash.interval", "30");
    }});

    final ClusterRequest clusterRequest1 =
      new ClusterRequest(cluster.getClusterId(), clusterName,
        cluster.getDesiredStackVersion().getStackVersion(), null);

    clusterRequest1.setDesiredConfig(cr);
    managementController.updateClusters(new HashSet<ClusterRequest>()
    {{ add(clusterRequest1); }}, null);

    // global
    cr.setType("global");
    cr.setVersionTag("version1");
    cr.setProperties(new HashMap<String, String>() {{
      put("dfs_namenode_name_dir", "/hadoop/hdfs/namenode");
      put("namenode_heapsize", "1024");
    }});

    final ClusterRequest clusterRequest2 =
      new ClusterRequest(cluster.getClusterId(), clusterName,
        cluster.getDesiredStackVersion().getStackVersion(), null);

    clusterRequest2.setDesiredConfig(cr);
    managementController.updateClusters(new HashSet<ClusterRequest>()
    {{ add(clusterRequest2); }}, null);
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.ClusterRequest

  @Override
  public RequestStatus deleteResources(Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

    for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
      final ClusterRequest clusterRequest = getRequest(propertyMap);
      modifyResources(new Command<Void>() {
        @Override
        public Void invoke() throws AmbariException {
          getManagementController().deleteCluster(clusterRequest);
          return null;
View Full Code Here

Examples of org.apache.ambari.server.controller.ClusterRequest

   * @param properties  the predicate
   *
   * @return the cluster request object
   */
  private ClusterRequest getRequest(Map<String, Object> properties) {
    ClusterRequest cr = new ClusterRequest(
        (Long) properties.get(CLUSTER_ID_PROPERTY_ID),
        (String) properties.get(CLUSTER_NAME_PROPERTY_ID),
        (String) properties.get(CLUSTER_VERSION_PROPERTY_ID),
        null);

   
    ConfigurationRequest configRequest = getConfigurationRequest("Clusters", properties);
   
    if (null != configRequest)
      cr.setDesiredConfig(configRequest);
   
    return cr;
  }
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.