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 9EB79200BB7 for ; Wed, 9 Nov 2016 13:18:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9D599160AFD; Wed, 9 Nov 2016 12:18:00 +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 E2EB0160AEE for ; Wed, 9 Nov 2016 13:17:59 +0100 (CET) Received: (qmail 83786 invoked by uid 500); 9 Nov 2016 12:17:58 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 83772 invoked by uid 99); 9 Nov 2016 12:17:58 -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; Wed, 09 Nov 2016 12:17:58 +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 C8AE9C2051 for ; Wed, 9 Nov 2016 12:17:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.629 X-Spam-Level: ** X-Spam-Status: No, score=2.629 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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 aip8B2dvrS36 for ; Wed, 9 Nov 2016 12:17:55 +0000 (UTC) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 1595A5F1B8 for ; Wed, 9 Nov 2016 12:17:55 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id t79so296842119wmt.0 for ; Wed, 09 Nov 2016 04:17:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=cC7VHDQ0cqq+Pj59sybHVQUdFjhJ6uYoj2yCRw2M9IU=; b=MK1l18cQWXt+e3pJwGP+YUqPG5hV5iFAskuY9Hjil7D9u5COYp72S0I+ue5gCo9DJx G0fYVrafoyC494uXznK+QATYfd6EwyXGvXoURdW42me3QYAVL2yucmTPppiYiMQcZ071 HWdoCPA9eZjgTpReK71n9H9bkmHTZwXURtZtLxFqBrb80UHA5OHSgZoUIQf49kycsEZV CNh9KQGPXANnRrKzVqUi8jsxHE8ZQMGRXCAqIDUIKTI6hPBz8LE8ZJMqj9IoaOk+h9za iLwsfK/HgcZNbAJWouXC/wnirhOUZMZCQChiho0JBUAbUj1U0ypOQktG9Ozk/5XdMD+H PITA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=cC7VHDQ0cqq+Pj59sybHVQUdFjhJ6uYoj2yCRw2M9IU=; b=YqL3pF3ie7n9hMGbi3EGhg55WqQK9A5oTYdcj10d/OThZou9Bg0SnUXbEa+RXWPod8 R2XUXfJVq94rD9930Qw/NvxU3Tyzsfs+jmmio+z0RRQVIN+uSgM/W6eu3a9MkQZCbzru gp0XVT71ZhaA9Ss67Otx0O5s8Ln0vHqj8r2VBseAoG8lSaNwYgzDtwombVxmFxf4CP3k 6WVKy+x3KqL3caw0Z1dOrhphW/GGXOOoQco7wsQ9gyS/gSxVU10PBMR8XsF7RuUcyU6s +qnFMzHGvTMtNse0BU6++6CPXOw7rCAYDVMEscatjfGE0VuiwSBzVbpjtygCHodH7Hti mtng== X-Gm-Message-State: ABUngvc8aRfrYCa+YRkSzDZ0OmFpRpxI1QQJmdtH9nSFvugHmE8nrKdA6VqfE9o6dS1CaNDZKxO24OAGELjKxA== X-Received: by 10.194.71.69 with SMTP id s5mr12957521wju.197.1478693874426; Wed, 09 Nov 2016 04:17:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.50.197 with HTTP; Wed, 9 Nov 2016 04:17:53 -0800 (PST) From: Ali Akhtar Date: Wed, 9 Nov 2016 17:17:53 +0500 Message-ID: Subject: Having Counters in a Collection, like a map? To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=047d7bd91f421de8740540dd3f0e archived-at: Wed, 09 Nov 2016 12:18:00 -0000 --047d7bd91f421de8740540dd3f0e Content-Type: text/plain; charset=UTF-8 I have a use-case where I need to have a dynamic number of counters. The easiest way to do this would be to have a map where the int is the key, and the counter is the value which is incremented / decremented. E.g if something related to 5 happened, then i'd get the counter for 5 and increment / decrement it. I also need to have multiple maps of this type, where each int is a key referring to something different. Is there a way to do this in c* which doesn't require creating 1 table per type of map that i need? --047d7bd91f421de8740540dd3f0e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have a use-case where I need to have a dynamic number of= counters.

The easiest way to do this would be to have a= map<int, counter> where the int is the key, and the counter is the v= alue which is incremented / decremented. E.g if something related to 5 happ= ened, then i'd get the counter for 5 and increment / decrement it.

I also need to have multiple map<int, counter>s = of this type, where each int is a key referring to something different.

Is there a way to do this in c* which doesn't req= uire creating 1 table per type of map<int, counter> that i need?
--047d7bd91f421de8740540dd3f0e--