@Override public KeyedStateHandle getIntersection(KeyGroupRange keyGroupRange) { return KeyGroupRange.EMPTY_KEY_GROUP_RANGE.equals(this.keyGroupRange.getIntersection(keyGroupRange)) ? null : this; }
@Override public KeyedStateHandle getIntersection(KeyGroupRange keyGroupRange) { return KeyGroupRange.EMPTY_KEY_GROUP_RANGE.equals(this.keyGroupRange.getIntersection(keyGroupRange)) ? null : this; }
@Override public KeyedStateHandle getIntersection(KeyGroupRange keyGroupRange) { return KeyGroupRange.EMPTY_KEY_GROUP_RANGE.equals(this.keyGroupRange.getIntersection(keyGroupRange)) ? null : this; }
@Override public KeyedStateHandle getIntersection(KeyGroupRange keyGroupRange) { return KeyGroupRange.EMPTY_KEY_GROUP_RANGE.equals(this.keyGroupRange.getIntersection(keyGroupRange)) ? null : this; }
@Override public KeyedStateHandle getIntersection(KeyGroupRange otherKeyGroupRange) { return this.keyGroupRange.getIntersection(otherKeyGroupRange).getNumberOfKeyGroups() > 0 ? this : null; }
@Override public KeyedStateHandle getIntersection(KeyGroupRange otherKeyGroupRange) { return this.keyGroupRange.getIntersection(otherKeyGroupRange).getNumberOfKeyGroups() > 0 ? this : null; }
@Override public KeyedStateHandle getIntersection(KeyGroupRange otherKeyGroupRange) { return this.keyGroupRange.getIntersection(otherKeyGroupRange).getNumberOfKeyGroups() > 0 ? this : null; }
@Override public KeyedStateHandle getIntersection(KeyGroupRange otherKeyGroupRange) { if (keyGroupRange.getIntersection(otherKeyGroupRange).getNumberOfKeyGroups() > 0) { return this; } else { return new IncrementalKeyedStateSnapshot( KeyGroupRange.EMPTY_KEY_GROUP_RANGE, this.checkpointId, this.sharedState, this.privateState, this.metaStateHandle); } }
@Override public KeyedStateHandle getIntersection(KeyGroupRange otherKeyGroupRange) { Preconditions.checkNotNull(otherKeyGroupRange); KeyGroupRange intersectGroups = keyGroupRange.getIntersection(otherKeyGroupRange); if (snapshotHandle == null) { return new KeyGroupsStateSnapshot(intersectGroups); } Map<Integer, Tuple2<Long, Integer>> intersectMetaInfos = new HashMap<>(); for (int group : intersectGroups) { Tuple2<Long, Integer> metaInfo = metaInfos.get(group); if (metaInfo != null) { intersectMetaInfos.put(group, metaInfo); } } return new KeyGroupsStateSnapshot( intersectGroups, intersectMetaInfos, snapshotHandle ); }
/** * Returns a key-group range with offsets which is the intersection of the internal key-group range with the given * key-group range. * * @param keyGroupRange Key-group range to intersect with the internal key-group range. * @return The key-group range with offsets for the intersection of the internal key-group range with the given * key-group range. */ public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { Preconditions.checkNotNull(keyGroupRange); KeyGroupRange intersection = this.keyGroupRange.getIntersection(keyGroupRange); long[] subOffsets = new long[intersection.getNumberOfKeyGroups()]; if(subOffsets.length > 0) { System.arraycopy( offsets, computeKeyGroupIndex(intersection.getStartKeyGroup()), subOffsets, 0, subOffsets.length); } return new KeyGroupRangeOffsets(intersection, subOffsets); }
/** * Returns a key-group range with offsets which is the intersection of the internal key-group range with the given * key-group range. * * @param keyGroupRange Key-group range to intersect with the internal key-group range. * @return The key-group range with offsets for the intersection of the internal key-group range with the given * key-group range. */ public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { Preconditions.checkNotNull(keyGroupRange); KeyGroupRange intersection = this.keyGroupRange.getIntersection(keyGroupRange); long[] subOffsets = new long[intersection.getNumberOfKeyGroups()]; if(subOffsets.length > 0) { System.arraycopy( offsets, computeKeyGroupIndex(intersection.getStartKeyGroup()), subOffsets, 0, subOffsets.length); } return new KeyGroupRangeOffsets(intersection, subOffsets); }
/** * Returns a key-group range with offsets which is the intersection of the internal key-group range with the given * key-group range. * * @param keyGroupRange Key-group range to intersect with the internal key-group range. * @return The key-group range with offsets for the intersection of the internal key-group range with the given * key-group range. */ public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { Preconditions.checkNotNull(keyGroupRange); KeyGroupRange intersection = this.keyGroupRange.getIntersection(keyGroupRange); long[] subOffsets = new long[intersection.getNumberOfKeyGroups()]; if(subOffsets.length > 0) { System.arraycopy( offsets, computeKeyGroupIndex(intersection.getStartKeyGroup()), subOffsets, 0, subOffsets.length); } return new KeyGroupRangeOffsets(intersection, subOffsets); }
/** * Returns a key-group range with offsets which is the intersection of the internal key-group range with the given * key-group range. * * @param keyGroupRange Key-group range to intersect with the internal key-group range. * @return The key-group range with offsets for the intersection of the internal key-group range with the given * key-group range. */ public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { Preconditions.checkNotNull(keyGroupRange); KeyGroupRange intersection = this.keyGroupRange.getIntersection(keyGroupRange); long[] subOffsets = new long[intersection.getNumberOfKeyGroups()]; if(subOffsets.length > 0) { System.arraycopy( offsets, computeKeyGroupIndex(intersection.getStartKeyGroup()), subOffsets, 0, subOffsets.length); } return new KeyGroupRangeOffsets(intersection, subOffsets); }