class CompletedCheckpoint implements Serializable {

	public static boolean checkpointsMatch(
		Collection<CompletedCheckpoint> first,
		Collection<CompletedCheckpoint> second) {
		if (first.size() != second.size()) {
			return false;
		}

		List<Tuple2<Long, JobID>> firstInterestingFields = new ArrayList<>(first.size());

		for (CompletedCheckpoint checkpoint : first) {
			firstInterestingFields.add(
				new Tuple2<>(checkpoint.getCheckpointID(), checkpoint.getJobId()));
		}

		List<Tuple2<Long, JobID>> secondInterestingFields = new ArrayList<>(second.size());

		for (CompletedCheckpoint checkpoint : second) {
			secondInterestingFields.add(
				new Tuple2<>(checkpoint.getCheckpointID(), checkpoint.getJobId()));
		}

		return firstInterestingFields.equals(secondInterestingFields);
	}

	public  CompletedCheckpoint(
			JobID job,
			long checkpointID,
			long timestamp,
			long completionTimestamp,
			Map<OperatorID, OperatorState> operatorStates,
			@Nullable Collection<MasterState> masterHookStates,
			CheckpointProperties props,
			CompletedCheckpointStorageLocation storageLocation);

}