YARN-6830 describes a problem where environment variables that contain commas cannot be specified via -Dmapreduce.map.env.
will set MOUNTS to /tmp/foo
In that Jira, Allen Wittenauer suggested that we change the API to provide a way to specify environment variables individually, the same way that Spark does.
Rather than fight with a regex why not redefine the API instead?
e.g, mapreduce.map.env.[foo]=bar gets turned into foo=bar
This greatly simplifies the input validation needed and makes it clear what is actually being defined.
The mapreduce properties were dealt with in
MAPREDUCE-7069. This Jira will address the YARN properties.