From fa685b0fbf6bfb8a5ac1462826ca3a3df8b606eb Mon Sep 17 00:00:00 2001 From: Bjorn Pedersen Date: Wed, 26 Jul 2023 13:12:00 -0400 Subject: [PATCH 1/4] moved --dataflowEndpoint to public pipeline option set --- .../options/DataflowPipelineOptions.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java index f87af28ca61b..524532738e3f 100644 --- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java +++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java @@ -136,6 +136,23 @@ public interface DataflowPipelineOptions void setRegion(String region); + /** + * Dataflow endpoint to use. + * + *

Defaults to the current version of the Google Cloud Dataflow API, at the time the current + * SDK version was released. + * + *

If the string contains "://", then this is treated as a URL, otherwise {@link + * #getApiRootUrl()} is used as the root URL. + */ + @Description( + "The URL for the Dataflow API. If the string contains \"://\", this" + + " will be treated as the entire URL, otherwise will be treated relative to apiRootUrl.") + @Default.String(Dataflow.DEFAULT_SERVICE_PATH) + String getDataflowEndpoint(); + + void setDataflowEndpoint(String value); + /** Labels that will be applied to the billing records for this job. */ @Description("Labels that will be applied to the billing records for this job.") Map getLabels(); From 06ff272bb72529dd51c2434d7446ab5f0ff1a62c Mon Sep 17 00:00:00 2001 From: Bjorn Pedersen Date: Wed, 26 Jul 2023 13:27:08 -0400 Subject: [PATCH 2/4] minor linting --- .../runners/dataflow/options/DataflowPipelineOptions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java index 524532738e3f..512177dde2ce 100644 --- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java +++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java @@ -136,7 +136,7 @@ public interface DataflowPipelineOptions void setRegion(String region); - /** + /** * Dataflow endpoint to use. * *

Defaults to the current version of the Google Cloud Dataflow API, at the time the current @@ -152,7 +152,7 @@ public interface DataflowPipelineOptions String getDataflowEndpoint(); void setDataflowEndpoint(String value); - + /** Labels that will be applied to the billing records for this job. */ @Description("Labels that will be applied to the billing records for this job.") Map getLabels(); From 03da178ecb5e6edfc780379d104b6de9f58638ca Mon Sep 17 00:00:00 2001 From: Bjorn Pedersen Date: Wed, 26 Jul 2023 14:46:35 -0400 Subject: [PATCH 3/4] imported Dataflow to DataflowPipelineOptions --- .../beam/runners/dataflow/options/DataflowPipelineOptions.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java index 512177dde2ce..04f1ba87cd79 100644 --- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java +++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java @@ -17,6 +17,7 @@ */ package org.apache.beam.runners.dataflow.options; +import com.google.api.services.dataflow.Dataflow; import java.util.List; import java.util.Map; import org.apache.beam.runners.dataflow.DataflowRunner; From 45781651cb550ab4edc632f6479bddafc5c81d6b Mon Sep 17 00:00:00 2001 From: Bjorn Pedersen Date: Wed, 26 Jul 2023 16:33:16 -0400 Subject: [PATCH 4/4] added Override decorators --- .../beam/runners/dataflow/options/DataflowPipelineOptions.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java index 04f1ba87cd79..985e1736dcb0 100644 --- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java +++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java @@ -149,9 +149,11 @@ public interface DataflowPipelineOptions @Description( "The URL for the Dataflow API. If the string contains \"://\", this" + " will be treated as the entire URL, otherwise will be treated relative to apiRootUrl.") + @Override @Default.String(Dataflow.DEFAULT_SERVICE_PATH) String getDataflowEndpoint(); + @Override void setDataflowEndpoint(String value); /** Labels that will be applied to the billing records for this job. */