@@ -611,6 +611,17 @@ private static void updateInfo(
611
611
InetAddress nativeAddress = row .getInet ("native_address" );
612
612
int nativePort = row .getInt ("native_port" );
613
613
broadcastRpcAddress = new InetSocketAddress (nativeAddress , nativePort );
614
+ } else if (row .getColumnDefinitions ().contains ("native_transport_address" )) {
615
+ // DSE 6.8 introduced native_transport_address and native_transport_port for the
616
+ // listen address. Also included is native_transport_port_ssl (in case users
617
+ // want to setup a different port for SSL and non-SSL conns).
618
+ InetAddress nativeAddress = row .getInet ("native_transport_address" );
619
+ int nativePort = row .getInt ("native_transport_port" );
620
+ if (cluster .getCluster ().getConfiguration ().getProtocolOptions ().getSSLOptions () != null
621
+ && !row .isNull ("native_transport_port_ssl" )) {
622
+ nativePort = row .getInt ("native_transport_port_ssl" );
623
+ }
624
+ broadcastRpcAddress = new InetSocketAddress (nativeAddress , nativePort );
614
625
} else if (row .getColumnDefinitions ().contains ("rpc_address" )) {
615
626
InetAddress rpcAddress = row .getInet ("rpc_address" );
616
627
broadcastRpcAddress = new InetSocketAddress (rpcAddress , cluster .connectionFactory .getPort ());
@@ -831,6 +842,14 @@ private void refreshNodeListAndTokenMap(
831
842
InetAddress nativeAddress = row .getInet ("native_address" );
832
843
int nativePort = row .getInt ("native_port" );
833
844
broadcastRpcAddress = new InetSocketAddress (nativeAddress , nativePort );
845
+ } else if (row .getColumnDefinitions ().contains ("native_transport_address" )) {
846
+ InetAddress nativeAddress = row .getInet ("native_transport_address" );
847
+ int nativePort = row .getInt ("native_transport_port" );
848
+ if (cluster .getCluster ().getConfiguration ().getProtocolOptions ().getSSLOptions () != null
849
+ && !row .isNull ("native_transport_port_ssl" )) {
850
+ nativePort = row .getInt ("native_transport_port_ssl" );
851
+ }
852
+ broadcastRpcAddress = new InetSocketAddress (nativeAddress , nativePort );
834
853
} else {
835
854
InetAddress rpcAddress = row .getInet ("rpc_address" );
836
855
broadcastRpcAddress =
@@ -956,7 +975,11 @@ private boolean isValidPeer(Row peerRow, boolean logIfInvalid) {
956
975
&& !peerRow .isNull ("native_port" );
957
976
} else {
958
977
isValid &=
959
- peerRow .getColumnDefinitions ().contains ("rpc_address" ) && !peerRow .isNull ("rpc_address" );
978
+ (peerRow .getColumnDefinitions ().contains ("rpc_address" ) && !peerRow .isNull ("rpc_address" ))
979
+ || (peerRow .getColumnDefinitions ().contains ("native_transport_address" )
980
+ && peerRow .getColumnDefinitions ().contains ("native_transport_port" )
981
+ && !peerRow .isNull ("native_transport_address" )
982
+ && !peerRow .isNull ("native_transport_port" ));
960
983
}
961
984
962
985
if (EXTENDED_PEER_CHECK ) {
@@ -984,6 +1007,9 @@ private String formatInvalidPeer(Row peerRow) {
984
1007
formatMissingOrNullColumn (peerRow , "native_address" , sb );
985
1008
formatMissingOrNullColumn (peerRow , "native_port" , sb );
986
1009
} else {
1010
+ formatMissingOrNullColumn (peerRow , "native_transport_address" , sb );
1011
+ formatMissingOrNullColumn (peerRow , "native_transport_port" , sb );
1012
+ formatMissingOrNullColumn (peerRow , "native_transport_port_ssl" , sb );
987
1013
formatMissingOrNullColumn (peerRow , "rpc_address" , sb );
988
1014
}
989
1015
if (EXTENDED_PEER_CHECK ) {
0 commit comments