diff --git a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/OutputTooLargeException.java b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/OutputTooLargeException.java index 9f4b413841c5..acfd8a291108 100644 --- a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/OutputTooLargeException.java +++ b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/OutputTooLargeException.java @@ -22,7 +22,9 @@ /** Indicates that an output element was too large. */ public class OutputTooLargeException extends RuntimeException { public OutputTooLargeException(String reason) { - super(reason); + super( + reason + + " See https://cloud.google.com/dataflow/docs/guides/common-errors#key-commit-too-large-exception."); } /** Returns whether an exception was caused by a {@link OutputTooLargeException}. */ diff --git a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WindmillSink.java b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WindmillSink.java index 78d0c6b4550a..f83c68ab3c90 100644 --- a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WindmillSink.java +++ b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WindmillSink.java @@ -183,7 +183,9 @@ public long add(WindowedValue data) throws IOException { "Trying to output too large key with size " + key.size() + ". Limit is " - + context.getMaxOutputKeyBytes()); + + context.getMaxOutputKeyBytes() + + ". See https://cloud.google.com/dataflow/docs/guides/common-errors#key-commit-too-large-exception." + + " Running with --experiments=throw_exceptions_on_large_output will instead throw an OutputTooLargeException which may be caught in user code."); } } if (value.size() > context.getMaxOutputValueBytes()) { @@ -194,7 +196,9 @@ public long add(WindowedValue data) throws IOException { "Trying to output too large value with size " + value.size() + ". Limit is " - + context.getMaxOutputValueBytes()); + + context.getMaxOutputValueBytes() + + ". See https://cloud.google.com/dataflow/docs/guides/common-errors#key-commit-too-large-exception." + + " Running with --experiments=throw_exceptions_on_large_output will instead throw an OutputTooLargeException which may be caught in user code."); } } diff --git a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/KeyCommitTooLargeException.java b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/KeyCommitTooLargeException.java index 090d9981309e..76228b9092b3 100644 --- a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/KeyCommitTooLargeException.java +++ b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/KeyCommitTooLargeException.java @@ -40,7 +40,8 @@ public static KeyCommitTooLargeException causedBy( message.append( ". This may be caused by grouping a very " + "large amount of data in a single window without using Combine," - + " or by producing a large amount of data from a single input element."); + + " or by producing a large amount of data from a single input element." + + " See https://cloud.google.com/dataflow/docs/guides/common-errors#key-commit-too-large-exception."); return new KeyCommitTooLargeException(message.toString()); }