The command line used is: ~/apache-cassandra-4.0.1/bin/sstableloader -d 10.14.20.148 -cph 1 -idct 0 -p 9942 -ssp 7011 -sp 7010 --verbose ~/cassandra4_experiment/nishant/employee/
Notice that transport port given is 9942 but I am still seeing that call is made to /10.14.20.148:9042. Any help is appreciated on this.
Cassandra folks changed sstableloader heavily in 4.0.
Currently it parses both -p
and -sp
options (native and storage ports), but doesn't use them as documented and expected.
-p
option) is simply ignored. The way to pass the custom port is -d host1:native_port1,host2:native_port2,...
. So, your command should look likesstableloader -d 10.14.20.148:9942 ...
My guess is that they try to unify the endpoint format across all client tools.
-sp
option) is a longer story.
On startup sstableloader connects to the given Cassandra cluster, takes its broadcast address and storage port and uses them. Only if Cassandra cluster has no broadcast_address
in its configuration file ($CASSANDRA_HOME/conf/cassandra.yaml
), sstableloader defaults to the storage port, passed as an option. See details in CASSANDRA-14522.