Codota Logo
ClusterGroup.forDataNodes
Code IndexAdd Codota to your IDE (free)

How to use
forDataNodes
method
in
org.apache.ignite.cluster.ClusterGroup

Best Java code snippets using org.apache.ignite.cluster.ClusterGroup.forDataNodes (Showing top 5 results out of 315)

  • Common ways to obtain ClusterGroup
private void myMethod () {
ClusterGroup c =
  • Codota IconIgnite ignite;ignite.cluster().forRemotes()
  • Codota IconIgnite ignite;ignite.cluster().forServers()
  • Smart code suggestions by Codota
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public ClusterGroup forIgfsMetadataDataNodes(String igfsName, String metaCacheName) {
  assert metaCacheName != null;
  return forPredicate(new IgfsNodePredicate(igfsName)).forDataNodes(metaCacheName);
}
origin: apache/ignite

/**
 * @param cacheName Cache name.
 */
private int mapped(String cacheName) {
  int mapped = 0;
  ClusterGroup srvs = ignite.cluster().forServers();
  Collection<ClusterNode> nodes = srvs.forDataNodes(cacheName).nodes();
  for (ClusterNode node : nodes)
    mapped += ignite.affinity(cacheName).primaryPartitions(node).length;
  return mapped;
}
origin: apache/ignite

/**
 * @throws Exception If failed.
 */
@Test
public void testEmptyGroup() throws Exception {
  ClusterGroup emptyGrp = ignite.cluster().forAttribute("nonExistent", "val");
  assertEquals(0, emptyGrp.forOldest().nodes().size());
  assertEquals(0, emptyGrp.forYoungest().nodes().size());
  assertEquals(0, emptyGrp.forAttribute("nonExistent2", "val").nodes().size());
  assertEquals(0, emptyGrp.forCacheNodes("cacheName").nodes().size());
  assertEquals(0, emptyGrp.forClientNodes("cacheName").nodes().size());
  assertEquals(0, emptyGrp.forClients().nodes().size());
  assertEquals(0, emptyGrp.forDaemons().nodes().size());
  assertEquals(0, emptyGrp.forDataNodes("cacheName").nodes().size());
  assertEquals(0, emptyGrp.forRandom().nodes().size());
  assertEquals(0, emptyGrp.forRemotes().nodes().size());
  assertEquals(0, emptyGrp.forServers().nodes().size());
  assertEquals(0, emptyGrp.forHost(ignite.cluster().localNode()).nodes().size());
  assertEquals(0, emptyGrp.forHost("127.0.0.1").nodes().size());
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public ClusterGroup forIgfsMetadataDataNodes(String igfsName, String metaCacheName) {
  assert metaCacheName != null;
  return forPredicate(new IgfsNodePredicate(igfsName)).forDataNodes(metaCacheName);
}
origin: org.apache.ignite/ignite-core

/**
 * @param cacheName Cache name.
 */
private int mapped(String cacheName) {
  int mapped = 0;
  ClusterGroup srvs = ignite.cluster().forServers();
  Collection<ClusterNode> nodes = srvs.forDataNodes(cacheName).nodes();
  for (ClusterNode node : nodes)
    mapped += ignite.affinity(cacheName).primaryPartitions(node).length;
  return mapped;
}
org.apache.ignite.clusterClusterGroupforDataNodes

Javadoc

Creates a cluster group for all data nodes that have the cache with the specified name running.

Popular methods of ClusterGroup

  • nodes
    Gets the read-only collection of nodes in this cluster group.
  • node
    Gets a node for given ID from this cluster group.
  • forPredicate
    Creates a new cluster group which includes all nodes that pass the given predicate filter.
  • forAttribute
    Creates a new cluster group for nodes containing given name and value specified in user attributes.
  • forClients
    Creates a cluster group of nodes started in client mode.
  • forNodeIds
    Creates a cluster group over nodes with specified node IDs.
  • forRandom
    Creates a cluster group with one random node from the current cluster group.
  • forRemotes
    Gets cluster group consisting from the nodes in this cluster group excluding the local node.
  • forServers
    Creates a cluster group of nodes started in server mode.
  • hostNames
    Gets the read-only collection of hostnames in this cluster group.
  • ignite
    Gets instance of grid.
  • metrics
    Gets a metrics snapshot for this cluster group.
  • ignite,
  • metrics,
  • predicate,
  • forCacheNodes,
  • forClientNodes,
  • forDaemons,
  • forHost,
  • forNodeId,
  • forOldest

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • orElseThrow (Optional)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now