/** {@inheritDoc} */ @Override public GridNode localNode() { assert g != null; return g.localNode(); }
/** {@inheritDoc} */ @Override public <T> GridNode route(GridStreamerContext ctx, String stageName, T evt) { return grid.localNode(); }
/** {@inheritDoc} */ @Override public <T> Map<GridNode, Collection<T>> route(GridStreamerContext ctx, String stageName, Collection<T> evts) { return F.asMap(grid.localNode(), evts); } }
@Override public UUID apply(Grid g) { return g.localNode().id(); } });
/** {@inheritDoc} */ @Override public Map<? extends GridComputeJob, GridNode> map(List<GridNode> subgrid, GridifyArgument arg) throws GridException { assert !subgrid.isEmpty() : "Subgrid should not be empty: " + subgrid; assert grid != null : "Grid instance could not be injected"; assert balancer != null : "Load balancer could not be injected"; GridComputeJob job = new GridifyJobAdapter(arg); GridNode node = balancer.getBalancedNode(job, Collections.<GridNode>singletonList(grid.localNode())); if (node != null) { // Give preference to remote nodes. return Collections.singletonMap(job, node); } return Collections.singletonMap(job, balancer.getBalancedNode(job, null)); }
/** {@inheritDoc} */ @Override public <T> GridNode route(GridStreamerContext ctx, String stageName, T evt) { if (evt instanceof CacheAffinityEvent) { CacheAffinityEvent e = (CacheAffinityEvent)evt; GridCache<Object, Object> c = ((GridEx)grid).cachex(e.cacheName()); assert c != null; return c.affinity().mapKeyToNode(e.affinityKey()); } return grid.localNode(); } }
/** {@inheritDoc} */ @Override public GridRestResponse call() throws Exception { GridNodeLocalMap<QueryExecutionKey, QueryFutureWrapper> locMap = g.nodeLocalMap(); return fetchQueryResults(req.queryId(), locMap.get(new QueryExecutionKey(req.queryId())), locMap, g.localNode().id()); } }
res.add(new VisorGridEventsLost(g.localNode().id()));
grid.nodeLocalMap().remove(futId); return first ? F.asList(grid.localNode().id(), futId, tbls, cols, types, fields, finished) : F.asList(fields, finished);
GridNode node = g.localNode();
log.debug("Record [key=" + key + ", val=" + val + ", incBackups=" + incBackups + "priNode=" + U.id8(CU.primaryNode(cctx, key).id()) + ", node=" + U.id8(cctx.grid().localNode().id()) + ']');
return fetchQueryResults(qryId, wrapper, locMap, g.localNode().id());