All checkpoints are managed by the Checkpoint Coordinator and deleted once
the job stops. You can use retained checkpoints [1] to keep them after job
termination. You can also use stop-with-savepoint to create a savepoint [2].

[1]
https://ci.apache.org/projects/flink/flink-docs-stable/ops/state/checkpoints.html#retained-checkpoints
[2]
https://ci.apache.org/projects/flink/flink-docs-release-1.12/ops/state/savepoints.html#cancel-job-with-savepoint

On Fri, Mar 19, 2021 at 2:53 PM Abdullah bin Omar <
[email protected]> wrote:

> Hi,
>
> I use the checkpoint configuration 10000 ms.
>
> env.getCheckpointConfig().setCheckpointTimeout(10000);
>
>
> used FSstatebackend to save the state
>
>    env.setStateBackend(*new* FsStateBackend(
> "file:///Users/username/Documents/checkpoint-save-java/checkpointing.txt"
> , *false*)); //here I tried both true and false
>
>
> After running the code,the job is finished. It gives a path in the
> checkpoint detail section of the apache flink UI:
>
>
> checkpoint detail:
>
> path:
> file:/Users/username/Documents/checkpoint-save-java/checkpointing.txt/7e6236fea7b572e6f06595ba11ec0eed
> /chk-58
>
> discarded: true
>
> checkpoint type: aligned checkpoint
>
>
> In Summary (of the checkpoint section of apache flink UI):
>
>
> End to End duration (for maximum): 133 ms
>
> Checkpointed data size: 2.82 KB
>
>
>
> Everything is okay. The code runs well. The job is finished, and the
> checkpoint interval is more than to complete each checkpoint.
>
>
>
> *Question:*
>
> *Why is discarded shown true? and why still there is no file appeared in
> the location of the FsStateBackend?*
>
>
>
> Thank you!
>
>
> Regards,
>
> Abdullah
>
> On Fri, Mar 19, 2021 at 8:26 AM Abdullah bin Omar <
> [email protected]> wrote:
>
>> Hi Yun,
>>
>> I use the checkpoint configuration 10000 ms.
>>
>> env.getCheckpointConfig().setCheckpointTimeout(10000);
>>
>>
>> used FSstatebackend to save the state
>>
>>    env.setStateBackend(*new* FsStateBackend(
>> "file:///Users/username/Documents/checkpoint-save-java/checkpointing.txt",
>> *false*)); //here I tried both true and false
>>
>>
>> After running the code,the job is finished. It gives a path in the
>> checkpoint detail section of the apache flink UI:
>>
>>
>> checkpoint detail:
>>
>> path:
>> file:/Users/username/Documents/checkpoint-save-java/checkpointing.txt/7e6236fea7b572e6f06595ba11ec0eed
>> /chk-58
>>
>> discarded: true
>>
>> checkpoint type: aligned checkpoint
>>
>>
>> In Summary (of the checkpoint section of apache flink UI):
>>
>>
>> End to End duration (for maximum): 133 ms
>>
>> Checkpointed data size: 2.82 KB
>>
>>
>>
>> Everything is okay. The code runs well. The job is finished, and the
>> checkpoint interval is more than to complete each checkpoint.
>>
>>
>>
>> *Question:*
>>
>> *Why is discarded shown true? and why still there is no file appeared in
>> the location of the FsStateBackend?*
>>
>>
>>
>> Thank you!
>>
>>
>> Regards,
>>
>> Abdullah
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Mar 17, 2021 at 9:16 AM Yun Tang <[email protected]> wrote:
>>
>>> Hi
>>>
>>> You could refer to [1] to know more details about checkpoint directory
>>> structure. If you are using FsStateBackend, all checkpointed data should be
>>> found under 'exclusive' folder, and nothing would exist if keyed state
>>> handle smaller than memory threshold [2] (checkpointed data would be sent
>>> to JM directly).
>>>
>>>
>>> [1]
>>> https://ci.apache.org/projects/flink/flink-docs-stable/ops/state/checkpoints.html#directory-structure
>>> [2]
>>> https://ci.apache.org/projects/flink/flink-docs-release-1.12/deployment/config.html#state-backend-fs-memory-threshold
>>>
>>> Best
>>> Yun Tang
>>> ------------------------------
>>> *From:* Abdullah bin Omar <[email protected]>
>>> *Sent:* Wednesday, March 17, 2021 17:41
>>> *To:* [email protected] <[email protected]>
>>> *Subject:* Saved State in FSstate Backend
>>>
>>> Hi,
>>>
>>> I used the FSstate backend to save the state. I just got a folder named
>>> similar to JobID (attached image). Inside the folder, there are two more
>>> folders named by shared and task owned. However, there is nothing in
>>> those folders.
>>>
>>> How can I see the saved state? or, where is the state saved?
>>>
>>> Thank you!
>>>
>>

Reply via email to