apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bright chen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (APEXMALHAR-2193) Implement SpillableByteArrayListMultimapImpl.remove(@Nullable Object key, @Nullable Object value)
Date Fri, 19 Aug 2016 23:48:23 GMT

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

bright chen commented on APEXMALHAR-2193:
-----------------------------------------

actually remove an entry would be very heavy as it only need need to remove from memory but
also need to remove the entry from files too. As the get operation will get from memory first
and then files.

suggest solutions
- Add the flag 'deleted' in the entry. so when delete an entry, just set this flag to true.
When get, get the entry and check the flag and return null if 'deleted' flag set.

- Add another spillable set ( which can be implemented by spillable map from key to deleted)
just for deleted keys. when get, check the deleted keys, if deleted, return null; else get
from the real map; when put, set the value("deleted") of deleted map to false ( same idea
as solution 1) and put to real map; when delete, set the value("deleted") of deleted map to
true.  For multimap, generate deleted map key from origin key and value.

> Implement SpillableByteArrayListMultimapImpl.remove(@Nullable Object key, @Nullable Object
value)
> -------------------------------------------------------------------------------------------------
>
>                 Key: APEXMALHAR-2193
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-2193
>             Project: Apache Apex Malhar
>          Issue Type: Sub-task
>            Reporter: David Yan
>            Assignee: David Yan
>
> This is needed by SpillableSessionWindowedStorage. It needs a way to remove the session
window given the key in its internal keyToWindowsMap



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message