Examples of updateCluster()


Examples of com.netflix.genie.client.ClusterServiceClient.updateCluster()

            LOG.info("Command = " + command);
        }

        LOG.info("Updating existing cluster config");
        cluster2.setStatus(ClusterStatus.TERMINATED);
        final Cluster cluster3 = clusterClient.updateCluster(cluster2.getId(), cluster2);
        LOG.info("Cluster updated:");
        LOG.info(cluster3.toString());

        LOG.info("Deleting cluster config using id");
        final Cluster cluster4 = clusterClient.deleteCluster(cluster1.getId());
View Full Code Here

Examples of org.apache.ambari.server.controller.AmbariManagementController.updateCluster()

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

    // set expectations
    expect(managementController.getClusters(EasyMock.<Set<ClusterRequest>>anyObject())).andReturn(nameResponse).once();
    expect(managementController.updateCluster(
        AbstractResourceProviderTest.Matcher.getClusterRequest(102L, "Cluster102", "HDP-0.1", null), eq(mapRequestProps))).
        andReturn(response).once();
    expect(managementController.updateCluster(
        AbstractResourceProviderTest.Matcher.getClusterRequest(103L, null, "HDP-0.1", null), eq(mapRequestProps))).
        andReturn(response).once();
View Full Code Here

Examples of org.apache.ambari.server.controller.AmbariManagementController.updateCluster()

    // set expectations
    expect(managementController.getClusters(EasyMock.<Set<ClusterRequest>>anyObject())).andReturn(nameResponse).once();
    expect(managementController.updateCluster(
        AbstractResourceProviderTest.Matcher.getClusterRequest(102L, "Cluster102", "HDP-0.1", null), eq(mapRequestProps))).
        andReturn(response).once();
    expect(managementController.updateCluster(
        AbstractResourceProviderTest.Matcher.getClusterRequest(103L, null, "HDP-0.1", null), eq(mapRequestProps))).
        andReturn(response).once();

    // replay
    replay(managementController, response);
View Full Code Here

Examples of org.apache.ambari.server.controller.AmbariManagementController.updateCluster()

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

    // set expectations
    expect(managementController.getClusters(EasyMock.<Set<ClusterRequest>>anyObject())).andReturn(nameResponse).once();
    expect(managementController.updateCluster(EasyMock.anyObject(ClusterRequest.class),
        eq(mapRequestProps))).andReturn(response).once();

    // replay
    replay(managementController, response);
View Full Code Here

Examples of org.apache.ambari.server.controller.AmbariManagementController.updateCluster()

    Set<ClusterResponse> nameResponse = new HashSet<ClusterResponse>();
    nameResponse.add(new ClusterResponse(102L, "Cluster102", null, null));

    // set expectations
    expect(managementController.getClusters(EasyMock.<Set<ClusterRequest>>anyObject())).andReturn(nameResponse).once();
    expect(managementController.updateCluster(
        AbstractResourceProviderTest.Matcher.getClusterRequest(102L, "Cluster102", "HDP-0.1", null))).
        andReturn(response).once();
    expect(managementController.updateCluster(
        AbstractResourceProviderTest.Matcher.getClusterRequest(103L, null, "HDP-0.1", null))).
        andReturn(response).once();
View Full Code Here

Examples of org.apache.ambari.server.controller.AmbariManagementController.updateCluster()

    // set expectations
    expect(managementController.getClusters(EasyMock.<Set<ClusterRequest>>anyObject())).andReturn(nameResponse).once();
    expect(managementController.updateCluster(
        AbstractResourceProviderTest.Matcher.getClusterRequest(102L, "Cluster102", "HDP-0.1", null))).
        andReturn(response).once();
    expect(managementController.updateCluster(
        AbstractResourceProviderTest.Matcher.getClusterRequest(103L, null, "HDP-0.1", null))).
        andReturn(response).once();

    // replay
    replay(managementController, response);
View Full Code Here

Examples of org.apache.ambari.server.controller.ivory.IvoryService.updateCluster()

      // get all the clusters that pass the predicate check
      Set<Resource> resources = getResources(PropertyHelper.getReadRequest(), predicate);

      for (Resource resource : resources) {
        // update all the matching clusters with the property values from the request
        service.updateCluster(getCluster((String) resource.getPropertyValue(CLUSTER_NAME_PROPERTY_ID), propertyMap));
      }
    }
    return new RequestStatusImpl(null);
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.ivory.IvoryService.updateCluster()

    // set expectations
    expect(service.getClusterNames()).andReturn(targetClusterNames);

    expect(service.getCluster("Cluster1")).andReturn(targetCluster1);

    service.updateCluster(targetCluster1);

    // replay
    replay(service);

    propertySet.add(properties);
View Full Code Here

Examples of org.apache.helix.api.accessor.ClusterAccessor.updateCluster()

        HelixUtil.parseCsvFormatedKeyValuePairs(constraintAttributesMap);
    ConstraintItem item = new ConstraintItem(constraintAttributes);
    ClusterConfig.Delta delta =
        new ClusterConfig.Delta(clusterId).addConstraintItem(
            ConstraintType.valueOf(constraintType), ConstraintId.from(constraintId), item);
    accessor.updateCluster(delta);
  }

  void getConstraints(String[] optValues) {
    String clusterName = optValues[0];
    ConstraintType constraintType = ConstraintType.valueOf(optValues[1]);
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.