November 2018
Beginner to intermediate
260 pages
6h 12m
English
You can configure a node with specific attributes, similar to passing arguments to a JVM. The Apache Ignite clustering API provides a method to find cluster groups where a specific user-defined attribute is set. Now, launch a node with an attribute, 'FOO', and value, 'BAR', and set it in IgniteConfiguration:
public class NodeAttributeFoo { public static void main(String[] args) throws InterruptedException { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setPeerClassLoadingEnabled(true); HashMap<String, Object> userAttrb = new HashMap<>(); userAttrb.put("FOO", "BAR"); cfg.setUserAttributes(userAttrb); try (Ignite ignite = Ignition.start(cfg)) { while(true) { Thread.sleep(1000); } } }}
Create a program to send ...
Read now
Unlock full access