Examples of ExternalView


Examples of org.apache.helix.model.ExternalView

        _accessor.getChildValuesMap(_keyBuilder.externalViews());

    // TODO all ideal-states should be included in external-views

    for (String resourceName : externalViews.keySet()) {
      ExternalView externalView = externalViews.get(resourceName);
      Map<Partition, Map<String, String>> bestPossbileState =
          bestPossbileStates.getResourceMap(resourceName);
      success = verifyExternalView(externalView, bestPossbileState);
      if (!success) {
        LOG.info("external-view for resource: " + resourceName + " not match");
View Full Code Here

Examples of org.apache.helix.model.ExternalView

    boolean result =
        ClusterStateVerifier.verifyByZkCallback(new BestPossAndExtViewZkVerifier(ZK_ADDR,
            CLUSTER_NAME));
    Assert.assertTrue(result);
    Builder kb = _participants[1].getHelixDataAccessor().keyBuilder();
    ExternalView externalView =
        _participants[1].getHelixDataAccessor().getProperty(
            kb.externalView("TestDB"));

    for (String partitionName : externalView.getRecord().getMapFields().keySet()) {
      for (String hostName : externalView.getRecord().getMapField(partitionName).keySet()) {
        if (hostName.equals(participant1)) {
          Assert.assertTrue(externalView.getRecord().getMapField(partitionName).get(hostName)
              .equalsIgnoreCase("OFFLINE"));
        }
      }
    }
    Assert.assertTrue(externalView.getRecord().getMapField("TestDB_14").get(participant2)
        .equalsIgnoreCase("OFFLINE"));
  }
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.