Skip to content

Instantly share code, notes, and snippets.

@KKcorps
Last active September 18, 2019 14:41
Show Gist options
  • Save KKcorps/4ffb6f565fd370caa872eae949884826 to your computer and use it in GitHub Desktop.
Save KKcorps/4ffb6f565fd370caa872eae949884826 to your computer and use it in GitHub Desktop.
public class TestCheckpointJob {
public static void main(String[] args) throws Exception {
bootstrapConfig();
//Rest same as previous code
}
}
static void bootstrapConfig() throws IOException {
ExecutionEnvironment executionEnvironment = ExecutionEnvironment.getExecutionEnvironment();
ExistingSavepoint existingSavepoint = Savepoint.load(executionEnvironment, "oldSavepointPath", new MemoryStateBackend());
BootstrapTransformation<TestConfig> configTransformation = getConfigTransformation(executionEnvironment);
String newSavepointPath = "newSavepointPath";
existingSavepoint.withOperator("classify_data", configTransformation).write(newSavepointPath);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment