[ 
https://issues.apache.org/jira/browse/FLINK-39380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119739#comment-18119739
 ] 

sepuri sai krishna commented on FLINK-39380:
--------------------------------------------

[~autophagian] is this one still on your list, or open for someone else to pick 
up? Happy
either way, I just don't want to duplicate work while you are going through the 
other
subtasks.

If it is free I would like to take it. From reading FLIP-567 and the current 
harness, the
pieces a TestSnapshot needs look like they already exist:

{noformat}
  per-partition state      TestHarnessStateManager.stateByKey
  pending / fired timers   TestHarnessTimerManager.pendingTimersByPartition, 
firedTimers
  watermarks per table     TestHarnessTimerManager.watermarkByTable
  output rows              ProcessTableFunctionTestHarness.output, 
functionOutput
  harness metadata         arguments, defaultTableArgument, outputKind
{noformat}

Two things I would want your opinion on before writing anything:

1. FLIP-567 shows both {{Builder.restoreFromSnapshot(TestSnapshot)}} and a 
static
   {{ProcessTableFunctionTestHarness.restoreFromSnapshot(snapshot)}} in 
different places.
   Which did you intend, or both?
2. Whether the snapshot should deep-copy state values at snapshot() time. A 
shallow copy
   would let a mutable POJO state keep changing after the snapshot was taken, 
which would
   be surprising for the reusable-scenario use case the FLIP describes.


> Add support for test snapshotting/restoration to 
> ProcessTableFunctionTestHarness
> --------------------------------------------------------------------------------
>
>                 Key: FLINK-39380
>                 URL: https://issues.apache.org/jira/browse/FLINK-39380
>             Project: Flink
>          Issue Type: Sub-task
>            Reporter: Mika Naylor
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to