The Transport client comes with a cluster sniffing feature which allows it to dynamically add new hosts and remove old ones. When sniffing is enabled, the transport client will connect to the nodes in its internal node list, which is built via calls to addTransportAddress.
You can use TransportClient#removeTransportAddress(TransportAddress)but note that addresses that you provide to the transport client are only used for the initial connection. Internally, the transport client will notice when the cluster changes (due to the sniffing feature) so there should be no real need to remove a transport address even on cluster changes.
I see but why do you want to remove a transport address then? As your original question here is answered (how to remove a transport address?), I'd say let's move the discussion to the other question.
Doesn't cause this manual work? I'd rather suggest instead the solution from the other question you've raised. As I said, the question on how to remove a transport address from the transport client is answered, so I'd say we should keep the discussion in the other thread.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.