[jira] [Updated] (FLINK-10343) Expose setCurrentKey method to streamRuntimeContext

2018-11-18 Thread Till Rohrmann (JIRA)


 [ 
https://issues.apache.org/jira/browse/FLINK-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Till Rohrmann updated FLINK-10343:
--
Fix Version/s: (was: 1.7.0)

> Expose setCurrentKey method to streamRuntimeContext
> ---
>
> Key: FLINK-10343
> URL: https://issues.apache.org/jira/browse/FLINK-10343
> Project: Flink
>  Issue Type: Improvement
>  Components: Streaming
>Affects Versions: 1.7.0
>Reporter: aitozi
>Assignee: aitozi
>Priority: Major
> Fix For: 1.8.0
>
>
> when we use reducing state / aggregating keyed state and so on , we have to 
> read value from state backend and update the value with userFunction and then 
> put back to state backend. If we can just cache certain data in heap with a 
> map, and update once in snapshot method with 
> {code:java}
> snapshot() {
>  for(Map.Entry entry : map.entrySet()){
>  setCurrentKey(entry.getKey());
>  valueState.update(entry.getValue()); // put value back to state backend
> }}
> {code}
> we just have to expose the setCurrentKey to userFunction and the will enable 
> the ability to cache partitial keyedState in memory by userself.
> what's your opinion [~stefanrichte...@gmail.com] [~azagrebin] ? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (FLINK-10343) Expose setCurrentKey method to streamRuntimeContext

2018-11-18 Thread Till Rohrmann (JIRA)


 [ 
https://issues.apache.org/jira/browse/FLINK-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Till Rohrmann updated FLINK-10343:
--
Fix Version/s: 1.8.0

> Expose setCurrentKey method to streamRuntimeContext
> ---
>
> Key: FLINK-10343
> URL: https://issues.apache.org/jira/browse/FLINK-10343
> Project: Flink
>  Issue Type: Improvement
>  Components: Streaming
>Affects Versions: 1.7.0
>Reporter: aitozi
>Assignee: aitozi
>Priority: Major
> Fix For: 1.7.0, 1.8.0
>
>
> when we use reducing state / aggregating keyed state and so on , we have to 
> read value from state backend and update the value with userFunction and then 
> put back to state backend. If we can just cache certain data in heap with a 
> map, and update once in snapshot method with 
> {code:java}
> snapshot() {
>  for(Map.Entry entry : map.entrySet()){
>  setCurrentKey(entry.getKey());
>  valueState.update(entry.getValue()); // put value back to state backend
> }}
> {code}
> we just have to expose the setCurrentKey to userFunction and the will enable 
> the ability to cache partitial keyedState in memory by userself.
> what's your opinion [~stefanrichte...@gmail.com] [~azagrebin] ? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (FLINK-10343) Expose setCurrentKey method to streamRuntimeContext

2018-09-13 Thread aitozi (JIRA)


 [ 
https://issues.apache.org/jira/browse/FLINK-10343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

aitozi updated FLINK-10343:
---
Description: 
when we use reducing state / aggregating keyed state and so on , we have to 
read value from state backend and update the value with userFunction and then 
put back to state backend. If we can just cache certain data in heap with a 
map, and update once in snapshot method with 

{code:java}
snapshot() {
 for(Map.Entry entry : map.entrySet()){
 setCurrentKey(entry.getKey());
 valueState.update(entry.getValue()); // put value back to state backend
}}
{code}

we just have to expose the setCurrentKey to userFunction and the will enable 
the ability to cache partitial keyedState in memory by userself.

what's your opinion [~stefanrichte...@gmail.com] [~azagrebin] ? 


  was:
when we use reducing state / aggregating keyed state and so on , we have to 
read value from state backend and update the value with userFunction and then 
put back to state backend. If we can just cache certain data in heap with a 
map, and update once in snapshot method with 

```
snapshot() {
 for(Map.Entry entry : map.entrySet()){
 setCurrentKey(entry.getKey());
 valueState.update(entry.getValue()); // put value back to state backend
}}
```
we just have to expose the setCurrentKey to userFunction and the will enable 
the ability to cache partitial keyedState in memory by userself.

what's your opinion [~stefanrichte...@gmail.com] [~azagrebin] ? 



> Expose setCurrentKey method to streamRuntimeContext
> ---
>
> Key: FLINK-10343
> URL: https://issues.apache.org/jira/browse/FLINK-10343
> Project: Flink
>  Issue Type: Improvement
>  Components: Streaming
>Affects Versions: 1.7.0
>Reporter: aitozi
>Assignee: aitozi
>Priority: Major
> Fix For: 1.7.0
>
>
> when we use reducing state / aggregating keyed state and so on , we have to 
> read value from state backend and update the value with userFunction and then 
> put back to state backend. If we can just cache certain data in heap with a 
> map, and update once in snapshot method with 
> {code:java}
> snapshot() {
>  for(Map.Entry entry : map.entrySet()){
>  setCurrentKey(entry.getKey());
>  valueState.update(entry.getValue()); // put value back to state backend
> }}
> {code}
> we just have to expose the setCurrentKey to userFunction and the will enable 
> the ability to cache partitial keyedState in memory by userself.
> what's your opinion [~stefanrichte...@gmail.com] [~azagrebin] ? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)