From f7889e1f9c0270442812e50f6f4e638d9977cd99 Mon Sep 17 00:00:00 2001 From: Scott Wegner Date: Mon, 29 Feb 2016 15:24:49 -0800 Subject: [PATCH 1/2] Move 'update' pipeline option to correct interface --- .../sdk/options/DataflowPipelineDebugOptions.java | 4 ++++ .../sdk/options/DataflowPipelineOptions.java | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineDebugOptions.java b/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineDebugOptions.java index e94b56df8714..3ceec894494b 100644 --- a/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineDebugOptions.java +++ b/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineDebugOptions.java @@ -172,11 +172,15 @@ public Dataflow create(PipelineOptions options) { /** * Whether to update the currently running pipeline with the same name as this one. + * + * @deprecated This property is replaced by @{link DataflowPipelineOptions#getUpdate()} */ @JsonIgnore + @Deprecated @Description("If set, replace the existing pipeline with the name specified by --jobName with " + "this pipeline, preserving state.") boolean getUpdate(); + @Deprecated void setUpdate(boolean value); /** diff --git a/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineOptions.java b/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineOptions.java index a0f188af0785..1aa434299c4f 100644 --- a/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineOptions.java +++ b/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineOptions.java @@ -91,6 +91,19 @@ public interface DataflowPipelineOptions extends String getJobName(); void setJobName(String value); + /** + * Whether to update the currently running pipeline with the same name as this one. + */ + @Override + @SuppressWarnings("deprecation") // base class member deprecated in favor of this one. + @Description( + "If set, replace the existing pipeline with the name specified by --jobName with " + + "this pipeline, preserving state.") + boolean getUpdate(); + @Override + @SuppressWarnings("deprecation") // base class member deprecated in favor of this one. + void setUpdate(boolean value); + /** * Returns a normalized job name constructed from {@link ApplicationNameOptions#getAppName()}, the * local system user name (if available), and the current time. The normalization makes sure that From 5b6c32acf0f1e05e4d4ecc55a5b90b87512dd9f4 Mon Sep 17 00:00:00 2001 From: Scott Wegner Date: Tue, 1 Mar 2016 11:38:09 -0800 Subject: [PATCH 2/2] Remove JsonIgnore attribute --- .../cloud/dataflow/sdk/options/DataflowPipelineDebugOptions.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineDebugOptions.java b/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineDebugOptions.java index 3ceec894494b..a14be4498701 100644 --- a/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineDebugOptions.java +++ b/sdk/src/main/java/com/google/cloud/dataflow/sdk/options/DataflowPipelineDebugOptions.java @@ -175,7 +175,6 @@ public Dataflow create(PipelineOptions options) { * * @deprecated This property is replaced by @{link DataflowPipelineOptions#getUpdate()} */ - @JsonIgnore @Deprecated @Description("If set, replace the existing pipeline with the name specified by --jobName with " + "this pipeline, preserving state.")