Skip to Content
Apache Flinkによるストリーム処理
book

Apache Flinkによるストリーム処理

by Fabian Hueske, Vasiliki Kalavri
March 2025
Intermediate to advanced
310 pages
5h 10m
Japanese
O'Reilly Media, Inc.
Content preview from Apache Flinkによるストリーム処理

第9章. ストリーミング・アプリケーション用にFlinkをセットアップする

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

今日のデータ インフラは多様化している。Apache Flinkのような分散データ処理フレームワークは、リソースマネージャ、ファイルシステム、分散協調のためのサービスなど、複数のコンポーネントと相互作用するようにセットアップする必要がある。

この章では、Flink クラスタをデプロイするさまざまな方法と、それらを安全に設定し、高可用性にする方法について説明する。異なる Hadoop バージョンとファイルシステムに対する Flink のセットアップを説明し、Flink のマスタプロセスとワーカプロセスの最も重要な設定パラメータについて説明する。この章を読めば、Flink クラスタのセットアップと設定の方法がわかるだろう。

デプロイ・モード

Flink は、ローカルマシン、ベアメタルクラスタ、Hadoop YARNクラスタ、Kubernetesクラスタなど、さまざまな環境にデプロイできる。Flinkセットアップのコンポーネント」では、Flinkセットアップの様々なコンポーネントを紹介した: JobManager、TaskManager、ResourceManager、Dispatcher。このセクションでは、スタンドアロンクラスタ、Docker、Hadoop YARN、Kubernetesを含む様々な環境でFlinkを設定し起動する方法と、それぞれのセットアップでFlinkのコンポーネントがどのように組み立てられるかを説明する。

スタンドアロンクラスター

スタンドアロンFlinkクラスタは、1台以上のマシンで実行される少なくとも1つのマスタープロセスと少なくとも1つのTaskManagerプロセスで構成される。すべてのプロセスは、通常の Java JVM プロセスとして実行される。図9-1にスタンドアロンFlinkのセットアップを示す。

図9-1. スタンドアロンのFlinkクラスタを起動する

マスター・プロセスは、DispatcherとResourceManagerを別々のスレッドで実行する。実行を開始すると、TaskManagerはResourceManagerに自分自身を登録する。図9-2はスタンドアロンクラスタにジョブが投入される様子を示している。

図9-2. Flinkスタンドアローン・クラスターにアプリケーションを投入する

クライアントはDispatcherにジョブを投入する。Dispatcherは内部的にJobManagerスレッドを起動し、実行用のJobGraphを提供する。JobManagerはResourceManagerに必要な処理スロットを要求し、要求されたスロットを受け取ると実行のためにジョブをデプロイする。

スタンドアロンデプロイでは、マスターとワーカーは障害発生時に自動的に再起動されない。十分な数の処理スロットがあれば、ジョブはワーカーの障害から回復できる。これは、1つ以上のスタンバイワーカーを実行することで確保できる。マスター障害からのジョブ回復には、この章で後述するように、可用性の高いセットアップが必要である。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

LLMのプロンプトエンジニアリング ―GitHub Copilotを生んだ開発者が教える生成AIアプリケーション開発

LLMのプロンプトエンジニアリング ―GitHub Copilotを生んだ開発者が教える生成AIアプリケーション開発

John Berryman, Albert Ziegler, 服部 佑樹, 佐藤 直生
信頼性の高い機械学習 ―SRE原則を活用したMLOps

信頼性の高い機械学習 ―SRE原則を活用したMLOps

Cathy Chen, Niall Richard Murphy, Kranti Parisa, D. Sculley, Todd Underwood, 井伊 篤彦, 張 凡, 樋口 千洋
AWS クックブック

AWS クックブック

John Culkin, Mike Zazon

Publisher Resources

ISBN: 9798341625044