hadoop/hadoop-common-project
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
..
hadoop-annotations HADOOP-17947. Additional element types for VisibleForTesting (ADDENDUM) (#3521) 2021-10-06 02:17:05 +09:00
hadoop-auth HDFS-16591. Setup JaasConfiguration in ZKCuratorManager when SASL is enabled 2022-06-28 16:44:02 -07:00
hadoop-auth-examples HADOOP-18120. Hadoop auth does not handle HTTP Headers in a case-insensitive way. Contributed by Janos Makai. 2022-05-20 10:43:19 +02:00
hadoop-common HADOOP-18365. Update the remote address when a change is detected (#4692) 2022-08-18 09:21:23 -07:00
hadoop-kms HADOOP-18266. Using HashSet/ TreeSet Constructor for hadoop-common (#4365) 2022-06-20 12:11:04 +05:30
hadoop-minikdc HADOOP-16870. Use spotbugs-maven-plugin instead of findbugs-maven-plugin (#2753) 2021-03-11 10:56:07 +09:00
hadoop-nfs HADOOP-18271.Remove unused Imports in Hadoop Common project (#4392) 2022-06-23 12:30:28 +05:30
hadoop-registry HDFS-16591. Setup JaasConfiguration in ZKCuratorManager when SASL is enabled 2022-06-28 16:44:02 -07:00
pom.xml HADOOP-11867. Add a high-performance vectored read API. (#3904) 2022-06-22 17:29:32 +01:00