0

DynamoDB データベースには、約 35GB (2200 万行) の Web クリック データがあります。キーでデータをうまくプルできます。私は今、Hive を使用してそのデータの集計を計算しようとしていますが、基本的なことでさえ機能させるのに苦労しています。

私の DynamoDB は 40 の読み取りスループットでセットアップされています。私の EMR は m1.small マスターと 3 つの m1.large コアでセットアップされています。私はハイブで次のことをしています:

SET dynamodb.throughput.read.percent=1.0;

CREATE EXTERNAL TABLE AntebellumHive (user_id string, session_time string, page_count string, custom_os string)
STORED BY 'org.apache.hadoop.hive.dynamodb.DynamoDBStorageHandler' 
TBLPROPERTIES ("dynamodb.table.name" = "AntebellumClickstream", 
"dynamodb.column.mapping" = "user_id:user_id,session_time:session_time,page_count:x-page-count,custom_os:x-custom-os"); 

select count(*)
from AntebellumHive
WHERE session_time > "2012/08/14 11:48:00.210 -0400"
  AND session_time < "2012/08/14 12:48:00.210 -0400";

そのため、4 つの列 (user_id キーと session_time 範囲フィールド、およびその他 2 つを含む) をマッピングしています。次に、1時間分のデータの行数を数えようとしていますが、これは数百のオーダーになるはずです。

出力は次のとおりです。

Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
  set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
  set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
  set mapred.reduce.tasks=<number>
Starting Job = job_201212031719_0002, Tracking URL = http://ip-xxxxx.ec2.internal:9100/jobdetails.jsp?jobid=job_201212031719_0002
Kill Command = /home/hadoop/bin/hadoop job  -Dmapred.job.tracker=x.x.x.x:9001 -kill job_201212031719_0002
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1
2012-12-03 19:13:58,988 Stage-1 map = 0%,  reduce = 0%
2012-12-03 19:14:59,415 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:00,423 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:01,435 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:02,441 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:04,227 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:05,233 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:06,255 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:07,263 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:08,269 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:09,275 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:10,290 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec
2012-12-03 19:15:11,296 Stage-1 map = 0%,  reduce = 0%, Cumulative CPU 4.5 sec

(マスクされた IP です。) 1 分ほどごとに、別の 1 秒の CPU 時間が得られますが、20 分以上経っても map% がゼロから増加することはなく、完了することもありません。Dynamo と EMR の両方のモニタリング グラフで、何かが起こっていることを確実に確認できます。

私は何を間違っていますか?ありがとう!

4

1 に答える 1

3

私があなたの投稿を正しく読んでいる場合、あなたは35 GBのデータを持っており、40の読み取りIOPSを使用してデータを読み取ろうとしています。40 IOPSは、スキャンの場合、およそ40KBPSに変換されます。これは、クエリが完了するまでに約254時間かかることを意味します。

1つ以上のマッパーが処理を完了すると、Hiveはクエリのパーセンテージを更新します。作成された各マッパーの実行には非常に長い時間がかかる可能性があるため、Hiveの更新はすぐには表示されません。

マスターノードでHadoopUIにログオンして、Hadoop統計を確認できます。個々のマップタスクのステータスと、読み取られたデータに関するいくつかの統計が表示されます。ドキュメントを参照してください:

http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/emr-web-interfaces.html http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/UsingtheHadoopUserInterface.html

于 2012-12-04T01:25:13.087 に答える