mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Move ResaveAllEppResources mapreduce from tools service to backend
It makes sense for all mapreduces to run in backend, especially onces that are scheduled regularly to run in cron like this one now. We don't have many instances configured for the tools service anymore on some of our environments, so backend is the friendliest place for a mapreduce to run. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=168882122
This commit is contained in:
parent
3cc44259da
commit
7dc1940cdb
12 changed files with 16 additions and 16 deletions
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package google.registry.tools.server;
|
package google.registry.batch;
|
||||||
|
|
||||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||||
import static google.registry.util.PipelineUtils.createJobPath;
|
import static google.registry.util.PipelineUtils.createJobPath;
|
||||||
|
@ -57,7 +57,7 @@ public class ResaveAllEppResourcesAction implements Runnable {
|
||||||
public void run() {
|
public void run() {
|
||||||
response.sendJavaScriptRedirect(createJobPath(mrRunner
|
response.sendJavaScriptRedirect(createJobPath(mrRunner
|
||||||
.setJobName("Re-save all EPP resources")
|
.setJobName("Re-save all EPP resources")
|
||||||
.setModuleName("tools")
|
.setModuleName("backend")
|
||||||
.runMapOnly(
|
.runMapOnly(
|
||||||
new ResaveAllEppResourcesActionMapper(),
|
new ResaveAllEppResourcesActionMapper(),
|
||||||
ImmutableList.of(EppResourceInputs.createKeyInput(EppResource.class)))));
|
ImmutableList.of(EppResourceInputs.createKeyInput(EppResource.class)))));
|
|
@ -90,7 +90,7 @@
|
||||||
It is needed for "deleteOldCommitLogs" to work correctly.
|
It is needed for "deleteOldCommitLogs" to work correctly.
|
||||||
</description>
|
</description>
|
||||||
<schedule>1st monday of month 09:00</schedule>
|
<schedule>1st monday of month 09:00</schedule>
|
||||||
<target>tools</target>
|
<target>backend</target>
|
||||||
</cron>
|
</cron>
|
||||||
|
|
||||||
<cron>
|
<cron>
|
||||||
|
|
|
@ -256,6 +256,12 @@
|
||||||
<url-pattern>/_dr/task/deleteProberData</url-pattern>
|
<url-pattern>/_dr/task/deleteProberData</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- Mapreduce to re-save all EppResources. -->
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>backend-servlet</servlet-name>
|
||||||
|
<url-pattern>/_dr/task/resaveAllEppResources</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Deletes contacts and hosts enqueued for asynchronous deletion if they are
|
Deletes contacts and hosts enqueued for asynchronous deletion if they are
|
||||||
not referenced by any domain.
|
not referenced by any domain.
|
||||||
|
|
|
@ -66,12 +66,6 @@
|
||||||
<url-pattern>/_dr/epptool</url-pattern>
|
<url-pattern>/_dr/epptool</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
<!-- Mapreduce to re-save all EppResources. -->
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>tools-servlet</servlet-name>
|
|
||||||
<url-pattern>/_dr/task/resaveAllEppResources</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<!-- Mapreduce to re-save all HistoryEntries. -->
|
<!-- Mapreduce to re-save all HistoryEntries. -->
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>tools-servlet</servlet-name>
|
<servlet-name>tools-servlet</servlet-name>
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
It is needed for "deleteOldCommitLogs" to work correctly.
|
It is needed for "deleteOldCommitLogs" to work correctly.
|
||||||
</description>
|
</description>
|
||||||
<schedule>1st monday of month 09:00</schedule>
|
<schedule>1st monday of month 09:00</schedule>
|
||||||
<target>tools</target>
|
<target>backend</target>
|
||||||
</cron>
|
</cron>
|
||||||
|
|
||||||
<cron>
|
<cron>
|
||||||
|
|
|
@ -149,7 +149,7 @@
|
||||||
It is needed for "deleteOldCommitLogs" to work correctly.
|
It is needed for "deleteOldCommitLogs" to work correctly.
|
||||||
</description>
|
</description>
|
||||||
<schedule>1st monday of month 09:00</schedule>
|
<schedule>1st monday of month 09:00</schedule>
|
||||||
<target>tools</target>
|
<target>backend</target>
|
||||||
</cron>
|
</cron>
|
||||||
|
|
||||||
<cron>
|
<cron>
|
||||||
|
|
|
@ -26,6 +26,7 @@ import google.registry.batch.DeleteProberDataAction;
|
||||||
import google.registry.batch.ExpandRecurringBillingEventsAction;
|
import google.registry.batch.ExpandRecurringBillingEventsAction;
|
||||||
import google.registry.batch.MapreduceEntityCleanupAction;
|
import google.registry.batch.MapreduceEntityCleanupAction;
|
||||||
import google.registry.batch.RefreshDnsOnHostRenameAction;
|
import google.registry.batch.RefreshDnsOnHostRenameAction;
|
||||||
|
import google.registry.batch.ResaveAllEppResourcesAction;
|
||||||
import google.registry.batch.VerifyEntityIntegrityAction;
|
import google.registry.batch.VerifyEntityIntegrityAction;
|
||||||
import google.registry.cron.CommitLogFanoutAction;
|
import google.registry.cron.CommitLogFanoutAction;
|
||||||
import google.registry.cron.CronModule;
|
import google.registry.cron.CronModule;
|
||||||
|
@ -132,6 +133,7 @@ interface BackendRequestComponent {
|
||||||
RdeReporter rdeReporter();
|
RdeReporter rdeReporter();
|
||||||
RefreshDnsAction refreshDnsAction();
|
RefreshDnsAction refreshDnsAction();
|
||||||
RefreshDnsOnHostRenameAction refreshDnsOnHostRenameAction();
|
RefreshDnsOnHostRenameAction refreshDnsOnHostRenameAction();
|
||||||
|
ResaveAllEppResourcesAction resaveAllEppResourcesAction();
|
||||||
SyncGroupMembersAction syncGroupMembersAction();
|
SyncGroupMembersAction syncGroupMembersAction();
|
||||||
SyncRegistrarsSheetAction syncRegistrarsSheetAction();
|
SyncRegistrarsSheetAction syncRegistrarsSheetAction();
|
||||||
TldFanoutAction tldFanoutAction();
|
TldFanoutAction tldFanoutAction();
|
||||||
|
|
|
@ -44,7 +44,6 @@ import google.registry.tools.server.ListReservedListsAction;
|
||||||
import google.registry.tools.server.ListTldsAction;
|
import google.registry.tools.server.ListTldsAction;
|
||||||
import google.registry.tools.server.PollMapreduceAction;
|
import google.registry.tools.server.PollMapreduceAction;
|
||||||
import google.registry.tools.server.RefreshDnsForAllDomainsAction;
|
import google.registry.tools.server.RefreshDnsForAllDomainsAction;
|
||||||
import google.registry.tools.server.ResaveAllEppResourcesAction;
|
|
||||||
import google.registry.tools.server.ResaveAllHistoryEntriesAction;
|
import google.registry.tools.server.ResaveAllHistoryEntriesAction;
|
||||||
import google.registry.tools.server.ToolsServerModule;
|
import google.registry.tools.server.ToolsServerModule;
|
||||||
import google.registry.tools.server.UpdatePremiumListAction;
|
import google.registry.tools.server.UpdatePremiumListAction;
|
||||||
|
@ -82,7 +81,6 @@ interface ToolsRequestComponent {
|
||||||
PollMapreduceAction pollMapReduceAction();
|
PollMapreduceAction pollMapReduceAction();
|
||||||
PublishDetailReportAction publishDetailReportAction();
|
PublishDetailReportAction publishDetailReportAction();
|
||||||
RefreshDnsForAllDomainsAction refreshDnsForAllDomainsAction();
|
RefreshDnsForAllDomainsAction refreshDnsForAllDomainsAction();
|
||||||
ResaveAllEppResourcesAction resaveAllEppResourcesAction();
|
|
||||||
ResaveAllHistoryEntriesAction resaveAllHistoryEntriesAction();
|
ResaveAllHistoryEntriesAction resaveAllHistoryEntriesAction();
|
||||||
RestoreCommitLogsAction restoreCommitLogsAction();
|
RestoreCommitLogsAction restoreCommitLogsAction();
|
||||||
UpdatePremiumListAction updatePremiumListAction();
|
UpdatePremiumListAction updatePremiumListAction();
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package google.registry.tools.server;
|
package google.registry.batch;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
import static google.registry.model.ofy.ObjectifyService.ofy;
|
|
@ -31,6 +31,7 @@ PATH CLASS METHOD
|
||||||
/_dr/task/rdeStaging RdeStagingAction GET,POST n INTERNAL APP IGNORED
|
/_dr/task/rdeStaging RdeStagingAction GET,POST n INTERNAL APP IGNORED
|
||||||
/_dr/task/rdeUpload RdeUploadAction POST n INTERNAL APP IGNORED
|
/_dr/task/rdeUpload RdeUploadAction POST n INTERNAL APP IGNORED
|
||||||
/_dr/task/refreshDnsOnHostRename RefreshDnsOnHostRenameAction GET n INTERNAL APP IGNORED
|
/_dr/task/refreshDnsOnHostRename RefreshDnsOnHostRenameAction GET n INTERNAL APP IGNORED
|
||||||
|
/_dr/task/resaveAllEppResources ResaveAllEppResourcesAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/syncGroupMembers SyncGroupMembersAction POST n INTERNAL APP IGNORED
|
/_dr/task/syncGroupMembers SyncGroupMembersAction POST n INTERNAL APP IGNORED
|
||||||
/_dr/task/syncRegistrarsSheet SyncRegistrarsSheetAction POST n INTERNAL APP IGNORED
|
/_dr/task/syncRegistrarsSheet SyncRegistrarsSheetAction POST n INTERNAL APP IGNORED
|
||||||
/_dr/task/tmchCrl TmchCrlAction POST y INTERNAL APP IGNORED
|
/_dr/task/tmchCrl TmchCrlAction POST y INTERNAL APP IGNORED
|
||||||
|
|
|
@ -18,6 +18,5 @@ PATH CLASS METHODS OK AUTH
|
||||||
/_dr/task/killAllEppResources KillAllEppResourcesAction POST n INTERNAL APP IGNORED
|
/_dr/task/killAllEppResources KillAllEppResourcesAction POST n INTERNAL APP IGNORED
|
||||||
/_dr/task/pollMapreduce PollMapreduceAction POST n INTERNAL APP IGNORED
|
/_dr/task/pollMapreduce PollMapreduceAction POST n INTERNAL APP IGNORED
|
||||||
/_dr/task/refreshDnsForAllDomains RefreshDnsForAllDomainsAction GET n INTERNAL,API APP ADMIN
|
/_dr/task/refreshDnsForAllDomains RefreshDnsForAllDomainsAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/resaveAllEppResources ResaveAllEppResourcesAction GET n INTERNAL,API APP ADMIN
|
|
||||||
/_dr/task/resaveAllHistoryEntries ResaveAllHistoryEntriesAction GET n INTERNAL,API APP ADMIN
|
/_dr/task/resaveAllHistoryEntries ResaveAllHistoryEntriesAction GET n INTERNAL,API APP ADMIN
|
||||||
/_dr/task/restoreCommitLogs RestoreCommitLogsAction POST y INTERNAL,API APP ADMIN
|
/_dr/task/restoreCommitLogs RestoreCommitLogsAction POST y INTERNAL,API APP ADMIN
|
||||||
|
|
|
@ -33,7 +33,7 @@ import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.junit.runners.JUnit4;
|
import org.junit.runners.JUnit4;
|
||||||
|
|
||||||
/** Unit tests for {@link ResaveAllEppResourcesAction}. */
|
/** Unit tests for {@link ResaveAllHistoryEntriesAction}. */
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
public class ResaveAllHistoryEntriesActionTest
|
public class ResaveAllHistoryEntriesActionTest
|
||||||
extends MapreduceTestCase<ResaveAllHistoryEntriesAction> {
|
extends MapreduceTestCase<ResaveAllHistoryEntriesAction> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue