From 401df6c34a9cb063ef5de0637bca954fa4d44598 Mon Sep 17 00:00:00 2001 From: mcilwain Date: Wed, 16 Mar 2016 17:42:12 -0700 Subject: [PATCH] Set # of reducer shards on ExportDomainLists [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=117403604 --- .../google/domain/registry/export/ExportDomainListsAction.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/com/google/domain/registry/export/ExportDomainListsAction.java b/java/com/google/domain/registry/export/ExportDomainListsAction.java index 493d0fbdb..a9a842a22 100644 --- a/java/com/google/domain/registry/export/ExportDomainListsAction.java +++ b/java/com/google/domain/registry/export/ExportDomainListsAction.java @@ -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),