Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,6 @@ 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()}
*/
@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);

/**
* Mapping of old PTranform names to new ones, specified as JSON
* <code>{"oldName":"newName",...}</code>. To mark a transform as deleted, make newName the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,10 @@ public interface DataflowPipelineOptions
/**
* 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.
boolean isUpdate();
void setUpdate(boolean value);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ public DataflowPipelineJob run(Pipeline pipeline) {
}

String jobIdToUpdate = null;
if (options.getUpdate()) {
if (options.isUpdate()) {
jobIdToUpdate = getJobIdFromName(options.getJobName());
newJob.setTransformNameMapping(options.getTransformNameMapping());
newJob.setReplaceJobId(jobIdToUpdate);
Expand Down Expand Up @@ -612,7 +612,7 @@ public DataflowPipelineJob run(Pipeline pipeline) {
if (jobResult.getClientRequestId() != null && !jobResult.getClientRequestId().isEmpty()
&& !jobResult.getClientRequestId().equals(requestId)) {
// If updating a job.
if (options.getUpdate()) {
if (options.isUpdate()) {
throw new DataflowJobAlreadyUpdatedException(dataflowPipelineJob,
String.format("The job named %s with id: %s has already been updated into job id: %s "
+ "and cannot be updated again.",
Expand Down