use of org.apache.flink.optimizer.dataproperties.RequestedGlobalProperties in project flink by apache.
the class CoGroupDescriptor method createPossibleGlobalProperties.
@Override
protected List<GlobalPropertiesPair> createPossibleGlobalProperties() {
if (this.customPartitioner == null) {
// we accept compatible partitionings of any type
RequestedGlobalProperties partitioned_left_any = new RequestedGlobalProperties();
RequestedGlobalProperties partitioned_right_any = new RequestedGlobalProperties();
partitioned_left_any.setAnyPartitioning(this.keys1);
partitioned_right_any.setAnyPartitioning(this.keys2);
// add strict hash partitioning of both inputs on their full key sets
RequestedGlobalProperties partitioned_left_hash = new RequestedGlobalProperties();
RequestedGlobalProperties partitioned_right_hash = new RequestedGlobalProperties();
partitioned_left_hash.setHashPartitioned(this.keys1);
partitioned_right_hash.setHashPartitioned(this.keys2);
return Arrays.asList(new GlobalPropertiesPair(partitioned_left_any, partitioned_right_any), new GlobalPropertiesPair(partitioned_left_hash, partitioned_right_hash));
} else {
RequestedGlobalProperties partitioned_left = new RequestedGlobalProperties();
partitioned_left.setCustomPartitioned(this.keys1, this.customPartitioner);
RequestedGlobalProperties partitioned_right = new RequestedGlobalProperties();
partitioned_right.setCustomPartitioned(this.keys2, this.customPartitioner);
return Collections.singletonList(new GlobalPropertiesPair(partitioned_left, partitioned_right));
}
}
use of org.apache.flink.optimizer.dataproperties.RequestedGlobalProperties in project flink by apache.
the class CoGroupRawDescriptor method createPossibleGlobalProperties.
@Override
protected List<OperatorDescriptorDual.GlobalPropertiesPair> createPossibleGlobalProperties() {
RequestedGlobalProperties partitioned1 = new RequestedGlobalProperties();
partitioned1.setHashPartitioned(this.keys1);
RequestedGlobalProperties partitioned2 = new RequestedGlobalProperties();
partitioned2.setHashPartitioned(this.keys2);
return Collections.singletonList(new OperatorDescriptorDual.GlobalPropertiesPair(partitioned1, partitioned2));
}
use of org.apache.flink.optimizer.dataproperties.RequestedGlobalProperties in project flink by apache.
the class FilterDescriptor method createPossibleGlobalProperties.
@Override
protected List<RequestedGlobalProperties> createPossibleGlobalProperties() {
RequestedGlobalProperties rgp = new RequestedGlobalProperties();
rgp.setAnyDistribution();
return Collections.singletonList(rgp);
}
use of org.apache.flink.optimizer.dataproperties.RequestedGlobalProperties in project flink by apache.
the class GroupCombineProperties method createPossibleGlobalProperties.
@Override
protected List<RequestedGlobalProperties> createPossibleGlobalProperties() {
RequestedGlobalProperties props = new RequestedGlobalProperties();
props.setRandomPartitioning();
return Collections.singletonList(props);
}
use of org.apache.flink.optimizer.dataproperties.RequestedGlobalProperties in project flink by apache.
the class FeedbackPropertiesMatchTest method testSingleInputOperators.
@Test
public void testSingleInputOperators() {
try {
SourcePlanNode target = new SourcePlanNode(getSourceNode(), "Source");
Channel toMap1 = new Channel(target);
toMap1.setShipStrategy(ShipStrategyType.FORWARD, DataExchangeMode.PIPELINED);
toMap1.setLocalStrategy(LocalStrategy.NONE);
SingleInputPlanNode map1 = new SingleInputPlanNode(getMapNode(), "Mapper 1", toMap1, DriverStrategy.MAP);
Channel toMap2 = new Channel(map1);
toMap2.setShipStrategy(ShipStrategyType.FORWARD, DataExchangeMode.PIPELINED);
toMap2.setLocalStrategy(LocalStrategy.NONE);
SingleInputPlanNode map2 = new SingleInputPlanNode(getMapNode(), "Mapper 2", toMap2, DriverStrategy.MAP);
// no feedback properties and none are ever required and present
{
GlobalProperties gp = new GlobalProperties();
LocalProperties lp = new LocalProperties();
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some global feedback properties and none are ever required and present
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 5));
LocalProperties lp = new LocalProperties();
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some local feedback properties and none are ever required and present
{
GlobalProperties gp = new GlobalProperties();
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1, 2));
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some global and local feedback properties and none are ever required and present
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 5));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1, 2));
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// --------------------------- requirements on channel 1 -----------------------
// some required global properties, which are matched exactly
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 5));
LocalProperties lp = new LocalProperties();
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setHashPartitioned(new FieldList(2, 5));
toMap1.setRequiredGlobalProps(reqGp);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required local properties, which are matched exactly
{
GlobalProperties gp = new GlobalProperties();
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1, 2));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(1, 2));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(reqLp);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required global and local properties, which are matched exactly
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 5));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1, 2));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setHashPartitioned(new FieldList(2, 5));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(1, 2));
toMap1.setRequiredGlobalProps(reqGp);
toMap1.setRequiredLocalProps(reqLp);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required global and local properties, which are over-fulfilled
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1, 2));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setHashPartitioned(new FieldSet(2, 5));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(1));
toMap1.setRequiredGlobalProps(reqGp);
toMap1.setRequiredLocalProps(reqLp);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required global properties that are not met
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 1));
LocalProperties lp = new LocalProperties();
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setHashPartitioned(new FieldList(2, 5));
toMap1.setRequiredGlobalProps(reqGp);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// some required local properties that are not met
{
GlobalProperties gp = new GlobalProperties();
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2, 1));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(reqLp);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// some required global and local properties where the global properties are not met
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 1));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldList(2, 5));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(1));
toMap1.setRequiredGlobalProps(reqGp);
toMap1.setRequiredLocalProps(reqLp);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// some required global and local properties where the local properties are not met
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(1));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldList(1));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2));
toMap1.setRequiredGlobalProps(reqGp);
toMap1.setRequiredLocalProps(reqLp);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// --------------------------- requirements on channel 2 -----------------------
// some required global properties, which are matched exactly
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 5));
LocalProperties lp = new LocalProperties();
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setHashPartitioned(new FieldList(2, 5));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(reqGp);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required local properties, which are matched exactly
{
GlobalProperties gp = new GlobalProperties();
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1, 2));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(1, 2));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(reqLp);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required global and local properties, which are matched exactly
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 5));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1, 2));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setHashPartitioned(new FieldList(2, 5));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(1, 2));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(reqGp);
toMap2.setRequiredLocalProps(reqLp);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required global and local properties, which are over-fulfilled
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1, 2));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setHashPartitioned(new FieldSet(2, 5));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(1));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(reqGp);
toMap2.setRequiredLocalProps(reqLp);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required global properties that are not met
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 1));
LocalProperties lp = new LocalProperties();
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setHashPartitioned(new FieldSet(2, 5));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(reqGp);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// some required local properties that are not met
{
GlobalProperties gp = new GlobalProperties();
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2, 1));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(reqLp);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// some required global and local properties where the global properties are not met
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(2, 1));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldSet(2, 5));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(1));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(reqGp);
toMap2.setRequiredLocalProps(reqLp);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// some required global and local properties where the local properties are not met
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(1));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldList(1));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(reqGp);
toMap2.setRequiredLocalProps(reqLp);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// ---------------------- requirements mixed on 1 and 2 -----------------------
// some required global properties at step one and some more at step 2
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(1, 2));
LocalProperties lp = LocalProperties.EMPTY;
RequestedGlobalProperties reqGp1 = new RequestedGlobalProperties();
reqGp1.setAnyPartitioning(new FieldList(1, 2));
RequestedGlobalProperties reqGp2 = new RequestedGlobalProperties();
reqGp2.setHashPartitioned(new FieldList(1, 2));
toMap1.setRequiredGlobalProps(reqGp1);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(reqGp2);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required local properties at step one and some more at step 2
{
GlobalProperties gp = new GlobalProperties();
LocalProperties lp = LocalProperties.forOrdering(new Ordering(3, null, Order.ASCENDING).appendOrdering(1, null, Order.DESCENDING));
RequestedLocalProperties reqLp1 = new RequestedLocalProperties();
reqLp1.setGroupedFields(new FieldList(3, 1));
RequestedLocalProperties reqLp2 = new RequestedLocalProperties();
reqLp2.setOrdering(new Ordering(3, null, Order.ANY).appendOrdering(1, null, Order.ANY));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(reqLp1);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(reqLp2);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required global properties at step one and some local ones at step 2
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(1, 2));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(2, 1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldList(1, 2));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2));
toMap1.setRequiredGlobalProps(reqGp);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(reqLp);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some required local properties at step one and some global ones at step 2
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(1, 2));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(2, 1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldList(1, 2));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(reqLp);
toMap2.setRequiredGlobalProps(reqGp);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertTrue(report != null && report != NO_PARTIAL_SOLUTION && report != NOT_MET);
}
// some fulfilled global properties at step one and some non-fulfilled local ones at step 2
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(1, 2));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(2, 1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldList(1, 2));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2, 3));
toMap1.setRequiredGlobalProps(reqGp);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(reqLp);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// some fulfilled local properties at step one and some non-fulfilled global ones at step 2
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(1, 2));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(2, 1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldList(2, 3));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2, 1));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(reqLp);
toMap2.setRequiredGlobalProps(reqGp);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// some non-fulfilled global properties at step one and some fulfilled local ones at step 2
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(1, 2));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(2, 1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldList(2, 3));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2, 1));
toMap1.setRequiredGlobalProps(reqGp);
toMap1.setRequiredLocalProps(null);
toMap2.setRequiredGlobalProps(null);
toMap2.setRequiredLocalProps(reqLp);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
// some non-fulfilled local properties at step one and some fulfilled global ones at step 2
{
GlobalProperties gp = new GlobalProperties();
gp.setHashPartitioned(new FieldList(1, 2));
LocalProperties lp = LocalProperties.forGrouping(new FieldList(2, 1));
RequestedGlobalProperties reqGp = new RequestedGlobalProperties();
reqGp.setAnyPartitioning(new FieldList(1, 2));
RequestedLocalProperties reqLp = new RequestedLocalProperties();
reqLp.setGroupedFields(new FieldList(2, 1, 3));
toMap1.setRequiredGlobalProps(null);
toMap1.setRequiredLocalProps(reqLp);
toMap2.setRequiredGlobalProps(reqGp);
toMap2.setRequiredLocalProps(null);
FeedbackPropertiesMeetRequirementsReport report = map2.checkPartialSolutionPropertiesMet(target, gp, lp);
assertEquals(NOT_MET, report);
}
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
Aggregations