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によるストリーム処理

第4章 Apache Flinkの開発環境のセットアップ Apache Flinkの開発環境をセットアップする

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

さて、 全ての知識を得たので、いよいよ手を動かして Flink アプリケーションの開発を始めよう!この章では、Flink アプリケーションを開発、実行、デバッグするための環境のセットアップ方法を学ぶ。この章では、Flink アプリケーションを開発し、実行し、デバッグするための環境をどのようにセットアップするかについて学ぶ。これらのサンプルを使って、Flink アプリケーションが IDE でどのように実行され、デバッグされるかを示す。最後に、新しいアプリケーションの出発点であるFlink MavenプロジェクトをBootstrapする方法を示す。

必要なソフトウェア

まず、Flink アプリケーションの開発に必要なソフトウェア について説明しよう。Linux、macOS、Windows上でFlinkアプリケーションを開発・実行できる。しかし、UNIX ベースのセットアップが最も豊富なツール・サポートを享受できるのは、ほとんどの Flink 開発者がこの環境を好んでいるからだ。本章では UNIX ベースのセットアップを想定する。Windowsユーザであれば、Windows subsystem for Linux (WSL)、Cygwin、またはLinux仮想マシンを使って、UNIX環境でFlinkを実行することができる。

FlinkのDataStream APIはJavaとScalaで利用できる。したがって、FlinkのDataStreamアプリケーションを実装するにはJava JDKが必要である-Java JDK 8(またはそれ以上)。Java JREだけでは不十分である。

Flinkアプリケーションの開発には厳密には必要ないが、以下のソフトウェアもインストールされているものとする:

  • Apache Maven 3.x。この本のコード例では、Mavenのビルド管理を使用している。さらに、Flinkは新しいFlink MavenプロジェクトをブートストラップするためのMavenアーキタイプを提供している。

  • Javaおよび/またはScala開発用のIDE。一般的な選択肢としては、IntelliJ IDEA、Eclipse、Netbeansと、適切なプラグイン(Maven、Git、Scalaサポートなど)がある。IntelliJ IDEAの使用を推奨する。IntelliJ IDEAのWebサイトの 指示に従ってダウンロードし、インストールすることができる。

IDEでFlinkアプリケーションを実行してデバッグする

Flinkは分散データ処理システムだが、通常はローカルマシンで開発し、初期テストを実行する。これは開発を容易にし、クラスタデプロイを簡素化する。なぜなら、クラスタ環境で変更を加えることなく、まったく同じコードを実行できるからだ。以下では、ここで使用するコード例の入手方法、IntelliJへのインポート方法、サンプル・アプリケーションの実行方法、デバッグ方法について説明する。

IDEでこの本の例をインポートする

本書の コード例はGitHubでホストされている。本書のGitHubページには、ScalaのサンプルとJavaのサンプルのリポジトリが1つずつ発見できる。セットアップにはScalaのリポジトリを使うが、Javaが好きなら同じ指示に従うことができるはずだ。 ...

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