JeetKunDoug commented on code in PR #51:
URL: https://github.com/apache/cassandra-sidecar/pull/51#discussion_r1280647715


##########
common/src/main/java/org/apache/cassandra/sidecar/cluster/InstancesConfigImpl.java:
##########
@@ -75,7 +77,18 @@ public InstanceMetadata instanceFromHost(String host) throws 
NoSuchElementExcept
         InstanceMetadata instanceMetadata = hostToInstanceMetadata.get(host);
         if (instanceMetadata == null)
         {
-            throw new NoSuchElementException("Instance with host address " + 
host + " not found");
+            try
+            {
+                instanceMetadata = 
hostToInstanceMetadata.get(InetAddress.getByName(host).getHostAddress());
+            }
+            catch (UnknownHostException e)
+            {
+                throw new RuntimeException(e);
+            }

Review Comment:
   Done



-- 
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]

Reply via email to