Examples of AlwaysPredicate


Examples of org.apache.ambari.server.controller.predicate.AlwaysPredicate

      Assert.assertEquals("SomeUpdateValue", map2.get("SomeProperty"));
      Assert.assertEquals(99, map2.get("SomeOtherProperty"));
    }

    // get the property maps to update all resources
    predicate = new AlwaysPredicate();

    propertyMaps = provider.getPropertyMaps(updatePropertyMap, predicate);

    Assert.assertEquals(4, propertyMaps.size());
View Full Code Here

Examples of org.apache.ambari.server.controller.predicate.AlwaysPredicate

    Resource.Type type = resourceDefinitions.keySet().iterator().next();

    ViewSubResourceProvider viewSubResourceProvider = new ViewSubResourceProvider(type, MyResource.class, "id", viewEntity);

    Request request = PropertyHelper.getReadRequest("id", "properties", "metrics/myMetric");
    Predicate predicate = new AlwaysPredicate();

    Set<Resource> resources = viewSubResourceProvider.getResources(request, predicate);

    Assert.assertEquals(2, resources.size());
View Full Code Here

Examples of org.apache.ambari.server.controller.predicate.AlwaysPredicate

    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
    TemporalInfo temporalInfo = new TemporalInfoImpl(1000L, 1100L, 10L);
    temporalInfoMap.put("metrics/myMetric", temporalInfo);

    Request request = PropertyHelper.getReadRequest(requestProperties, temporalInfoMap);
    Predicate predicate = new AlwaysPredicate();

    Set<Resource> resources = viewSubResourceProvider.getResources(request, predicate);

    Assert.assertEquals(2, resources.size());
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.predicate.AlwaysPredicate

      Assert.assertEquals("SomeUpdateValue", map2.get("SomeProperty"));
      Assert.assertEquals(99, map2.get("SomeOtherProperty"));
    }

    // get the property maps to update all resources
    predicate = new AlwaysPredicate();

    propertyMaps = provider.getPropertyMaps(updatePropertyMap, predicate);

    Assert.assertEquals(4, propertyMaps.size());
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.