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 A75C4200C85 for ; Tue, 30 May 2017 16:00:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A5D12160BC9; Tue, 30 May 2017 14:00:35 +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 C7E23160BC1 for ; Tue, 30 May 2017 16:00:34 +0200 (CEST) Received: (qmail 23451 invoked by uid 500); 30 May 2017 14:00:28 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 23441 invoked by uid 99); 30 May 2017 14:00:28 -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; Tue, 30 May 2017 14:00:28 +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 7991CC04CA for ; Tue, 30 May 2017 14:00:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.397 X-Spam-Level: X-Spam-Status: No, score=-0.397 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, 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 u44bhCZ03_y8 for ; Tue, 30 May 2017 14:00:24 +0000 (UTC) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E59685FB71 for ; Tue, 30 May 2017 14:00:23 +0000 (UTC) Received: by mail-io0-f179.google.com with SMTP id f102so56607027ioi.2 for ; Tue, 30 May 2017 07:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=pid0Fso+s1DC6e8nrIBEXBUKCF9IqETPcqYzIJDo/tg=; b=Ydyz8e/nwc5Als3Ku9CyvtinJV5HG37wQux8P12rM9AlrZ1DUWNjEk6lkBfr91B0UT e0rTrx4xQ+cnUIvrzZZRSAgdpDe+hqRj1y0uMx4Xjilvj0pqrHxc0PFtAzCz/HS0rgAq 5ilJSvV3x/9wpsS5Yljmt6AAPmpYliZZICadeXhUTX/vszVMCD8OWJJ0Lq2Mm3C4kMQY XpmnCj8wjE0JODNb3MJNbpgH7xZF9xGlkmVo/Znj9zDsr59MGQYyVa1/+qGpGIppJGBw ieR8G44IakGHHDV8hfwyjfYuX7l45N39djuQh2QFVvz1J5Y9l9PlaxTXPFEJlQguVAmh 5FGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=pid0Fso+s1DC6e8nrIBEXBUKCF9IqETPcqYzIJDo/tg=; b=pFHwtoeBwc5lE1TRG0PyVzHRGyaY7SFg0AzssMxvntrF0VZiDOU9ctaf1Xwu6S083B cUa0+jmJzFF5SSsoP+G6vI6/go7NKT8oqtDMTr4AnBKJ4L08LzkBQkd66apoBb7HUxkn J9Gtno29VV2qGdm3tNto6yX0yZh4J3lXMTCJTk3GReDJwMknIUXG2RiHs+sCzKAMpHoc jI2s87A2/2Km97BEUIV1LE96czKSIgIoHgfiSyczE4TpHN8q7b0VHb3ubVvRsPst9uNd BieRKzx7fAw6IXcC+78ufzQ0DrRwSKHU9Iob0h4eR5CHD8tZ7cNFIwsLSKAWRYB2yE2i GHJg== X-Gm-Message-State: AODbwcB340Nef48mJ+8SxF9CVkilk4PjIZAM2Ty3kO0jJ19K0D0MkVHN qZqwIk9niKRdA5q0LVLm9D+B7ICR8UGL X-Received: by 10.107.138.193 with SMTP id c62mr19443649ioj.32.1496152821768; Tue, 30 May 2017 07:00:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.38.202 with HTTP; Tue, 30 May 2017 07:00:21 -0700 (PDT) From: =?UTF-8?B?0JDQu9C10LrRgdC10Lkg0KDRj9Cx0L7Qsg==?= Date: Tue, 30 May 2017 17:00:21 +0300 Message-ID: Subject: Cache size Ignite 2.0? To: user@ignite.apache.org Content-Type: multipart/alternative; boundary="001a113e8cbe78d78a0550be39f9" archived-at: Tue, 30 May 2017 14:00:35 -0000 --001a113e8cbe78d78a0550be39f9 Content-Type: text/plain; charset="UTF-8" Hello, i am trying to get the offHeap size of my cache. This code: try (Ignite ignite = Ignition.start()){ CacheConfiguration cfg = new CacheConfiguration<>(); cfg.setName("sample"); cfg.setStatisticsEnabled(true); cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED); IgniteCache cache = ignite.getOrCreateCache(cfg).withKeepBinary(); cache.clear(); for (int i=0; i<100; i++) { BinaryObjectBuilder builder = ignite.binary().builder("sample"); builder.setField("field1", i*1000); builder.setField("field2", i); cache.put(Integer.toString(i), builder.build()); } System.out.println("statistics: " + cache.metrics().isStatisticsEnabled()); System.out.println(cache.metrics().getOffHeapAllocatedSize()); } catch (Exception e) { e.printStackTrace(); } works fine in Ignite version 1.9.0: ... [16:57:39] Topology snapshot [ver=1, servers=1, clients=0, CPUs=8, heap=3.5GB] statistics: true 11890 [16:57:39] Ignite node stopped OK [uptime=00:00:00:230] ... but in 2.0.0 (i commented cout line cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED)) methon getOffHeapAllocatedSize returns zero: ... [16:59:13] Topology snapshot [ver=1, servers=1, clients=0, CPUs=8, heap=3.5GB] statistics: true 0 [16:59:22] Ignite node stopped OK [uptime=00:00:08:965] ... Is there anything special that I should do in 2.0.0 to get the size of my cache? Thanks a lot, Aleksey. --001a113e8cbe78d78a0550be39f9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

i am trying to get the offHeap s= ize of my cache. This code:

try (Ignite ignite =3D Ignition.start()){
CacheConfiguration<String= , BinaryObject> cfg =3D new CacheConfiguration<>();
cfg.setName("sample");
= cfg.setStatisticsEnabled(true);
cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);

IgniteCache<String, BinaryObject> cache =3D ignite.ge= tOrCreateCache(cfg).withKeepBinary();
cache.clear();
for (int i=3D0; i<100; i++) = {
BinaryObjectBuilder builder =3D ignite.binary().builder("sample"); builder.setField("field1", i*1000);
builder.setField("field2", i);
cache.put(Integer.toString
(i), builder.build());
= }
System.out.println("statistics: " + cache.metrics().isStatisticsEn= abled());
System.out.println(cache.metrics().getOffHeapAllocate= dSize());
} catch (Exception e) {
e.printStackTrace();
}

works fine in Ignite=
 version 1.9.0:
...
[1=
6:57:39] Topology snapshot [ver=3D1, servers=3D1, clients=3D0, CPUs=3D8, he=
ap=3D3.5GB]
statistics: true
11890
[16:57:39] Ignite node stopped OK [uptime=3D00:00:00:230]
<= pre style=3D"color:rgb(0,0,0);font-family:"Courier New"">...
but in=
 2.0.0 (i commented cout line cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIE=
RED)) methon getOffHeapAllocatedSize returns zero:
...
[16:59:13] Topology snapshot [ver=3D1, servers=3D1, c=
lients=3D0, CPUs=3D8, heap=3D3.5GB]
statistics: true
0
[16:59:22] Ignite node stopped OK [uptime=3D00:00:08:965]
<= pre>...
Is there anything=
 special that I should do in 2.0.0 to get the size of my cache?

Thanks a l= ot,