smiklosovic commented on code in PR #2988:
URL: https://github.com/apache/cassandra/pull/2988#discussion_r1466187911


##########
src/java/org/apache/cassandra/locator/AbstractCloudMetadataServiceConnector.java:
##########
@@ -18,122 +18,30 @@
 
 package org.apache.cassandra.locator;
 
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Map;
-
-import com.google.common.collect.ImmutableMap;
-
-import org.apache.cassandra.config.CassandraRelevantProperties;
-import org.apache.cassandra.config.DurationSpec;
-import org.apache.cassandra.exceptions.ConfigurationException;
-
 import static java.lang.String.format;
-import static java.nio.charset.StandardCharsets.UTF_8;
 
-abstract class AbstractCloudMetadataServiceConnector
+abstract class AbstractCloudMetadataServiceConnector extends 
HttpServiceConnector

Review Comment:
   The reason why I chose this approach is that 
`AbstractCloudMetadataServiceConnector` is meant to be used for _clouds_ in 
connection with snitches. That means that it has properties like `metadata_url` 
and `metadata_request_timeout` to reflect the fact that we are querying some 
_metadata service_ as all these clouds have them.
   
   On the other hand, I am not sure if we are going to use same terminology for 
seed providers. We could. Currently there is `seeds_url` instead of 
`metadata_url` as I just think it reads better.
   
   If we decide that using `metadata_*`  terminology is OK for seed providers 
too, I can just reuse AbstractCloudMetadataServiceConnector in seed providers 
and get rid of `HttpServiceConnector`.
   
   We would also need to change the error messages a little bit to get rid of 
mentions about snitches to have it snitch/seed agnostic.



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