Skip to Content
スパーク定義ガイド
book

スパーク定義ガイド

by Bill Chambers, Matei Zaharia
March 2025
Intermediate to advanced
606 pages
9h
Japanese
O'Reilly Media, Inc.
Content preview from スパーク定義ガイド

第18章. モニタリングとデバッグ

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

この 章では、Spark アプリケーションの監視とデバッグに必要な主な詳細を説明する。そのために、ジョブの実行ライフサイクルをトレースする方法を理解するのに役立つように設計されたクエリの例で、Spark UI を見ていく。この例は、ジョブのデバッグ方法とエラーが発生しやすい場所を理解するのにも役立つだろう。

モニタリングの現状

ある時点で、Sparkのジョブを監視して、どこで問題が発生しているかを理解する必要がある。実際に監視できるさまざまなものを確認し、そのためのオプションの概要を説明する価値がある。監視できるコンポーネントを確認しよう(図18-1参照)。

Sparkのアプリケーションと仕事

アプリケーションがクラスタに対してどのように実行されるかをデバッグしたり、よりよく理解したりする際に、最初に監視を開始したいのはSpark UIとSparkログだ。これらは、RDDやクエリプランのようなSparkの概念のレベルで、現在実行中のアプリケーションに関する情報をレポートする。この章を通して、これらのSpark監視ツールの使い方について詳しく説明する。

JVM

Spark 、個々のJava仮想マシン(JVM)でエグゼキューターが実行される。したがって、次のレベルでは、個々の仮想マシン(VM)をモニターして、コードがどのように実行されているかをよりよく理解する必要がある。JVM スタック・トレースを提供するjstack、ヒープ・ダンプを作成するjmap、時系列統計を報告するjstat、様々なJVMプロパティを視覚的に探索するjconsoleのようなユーティリティは、JVM内部に慣れている人にとって便利である。 、jvisualvmのようなツールを使ってSparkジョブのプロファイリングを支援することもできる。これらの情報の一部はSpark UIで提供されるが、非常に低レベルのデバッグには、前述のツールが便利だ。

OS/マシン

JVMはホスト・オペレーティング・システム(OS)上で動作しており、それらのマシンが健全であることを確認するために、マシンの状態を監視することが重要である。これにはCPU、Network、I/Oなどのモニタリングが含まれる。これらの は、クラスタ・レベルの監視ソリューションでしばしば報告される。しかし、dstatiostatiotopなど、より具体的に使用できるツールもある。

クラスター

当然ながら、 、Sparkアプリケーションを実行するクラスタを監視できる。これはYARN、Mesos、またはスタンドアロンのクラスタかもしれない。通常、ここで何らかのモニタリング・ソリューションを持つことは重要だ。クラスターが動作していない場合、すぐにわかるはずだからだ。一般的なクラスタレベルの監視ツールには、Gangliaや Prometheusなどがある。

image
図18-1. 監視できるSparkアプリケーションのコンポーネント

何を監視すべきか

、モニタリングについて簡単に説明した後、Sparkアプリケーションのモニタリングとデバッグについて説明しよう。アプリケーションを実行している ...

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

高性能Spark

高性能Spark

Holden Karau, Rachel Warren
生成AIの可視化

生成AIの可視化

Priyanka Vergadia, Valliappa Lakshmanan
ソフトウェア工学の基礎

ソフトウェア工学の基礎

Nathaniel Schutta, Dan Vega

Publisher Resources

ISBN: 9798341627567