in priam/src/main/java/com/netflix/priam/tuner/dse/DseTuner.java [62:85]
private void writeCassandraSnitchProperties() {
final NodeType nodeType = dseConfig.getNodeType();
if (nodeType == NodeType.REAL_TIME_QUERY) return;
Reader reader = null;
try {
String filePath = config.getCassHome() + "/conf/" + RACKDC_PROPERTY_FILENAME;
reader = new FileReader(filePath);
Properties properties = new Properties();
properties.load(reader);
String suffix = "";
if (nodeType == NodeType.SEARCH) suffix = "_solr";
if (nodeType == NodeType.ANALYTIC_HADOOP) suffix = "_hadoop";
if (nodeType == NodeType.ANALYTIC_HADOOP_SPARK) suffix = "_hadoop_spark";
if (nodeType == NodeType.ANALYTIC_SPARK) suffix = "_spark";
properties.put("dc_suffix", suffix);
properties.store(new FileWriter(filePath), "");
} catch (Exception e) {
throw new RuntimeException("Unable to read " + RACKDC_PROPERTY_FILENAME, e);
} finally {
FileUtils.closeQuietly(reader);
}
}