@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof KeyGroupRangeOffsets)) { return false; } KeyGroupRangeOffsets that = (KeyGroupRangeOffsets) o; if (keyGroupRange != null ? !keyGroupRange.equals(that.keyGroupRange) : that.keyGroupRange != null) { return false; } return Arrays.equals(offsets, that.offsets); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof KeyGroupRangeOffsets)) { return false; } KeyGroupRangeOffsets that = (KeyGroupRangeOffsets) o; if (keyGroupRange != null ? !keyGroupRange.equals(that.keyGroupRange) : that.keyGroupRange != null) { return false; } return Arrays.equals(offsets, that.offsets); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof KeyGroupRangeOffsets)) { return false; } KeyGroupRangeOffsets that = (KeyGroupRangeOffsets) o; if (keyGroupRange != null ? !keyGroupRange.equals(that.keyGroupRange) : that.keyGroupRange != null) { return false; } return Arrays.equals(offsets, that.offsets); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof KeyGroupRangeOffsets)) { return false; } KeyGroupRangeOffsets that = (KeyGroupRangeOffsets) o; if (keyGroupRange != null ? !keyGroupRange.equals(that.keyGroupRange) : that.keyGroupRange != null) { return false; } return Arrays.equals(offsets, that.offsets); }
@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; }
void restore(Collection<KeyedStateHandle> restoreStateHandles) throws Exception { boolean hasExtraKeys = (restoreStateHandles.size() > 1 || !restoreStateHandles.iterator().next().getKeyGroupRange().equals(stateBackend.keyGroupRange)); if (hasExtraKeys) { stateBackend.createDB(); } for (KeyedStateHandle rawStateHandle : restoreStateHandles) { if (! (rawStateHandle instanceof IncrementalKeyedStateHandle)) { throw new IllegalStateException("Unexpected state handle type, " + "expected " + IncrementalKeyedStateHandle.class + ", but found " + rawStateHandle.getClass()); } IncrementalKeyedStateHandle keyedStateHandle = (IncrementalKeyedStateHandle) rawStateHandle; restoreInstance(keyedStateHandle, hasExtraKeys); } } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DirectoryKeyedStateHandle that = (DirectoryKeyedStateHandle) o; if (!getDirectoryStateHandle().equals(that.getDirectoryStateHandle())) { return false; } return getKeyGroupRange().equals(that.getKeyGroupRange()); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DirectoryKeyedStateHandle that = (DirectoryKeyedStateHandle) o; if (!getDirectoryStateHandle().equals(that.getDirectoryStateHandle())) { return false; } return getKeyGroupRange().equals(that.getKeyGroupRange()); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DirectoryKeyedStateHandle that = (DirectoryKeyedStateHandle) o; if (!getDirectoryStateHandle().equals(that.getDirectoryStateHandle())) { return false; } return getKeyGroupRange().equals(that.getKeyGroupRange()); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } IncrementalKeyedStateSnapshot that = (IncrementalKeyedStateSnapshot) o; if (getCheckpointId() != that.getCheckpointId()) { return false; } if (!keyGroupRange.equals(that.getKeyGroupRange())) { return false; } if (!getSharedState().equals(that.getSharedState())) { return false; } if (!getPrivateState().equals(that.getPrivateState())) { return false; } return getMetaStateHandle().equals(that.getMetaStateHandle()); }
(ref, alt) -> ref.getKeyGroupRange().equals(alt.getKeyGroupRange());
/** * This method is should only be called in tests! This should never serve as key in a hash map. */ @VisibleForTesting @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } IncrementalKeyedStateHandle that = (IncrementalKeyedStateHandle) o; if (getCheckpointId() != that.getCheckpointId()) { return false; } if (!getBackendIdentifier().equals(that.getBackendIdentifier())) { return false; } if (!getKeyGroupRange().equals(that.getKeyGroupRange())) { return false; } if (!getSharedState().equals(that.getSharedState())) { return false; } if (!getPrivateState().equals(that.getPrivateState())) { return false; } return getMetaStateHandle().equals(that.getMetaStateHandle()); }
/** * This method is should only be called in tests! This should never serve as key in a hash map. */ @VisibleForTesting @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } IncrementalKeyedStateHandle that = (IncrementalKeyedStateHandle) o; if (getCheckpointId() != that.getCheckpointId()) { return false; } if (!getBackendIdentifier().equals(that.getBackendIdentifier())) { return false; } if (!getKeyGroupRange().equals(that.getKeyGroupRange())) { return false; } if (!getSharedState().equals(that.getSharedState())) { return false; } if (!getPrivateState().equals(that.getPrivateState())) { return false; } return getMetaStateHandle().equals(that.getMetaStateHandle()); }
(ref, alt) -> ref.getKeyGroupRange().equals(alt.getKeyGroupRange());
/** * This method is should only be called in tests! This should never serve as key in a hash map. */ @VisibleForTesting @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } IncrementalKeyedStateHandle that = (IncrementalKeyedStateHandle) o; if (getCheckpointId() != that.getCheckpointId()) { return false; } if (!getBackendIdentifier().equals(that.getBackendIdentifier())) { return false; } if (!getKeyGroupRange().equals(that.getKeyGroupRange())) { return false; } if (!getSharedState().equals(that.getSharedState())) { return false; } if (!getPrivateState().equals(that.getPrivateState())) { return false; } return getMetaStateHandle().equals(that.getMetaStateHandle()); }
/** * This method is should only be called in tests! This should never serve as key in a hash map. */ @VisibleForTesting @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } IncrementalKeyedStateHandle that = (IncrementalKeyedStateHandle) o; if (getCheckpointId() != that.getCheckpointId()) { return false; } if (!getBackendIdentifier().equals(that.getBackendIdentifier())) { return false; } if (!getKeyGroupRange().equals(that.getKeyGroupRange())) { return false; } if (!getSharedState().equals(that.getSharedState())) { return false; } if (!getPrivateState().equals(that.getPrivateState())) { return false; } return getMetaStateHandle().equals(that.getMetaStateHandle()); }
(ref, alt) -> ref.getKeyGroupRange().equals(alt.getKeyGroupRange());