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..05d23be98bb5 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 @@ -208,6 +208,20 @@ public Dataflow create(PipelineOptions options) { int getNumberOfWorkerHarnessThreads(); void setNumberOfWorkerHarnessThreads(int value); + /** + * If {@literal true}, save a heap dump before killing a thread or process which is GC + * thrashing or out of memory. The location of the heap file will either be echoed back + * to the user, or the user will be given the oppourtunity to download the heap file. + * + *

+ * CAUTION: Heap dumps can of comparable size to the default boot disk. Consider increasing + * the boot disk size before setting this flag to true. + */ + @Description("If {@literal true}, save a heap dump before killing a thread or process " + + "which is GC thrashing or out of memory.") + boolean getDumpHeapOnOOM(); + void setDumpHeapOnOOM(boolean dumpHeapBeforeExit); + /** * Creates a {@link PathValidator} object using the class specified in * {@link #getPathValidatorClass()}.