apache/beam · warning

withThrottlingTargetMs has been removed and does not have…

Error message

withThrottlingTargetMs has been removed and does not have effect.

What it means

BigtableIO.Write.withThrottlingTargetMs(int) was deprecated in Beam 2.60.0 because the underlying Bigtable client no longer honors a caller-supplied throttling target. The method is kept for source compatibility but is a no-op that only logs this warning and returns the unchanged Write transform.

Solutions

  1. Remove the withThrottlingTargetMs call — it has no effect.
  2. Tune throughput with Bigtable instance-level autoscaling or client-level flow control settings instead.
  3. Suppress or fix the deprecation warning during the SDK upgrade review.
  4. Pin to Beam 2.59.x only if the old throttling behavior is strictly required (not recommended).

Example fix

// before
BigtableIO.write().withTableId(tableId).withThrottlingTargetMs(100)
// after
BigtableIO.write().withTableId(tableId)
Defensive patterns

Strategy: validation

Validate before calling

// Detect removed API usage before upgrading:
grep -R "withThrottlingTargetMs" pipeline/src/ || echo "safe to upgrade to Beam 2.60+"

Prevention

When it happens

Trigger: Any call to BigtableIO.write().withThrottlingTargetMs(n) on Beam 2.60.0 or later.

Common situations: Upgrading a pipeline from Beam <2.60 to 2.60+ where throttling was explicitly tuned; copy-pasted pipeline configuration that sets throttlingTargetMs; IDE auto-suggest still resolves the deprecated method so it compiles silently.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/9bbeb81e7508c7d7. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java:1149

     * #withMaxOutstandingElements(long)} and {@link #withMaxOutstandingBytes(long)}, which is
     * always enabled on batch writes and limits the number of outstanding requests to the Bigtable
     * server.
     *
     * <p>Does not modify this object.
     */
    public Write withFlowControl(boolean enableFlowControl) {
      BigtableWriteOptions options = getBigtableWriteOptions();
      return toBuilder()
          .setBigtableWriteOptions(options.toBuilder().setFlowControl(enableFlowControl).build())
          .build();
    }

    /**
     * @deprecated This method has been deprecated in Beam 2.60.0. It does not have an effect.
     */
    @Deprecated
    public Write withThrottlingTargetMs(int throttlingTargetMs) {
      LOG.warn("withThrottlingTargetMs has been removed and does not have effect.");
      return this;
    }

    /**
     * @deprecated This method has been deprecated in Beam 2.60.0. It does not have an effect.
     */
    @Deprecated
    public Write withThrottlingReportTargetMs(int throttlingReportTargetMs) {
      LOG.warn("withThrottlingReportTargetMs has been removed and does not have an effect.");
      return this;
    }

    public Write withErrorHandler(ErrorHandler<BadRecord, ?> badRecordErrorHandler) {
      return toBuilder()
          .setBadRecordErrorHandler(badRecordErrorHandler)
          .setBadRecordRouter(BadRecordRouter.RECORDING_ROUTER)
          .build();
    }

View on GitHub (pinned to 12126d8942)