@ Override public String getTopologyJsonPayload ( Set < Host > activeHosts ) { int count = NUM_RETRIER_ACROSS_NODES ; String response ; Exception lastEx = null ; do { try { response = getTopologyFromRandomNodeWithRetry ( activeHosts ) ; if ( response != null ) { return response ; } } catch ( Exception e ) { lastEx = e ; } finally { count -- ; } } while ( ( count > 0 ) ) ; if ( lastEx != null ) { if ( lastEx instanceof ConnectTimeoutException ) { throw new TimeoutException ( "Unable to obtain topology" , lastEx ) ; } throw new DynoException ( lastEx ) ; } else { throw new DynoException ( "Could not contact dynomite for token map" ) ; } }
Tries to get topology information by randomly trying across nodes .