前回は、
Web Consoleに接続する
まずはWebブラウザでAWSのWeb Consoleに接続します。AWSの推奨ブラウザはFirefoxです。接続したら、

次に、

ログインしたら、

新しいJob Flowを作成する
次に、


ここではまず、
- 自分で作成したアプリケーションを使用する場合
- →Run your own application
- ためしになにかしらのJobを起動してみたい場合
- →Run a sample applicationを選択します。
サンプルには下記のものがあります。
- Contextual Advertising
(Hive Script) - Word Count
(Streaming) - CloudBurst
(Custom Jar) - CloudFront HTTP LogAnalyzer
(Custom Jar) - Apache Log Reports
(Pig Script)
今回は自分で作成したCustome Jar
最後にJobのタイプを指定します。使用できるJobのタイプには以下のものがあります。
- Hive Program
(Hiveを使ったアプリケーション) - Custome Jar
(Javaで書いたネイティブなアプリケーション) - Streaming
(ストリーミングを使ったアプリケーション) - Pig Program
(pig. apache. を使ったアプリケーション)org/">Pig
continueをクリックすると次の画面が表示されます
Jobのタイプを指定する

Jar LocationにJobを実行するjarファイルが存在するS3のパスを指定します。実際に自分で作成したアプリケーションを実行する場合は、
次に、
- 実行するプログラムのタイプ
(Word Count) - インプットに使用するデータが存在するS3のパス
- 結果を出力するS3のパス
指定が終わったら、
起動したいインスタンスの数を設定する

まず、
- Number of Instances
- →起動したいインスタンスの数
- Type of Instance
- →起動したいインスタンスのタイプ
このあたりは自分で作成したアプリケーションがどのぐらいのパフォーマンスを必要となるのかを計算し、
次にAmazon EC2 Key Pairでキーを指定します。通常ではデフォルトのものでかまいませんが、
最後に、
- Enable DebuggingをYesにする
- →HadoopのログがAmazon S3 Log Pathに指定したS3のパスに保存できるようになります。
- Enable Hadoop DebugginsをYesにする
- →リアルタイムでデバッグの進行状況などが確認できるようになります。こちらを使用するには、
前回説明したAmazon SimpleDBを有効にしておく必要があります。
設定が終わったら、
bootstrapを指定する

ここでは、
今回は使用しませんが、
continueをクリックすると次の画面が表示されます
設定を確認してJobを起動する

最後に、
問題がなければCreate Job Flowを選択してJobを起動してください。Jobを起動すると、

下のJob Flowの画面には、
Jobが完了すると、

そして、
- Jobを起動した時間
(Start Date) - Jobを終了させた時間
(End Date) - どのぐらい処理に時間が掛かったのか
(Elapsed Time)
出力結果はJar Argumentsで指定したS3上のパスに出力されています。
以上で、