[java] client update master locations cache

Recently a master in our cluster was down because of network issues and somehow
the server didn't close the connections to some clients. Then these clients
keep trying to connect to the dead master but can't receive response until rpc
timeout, even when this server is up the client still send rpc through the old
channel and can't connect to the server and the new leader master. The only
solution is to restart clients.

This patch fixes the issue that java client can't invalidate stale locations of
the leader master. Maybe in this case we also need a better way to trigger
connection shutdown for an inactive channel.

Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Reviewed-on: http://gerrit.cloudera.org:8080/18703
Tested-by: Alexey Serbin <alexey@apache.org>
Reviewed-by: Alexey Serbin <alexey@apache.org>
4 files changed