hadoop/hadoop-common-project/hadoop-common/src
Steve Vaughan b7d4dc61bf
HADOOP-18365. Update the remote address when a change is detected (#4692)
Avoid reconnecting to the old address after detecting that the address has been updated.

* Fix Checkstyle line length violation
* Keep ConnectionId as Immutable for map key

The ConnectionId is used as a key in the connections map, and updating the remoteId caused problems with the cleanup of connections when the removeMethod was used.

Instead of updating the address within the remoteId, use the removeMethod to cleanup references to the current identifier and then replace it with a new identifier using the updated address.

* Use final to protect immutable ConnectionId

Mark non-test fields as private and final, and add a missing accessor.

* Use a stable hashCode to allow safe IP addr changes
* Add test that updated address is used

Once the address has been updated, it should be used in future calls.  Check to ensure that a second request succeeds and that it uses the existing updated address instead of having to re-resolve.

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: sokui
Signed-off-by: XanderZu
Signed-off-by: stack <stack@apache.org>
2022-08-18 09:21:23 -07:00
..
contrib/bash-tab-completion
main HADOOP-18365. Update the remote address when a change is detected (#4692) 2022-08-18 09:21:23 -07:00
site HADOOP-18305. Release Hadoop 3.3.4: upstream changelog and jdiff files 2022-08-05 14:06:22 +01:00
test HADOOP-18365. Update the remote address when a change is detected (#4692) 2022-08-18 09:21:23 -07:00
CMakeLists.txt HADOOP-17292. Using lz4-java in Lz4Codec (#2350) 2020-11-18 12:03:25 -08:00
config.h.cmake HDFS-14356. Implement HDFS cache on SCM with native PMDK libs. Contributed by Feilong He. 2019-06-05 21:33:00 +08:00