consIdxToNodeId = U.newHashMap(srvNodes.size()); Map<Object, Short> m = blt.consistentIdMapping();
/** * Log exchange event. * * @param evt Discovery event. */ private void logExchange(DiscoveryEvent evt) { if (cctx.kernalContext().state().publicApiActiveState(false) && cctx.wal() != null) { if (cctx.wal().serializerVersion() > 1) try { ExchangeRecord.Type type = null; if (evt.type() == EVT_NODE_JOINED) type = ExchangeRecord.Type.JOIN; else if (evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED) type = ExchangeRecord.Type.LEFT; BaselineTopology blt = cctx.kernalContext().state().clusterState().baselineTopology(); if (type != null && blt != null) { Short constId = blt.consistentIdMapping().get(evt.eventNode().consistentId()); if (constId != null) cctx.wal().log(new ExchangeRecord(constId, type)); } } catch (IgniteCheckedException e) { U.error(log, "Fail during log exchange record.", e); } } }
return null; Map<Object, Short> constIdMap = baselineTop.consistentIdMapping();
consIdxToNodeId = U.newHashMap(srvNodes.size()); Map<Object, Short> m = blt.consistentIdMapping();
/** * Log exchange event. * * @param evt Discovery event. */ private void logExchange(DiscoveryEvent evt) { if (cctx.kernalContext().state().publicApiActiveState(false) && cctx.wal() != null) { if (cctx.wal().serializerVersion() > 1) try { ExchangeRecord.Type type = null; if (evt.type() == EVT_NODE_JOINED) type = ExchangeRecord.Type.JOIN; else if (evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED) type = ExchangeRecord.Type.LEFT; BaselineTopology blt = cctx.kernalContext().state().clusterState().baselineTopology(); if (type != null && blt != null) { Short constId = blt.consistentIdMapping().get(evt.eventNode().consistentId()); if (constId != null) cctx.wal().log(new ExchangeRecord(constId, type)); } } catch (IgniteCheckedException e) { U.error(log, "Fail during log exchange record.", e); } } }