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

   Generated-by: Claude Code (Opus 5.5)
   
   JIRA: https://issues.apache.org/jira/browse/YARN-12033
   
   ### Description of PR
   
   When a NodeManager host has no reverse DNS, its NodeId host is a numeric 
IPv6 literal, so `NodeId.toString()` gives `2001:db8:0:0:0:0:0:21:8041`. 
`NodeId.fromString()` split on every colon and rejected that, and also rejected 
`[2001:db8::21]:8041`. This breaks the aggregated log page ("Invalid nodeId"), 
`GET /ws/v1/cluster/nodes/{nodeid}`, `yarn node -status`, `rmadmin 
-updateNodeResource` and MR AM recovery of completed task attempts.
   
   `fromString()` now splits at the last colon. The port is always present, so 
the `toString()` form is unambiguous. A bracketed `[ipv6]:port` host is 
accepted and stored without brackets. A host that is bracketed or contains a 
colon must be an IPv6 literal, so values such as `a:b:8041` or `host:8041:1` 
are still rejected. `toString()` is unchanged, and host names and IPv4 values 
parse as before.
   
   The RM activities REST call splits the node id at the first colon before 
calling `fromString()`; that is not changed here.
   
   ### How was this patch tested?
   
   - `TestNodeId#testFromString` (new): covers host name, IPv4, the IPv6 
`toString()` round trip, `[ipv6]:port`, and invalid inputs. It fails without 
the fix.
   - `TestNodeId` and `TestConverterUtils` pass.
   - Not run on a cluster.
   
   ### For code changes:
   
   - [x] Does the title or this PR starts 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?
   
   🤖 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