Abdullah, ReadRidesAndFaresSnapshot [1] is an example that shows how to use the State Processor API to display the contents of a snapshot taken while running RidesAndFaresSolution [2].
Hopefully that will help you get started. [1] https://github.com/ververica/flink-training/blob/master/state-processor/src/main/java/com/ververica/flink/training/exercises/ReadRidesAndFaresSnapshot.java [2] https://github.com/ververica/flink-training/blob/master/rides-and-fares/src/solution/java/org/apache/flink/training/solutions/ridesandfares/RidesAndFaresSolution.java Best regards, David On Fri, Apr 23, 2021 at 3:32 PM Abdullah bin Omar < abdullahbinoma...@gmail.com> wrote: > Hi, > > Thank you for your reply. > > I want to read the previous snapshot (if needed) at the time of operation. > In [1], there is a portion: > > DataSet<Integer> listState = savepoint.readListState<>( > "my-uid", > "list-state", > Types.INT); > > > here, will the function savepoint.readliststate<> () work to read the > previous snapshot? If it is, then is the filename of a savepoint file > similar to my-uid? > > [1] > https://ci.apache.org/projects/flink/flink-docs-stable/dev/libs/state_processor_api.html > > Thank you > > > > > On Fri, Apr 23, 2021 at 1:11 AM Matthias Pohl <matth...@ververica.com> > wrote: > >> What is it you're trying to achieve in general? The JavaDoc of >> MetadataV2V3SerializerBase provides a description on the format of the >> file. Theoretically, you could come up with custom code using the Flink >> sources to parse the content of the file. But maybe, there's another way to >> accomplish what you're trying to do. >> >> Matthias >> >> [1] >> https://github.com/apache/flink/blob/adaaed426c2e637b8e5ffa3f0d051326038d30aa/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/metadata/MetadataV2V3SerializerBase.java#L83 >> >> On Thu, Apr 22, 2021 at 7:53 PM Abdullah bin Omar < >> abdullahbinoma...@gmail.com> wrote: >> >>> Hi, >>> >>> I have a savepoint or checkpointed file from my task. However, the file >>> is binary. I want to see what the file contains. >>> >>> How is it possible to see what information the file has (or how it is >>> possible to make it human readable?) >>> >>> Thank you >>> >>> On Thu, Apr 22, 2021 at 10:19 AM Matthias Pohl <matth...@ververica.com> >>> wrote: >>> >>>> Hi Abdullah, >>>> the metadata file contains handles to the operator states of the >>>> checkpoint [1]. You might want to have a look into the State Processor API >>>> [2]. >>>> >>>> Best, >>>> Matthias >>>> >>>> [1] >>>> https://github.com/apache/flink/blob/adaaed426c2e637b8e5ffa3f0d051326038d30aa/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/metadata/MetadataV2V3SerializerBase.java#L83 >>>> [2] >>>> https://ci.apache.org/projects/flink/flink-docs-stable/dev/libs/state_processor_api.html >>>> >>>> On Thu, Apr 22, 2021 at 4:57 PM Abdullah bin Omar < >>>> abdullahbinoma...@gmail.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> (1) what 's the snapshot metadata file (binary) contains ? is it >>>>> possible to read the snapshot metadata file by using Flink >>>>> Deserialization? >>>>> >>>>> (2) is there any function that can be used to see the previous >>>>> states on time of operation? >>>>> >>>>> Thank you >>>>> >>>> >>