You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Matthias Niehoff <ma...@codecentric.de> on 2017/04/17 12:13:03 UTC

Invalidating/Remove complete mapWithState state

Hi everybody,

is there a way to complete invalidate or remove the state used by
mapWithState, not only for a given key using State#remove()?

Deleting the state key by key is not an option, as a) not all possible keys
are known(might be work around of course) and b) the number of keys is to
big and therefore takes to long.

I tried to unpersist the RDD retrieved by stateSnapshot (
stateSnapshots().transform(_.unpersist()) ) , but this did not work as
expected.

Thank you,

Matthias
-- 
Matthias Niehoff | IT-Consultant | Agile Software Factory | Consulting
codecentric AG | Hochstraße 11 | 42697 Solingen | Deutschland
telefon: +49 (0) 1721702676 <%2B49%20%280%29%20172.1702676>
www.codecentric.de | blog.codecentric.de | www.meettheexperts.de

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche
und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige
Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie
bitte sofort den Absender und löschen Sie diese E-Mail und evtl.
beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen
evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet

Re: Invalidating/Remove complete mapWithState state

Posted by Matthias Niehoff <ma...@codecentric.de>.
That would be the hard way, but if possible I want to clear the cache
without stopping the application, maybe triggered by a message in the
stream.

Am 17. April 2017 um 19:41 schrieb ayan guha <gu...@gmail.com>:

> It sounds like you want to stop the stream process, wipe out the check
> point and restart?
>
> On Mon, 17 Apr 2017 at 10:13 pm, Matthias Niehoff <
> matthias.niehoff@codecentric.de> wrote:
>
>> Hi everybody,
>>
>> is there a way to complete invalidate or remove the state used by
>> mapWithState, not only for a given key using State#remove()?
>>
>> Deleting the state key by key is not an option, as a) not all possible
>> keys are known(might be work around of course) and b) the number of keys is
>> to big and therefore takes to long.
>>
>> I tried to unpersist the RDD retrieved by stateSnapshot (
>> stateSnapshots().transform(_.unpersist()) ) , but this did not work as
>> expected.
>>
>> Thank you,
>>
>> Matthias
>> --
>> Matthias Niehoff | IT-Consultant | Agile Software Factory | Consulting
>> codecentric AG | Hochstraße 11 | 42697 Solingen | Deutschland
>> telefon: +49 (0) 1721702676 <%2B49%20%280%29%20172.1702676>
>> www.codecentric.de | blog.codecentric.de | www.meettheexperts.de
>>
>> Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
>> Vorstand: Michael Hochgürtel . Rainer Vehns
>> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen
>> Schütz
>>
>> Diese E-Mail einschließlich evtl. beigefügter Dateien enthält
>> vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht
>> der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
>> informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail und
>> evtl. beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder
>> Öffnen evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser
>> E-Mail ist nicht gestattet
>>
> --
> Best Regards,
> Ayan Guha
>



-- 
Matthias Niehoff | IT-Consultant | Agile Software Factory | Consulting
codecentric AG | Hochstraße 11 | 42697 Solingen | Deutschland
telefon: +49 (0) 1721702676 <%2B49%20%280%29%20172.1702676>
www.codecentric.de | blog.codecentric.de | www.meettheexperts.de

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche
und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige
Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie
bitte sofort den Absender und löschen Sie diese E-Mail und evtl.
beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen
evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet

Re: Invalidating/Remove complete mapWithState state

Posted by ayan guha <gu...@gmail.com>.
It sounds like you want to stop the stream process, wipe out the check
point and restart?

On Mon, 17 Apr 2017 at 10:13 pm, Matthias Niehoff <
matthias.niehoff@codecentric.de> wrote:

> Hi everybody,
>
> is there a way to complete invalidate or remove the state used by
> mapWithState, not only for a given key using State#remove()?
>
> Deleting the state key by key is not an option, as a) not all possible
> keys are known(might be work around of course) and b) the number of keys is
> to big and therefore takes to long.
>
> I tried to unpersist the RDD retrieved by stateSnapshot (
> stateSnapshots().transform(_.unpersist()) ) , but this did not work as
> expected.
>
> Thank you,
>
> Matthias
> --
> Matthias Niehoff | IT-Consultant | Agile Software Factory | Consulting
> codecentric AG | Hochstraße 11 | 42697 Solingen | Deutschland
> telefon: +49 (0) 1721702676 <%2B49%20%280%29%20172.1702676>
> www.codecentric.de | blog.codecentric.de | www.meettheexperts.de
>
> Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> Vorstand: Michael Hochgürtel . Rainer Vehns
> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz
>
> Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche
> und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige
> Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie
> bitte sofort den Absender und löschen Sie diese E-Mail und evtl.
> beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen
> evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist
> nicht gestattet
>
-- 
Best Regards,
Ayan Guha