rotate
aims to swap tables among workers. If rotateMap
isn’t specified, the i
th worker will get (i + n - 1) % n
th worker’s table and send its table to (i + 1) % n
th worker. All workers should run it concurrently. The defination of the method is:
boolean rotate(final String contextName, final String operationName, Table<P> globalTable, Int2IntMap rotateMap, DataMap dataMap, Workers workers)
contextName
— the name of the contextoperationName
— the name of the operationglobalTable
— the name of the global data tablerotateMap
— the map indicating the order of rotationdataMap
— the data mapworkers
— the workers
Example
rotate(contextName, "max-rotate-" + i + "-" + j, cenTable, null, dataMap, workers);