[
https://issues.apache.org/jira/browse/BEAM-8550?focusedWorklogId=393658&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-393658
]
ASF GitHub Bot logged work on BEAM-8550:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Feb/20 17:58
Start Date: 26/Feb/20 17:58
Worklog Time Spent: 10m
Work Description: je-ik commented on pull request #8774: [BEAM-8550]
Requires time sorted input
URL: https://github.com/apache/beam/pull/8774#discussion_r384664775
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/ExecutableStageDoFnOperator.java
##########
@@ -938,4 +938,24 @@ private static void initializeUserState(
@ProcessElement
public void doNothing(ProcessContext context) {}
}
+
+ private static class Locker implements AutoCloseable {
+
+ public static Locker locked(Lock lock) {
+ Locker locker = new Locker(lock);
Review comment:
I agree, that these changes are not directly related to this PR and we can
revert them, if necessary.
If I recall correctly, these changes were part of debugging of state related
to [FLINK-12653](https://jira.apache.org/jira/browse/FLINK-12653). Just to add
context, why these changes are there.
Regarding performance, I think that this change cannot have any measurable
impact on performance, because creating object in eden space is pretty cheap in
current JVMs.
I agree that the `try` - `finally` is working just fine, the locker pattern
is just a safeguard to prevent someone forgetting add the `finally` clause.
But as I said, if these changes are undesirable, we can revert them.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 393658)
Time Spent: 11.5h (was: 11h 20m)
> @RequiresTimeSortedInput DoFn annotation
> ----------------------------------------
>
> Key: BEAM-8550
> URL: https://issues.apache.org/jira/browse/BEAM-8550
> Project: Beam
> Issue Type: New Feature
> Components: beam-model, sdk-java-core
> Reporter: Jan Lukavský
> Assignee: Jan Lukavský
> Priority: Major
> Fix For: 2.20.0
>
> Time Spent: 11.5h
> Remaining Estimate: 0h
>
> Implement new annotation {{@RequiresTimeSortedInput}} for stateful DoFn as
> described in [design
> document|https://docs.google.com/document/d/1ObLVUFsf1NcG8ZuIZE4aVy2RYKx2FfyMhkZYWPnI9-c/edit?usp=sharing].
> First implementation will assume that:
> - time is defined by timestamp in associated WindowedValue
> - allowed lateness is explicitly zero and all late elements are dropped
> (due to being out of order)
> The above properties are considered temporary and will be resolved by
> subsequent extensions (backwards compatible).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)