Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 90471200B77 for ; Sat, 20 Aug 2016 01:55:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8EA0D160AAC; Fri, 19 Aug 2016 23:55:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D6F76160AAB for ; Sat, 20 Aug 2016 01:55:07 +0200 (CEST) Received: (qmail 27445 invoked by uid 500); 19 Aug 2016 23:55:07 -0000 Mailing-List: contact dev-help@apex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apex.apache.org Delivered-To: mailing list dev@apex.apache.org Received: (qmail 27429 invoked by uid 99); 19 Aug 2016 23:55:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Aug 2016 23:55:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9F377C12D7 for ; Fri, 19 Aug 2016 23:55:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.739 X-Spam-Level: X-Spam-Status: No, score=-3.739 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.519] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id OFr0qwMVtFpa for ; Fri, 19 Aug 2016 23:55:06 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 415365F30E for ; Fri, 19 Aug 2016 23:55:05 +0000 (UTC) Received: (qmail 12544 invoked by uid 99); 19 Aug 2016 23:48:24 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Aug 2016 23:48:24 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1B9CB2C0154 for ; Fri, 19 Aug 2016 23:48:23 +0000 (UTC) Date: Fri, 19 Aug 2016 23:48:23 +0000 (UTC) From: "bright chen (JIRA)" To: dev@apex.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (APEXMALHAR-2193) Implement SpillableByteArrayListMultimapImpl.remove(@Nullable Object key, @Nullable Object value) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 19 Aug 2016 23:55:08 -0000 [ 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)