0
votes

Having (learning) AWS EMR cluster release emr-5.31.0

trying to copy files from s3 to hdfs, I issued a command on the master node:

s3-dist-cp --src=s3://bigdata-xxxxxxxxx/emrdata/orders.tbl.gz --dest=hdfs:/emrdata/orders.tbl.gz

which actually executes a series of map/reduce jobs, where one of the reduce jobs fails:

20/10/20 17:46:29 INFO mapreduce.Job:  map 100% reduce 50%
20/10/20 17:46:31 INFO mapreduce.Job: Task Id : attempt_1603203512239_0014_r_000005_0, Status : FAILED
Error: java.lang.RuntimeException: Reducer task failed to copy 1 files: s3://bigdata-xxxxxxxxx/emrdata/orders.tbl.gz etc
        at com.amazon.elasticmapreduce.s3distcp.CopyFilesReducer.cleanup(CopyFilesReducer.java:67)
        at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:179)
        at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:635)
        at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:390)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:177)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1893)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:171)

I have a full cli output and the task syslog if it helps.

The file is relatively small archive (400MB)

I'm learning the AWS EMR environment so I may be missing something which may be assumed as granted.

Cluster info:

Applications:Hive 2.3.7, Pig 0.17.0, Hue 4.7.1, Spark 2.4.6, Tez 0.9.2, Flink 1.11.0, ZooKeeper 3.4.14, Oozie 5.2.0

EC2 instance profile:EMR_EC2_DefaultRole
EMR role:EMR_DefaultRole
Auto Scaling role:EMR_AutoScaling_DefaultRole

I'm unable to identify any root cause of the issue or what to do about it.

1

1 Answers

0
votes

I got it working. The proper way of using s3-dist-cp is using buckets and the srcPattern parameter.

s3-dist-cp --src=s3://bigdata-xxxxxxxxx/emrdata/ --dest=hdfs:///emrdata/ --srcPattern='orders\.tbl\.gz'