LoginSignup
16
16

More than 5 years have passed since last update.

Apache Spark ドキュメント和訳 - Cluster Mode Overview

Last updated at Posted at 2014-06-10

Apache Sparkプロジェクトの以下のデプロイメントオーバービューの日本語訳です。
http://spark.apache.org/docs/latest/cluster-overview.html

翻訳におかしたところがありましたらコメントにてご指摘ください。

Quick StartとEC2導入の和訳も下記で投稿しているので会わせてご覧ください。

Cluster Mode Overview (クラスタモード オーバービュー)

This document gives a short overview of how Spark runs on clusters, to make it easier to understand the components involved. Read through the application submission guide to submit applications to a cluster.

このドキュメントはSparkがクラスタ上でどのように動作するか、複雑なコンポーネントを簡単に理解するための簡単なオーバービューです。
アプリケーションをクラスタにどのように配備するかをアプリケーションサブミッションガイドに目を通してください。

Components (コンポーネント)

Spark applications run as independent sets of processes on a cluster, coordinated by the SparkContext object in your main program (called the driver program).

Sparkアプリケーションは、あなたのアプリケーションメインプログラム(ドライバープログラムといいます)のSparkContextオブジェクトによって協調して一つのクラスタ上で独立したプロセスのセットとして動作します。

Specifically, to run on a cluster, the SparkContext can connect to several types of cluster managers (either Spark’s own standalone cluster manager or Mesos/YARN), which allocate resources across applications.

特に、一つのクラスタで動作させるためにSparkContextはいくつかのタイプのクラスタマネージャー(Sparkの独自スタンドアロンクラスタマネージャーやMesos/YARN)に接続し、アプリケーションにまたがってリソースを割り当てます。

Once connected, Spark acquires executors on nodes in the cluster, which are processes that run computations and store data for your application. Next, it sends your application code (defined by JAR or Python files passed to SparkContext) to the executors. Finally, SparkContext sends tasks for the executors to run.

一度接続されるとSparkはexecuterosをクラスタのノード群上に取得し、それらがあなたのアプリケーションの為に計算を実行し、データをストアします。
次にあなたのアプリケーションコード(SparkContextに渡されたJARやPythonファイル)がexecutorsに送られます。
さいごにSparkContextはexecutorsの実行タスクを送信します。

There are several useful things to note about this architecture:

アーキテクチャについていくつかの有用なことがあります。

  1. Each application gets its own executor processes, which stay up for the duration of the whole application and run tasks in multiple threads. This has the benefit of isolating applications from each other, on both the scheduling side (each driver schedules its own tasks) and executor side (tasks from different applications run in different JVMs). However, it also means that data cannot be shared across different Spark applications (instances of SparkContext) without writing it to an external storage system.

それぞれのアプリケーションは、全てのアプリケーションがタスクを実行する全てのスレッドが実行される間、独自のexecutorプロセス群を取得します。
これはアプリケーションをそれぞれ個別に分離する上で、スケジューリング面(それぞれのドライバーは独自にタスクをスケジュールします)、executor面(違うアプリケーションからのタスクは違うJVM上で実行)ともに非常に有益です。
しかし、これはデータを外部ストレージシステムを利用しなければ、異なるSparkアプリケーション(SparkContextインスタンス)でシェアできないことを意味します。

  1. Spark is agnostic to the underlying cluster manager. As long as it can acquire executor processes, and these communicate with each other, it is relatively easy to run it even on a cluster manager that also supports other applications (e.g. Mesos/YARN).

Sparkはクラスタマネージャーに強く関係しません。executorプロセス群を要求し、相互に通信する間ずっと、Sparkは比較的簡単に実他のアプリケーションをサポートしているクラスタマネージャ上で動作します。

  1. Because the driver schedules tasks on the cluster, it should be run close to the worker nodes, preferably on the same local area network. If you’d like to send requests to the cluster remotely, it’s better to open an RPC to the driver and have it submit operations from nearby than to run a driver far away from the worker nodes.

ドライバはクラスタ上でタスクをスケジュールするので、ワーカーノード群の近くで実行するべきです, むしろ同じローカルエリアネットワーク内で。
もしあなたがリモートでリクエストを送信したいなら、RPCを利用してアプリケーションのサブミットオペレーションをおこなって近くで実行する方が、ワーカーノード群の遠くから実行するより良いでしょう。

16
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
16