Skip to content
This repository was archived by the owner on Nov 11, 2022. It is now read-only.
Merged
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 @@ -27,11 +27,17 @@
@Hidden
public interface DataflowProfilingOptions {

@Description("Whether to periodically dump profiling information to local disk.\n"
+ "WARNING: Enabling this option may fill local disk with profiling information.")
@Description(
"This option is deprecated and ignored. Using --saveProfilesToGcs=<GCS path> is preferred.")
boolean getEnableProfilingAgent();
void setEnableProfilingAgent(boolean enabled);

@Description(
"When set to a non-empty value, enables recording profiles and saving them to GCS.\n"
+ "Profiles will continue until the pipeline is stopped or updated without this option.\n")
String getSaveProfilesToGcs();
void setSaveProfilesToGcs(String gcsPath);

@Description(
"[INTERNAL] Additional configuration for the profiling agent. Not typically necessary.")
@Hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,14 @@ public static DataflowPipelineRunner fromOptions(PipelineOptions options) {
if (dataflowOptions.getTempLocation() != null) {
validator.validateOutputFilePrefixSupported(dataflowOptions.getTempLocation());
}
if (!Strings.isNullOrEmpty(dataflowOptions.getSaveProfilesToGcs())) {
validator.validateOutputFilePrefixSupported(dataflowOptions.getSaveProfilesToGcs());
}
if (dataflowOptions.getEnableProfilingAgent()) {
LOG.error("--enableProfilingAgent is no longer supported, and will be ignored. "
+ "Use --saveProfilesToGcs instead.");
}

if (Strings.isNullOrEmpty(dataflowOptions.getTempLocation())) {
dataflowOptions.setTempLocation(dataflowOptions.getStagingLocation());
} else if (Strings.isNullOrEmpty(dataflowOptions.getStagingLocation())) {
Expand Down
Loading