[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2018-01-05 Thread Tzu-Li (Gordon) Tai (JIRA)

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

Tzu-Li (Gordon) Tai commented on FLINK-8116:


Merged.

1.5.0: 7b5fdbd6501c33f74700d79aedc9411d160191ba
1.4.1: 1e637c54c2ad1b9a8d9ad6d3f9c8aa55605d7e8e

> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2018-01-05 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-8116:
---

Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/5121


> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-12-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-8116:
---

Github user tzulitai commented on the issue:

https://github.com/apache/flink/pull/5121
  
Thanks @ankitiitb1069 @ggevay for the work and review.
The changes LGTM, minus my comment. I'll address my comments while merging 
this ...


> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-12-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-8116:
---

Github user tzulitai commented on a diff in the pull request:

https://github.com/apache/flink/pull/5121#discussion_r157606375
  
--- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/SourceFunction.java
 ---
@@ -61,9 +61,9 @@
  *  isRunning = false;
  *  }
  *
- *  public Long snapshotState(long checkpointId, long 
checkpointTimestamp) { return count; }
+ *  public void snapshotState(FunctionSnapshotContext context) {  }
  *
- *  public void restoreState(Long state) { this.count = state; }
+ *  public void initializeState(FunctionInitializationContext context) 
{  }
--- End diff --

These methods should handle checkpointing of the count state.




> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-12-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-8116:
---

Github user tzulitai commented on a diff in the pull request:

https://github.com/apache/flink/pull/5121#discussion_r157606329
  
--- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/SourceFunction.java
 ---
@@ -61,9 +61,9 @@
  *  isRunning = false;
  *  }
  *
- *  public Long snapshotState(long checkpointId, long 
checkpointTimestamp) { return count; }
+ *  public void snapshotState(FunctionSnapshotContext context) {  }
--- End diff --

These methods should handle checkpointing of the `count` state.


> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-12-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-8116:
---

Github user ggevay commented on a diff in the pull request:

https://github.com/apache/flink/pull/5121#discussion_r155927615
  
--- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/SourceFunction.java
 ---
@@ -34,17 +34,17 @@
  * The run method can run for as long as necessary. The source must, 
however, react to an
  * invocation of {@link #cancel()} by breaking out of its main loop.
  *
- * Checkpointed Sources
+ * CheckpointedFunction Sources
  *
- * Sources that also implement the {@link 
org.apache.flink.streaming.api.checkpoint.Checkpointed}
+ * Sources that also implement the {@link 
org.apache.flink.streaming.api.checkpoint.CheckpointedFunction}
  * interface must ensure that state checkpointing, updating of internal 
state and emission of
  * elements are not done concurrently. This is achieved by using the 
provided checkpointing lock
  * object to protect update of state and emission of elements in a 
synchronized block.
  *
  * This is the basic pattern one should follow when implementing a 
(checkpointed) source:
  *
  * {@code
- *  public class ExampleSource implements SourceFunction, 
Checkpointed {
+ *  public class ExampleSource implements SourceFunction, 
CheckpointedFunction {
--- End diff --

You can see the function bodies here:

https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/stream/state/state.html#stateful-source-functions


> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-12-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-8116:
---

Github user ankitiitb1069 commented on a diff in the pull request:

https://github.com/apache/flink/pull/5121#discussion_r155877893
  
--- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/SourceFunction.java
 ---
@@ -34,17 +34,17 @@
  * The run method can run for as long as necessary. The source must, 
however, react to an
  * invocation of {@link #cancel()} by breaking out of its main loop.
  *
- * Checkpointed Sources
+ * CheckpointedFunction Sources
  *
- * Sources that also implement the {@link 
org.apache.flink.streaming.api.checkpoint.Checkpointed}
+ * Sources that also implement the {@link 
org.apache.flink.streaming.api.checkpoint.CheckpointedFunction}
  * interface must ensure that state checkpointing, updating of internal 
state and emission of
  * elements are not done concurrently. This is achieved by using the 
provided checkpointing lock
  * object to protect update of state and emission of elements in a 
synchronized block.
  *
  * This is the basic pattern one should follow when implementing a 
(checkpointed) source:
  *
  * {@code
- *  public class ExampleSource implements SourceFunction, 
Checkpointed {
+ *  public class ExampleSource implements SourceFunction, 
CheckpointedFunction {
--- End diff --

Please check, I have made the changes, but could not make up what to write 
inside of these functions


> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-12-05 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-8116:
---

Github user ggevay commented on a diff in the pull request:

https://github.com/apache/flink/pull/5121#discussion_r154906923
  
--- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/SourceFunction.java
 ---
@@ -34,17 +34,17 @@
  * The run method can run for as long as necessary. The source must, 
however, react to an
  * invocation of {@link #cancel()} by breaking out of its main loop.
  *
- * Checkpointed Sources
+ * CheckpointedFunction Sources
  *
- * Sources that also implement the {@link 
org.apache.flink.streaming.api.checkpoint.Checkpointed}
+ * Sources that also implement the {@link 
org.apache.flink.streaming.api.checkpoint.CheckpointedFunction}
  * interface must ensure that state checkpointing, updating of internal 
state and emission of
  * elements are not done concurrently. This is achieved by using the 
provided checkpointing lock
  * object to protect update of state and emission of elements in a 
synchronized block.
  *
  * This is the basic pattern one should follow when implementing a 
(checkpointed) source:
  *
  * {@code
- *  public class ExampleSource implements SourceFunction, 
Checkpointed {
+ *  public class ExampleSource implements SourceFunction, 
CheckpointedFunction {
--- End diff --

Could you please also update the methods of the class in the code examples? 
`snapshotState` and `restoreState` have changed with the interface change.


> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-12-04 Thread Ankit Parashar (JIRA)

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

Ankit Parashar commented on FLINK-8116:
---

Hi [~ggevay] , I have made the required changes, can you help me get started in 
contributing more in terms of functionalities, would really appreciate that.

Thanks & Regards,
Ankit Parashar

> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-12-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-8116:
---

GitHub user ankitiitb1069 opened a pull request:

https://github.com/apache/flink/pull/5121

[FLINK-8116] Stale comments referring to Checkpointed interface

## What is the purpose of the change

This pull request replaces the stale comments referring to Checkpointed 
interface with the new one defined as CheckpointedFunction interface

## Verifying this change

This change is a trivial rework / code cleanup without any test coverage


## Does this pull request potentially affect one of the following parts:

  - Dependencies (does it add or upgrade a dependency): no
  - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
  - The serializers: no
  - The runtime per-record code paths (performance sensitive): no
  - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: no
  - The S3 file system connector: no 

## Documentation

  - Does this pull request introduce a new feature?  no
  - If yes, how is the feature documented? not applicable 


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ankitiitb1069/flink master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/5121.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #5121


commit 9d9bb2fc814f061caadfa1fe28a2734ecb2482eb
Author: Ankit Parashar 
Date:   2017-12-04T18:16:16Z

[FLINK-8116] Stale comments referring to Checkpointed interface




> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-11-26 Thread Gabor Gevay (JIRA)

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

Gabor Gevay commented on FLINK-8116:


Hi,

The mentions of the Checkpointed interface need to be upgraded. Here is a 
relevant section in the docs, which explains the change of interfaces between 
1.1 ans 1.2:
https://ci.apache.org/projects/flink/flink-docs-master/dev/migration.html#rescaling-and-new-state-abstractions

I suggest using Ctrl+Shift+F in IntelliJ to find all stale mentions of the 
Checkpointed interface.

Btw. you can also check out some old commit in git, if you would like to look 
at how things were in 1.1.

I also suggest reading this contributor guide:
https://flink.apache.org/contribute-code.html

> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-8116) Stale comments referring to Checkpointed interface

2017-11-25 Thread Ankit Parashar (JIRA)

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

Ankit Parashar commented on FLINK-8116:
---

Hi,
I would like to work on this issue, would really appreciate if someone can 
guide me on this.

> Stale comments referring to Checkpointed interface
> --
>
> Key: FLINK-8116
> URL: https://issues.apache.org/jira/browse/FLINK-8116
> Project: Flink
>  Issue Type: Bug
>  Components: DataStream API, Documentation
>Reporter: Gabor Gevay
>Priority: Trivial
>  Labels: starter
> Fix For: 1.5.0
>
>
> Between Flink 1.1 and 1.2, the {{Checkpointed}} interface was superseded by 
> the {{CheckpointedFunction}} interface.
> However, in {{SourceFunction}} there are two comments still referring to the 
> old {{Checkpointed}} interface. (The code examples there also need to be 
> modified.)
> Note that the problem also occurs in {{StreamExecutionEnvironment}}, and 
> possibly other places as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)