Skip to content

Commit b46b0e8

Browse files
committed
corrected map workers retrieval in MapReduceMasterJob
1 parent adcb175 commit b46b0e8

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

src/interconnected_node/contribution/mapreduce/jobs/MapReduceMasterJob.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,24 +160,18 @@ export default class MapReduceMasterJob implements Job {
160160
const mwUsed = new Array<MasterP2PConnection>();
161161
const remainingMWsFromIndex =
162162
this.mapWorkers.length - this.currentUsedMapWorkerIndex;
163-
console.log('length ' + this.mapWorkers.length.toString());
164-
console.log('index ' + this.currentUsedMapWorkerIndex.toString());
165-
console.log('remaining ' + remainingMWsFromIndex.toString());
166-
console.log('per region ' + this.mapWorkersPerRegion);
167163
if (remainingMWsFromIndex >= this.mapWorkersPerRegion) {
168-
console.log('A');
169164
mwUsed.push(
170165
...this.mapWorkers.slice(
171166
this.currentUsedMapWorkerIndex,
172-
this.mapWorkersPerRegion
167+
this.currentUsedMapWorkerIndex + this.mapWorkersPerRegion
173168
)
174169
);
175170
} else {
176-
console.log('B');
177171
mwUsed.push(
178172
...this.mapWorkers.slice(
179173
this.currentUsedMapWorkerIndex,
180-
remainingMWsFromIndex
174+
this.currentUsedMapWorkerIndex + remainingMWsFromIndex
181175
)
182176
);
183177
mwUsed.push(
@@ -187,7 +181,6 @@ export default class MapReduceMasterJob implements Job {
187181
)
188182
);
189183
}
190-
console.log(mwUsed.length.toString());
191184
this.currentUsedMapWorkerIndex += this.mapWorkersPerRegion;
192185
if (this.currentUsedMapWorkerIndex >= this.mapWorkers.length) {
193186
this.currentUsedMapWorkerIndex =

0 commit comments

Comments
 (0)