Package org.apache.ambari.server.state

Examples of org.apache.ambari.server.state.ServiceComponentHost.convertToResponse()


        put("fs.trash.interval", "360"); // HDFS only
      }});

    Assert.assertTrue(sch1.convertToResponse().isStaleConfig());
    Assert.assertTrue(sch2.convertToResponse().isStaleConfig());
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());

    actual.put("core-site", new HashMap<String, String>() {{
      put("tag", "version1");
    }});
View Full Code Here


    configGroup.persist();
    cluster.addConfigGroup(configGroup);

    Assert.assertTrue(sch1.convertToResponse().isStaleConfig());
    Assert.assertTrue(sch2.convertToResponse().isStaleConfig());
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());

    // Test actual configs are updated for deleted config group
    Long id = configGroup.getId();
    HashMap<String, String> tags = new HashMap<String, String>(2);
    tags.put("tag", "version1");
View Full Code Here

    tags.put("tag", "version1");
    tags.put(id.toString(), "version2");
    actual.put("core-site", tags);
    sch3.updateActualConfigs(actual);
    // previous value from cache
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());
    //reset restartRequired flag + invalidating isStale cache
    // after start/restart command execution completed
    sch3.setRestartRequired(false);

    Assert.assertFalse(sch3.convertToResponse().isStaleConfig());
View Full Code Here

    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());
    //reset restartRequired flag + invalidating isStale cache
    // after start/restart command execution completed
    sch3.setRestartRequired(false);

    Assert.assertFalse(sch3.convertToResponse().isStaleConfig());

    cluster.deleteConfigGroup(id);
    Assert.assertNull(cluster.getConfigGroups().get(id));

    sch3.updateActualConfigs(actual);
View Full Code Here

    cluster.deleteConfigGroup(id);
    Assert.assertNull(cluster.getConfigGroups().get(id));

    sch3.updateActualConfigs(actual);
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());

    tags.remove(id.toString());
    sch3.updateActualConfigs(actual);
    // previous value from cache
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());
View Full Code Here

    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());

    tags.remove(id.toString());
    sch3.updateActualConfigs(actual);
    // previous value from cache
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());
    //reset restartRequired flag + invalidating isStale cache
    // after start/restart command execution completed
    sch3.setRestartRequired(false);
    Assert.assertFalse(sch3.convertToResponse().isStaleConfig());
  }
View Full Code Here

    // previous value from cache
    Assert.assertTrue(sch3.convertToResponse().isStaleConfig());
    //reset restartRequired flag + invalidating isStale cache
    // after start/restart command execution completed
    sch3.setRestartRequired(false);
    Assert.assertFalse(sch3.convertToResponse().isStaleConfig());
  }

  /**
   * Helper method to create a configuration
   * @param cluster the cluster
View Full Code Here

                request.getHostname());
            if (checkDesiredState
                && (desiredStateToCheck != sch.getDesiredState())) {
              continue;
            }
            ServiceComponentHostResponse r = sch.convertToResponse();
            response.add(r);
          } catch (ServiceComponentHostNotFoundException e) {
            if (request.getServiceName() != null && request.getComponentName() != null) {
              throw new ServiceComponentHostNotFoundException(cluster.getClusterName(),
                  request.getServiceName(), request.getComponentName(),request.getHostname());
View Full Code Here

              sc.getServiceComponentHosts().values()) {
            if (checkDesiredState
                && (desiredStateToCheck != sch.getDesiredState())) {
              continue;
            }
            ServiceComponentHostResponse r = sch.convertToResponse();
            response.add(r);
          }
        }
      }
    }
View Full Code Here

                request.getHostname());
            if (checkDesiredState
                && (desiredStateToCheck != sch.getDesiredState())) {
              continue;
            }
            ServiceComponentHostResponse r = sch.convertToResponse();
            response.add(r);
          } catch (ServiceComponentHostNotFoundException e) {
            if (request.getServiceName() != null && request.getComponentName() != null) {
              throw new ServiceComponentHostNotFoundException(cluster.getClusterName(),
                  request.getServiceName(), request.getComponentName(),request.getHostname());
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.