Examples of containsTag()


Examples of org.apache.helix.model.InstanceConfig.containsTag()

    for(String p : ev.getPartitionSet())
    {
      for(String hostName : ev.getStateMap(p).keySet())
      {
        InstanceConfig config = accessor.getProperty(accessor.keyBuilder().instanceConfig(hostName));
        Assert.assertTrue(config.containsTag(DB2tag));
        hosts.add(hostName);
      }
    }
    Assert.assertEquals(hosts.size(), 2);
   
View Full Code Here

Examples of org.apache.helix.model.InstanceConfig.containsTag()

    for(String p : ev.getPartitionSet())
    {
      for(String hostName : ev.getStateMap(p).keySet())
      {
        InstanceConfig config = accessor.getProperty(accessor.keyBuilder().instanceConfig(hostName));
        Assert.assertTrue(config.containsTag(DB3Tag));
        hosts.add(hostName);
      }
    }
    Assert.assertEquals(hosts.size(), 4);
  }
View Full Code Here

Examples of org.apache.helix.model.InstanceConfig.containsTag()

    for(String p : dbIs.getPartitionSet())
    {
      for(String hostName : dbIs.getInstanceStateMap(p).keySet())
      {
        InstanceConfig config = accessor.getProperty(accessor.keyBuilder().instanceConfig(hostName));
        Assert.assertTrue(config.containsTag("tag1"));
        hosts.add(hostName);
      }
    }
    Assert.assertEquals(hosts.size(), 2);
   
View Full Code Here

Examples of org.apache.helix.model.InstanceConfig.containsTag()

    for(String p : dbIs.getPartitionSet())
    {
      for(String hostName : dbIs.getInstanceStateMap(p).keySet())
      {
        InstanceConfig config = accessor.getProperty(accessor.keyBuilder().instanceConfig(hostName));
        Assert.assertTrue(config.containsTag("tag2"));
        hosts.add(hostName);
      }
    }
    Assert.assertEquals(hosts.size(), 4);
   
View Full Code Here

Examples of org.apache.helix.model.InstanceConfig.containsTag()

   for(String p : dbIs.getPartitionSet())
   {
     for(String hostName : dbIs.getInstanceStateMap(p).keySet())
     {
       InstanceConfig config = accessor.getProperty(accessor.keyBuilder().instanceConfig(hostName));
       Assert.assertTrue(config.containsTag("tag2"));
       hosts.add(hostName);
     }
   }
   Assert.assertEquals(hosts.size(), 3);
   
View Full Code Here

Examples of org.apache.helix.model.InstanceConfig.containsTag()

    Builder keyBuilder = accessor.keyBuilder();
   
    for(String instanceName : instances)
    {
      InstanceConfig config = accessor.getProperty(keyBuilder.instanceConfig(instanceName));
      if(config.containsTag(tag))
      {
        result.add(instanceName);
      }
    }
    return result;
View Full Code Here

Examples of org.mmisw.ont.client.util.XmlAccessor.containsTag()

    if ( sessionId == null || sessionId.trim().length() == 0
    ||   id == null || id.trim().length() == 0
    ||   username == null || username.trim().length() == 0
    ||   role == null || role.trim().length() == 0
    ) {
      if ( ! xa.containsTag("success") ) {
        // unexpected response.
        throw new Exception("Unexpected: server did not respond with a success nor an error message. Please try again later.");
      }
      else {
        throw new Exception("Could not parse response from registry server. Please try again later. response=" +response);
View Full Code Here

Examples of org.mmisw.ont.client.util.XmlAccessor.containsTag()

    log.info("----response=" +response);
   
 
    XmlAccessor xa = new XmlAccessor(response);
   
    if ( xa.containsTag("error") ) {
      throw new Exception("Could not create/update account");
    }
   
    if ( xa.containsTag("errorCode") ) {
      if ( response.contains("Duplicate") ) {
View Full Code Here

Examples of org.mmisw.ont.client.util.XmlAccessor.containsTag()

   
    if ( xa.containsTag("error") ) {
      throw new Exception("Could not create/update account");
    }
   
    if ( xa.containsTag("errorCode") ) {
      if ( response.contains("Duplicate") ) {
        throw new Exception("Please try a different username");
      }
      else {
        throw new Exception("Could not create/update account. Please try again later.");
View Full Code Here

Examples of org.mmisw.ont.client.util.XmlAccessor.containsTag()

    ||   id == null || id.trim().length() == 0
    ||   username == null || username.trim().length() == 0
//    ||   role == null || role.trim().length() == 0
    ) {
      String error;
      if ( ! xa.containsTag("success") ) {
        // unexpected response.
        error = "Unexpected: server did not respond with a success nor an error message. Please try again later.";
      }
      else {
        error = "Could not parse response from registry server. Please try again later. response=" +response;
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.