diff --git a/java/google/registry/export/ExportDomainListsAction.java b/java/google/registry/export/ExportDomainListsAction.java index 5e2f2a852..0617ec5d1 100644 --- a/java/google/registry/export/ExportDomainListsAction.java +++ b/java/google/registry/export/ExportDomainListsAction.java @@ -32,7 +32,6 @@ import com.google.common.collect.ImmutableSet; import google.registry.config.ConfigModule.Config; import google.registry.gcs.GcsUtils; -import google.registry.mapreduce.MapreduceAction; import google.registry.mapreduce.MapreduceRunner; import google.registry.model.domain.DomainResource; import google.registry.model.registry.Registry.TldType; @@ -57,7 +56,7 @@ import javax.inject.Inject; * TLD.txt into the domain-lists bucket. Note that this overwrites the files in place. */ @Action(path = "/_dr/task/exportDomainLists") -public class ExportDomainListsAction implements MapreduceAction { +public class ExportDomainListsAction implements Runnable { private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass(); private static final int MAX_NUM_REDUCE_SHARDS = 100; diff --git a/java/google/registry/flows/async/AsyncFlowUtils.java b/java/google/registry/flows/async/AsyncFlowUtils.java index fa744c50d..579629a09 100644 --- a/java/google/registry/flows/async/AsyncFlowUtils.java +++ b/java/google/registry/flows/async/AsyncFlowUtils.java @@ -26,7 +26,6 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; import google.registry.config.RegistryEnvironment; -import google.registry.mapreduce.MapreduceAction; import google.registry.util.FormattingLogger; import org.joda.time.Duration; @@ -45,7 +44,7 @@ public final class AsyncFlowUtils { /** Enqueues a mapreduce action to perform an async flow operation. */ public static TaskHandle enqueueMapreduceAction( - Class action, + Class action, ImmutableMap params, Duration executionDelay) { Queue queue = QueueFactory.getQueue(ASYNC_FLOW_QUEUE_NAME); diff --git a/java/google/registry/flows/async/DeleteEppResourceAction.java b/java/google/registry/flows/async/DeleteEppResourceAction.java index 2062c24df..fd68c3b61 100644 --- a/java/google/registry/flows/async/DeleteEppResourceAction.java +++ b/java/google/registry/flows/async/DeleteEppResourceAction.java @@ -34,7 +34,6 @@ import com.googlecode.objectify.Key; import com.googlecode.objectify.Ref; import com.googlecode.objectify.Work; -import google.registry.mapreduce.MapreduceAction; import google.registry.mapreduce.MapreduceRunner; import google.registry.mapreduce.inputs.EppResourceInputs; import google.registry.mapreduce.inputs.NullInput; @@ -59,7 +58,7 @@ import javax.inject.Inject; * A mapreduce to delete the specified EPP resource, but ONLY if it is not referred to by any * existing DomainBase entity. */ -public abstract class DeleteEppResourceAction implements MapreduceAction { +public abstract class DeleteEppResourceAction implements Runnable { /** The HTTP parameter name used to specify the websafe key of the resource to delete. */ public static final String PARAM_RESOURCE_KEY = "resourceKey"; diff --git a/java/google/registry/flows/async/DnsRefreshForHostRenameAction.java b/java/google/registry/flows/async/DnsRefreshForHostRenameAction.java index 97c5a406b..287466464 100644 --- a/java/google/registry/flows/async/DnsRefreshForHostRenameAction.java +++ b/java/google/registry/flows/async/DnsRefreshForHostRenameAction.java @@ -26,7 +26,6 @@ import com.googlecode.objectify.Key; import com.googlecode.objectify.Ref; import google.registry.dns.DnsQueue; -import google.registry.mapreduce.MapreduceAction; import google.registry.mapreduce.MapreduceRunner; import google.registry.mapreduce.inputs.EppResourceInputs; import google.registry.model.domain.DomainResource; @@ -46,7 +45,7 @@ import javax.inject.Inject; * Enqueues DNS refreshes for applicable domains following a host rename. */ @Action(path = "/_dr/task/dnsRefreshForHostRename") -public class DnsRefreshForHostRenameAction implements MapreduceAction { +public class DnsRefreshForHostRenameAction implements Runnable { /** The HTTP parameter name used to specify the websafe key of the host to rename. */ public static final String PARAM_HOST_KEY = "hostKey"; diff --git a/java/google/registry/mapreduce/MapreduceAction.java b/java/google/registry/mapreduce/MapreduceAction.java deleted file mode 100644 index f9662db97..000000000 --- a/java/google/registry/mapreduce/MapreduceAction.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2016 The Domain Registry Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package google.registry.mapreduce; - -import google.registry.request.Action; - -/** - * Marker interface to denote an action intended for the Mapreduce queue. - * - *

Classes that implement this interface are expected to have {@link Action} set. - */ -public interface MapreduceAction extends Runnable {} diff --git a/java/google/registry/tools/server/KillAllCommitLogsAction.java b/java/google/registry/tools/server/KillAllCommitLogsAction.java index 70a45a29d..c71af4359 100644 --- a/java/google/registry/tools/server/KillAllCommitLogsAction.java +++ b/java/google/registry/tools/server/KillAllCommitLogsAction.java @@ -29,7 +29,6 @@ import com.google.common.collect.Lists; import com.googlecode.objectify.Key; import google.registry.config.RegistryEnvironment; -import google.registry.mapreduce.MapreduceAction; import google.registry.mapreduce.MapreduceRunner; import google.registry.model.ofy.CommitLogBucket; import google.registry.model.ofy.CommitLogCheckpointRoot; @@ -42,7 +41,7 @@ import javax.inject.Inject; /** Deletes all commit logs in datastore. */ @Action(path = "/_dr/task/killAllCommitLogs", method = POST) -public class KillAllCommitLogsAction implements MapreduceAction { +public class KillAllCommitLogsAction implements Runnable { @Inject MapreduceRunner mrRunner; @Inject Response response; diff --git a/java/google/registry/tools/server/KillAllEppResourcesAction.java b/java/google/registry/tools/server/KillAllEppResourcesAction.java index 45454714a..960498806 100644 --- a/java/google/registry/tools/server/KillAllEppResourcesAction.java +++ b/java/google/registry/tools/server/KillAllEppResourcesAction.java @@ -26,7 +26,6 @@ import com.googlecode.objectify.Key; import com.googlecode.objectify.Work; import google.registry.config.RegistryEnvironment; -import google.registry.mapreduce.MapreduceAction; import google.registry.mapreduce.MapreduceRunner; import google.registry.mapreduce.inputs.EppResourceInputs; import google.registry.model.EppResource; @@ -41,7 +40,7 @@ import javax.inject.Inject; /** Deletes all {@link EppResource} objects in datastore, including indices and descendants. */ @Action(path = "/_dr/task/killAllEppResources", method = POST) -public class KillAllEppResourcesAction implements MapreduceAction { +public class KillAllEppResourcesAction implements Runnable { @Inject MapreduceRunner mrRunner; @Inject Response response; diff --git a/java/google/registry/tools/server/ResaveAllEppResourcesAction.java b/java/google/registry/tools/server/ResaveAllEppResourcesAction.java index 89920a79e..8ac28532b 100644 --- a/java/google/registry/tools/server/ResaveAllEppResourcesAction.java +++ b/java/google/registry/tools/server/ResaveAllEppResourcesAction.java @@ -23,7 +23,6 @@ import com.google.common.collect.ImmutableList; import com.googlecode.objectify.VoidWork; -import google.registry.mapreduce.MapreduceAction; import google.registry.mapreduce.MapreduceRunner; import google.registry.model.EppResource; import google.registry.request.Action; @@ -39,7 +38,7 @@ import javax.inject.Inject; * commit logs (for backup purposes). */ @Action(path = "/_dr/task/resaveAllEppResources") -public class ResaveAllEppResourcesAction implements MapreduceAction { +public class ResaveAllEppResourcesAction implements Runnable { @Inject MapreduceRunner mrRunner; @Inject Response response; diff --git a/java/google/registry/tools/server/javascrap/BackfillAutorenewBillingFlagAction.java b/java/google/registry/tools/server/javascrap/BackfillAutorenewBillingFlagAction.java index d265ff9d9..d9a58db71 100644 --- a/java/google/registry/tools/server/javascrap/BackfillAutorenewBillingFlagAction.java +++ b/java/google/registry/tools/server/javascrap/BackfillAutorenewBillingFlagAction.java @@ -26,7 +26,6 @@ import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.VoidWork; -import google.registry.mapreduce.MapreduceAction; import google.registry.mapreduce.MapreduceRunner; import google.registry.model.billing.BillingEvent.Flag; import google.registry.model.billing.BillingEvent.Recurring; @@ -40,7 +39,7 @@ import javax.inject.Inject; /** A mapreduce that backfills new {@link Flag#AUTO_RENEW} flag on recurring billing events. */ @Action(path = "/_dr/task/backfillAutorenewBillingFlag") -public class BackfillAutorenewBillingFlagAction implements MapreduceAction { +public class BackfillAutorenewBillingFlagAction implements Runnable { private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass(); diff --git a/java/google/registry/tools/server/javascrap/CountRecurringBillingEventsAction.java b/java/google/registry/tools/server/javascrap/CountRecurringBillingEventsAction.java index e3290251d..055cc422c 100644 --- a/java/google/registry/tools/server/javascrap/CountRecurringBillingEventsAction.java +++ b/java/google/registry/tools/server/javascrap/CountRecurringBillingEventsAction.java @@ -22,7 +22,6 @@ import com.google.appengine.tools.mapreduce.Mapper; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import google.registry.mapreduce.MapreduceAction; import google.registry.mapreduce.MapreduceRunner; import google.registry.model.EppResource; import google.registry.model.billing.BillingEvent.Recurring; @@ -37,7 +36,7 @@ import javax.inject.Inject; *

This is a test of the ChildEntityInput/ChildEntityReader classes. */ @Action(path = "/_dr/task/countRecurringBillingEvents") -public class CountRecurringBillingEventsAction implements MapreduceAction { +public class CountRecurringBillingEventsAction implements Runnable { // TODO(b/27562876): Delete this mapreduce once tested in production.