You're right that the slaveIndex is set correctly after all as it is the method parameter - my mistake, I apologize. In this case, you temporarily store the word list in master state between initOnMaster for a copy of the stage for each slave. However, I have to insist that the code is executed only on master node, and masterState then works only locally - the word list is sent over network.