nvharikrishna commented on code in PR #312:
URL: https://github.com/apache/cassandra-sidecar/pull/312#discussion_r2789860785
##########
server/src/main/java/org/apache/cassandra/sidecar/modules/ConfigurationModule.java:
##########
@@ -240,21 +240,29 @@ private static InstanceMetadata
buildInstanceMetadata(Vertx vertx,
host,
port,
new
InstanceHealthMetrics(instanceSpecificRegistry));
- return InstanceMetadataImpl.builder()
- .id(cassandraInstance.id())
- .host(host, dnsResolver)
- .port(port)
- .storageDir(cassandraInstance.storageDir())
- .dataDirs(cassandraInstance.dataDirs())
- .stagingDir(cassandraInstance.stagingDir())
- .cdcDir(cassandraInstance.cdcDir())
-
.commitlogDir(cassandraInstance.commitlogDir())
- .hintsDir(cassandraInstance.hintsDir())
-
.savedCachesDir(cassandraInstance.savedCachesDir())
-
.localSystemDataFileDir(cassandraInstance.localSystemDataFileDir())
-
.lifecycleOptions(cassandraInstance.lifecycleOptions())
- .delegate(delegate)
- .metricRegistry(instanceSpecificRegistry)
- .build();
+ InstanceMetadataImpl.Builder builder = InstanceMetadataImpl.builder()
+
.id(cassandraInstance.id())
+
.host(host, dnsResolver)
+
.port(port);
+
+ // Only set storagePort if explicitly configured, otherwise use
builder default
+ Integer configuredStoragePort = cassandraInstance.storagePort();
+ if (configuredStoragePort != null)
+ {
+ builder.storagePort(configuredStoragePort);
+ }
Review Comment:
Right, not applicable as storagePort is a primitive now. Pushed the changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]