Set the number of map shards to 20

This change is motivated by the sandbox run where we saw the backend instances overwhelmed by the 100 default shards to the point where they couldn't even answer a simple status request.

Production has 50 backend instances, so 20 will leave a lot of spare for other tasks.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162357857
This commit is contained in:
guyben 2017-07-18 08:55:19 -07:00 committed by Ben McIlwain
parent 7a7bb51093
commit 882db28ee0

View file

@ -67,6 +67,7 @@ import org.joda.time.Duration;
)
public final class DeleteOldCommitLogsAction implements Runnable {
private static final int NUM_MAP_SHARDS = 20;
private static final int NUM_REDUCE_SHARDS = 10;
private static final FormattingLogger logger = getLoggerForCallerClass();
@ -86,6 +87,7 @@ public final class DeleteOldCommitLogsAction implements Runnable {
response.sendJavaScriptRedirect(createJobPath(mrRunner
.setJobName("Delete old commit logs")
.setModuleName("backend")
.setDefaultMapShards(NUM_MAP_SHARDS)
.setDefaultReduceShards(NUM_REDUCE_SHARDS)
.runMapreduce(
new DeleteOldCommitLogsMapper(),