Issue #5737 Cassandra Cluster Example Custom Seed Cores on First Node

This commit is contained in:
Mikel Nelson 2015-03-23 13:50:38 -07:00
parent b46276e51b
commit bbca7217b7
2 changed files with 6 additions and 0 deletions

View File

@ -295,10 +295,13 @@ public class KubernetesSeedProvider implements SeedProvider {
ObjectMapper mapper = new ObjectMapper();
Endpoints endpoints = mapper.readValue(url, Endpoints.class);
if (endpoints != null) {
// Here is a problem point, endpoints.endpoints can be null in first node cases.
if (endpoints.endpoints != null){
for (String endpoint : endpoints.endpoints) {
String[] parts = endpoint.split(":");
list.add(InetAddress.getByName(parts[0]));
}
}
}
} catch (IOException ex) {
logger.warn("Request to kubernetes apiserver failed");

View File

@ -70,10 +70,13 @@ public class KubernetesSeedProvider implements SeedProvider {
ObjectMapper mapper = new ObjectMapper();
Endpoints endpoints = mapper.readValue(url, Endpoints.class);
if (endpoints != null) {
// Here is a problem point, endpoints.endpoints can be null in first node cases.
if (endpoints.endpoints != null){
for (String endpoint : endpoints.endpoints) {
String[] parts = endpoint.split(":");
list.add(InetAddress.getByName(parts[0]));
}
}
}
} catch (IOException ex) {
logger.warn("Request to kubernetes apiserver failed");