Amazon EMR
Developer Guide

JAR Requirements

This documentation is for AMI versions 2.x and 3.x of Amazon EMR. For information about Amazon EMR releases 4.0.0 and above, see the Amazon EMR Release Guide. For information about managing the Amazon EMR service in 4.x releases, see the Amazon EMR Management Guide.

When you launch an Amazon EMR cluster and add steps that and specify a JAR, Amazon EMR starts Hadoop and then executes your JAR using the bin/hadoop jar command.

Your JAR should not exit until your step is complete and then it should have an exit code to indicate successful completion (0). If there isn't an exit code indicating success, Amazon EMR assumes the step failed. Likewise, when your JAR completes, Amazon EMR assumes that all activity related to that step is complete.