pnowojski commented on code in PR #24784: URL: https://github.com/apache/flink/pull/24784#discussion_r1606882746
########## flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointCustomRescaleITCase.java: ########## @@ -0,0 +1,182 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.test.checkpointing; + +import org.apache.flink.api.common.JobID; +import org.apache.flink.api.common.JobStatus; +import org.apache.flink.api.common.functions.Partitioner; +import org.apache.flink.configuration.CheckpointingOptions; +import org.apache.flink.configuration.Configuration; +import org.apache.flink.core.fs.Path; +import org.apache.flink.runtime.jobgraph.JobGraph; +import org.apache.flink.runtime.jobgraph.SavepointRestoreSettings; +import org.apache.flink.runtime.minicluster.MiniCluster; +import org.apache.flink.runtime.minicluster.MiniClusterConfiguration; +import org.apache.flink.streaming.api.environment.CheckpointConfig; +import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; +import org.apache.flink.streaming.api.functions.sink.SinkFunction; +import org.apache.flink.util.FileUtils; + +import org.junit.After; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; + +import static org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.createLocalEnvironment; +import static org.junit.Assert.fail; + +/** Integration test for performing rescale of unaligned checkpoint with custom partitioner. */ +public class UnalignedCheckpointCustomRescaleITCase { Review Comment: > You could always most likely change the record type for UnalignedCheckpointRescaleITCase. String there should work just as fine, but that's probably more work vs option 1. I've just realised that I don't see any place in the `UnalignedCheckpointRescaleITCase` that hardcodes the type of the record. You can add a new `Topology` (`UnalignedCheckpointRescaleITCase.Topology`) that creates any JobGraph, so you can keep your proposed records format. Also I wouldn't mind if you re-used the same `LongSource`, but changed the record type from `Long` to some POJO of `Long` and `String payload` ``` public static class Record { private final long value; private final @Nullable String payload; (...) } ``` where `payload` length/size would be configurable, between 0 (`payload == null`) to whatever value you would configured (`3713`?). This way you won't be duplicating all of the setup code and you will leverage the same -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
