for java program, we can use
java -ea
to enable assertion check. is it available in hadoop command:
hadoop jar some-mapreduce-program.jar org.foo.bar.MainJob ...
is it possible?
Assuming Hadoop 2+, you can set this property in your mapred-site.xml
<property>
<name>mapreduce.map.java.opts</name>
<value>-ea</value>
</property>
Alternatively, you can try exporting it in the client opts:
export HADOOP_CLIENT_OPTS="-ea ${HADOOP_CLIENT_OPTS}"
hadoop jar some-mapreduce-program.jar org.foo.bar.MainJob ...
Note that if you are using a cluster, this variable should be set in all nodes.