[email protected] has uploaded this change for review. ( 
https://gerrit.cloudera.org/25604


Change subject: IMPALA-15881: Parse IPv6 addresses in BlockReplica.parseLocation
......................................................................

IMPALA-15881: Parse IPv6 addresses in BlockReplica.parseLocation

HDFS reports block replica locations as "host:port". When DataNodes
register with the NameNode over IPv6, BlockLocation#getNames() returns
names like "2620:13d:1:11:0:0:0:41:9866". BlockReplica.parseLocation()
split the location on every ':' and returned null unless there were
exactly two parts, so every such replica parsed to null.
FileBlock.createFbFileBlock() then passed the null to
ListMap.getOrAddIndex(), which failed with a NullPointerException, and
catalogd could not load the table.

This patch takes the port after the last ':' and strips optional
brackets around the host, so "10.0.0.1:9866",
"2620:13d:1:11:0:0:0:41:9866" and "[::1]:9866" all parse. Malformed
locations still return null.

Testing:
- Added BlockReplicaTest for IPv4, IPv6 and bracketed IPv6 locations
  and for malformed input. The test fails without the fix.
- Loaded tables and ran queries on a cluster where DataNodes register
  over IPv6.

Change-Id: Ie13e2a85298fcafe61d1a0a7085b0d0bd7ca71e0
Assisted-by: Claude Opus 5.5 (Claude Code)
---
M fe/src/main/java/org/apache/impala/catalog/BlockReplica.java
A fe/src/test/java/org/apache/impala/catalog/BlockReplicaTest.java
2 files changed, 51 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/04/25604/1
-- 
To view, visit https://gerrit.cloudera.org/25604
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie13e2a85298fcafe61d1a0a7085b0d0bd7ca71e0
Gerrit-Change-Number: 25604
Gerrit-PatchSet: 1
Gerrit-Owner: Anonymous Coward <[email protected]>

Reply via email to