use of org.apache.ignite.internal.raft.server.impl.JraftServerImpl in project ignite-3 by apache.
the class ItTxDistributedTestSingleNode method assertPartitionsSame.
/**
* {@inheritDoc}
*/
@Override
protected boolean assertPartitionsSame(Table table, int partId) {
int hash = 0;
for (Map.Entry<ClusterNode, Loza> entry : raftServers.entrySet()) {
Loza svc = (Loza) entry.getValue();
JraftServerImpl server = (JraftServerImpl) svc.server();
org.apache.ignite.raft.jraft.RaftGroupService grp = server.raftGroupService(table.name() + "-part-" + partId);
JraftServerImpl.DelegatingStateMachine fsm = (JraftServerImpl.DelegatingStateMachine) grp.getRaftNode().getOptions().getFsm();
PartitionListener listener = (PartitionListener) fsm.getListener();
VersionedRowStore storage = listener.getStorage();
if (hash == 0) {
hash = storage.delegate().hashCode();
} else if (hash != storage.delegate().hashCode()) {
return false;
}
}
return true;
}
Aggregations