0

The Hadoop documentation states it's possible to make files available locally by use of the -file option.

How can I do this using the Elastic MapReduce Ruby CLI?

4

1 に答える 1

0

DistributedCacheこれを行うには、EMR を使用できます。

Ruby クライアントでは、これは次のオプションで実行できます。

`--cache <path_to_file_being_cached#name_in_current_working_dir>`

単一のファイルをDistributedCache. アプリケーションの現在の作業ディレクトリで参照されているファイルの場所 (s3n または hdfs) の後にその名前を指定し、ファイルをmapred.local.dir(私が思うに) で識別されるディレクトリのタスク ノードにローカルに配置します。

Mapper/Reducerタスク内のファイルに簡単にアクセスできます。通常のファイルと同じように直接アクセスできると思いますが、タスクDistributedCache.getLocalCacheFiles(job);のメソッドのようなことをしなければならない場合があります。setup

Amazon のフォーラムから取った Ruby クライアントでこれを行う例:

./elastic-mapreduce --create --stream --input s3n://your_bucket/wordcount/input --output s3n://your_bucket/wordcount/output --mapper s3n://your_bucket/wordcount/wordSplitter.py --reducer aggregate --cache s3n://your_bucket/wordcount/stop-word-list#stop-word-list
于 2013-01-18T00:17:59.163 に答える