

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Apache Flink の設定
<a name="reference-flink-settings.title"></a>

Apache Flink 用 Managed Service は、Apache Flink フレームワークの実装です。Apache Flink 用 Managed Service は、このセクションで説明されているデフォルト値を使用します。これらの値には、Managed Service for Apache Flink アプリケーションのコード内で設定できるものもありますが、変更できないものもあります。

このセクションのリンクを使用して、Apache flink 設定と変更可能な設定の詳細を確認します。

**Topics**
+ [Apache Spark の設定](#apache-flink-configuration)
+ [ステートバックエンド](#reference-defaults-state-backend)
+ [Checkpointing](#reference-defaults-checkpoint)
+ [セーブポインティング](#reference-defaults-savepoint)
+ [ヒープサイズ](#reference-defaults-heap)
+ [バッファデブローティング](#reference-defaults-buffer-debloating)
+ [変更可能な Flink 設定プロパティ](reference-modifiable-settings.md)
+ [プログラムによる Flink 設定プロパティ](programmatic-configuration.md)
+ [設定済み Flink プロパティを表示する](viewing-modifiable-settings.md)

## Apache Spark の設定
<a name="apache-flink-configuration"></a>

Apache Flink 用 Managed Service には、ほとんどのプロパティに Apache Flink 推奨値と、一般的なアプリケーションプロファイルに基づくいくつかの値で構成されるデフォルトの Flink 設定が用意されています。Flink 設定の詳細については、「[設定](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/)」を参照してください。サービス提供のデフォルト設定は、ほとんどのアプリケーションに適用されます。ただし、並列度が高く、メモリやステートの使用量が多い特定のアプリケーションのパフォーマンスを向上させるために Flink の設定プロパティを微調整したり、Apache Flink の新しいデバッグ機能を有効にしたりする場合は、サポートケースをリクエストすることで特定のプロパティを変更することができます。詳細については、「[AWS サポートセンター](https://console.aws.amazon.com/support/home#/)」を参照してください。アプリケーションの現在の設定は、[Apache Flink ダッシュボード](https://docs.aws.amazon.com/managed-flink/latest/java/how-dashboard.html)を使用して確認できます。

## ステートバックエンド
<a name="reference-defaults-state-backend"></a>

Apache Flink 用 Managed Service は、一時的なデータをステートバックエンドに保存します。Apache Flink 用 Managed Service は、「**RocksDBStateBackend**」を使用しています。「`setStateBackend`」を呼び出して別のバックエンドを設定しても効果はありません。

ステートバックエンドでは、以下の機能が利用できます。
+ インクリメンタルステートのバックエンドスナップショット
+ 非同期ステートのバックエンドスナップショット
+ チェックポイントのローカルリカバリ

ステートバックエンドについて詳しくは、「Apache Flink ドキュメント」の「[State Backends](https://nightlies.apache.org/flink/flink-docs-release-1.19/ops/state/state_backends.html)」を参照してください。

## Checkpointing
<a name="reference-defaults-checkpoint"></a>

Apache Flink 用 Managed Service は、以下の値を持つデフォルトのチェックポイント設定を使用します。これらの値の一部は、[CheckpointConfiguration](https://docs.aws.amazon.com/managed-flink/latest/apiv2/API_CheckpointConfiguration.html) を使用して変更できます。変更したチェックポイント値を使用するには、Managed Service for Apache Flink の `CheckpointConfiguration.ConfigurationType` を `CUSTOM` に設定する必要があります。


****  

| 設定 | 変更することはできますか？ | その方法は? | デフォルト値 | 
| --- | --- | --- | --- | 
| CheckpointingEnabled | 変更可能 | [アプリケーションの作成](https://docs.aws.amazon.com/managed-flink/latest/apiv2/API_CreateApplication.html) [アプリケーションの更新](https://docs.aws.amazon.com/managed-flink/latest/apiv2/API_UpdateApplication.html) [CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_KinesisAnalyticsV2.html)  | 正 | 
| CheckpointInterval | 変更可能 | [アプリケーションの作成](https://docs.aws.amazon.com/managed-flink/latest/apiv2/API_CreateApplication.html) [アプリケーションの更新](https://docs.aws.amazon.com/managed-flink/latest/apiv2/API_UpdateApplication.html) [CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_KinesisAnalyticsV2.html)  | 60000 | 
| MinPauseBetweenCheckpoints | 変更可能 | [アプリケーションの作成](https://docs.aws.amazon.com/managed-flink/latest/apiv2/API_CreateApplication.html) [アプリケーションの更新](https://docs.aws.amazon.com/managed-flink/latest/apiv2/API_UpdateApplication.html) [CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_KinesisAnalyticsV2.html)  | 5000 | 
| アライメントされていないチェックポイント | 変更可能 | [サポートケース](https://console.aws.amazon.com/support/home#/) | 誤 | 
| 同時チェックポイントの数 | 変更不可 | 該当なし | 1 | 
| チェックポイントモード | 変更不可 | 該当なし | 1 回だけ | 
| チェックポイント保持ポリシー | 変更不可 | 該当なし | 故障した時 | 
| チェックポイントタイムアウト | 変更不可 | 該当なし | 60 分 | 
| 最大チェックポイントの保持 | 変更不可 | 該当なし | 1 | 
| チェックポイントとセーブポイントのロケーション | 変更不可 | 該当なし | 永続的なチェックポイントとセーブポイントのデータは、サービスが所有する S3 バケットに保存されます。 | 

## セーブポインティング
<a name="reference-defaults-savepoint"></a>

デフォルトでは、セーブポイントからリストアする場合、再開操作はセーブポイントのすべての状態をリストアするプログラムにマッピングしようとします。オペレータをドロップした場合、デフォルトでは、欠落したオペレータに対応するデータを含むセーブポイントからのリストアは失敗します。アプリケーションの [FlinkRunConfiguration](https://docs.aws.amazon.com/managed-flink/latest/apiv2/API_FlinkRunConfiguration.html) の *AllowNonRestoredState* パラメータを `true` に設定することで、操作を成功させることができます。これにより、再開操作は、新しいプログラムにマッピングできない状態をスキップすることができます。

詳細については、「[Apache Flink ドキュメント](https://nightlies.apache.org/flink/flink-docs-release-1.15/)」の「[復元されない状態を許可する](https://nightlies.apache.org/flink/flink-docs-release-1.15/ops/state/savepoints.html#allowing-non-restored-state)」を参照してください。

## ヒープサイズ
<a name="reference-defaults-heap"></a>

Apache Flink 用 Managed Service は、各 KPU に 3 GiB の JVM ヒープを割り当て、ネイティブコード割り当て用に1 GiB を確保します。アプリケーションの容量を増やす情報については、 [Managed Service for Apache Flink でアプリケーションスケーリングを実装する](how-scaling.md) を参照してください。

[ の詳細については、「[Apache ActiveMQ ドキュメント](https://nightlies.apache.org/flink/flink-docs-release-1.15/)」の「設定](https://nightlies.apache.org/flink/flink-docs-release-1.15/ops/config.html)」を参照してください。

## バッファデブローティング
<a name="reference-defaults-buffer-debloating"></a>

バッファデブローティングは、バックプレッシャーが高いアプリケーションに役立ちます。アプリケーションでチェックポイントやセーブポイントの失敗が発生する場合、この機能を有効にすると役に立ちます。そのためには、「[サポートケース](https://console.aws.amazon.com/support/home#/)」をリクエストしてください。

詳細については、「[Apache Flink ドキュメント](https://nightlies.apache.org/flink/flink-docs-release-1.15/)」の「[バッファデブローティングのメカニズム](https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/deployment/memory/network_mem_tuning/#the-buffer-debloating-mechanism)」を参照してください。

# 変更可能な Flink 設定プロパティ
<a name="reference-modifiable-settings"></a>

[サポートケース](https://console.aws.amazon.com/support/home#/)を使用して変更できる Flink 設定は次のとおりです。アプリケーションプレフィックスを指定することで、1 以上のプロパティを一度に変更できます。また、複数のアプリケーションを同時に変更できます。このリスト以外にも変更したい Flink 設定プロパティがある場合は、状況に応じて適切なプロパティを指定してください。

## リスタートストラテジー
<a name="reference-modifiable-settings-fault-tolerance"></a>

Flink 1.19 以降では、デフォルトで `exponential-delay` リスタートストラテジーを使用します。以前のすべてのバージョンでは、デフォルトで `fixed-delay` リスタートストラテジーが使用されます。

`restart-strategy:`

`restart-strategy.fixed-delay.delay:`

`restart-strategy.exponential-delay.backoff-muliplier:`

`restart-strategy.exponential-delay.initial-backoff:`

`restart-strategy.exponential-delay.jitter-factor:`

`restart-strategy.exponential-delay.reset-backoff-threshold:`

## チェックポイントとステートバックエンド
<a name="reference-modifiable-settings-checkpoints-state-backends"></a>

`state.backend.type:`

`state.backend.fs.memory-threshold:`

`state.backend.incremental:`

## Checkpointing
<a name="reference-modifiable-settings-checkpointing"></a>

`execution.checkpointing.unaligned:`

`execution.checkpointing.interval-during-backlog:`

## RocksDB ネイティブメトリクス
<a name="reference-modifiable-settings-rocksdb"></a>

RocksDB ネイティブメトリクスは CloudWatch には発送されません。有効にすると、これらのメトリクスには Flink ダッシュボードから、またはカスタムツールを使用して Flink REST API からアクセスできます。

Apache Flink 用 Managed Service では、顧客は「[CreateApplicationPresignedUrl](https://docs.aws.amazon.com/managed-flink/latest/apiv2/API_CreateApplicationPresignedUrl.html)」API を使用して、最新の Flink 「[REST API](https://nightlies.apache.org/flink/flink-docs-release-1.18/docs/ops/rest_api/)」（または使用しているサポートバージョン）に読み取り専用モードでアクセスできます。この API は Flink 独自のダッシュボードで使用されますが、カスタムモニタリングツールでも使用されることもできます。

`state.backend.rocksdb.metrics.actual-delayed-write-rate:`

`state.backend.rocksdb.metrics.background-errors:`

`state.backend.rocksdb.metrics.block-cache-capacity:`

`state.backend.rocksdb.metrics.block-cache-pinned-usage:`

`state.backend.rocksdb.metrics.block-cache-usage:`

`state.backend.rocksdb.metrics.column-family-as-variable:`

`state.backend.rocksdb.metrics.compaction-pending:`

`state.backend.rocksdb.metrics.cur-size-active-mem-table:`

`state.backend.rocksdb.metrics.cur-size-all-mem-tables:`

`state.backend.rocksdb.metrics.estimate-live-data-size:`

`state.backend.rocksdb.metrics.estimate-num-keys:`

`state.backend.rocksdb.metrics.estimate-pending-compaction-bytes:`

`state.backend.rocksdb.metrics.estimate-table-readers-mem:`

`state.backend.rocksdb.metrics.is-write-stopped:`

`state.backend.rocksdb.metrics.mem-table-flush-pending:`

`state.backend.rocksdb.metrics.num-deletes-active-mem-table:`

`state.backend.rocksdb.metrics.num-deletes-imm-mem-tables:`

`state.backend.rocksdb.metrics.num-entries-active-mem-table:`

`state.backend.rocksdb.metrics.num-entries-imm-mem-tables:`

`state.backend.rocksdb.metrics.num-immutable-mem-table:`

`state.backend.rocksdb.metrics.num-live-versions:`

`state.backend.rocksdb.metrics.num-running-compactions:`

`state.backend.rocksdb.metrics.num-running-flushes:`

`state.backend.rocksdb.metrics.num-snapshots:`

`state.backend.rocksdb.metrics.size-all-mem-tables:`

## RocksDB オプション
<a name="reference-modifiable-settings-rocksdb-options"></a>

`state.backend.rocksdb.compaction.style:`

`state.backend.rocksdb.memory.partitioned-index-filters:`

`state.backend.rocksdb.thread.num:`

## 高度なステートバックエンドオプション
<a name="reference-modifiable-settings-advanced-state-backends-options"></a>

`state.storage.fs.memory-threshold:`

## フルタスクマネージャーオプション
<a name="reference-modifiable-settings-full-task-manager-options"></a>

`task.cancellation.timeout:`

`taskmanager.jvm-exit-on-oom:`

`taskmanager.numberOfTaskSlots:`

`taskmanager.slot.timeout:`

`taskmanager.memory.network.fraction:`

`taskmanager.memory.network.max:`

`taskmanager.network.request-backoff.initial:`

`taskmanager.network.request-backoff.max:`

`taskmanager.network.memory.buffer-debloat.enabled:`

`taskmanager.network.memory.buffer-debloat.period:`

`taskmanager.network.memory.buffer-debloat.samples:`

`taskmanager.network.memory.buffer-debloat.threshold-percentages:`

## メモリ設定
<a name="reference-modifiable-settings-memory-configuration"></a>

`taskmanager.memory.jvm-metaspace.size:`

`taskmanager.memory.jvm-overhead.fraction:`

`taskmanager.memory.jvm-overhead.max:`

`taskmanager.memory.managed.consumer-weights:`

`taskmanager.memory.managed.fraction:`

`taskmanager.memory.network.fraction:`

`taskmanager.memory.network.max:`

`taskmanager.memory.segment-size:`

`taskmanager.memory.task.off-heap.size:`

## RPC/Akka
<a name="reference-modifiable-settings-RPC-Akka"></a>

`akka.ask.timeout:`

`akka.client.timeout:`

`akka.framesize:`

`akka.lookup.timeout:`

`akka.tcp.timeout:`

## クライアント
<a name="reference-modifiable-settings-client"></a>

`client.timeout:`

## 高度なクラスターオプション
<a name="reference-modifiable-settings-advanced-cluster-options"></a>

`cluster.intercept-user-system-exit:`

`cluster.processes.halt-on-fatal-error:`

## ファイルシステムの設定
<a name="reference-modifiable-settings-advanced-filesystem-configurations"></a>

`fs.s3.connection.maximum:`

`fs.s3a.connection.maximum:`

`fs.s3a.threads.max:`

`s3.upload.max.concurrent.uploads:`

## 高度な耐障害性オプション
<a name="reference-modifiable-settings-advanced-fault-tolerance-options"></a>

`heartbeat.timeout:`

`jobmanager.execution.failover-strategy:`

## メモリ設定
<a name="reference-modifiable-settings-memory-configuration"></a>

`jobmanager.memory.heap.size:`

## メトリクス
<a name="reference-modifiable-settings-metrics"></a>

`metrics.latency.interval:`

## REST エンドポイントとクライアントの高度なオプション
<a name="reference-modifiable-settings-rest"></a>

`rest.flamegraph.enabled:`

`rest.server.numThreads:`

## 高度な SSL セキュリティオプション
<a name="reference-modifiable-settings-ssl"></a>

`security.ssl.internal.handshake-timeout:`

## 高度なトスケジュールオプション
<a name="reference-modifiable-settings-scheduling"></a>

`slot.request.timeout:`

## Flink ウェブ UI の高度なオプション
<a name="reference-modifiable-settings-webui"></a>

`web.timeout:`

# プログラムによる Flink 設定プロパティ
<a name="programmatic-configuration"></a>

以下は、アプリケーションコードで直接変更できる Flink 設定プロパティです。MSF 2.2 以降、アプリケーションコードのこのページに記載されていないプロパティを変更しようとすると、例外がスローされます。

**注記**  
これらのプロパティは、 AWS サポートケースによって変更された設定とは異なります。TaskManager メモリ、ステートバックエンド、RocksDB チューニング、再起動戦略などのインフラストラクチャレベルの設定については、「」を参照してください[変更可能な Flink 設定プロパティ](reference-modifiable-settings.md)。

## パイプラインの設定
<a name="programmatic-configuration-pipeline"></a>

`execution.runtime-mode`

`pipeline.auto-generate-uids`

`pipeline.auto-watermark-interval`

`pipeline.cached-files`

`pipeline.classpaths`

`pipeline.closure-cleaner-level`

`pipeline.force-avro`

`pipeline.force-kryo`

`pipeline.generic-types`

`pipeline.global-job-parameters`

`pipeline.jars`

`pipeline.jobvertex-parallelism-overrides`

`pipeline.max-parallelism`

`pipeline.name`

`pipeline.object-reuse`

`pipeline.operator-chaining.chain-operators-with-different-max-parallelism`

`pipeline.operator-chaining.enabled`

`pipeline.serialization-config`

`pipeline.vertex-description-mode`

`pipeline.vertex-name-include-index-prefix`

`pipeline.watermark-alignment.allow-unaligned-source-splits`

## Python API
<a name="programmatic-configuration-python"></a>

`python.execution-mode`

`python.operator-chaining.enabled`

`python.job-options`

`python.internal.archives-key-map`

`python.internal.files-key-map`

`python.internal.requirements-file-key`

## テーブル API / SQL
<a name="programmatic-configuration-table-api"></a>

`table.exec.async-lookup.buffer-capacity`

`table.exec.async-lookup.key-ordered-enabled`

`table.exec.async-lookup.output-mode`

`table.exec.async-lookup.timeout`

`table.exec.async-ml-predict.max-concurrent-operations`

`table.exec.async-ml-predict.output-mode`

`table.exec.async-ml-predict.timeout`

`table.exec.async-scalar.max-concurrent-operations`

`table.exec.async-scalar.max-attempts`

`table.exec.async-scalar.retry-delay`

`table.exec.async-scalar.retry-strategy`

`table.exec.async-scalar.timeout`

`table.exec.async-state.enabled`

`table.exec.async-table.max-concurrent-operations`

`table.exec.async-table.max-retries`

`table.exec.async-table.retry-delay`

`table.exec.async-table.retry-strategy`

`table.exec.async-table.timeout`

`table.exec.async-vector-search.max-concurrent-operations`

`table.exec.async-vector-search.output-mode`

`table.exec.async-vector-search.timeout`

`table.exec.deduplicate.insert-update-after-sensitive-enabled`

`table.exec.deduplicate.mini-batch.compact-changes-enabled`

`table.exec.delta-join.cache-enabled`

`table.exec.disabled-operators`

`table.exec.iceberg.use-v2-sink`

`table.exec.interval-join.min-cleanup-interval`

`table.exec.legacy-cast-behaviour`

`table.exec.local-hash-agg.adaptive.distinct-value-rate-threshold`

`table.exec.local-hash-agg.adaptive.enabled`

`table.exec.local-hash-agg.adaptive.sampling-threshold`

`table.exec.mini-batch.allow-latency`

`table.exec.mini-batch.enabled`

`table.exec.mini-batch.size`

`table.exec.operator-fusion-codegen.enabled`

`table.exec.simplify-operator-name-enabled`

`table.exec.sink.keyed-shuffle`

`table.exec.sink.nested-constraint-enforcer`

`table.exec.sink.not-null-enforcer`

`table.exec.sink.rowtime-inserter`

`table.exec.sink.type-length-enforcer`

`table.exec.sink.upsert-materialize`

`table.exec.sink.upsert-materialize-strategy.adaptive.threshold.high`

`table.exec.sink.upsert-materialize-strategy.adaptive.threshold.low`

`table.exec.sink.upsert-materialize-strategy.type`

`table.exec.sort.async-merge-enabled`

`table.exec.sort.default-limit`

`table.exec.sort.max-num-file-handles`

`table.exec.source.cdc-events-duplicate`

`table.exec.source.idle-timeout`

`table.exec.spill-compression.block-size`

`table.exec.spill-compression.enabled`

`table.exec.state.ttl`

`table.exec.uid.format`

`table.exec.uid.generation`

`table.exec.unbounded-over.version`

`table.exec.window-agg.buffer-size-limit`

`table.optimizer.agg-phase-strategy`

`table.optimizer.adaptive-broadcast-join.strategy`

`table.optimizer.bushy-join-reorder-threshold`

`table.optimizer.delta-join.strategy`

`table.optimizer.distinct-agg.split.bucket-num`

`table.optimizer.distinct-agg.split.enabled`

`table.optimizer.dynamic-filtering.enabled`

`table.optimizer.incremental-agg-enabled`

`table.optimizer.join-reorder-enabled`

`table.optimizer.multi-join.enabled`

`table.optimizer.multiple-input-enabled`

`table.optimizer.non-deterministic-update.strategy`

`table.optimizer.reuse-optimize-block-with-digest-enabled`

`table.optimizer.reuse-sink-enabled`

`table.optimizer.reuse-source-enabled`

`table.optimizer.reuse-sub-plan-enabled`

`table.optimizer.runtime-filter.enabled`

`table.optimizer.skewed-join-optimization.skewed-factor`

`table.optimizer.skewed-join-optimization.skewed-threshold`

`table.optimizer.skewed-join-optimization.strategy`

`table.optimizer.source.report-statistics-enabled`

`table.optimizer.union-all-as-breakpoint-enabled`

`table.builtin-catalog-name`

`table.builtin-database-name`

`table.catalog-modification.listeners`

`table.column-expansion-strategy`

`table.display.max-column-width`

`table.dml-sync`

`table.dynamic-table-options.enabled`

`table.generated-code.max-length`

`table.legacy-nested-row-nullability`

`table.local-time-zone`

`table.plan.compile.catalog-objects`

`table.plan.force-recompile`

`table.plan.restore.catalog-objects`

`table.rtas-ctas.atomicity-enabled`

`table.sql-dialect`

# 設定済み Flink プロパティを表示する
<a name="viewing-modifiable-settings"></a>

自分で設定した Apache Flink プロパティや、「[サポートケース](https://support.console.aws.amazon.com/support/home#/)」を通じて修正を依頼した Apache Flink プロパティは、Apache Flink ダッシュボードから以下の手順で確認できます。

1. Flink ダッシュボードへ移動

1. 左側のナビゲーションペインで、[**Job Manager**] を選択します。

1. [**設定**] を選択すると、Flink プロパティのリストが表示されます。