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 スパーク定義ガイド

第3章. Sparkのツールセットのツアー

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

第2章では、 、Sparkの構造化APIの文脈で、変換やアクションのようなSparkの中核概念を紹介した。これらの単純な概念的構成要素は、Apache Sparkの膨大なツールやライブラリのエコシステムの基盤となっている(図3-1)。Sparkはこれらのプリミティブ(低レベルAPIと構造化API)、そして追加機能のための一連の標準ライブラリで構成されている。

image
図3-1. Sparkのツールセット

Sparkのライブラリは、グラフ解析やマシン学習から、ストリーミングや多くのコンピューティングシステムやストレージシステムとの統合まで、様々なタスクをサポートしている。この章では、まだ取り上げていないAPIや主要なライブラリのいくつかを含め、Sparkが提供するものの多くを一気に紹介する。各セクションについては、本書の他の部分でより詳細な情報を発見できるだろう。ここでの目的は、何が可能かの概要を提供することである。

この章では、以下のことを取り上げる:

  • 本番アプリケーションをspark-submit

  • データセット:構造化データのタイプセーフAPI

  • 構造化ストリーミング

  • マシンラーニングと高度なアナリティクス

  • レジリエンス分散データセット(RDD):Sparkの低レベルAPI

  • スパークR

  • サードパーティーのパッケージ・エコシステム

ツアーに参加した後は、本の該当箇所にジャンプして、特定のトピックに関する質問の答えを発見することができる。

プロダクション・アプリケーションの実行

Spark は、ビッグデータ・プログラムの開発と作成を容易にする。Spark はまた、ビルトインのコマンドラインツールであるspark-submit を使って、インタラクティブな探索を本番アプリケーションに簡単に変換することもできる。spark-submit でできることはひとつ、アプリケーションコードをクラスタに送信し、そこで実行するように起動させることだ。送信されたアプリケーションは、終了(タスクの完了)またはエラーが発生するまで実行される。これは、Standalone、Mesos、YARNなど、Sparkがサポートしているすべてのクラスタ・マネージャーで実行できる。

spark-submit には、アプリケーションに必要なリソースや実行方法、コマンドライン引数を指定するためのコントロールがいくつか用意されている。

Sparkがサポートしている言語でアプリケーションを作成し、実行のためにサブミットすることができる。最も単純な例は、ローカルマシン上でアプリケーションを実行することだ。Sparkをダウンロードしたディレクトリで以下のコマンドを実行し、Spark付属のサンプルScalaアプリケーションを実行する:

./bin/spark-submit \
  --class org.apache.spark.examples.SparkPi \
  --master local \
  ./examples/jars/spark-examples_2.11-2.2.0.jar 10
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