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 DD06E200CC5 for ; Tue, 11 Jul 2017 15:33:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5D531165E8C; Tue, 11 Jul 2017 13:33:47 +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 2F7BC165E89 for ; Tue, 11 Jul 2017 15:33:46 +0200 (CEST) Received: (qmail 32165 invoked by uid 500); 11 Jul 2017 13:33:40 -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 32155 invoked by uid 99); 11 Jul 2017 13:33:40 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2017 13:33:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id CB5A4182132 for ; Tue, 11 Jul 2017 13:33:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.646 X-Spam-Level: X-Spam-Status: No, score=-0.646 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_H2=-2.796, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id GK8_rxmnSEPY for ; Tue, 11 Jul 2017 13:33:37 +0000 (UTC) Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 558256246A for ; Tue, 11 Jul 2017 13:15:51 +0000 (UTC) Received: by mail-wr0-f177.google.com with SMTP id r103so183266999wrb.0 for ; Tue, 11 Jul 2017 06:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=fsilmkcc7Upbz4QgqP3/+mHrG6z+gbLW3WiquEKLiEg=; b=FhnDIbQCWUpZh+sNfcVRCg6Iyp9VUS/3WdmRV9J7vzuzd+zSSv0yFwMH1Hm3mpNmse 6wemARpIl6j+0lMzdolRzKTIYS8w4DLVNKCeLiflZxxVnFtWOxPWbIwJ++CWTpxTnBgr leG41Qkef8sjoHqdB4/pPZdpD6sBDlgqS8NbA00wO8G/Acfu3172H2JdSEuiJEDgv1Vq 1ju0tNlYRwke0L86U1p/8+enFkgv2Z+qAKvUcdQ+3TDhe+7IzenMpoJ4xm5mv9zEbJdv z6f7QHIS8Kp0+k8uv/O6fsOV04/fnkaAGkWwFlV6epIrCKTybs27MRugwp7ilU1llMV0 OFbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=fsilmkcc7Upbz4QgqP3/+mHrG6z+gbLW3WiquEKLiEg=; b=hS2ZcEoeAz+px0xD2S5FSfNAXkKFIRs0HoReHE4PXQ0T0QZHFq5ns/oLxk9DjrtMUE f7R6Ix2t9maRWxJNwc7qq9XtSkuXQGUxXwSyWHX/dub7vTD+yL65J67wlAOoPM+EUglW C3WvU/IqFaB4MZmNLZCJGMJjmNmnaR4K5Wsx5lNeHOEZVXR8bJWgoFRugBlIQLZiz1vU 9d4/a6NF9hOcumJqQByRGbly3iaao4kv9hqpUysEQpKXdsrI6kIgNFSKGX4EzFHcu6CR K3E+Rd1EeCAx6kQRQBAR3hoXdeKYz5f28Cn7DdeHqVjHIdt1DvK3eyOlUohATt/mzDpH +3cg== X-Gm-Message-State: AIVw110NiHaQ4eAqodxS+iFLheKl7o/m2v7CoyXi6F89yn7ZlnYFtJz1 yZ+lRGJFJMlLa0LMD5nlbKTYew3COe5z X-Received: by 10.28.54.65 with SMTP id d62mr11452204wma.85.1499778950779; Tue, 11 Jul 2017 06:15:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.101.84 with HTTP; Tue, 11 Jul 2017 06:15:50 -0700 (PDT) In-Reply-To: <5EA5EFD9-190F-47B2-BDA9-D95861C5DB7B@gmail.com> References: <1499270215420-14330.post@n6.nabble.com> <1499341611964-14386.post@n6.nabble.com> <1499378598928-14423.post@n6.nabble.com> <1499455025176-14509.post@n6.nabble.com> <5EA5EFD9-190F-47B2-BDA9-D95861C5DB7B@gmail.com> From: Mimmo Celano Date: Tue, 11 Jul 2017 15:15:50 +0200 Message-ID: Subject: Re: Ignite Information To: user@ignite.apache.org Content-Type: multipart/alternative; boundary="001a1143667e9a69b805540a7f56" archived-at: Tue, 11 Jul 2017 13:33:50 -0000 --001a1143667e9a69b805540a7f56 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi thanks for the reply. We can't filter data. public class NodeFilter implements IgnitePredicate { private static final long serialVersionUID =3D 0L; public NodeFilter() { System.out.println("Start NodeFilter"); } @Override public boolean apply(ClusterNode node) { System.out.println(""+node.attribute("id")); Map nodeAttrs =3D node.attributes(); System.out.println("Attr =3D "+nodeAttrs.get("id").toString()); return true; } } This is the class Filter, which print just information about the node attributes. Node attributes are added in xml config file 127.0.0.1:47500..47509 192.168.30.5:47500..47509 192.168.30.22:47500..47509 192.168.30.99:47500..47509 We set it to cache configuration Ignition.setClientMode(true); ignite =3D Ignition.getOrStart(Ignition.loadSpringBean("/home/hduser/apache-ignite-2.0= .0-src/examples/config/example-cache1.xml", "ignite.cfg")); CacheConfiguration cfg2=3D Ignition.loadSpringBean("/home/hduser/apache-ignite-2.0.0-src/examples/conf= ig/example-cache1.xml", "cacheconf"); -->cfg2.setNodeFilter(new NodeFilter()); cache =3D ignite.getOrCreateCache(cfg2); but when we put data into the cache, the filter is not setted. The "println" in apply function is not starting, so the function is not called. The filter returns everytime true, it's just an example to test it. Are we doing something wrong about setting the filter? Thanks 2017-07-08 1:51 GMT+02:00 ignite_user2016 : > Thanks .. Val > > I will look at it in detail. > > > > Take Care, > Rishi > > On Jul 7, 2017, at 2:17 PM, vkulichenko [via Apache Ignite Users] <[hidde= n > email] > wrote= : > > You can read here about user attributes: https://apacheignite.readme. > io/docs/cluster#cluster-node-attributes > > For the node filter example, refer to JavaDoc: https://github.com/apache/ > ignite/blob/master/modules/core/src/main/java/org/apache/ignite/util/ > AttributeNodeFilter.java > > -Val > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://apache-ignite-users.70518.x6.nabble.com/Ignite- > Information-tp14330p14509.html > To start a new topic under Apache Ignite Users, email [hidden email] > > To unsubscribe from Apache Ignite Users, click here. > NAML > > > > ------------------------------ > View this message in context: Re: Ignite Information > > > Sent from the Apache Ignite Users mailing list archive > at Nabble.com. > --001a1143667e9a69b805540a7f56 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi thanks for the reply.

We can't f= ilter data.=C2=A0

public class NodeFilter imp= lements IgnitePredicate<ClusterNode> {
=C2=A0 =C2=A0
<= div> private static final long seria= lVersionUID =3D 0L;

=C2=A0 =C2=A0 public NodeFilter() {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 System.out.println("Start NodeFilter");
=C2=A0 =C2=A0 }

=C2=A0 =C2=A0 @Override publ= ic boolean apply(ClusterNode node) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 System.out.println(""+node.attribute("id&qu= ot;));
=C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Map<String, Object> nodeAttrs =3D node.attribut= es();

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Sy= stem.out.println("Attr =3D "+nodeAttrs.get("id").toStri= ng());
=C2=A0 =C2=A0 =C2=A0 =C2=A0
return true;<= /div>
=C2=A0 =C2=A0 }
}


This is the class Filter, which print just information about the n= ode attributes.

Node attributes are added in xml c= onfig file

<bean id=3D"ignite.cfg&quo= t; class=3D"org.apache.ignite.configuration.IgniteConfiguration"&= gt;

=C2=A0 =C2=A0 =C2=A0 =C2=A0 <!-- Explicitly= configure TCP discovery SPI to provide list of initial nodes. -->
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"discoverySpi&quo= t;>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <bean class= =3D"org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property = name=3D"ipFinder">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <!--
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Ignite p= rovides several options for automatic discovery that can be used
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 instead os static IP based discovery. For information on all opt= ions refer
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 to our documentation: http://apacheignite.readme.io/docs= /cluster-config
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 -->
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <!-- Uncomment static IP finder t= o enable static-based discovery of initial nodes. -->
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <!--<b= ean class=3D"org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscov= eryVmIpFinde$
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 <bean class=3D"org.apache.ignite.spi.discovery= .tcp.ipfinder.multicast.TcpDiscoveryMultic$
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <property= name=3D"addresses">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <list= >
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <!-- In distributed= environment, replace with actual host IP address. -->
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <value>127.0.0.1:47500..47509</val= ue>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <value>192.16= 8.30.5:47500..47509</value>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 <value>192.168.30.22:47500..47509</value>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <value>192.168.30.99:47500..47509&= lt;/value>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </list>
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 </property>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </bean>
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </property>
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </bean>
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 </property>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 &= lt;property name=3D"peerClassLoadingEnabled" value=3D"true&q= uot;/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <property name=3D"u= serAttributes">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 <map>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <entry key=3D"id"= ; value=3D"uno"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0</map>
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 </property>
=C2=A0 =C2=A0 </bean>

We set it to cache configuration

<= /div>
=C2=A0 =C2=A0 =C2=A0Ignition.setClientMode(true);
= =C2=A0 =C2=A0 =C2=A0ignite =3D Ignition.getOrStart(Ignition.loadSpringBean(= "/home/hduser/apache-ignite-2.0.0-src/examples/config/example-cache1.x= ml", "ignite.cfg"));
=C2=A0 =C2=A0 =C2=A0CacheConfiguration<String,Lon= g> cfg2=3D Ignition.loadSpringBean("/home/hduser/apache-ignite-2.0.= 0-src/examples/config/example-cache1.xml", "cacheconf");
-->cfg2.setNodeFilter(new= NodeFilter());=C2=A0
=C2=A0 =C2=A0 =C2=A0cache =3D ignite.getOrC= reateCache(cfg2);

but when we put data into = the cache, the filter is not setted. The "println" in apply funct= ion is not starting, so the function is not called.=C2=A0
The fil= ter returns everytime true, it's just an example to test it.
=

Are we doing something wrong about setting th= e filter?

Thanks

2017-07-08 1:51 GMT+02:00 ignite_user20= 16 <rishiyagnik@gmail.com>:
Thanks .. Val

I will l= ook at it in detail.



Take= Care,
Rishi

On Jul 7, 2017, a= t 2:17 PM, vkulichenko [via Apache Ignite Users] <[hidden email]> wrote:

You can read here about user attributes: https://apacheignite.readme.io/docs/cluster#c= luster-node-attributes

For the node filter example, refer t= o JavaDoc: https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite= /util/AttributeNodeFilter.java

-Val =09 =09 =09


If you reply to this email, your message = will be added to the discussion below:
http://apache-ignite-users.70518.x6.nabble.com/Ignite-Informati= on-tp14330p14509.html
To start a new topic under Apache Ignite Users, email [hidden email]
To unsubscribe from Apache Ignite Users, click here.
NAML
=09 =09 =09

View this message in context: Re: I= gnite Information

Sent from the Apache Ignite Users mailing list archive at Nabble.com= .

--001a1143667e9a69b805540a7f56--