Set # of reducer shards on ExportDomainLists []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117403604
This commit is contained in:
mcilwain 2016-03-16 17:42:12 -07:00 committed by Justine Tunney
parent a31a626b16
commit 401df6c34a

View file

@ -59,6 +59,7 @@ import javax.inject.Inject;
public class ExportDomainListsAction implements MapreduceAction {
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
private static final int MAX_NUM_REDUCE_SHARDS = 100;
@Inject MapreduceRunner mrRunner;
@Inject Response response;
@ -73,6 +74,7 @@ public class ExportDomainListsAction implements MapreduceAction {
response.sendJavaScriptRedirect(createJobPath(mrRunner
.setJobName("Export domain lists")
.setModuleName("backend")
.setDefaultReduceShards(Math.min(realTlds.size(), MAX_NUM_REDUCE_SHARDS))
.runMapreduce(
new ExportDomainListsMapper(DateTime.now(UTC), realTlds),
new ExportDomainListsReducer(gcsBucket, gcsBufferSize),