smengcl opened a new pull request, #8959:
URL: https://github.com/apache/hadoop/pull/8959

   Generated-by: Claude Code (Opus 5.5)
   
   JIRA: https://issues.apache.org/jira/browse/MAPREDUCE-7552
   
   ### Description of PR
   
   Map and reduce task JVMs get `-Djava.net.preferIPv4Stack=true` from the 
default of `mapreduce.admin.map.child.java.opts` and 
`mapreduce.admin.reduce.child.java.opts` 
(`MRJobConfig.DEFAULT_MAPRED_ADMIN_JAVA_OPTS`). Unlike daemons, they do not 
take this from `HADOOP_OPTS`, so on an IPv6 cluster the tasks keep IPv4 only 
sockets and fail to connect to IPv6 addresses 
(`java.nio.channels.UnsupportedAddressTypeException`). Both keys are missing 
from `mapred-default.xml`, so operators have no documented way to find this.
   
   The JIRA proposed removing the pin from the default. That would change task 
JVM networking on every existing IPv4 cluster, and daemons still default to 
`-Djava.net.preferIPv4Stack=true` in `hadoop-functions.sh`, so this PR keeps 
the default and documents the override instead:
   
   - Add both keys to `mapred-default.xml` with the current default value 
(unchanged), and explain that an IPv6 cluster has to remove 
`-Djava.net.preferIPv4Stack=true` from them.
   
   A job can also override it by adding `-Djava.net.preferIPv4Stack=false` to 
`mapreduce.map.java.opts` / `mapreduce.reduce.java.opts`, since user opts come 
after admin opts on the command line.
   
   ### How was this patch tested?
   
   - `TestMapReduceChildJVM` (checks the exact task command line, including the 
admin opts) and `TestMapreduceConfigFields` pass with the new 
`mapred-default.xml`, so the value matches the code default exactly.
   - Doc only, no behavior change.
   
   ### For code changes:
   
   - [x] Does the title of this PR start with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: Have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   ### AI Tooling
   
   - [x] The PR includes the phrase "Contains content generated by Claude Code" 
where Claude Code is the name of the AI tool used.
   - [x] My use of AI contributions follows the ASF legal policy 
https://www.apache.org/legal/generative-tooling.html
   
   Contains content generated by Claude Code.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to