From 5bccd65bd774b33f6833631325cc412028aa70bb Mon Sep 17 00:00:00 2001 From: gbrodman Date: Mon, 22 Aug 2022 12:39:34 -0400 Subject: [PATCH] Add main method to ResaveAllEppResourcesPipeline (#1748) Not sure how this got missed before, I am pretty sure we tested this on alpha. --- .../beam/resave/ResaveAllEppResourcesPipeline.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/src/main/java/google/registry/beam/resave/ResaveAllEppResourcesPipeline.java b/core/src/main/java/google/registry/beam/resave/ResaveAllEppResourcesPipeline.java index 014e1e9fd..52a9bd827 100644 --- a/core/src/main/java/google/registry/beam/resave/ResaveAllEppResourcesPipeline.java +++ b/core/src/main/java/google/registry/beam/resave/ResaveAllEppResourcesPipeline.java @@ -33,6 +33,7 @@ import java.io.Serializable; import java.util.concurrent.ThreadLocalRandom; import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.PipelineResult; +import org.apache.beam.sdk.options.PipelineOptionsFactory; import org.apache.beam.sdk.transforms.DoFn; import org.apache.beam.sdk.transforms.GroupIntoBatches; import org.apache.beam.sdk.transforms.ParDo; @@ -172,4 +173,13 @@ public class ResaveAllEppResourcesPipeline implements Serializable { resource.cloneProjectedAtTime(jpaTm().getTransactionTime())))); } } + + public static void main(String[] args) { + PipelineOptionsFactory.register(ResaveAllEppResourcesPipelineOptions.class); + ResaveAllEppResourcesPipelineOptions options = + PipelineOptionsFactory.fromArgs(args) + .withValidation() + .as(ResaveAllEppResourcesPipelineOptions.class); + new ResaveAllEppResourcesPipeline(options).run(); + } }