private void displayClusterInfo ( ) { Metadata metadata = m_cluster . getMetadata ( ) ; m_logger . info ( "Connected to cluster with topography:" ) ; RoundRobinPolicy policy = new RoundRobinPolicy ( ) ; for ( Host host : metadata . getAllHosts ( ) ) { m_logger . info ( " Host {}: datacenter: {}, rack: {}, distance: {}" , new Object [ ] { host . getAddress ( ) , host . getDatacenter ( ) , host . getRack ( ) , policy . distance ( host ) } ) ; } m_logger . info ( "Database contains {} keyspaces" , metadata . getKeyspaces ( ) . size ( ) ) ; }
Display configuration information for the given cluster .